Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > b38d2da330d1936e5ab1307c039c4941 > files > 331

octave-doc-3.6.4-3.mga4.noarch.rpm

<html lang="en">
<head>
<title>Killing and Yanking - GNU Octave</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Octave">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Command-Line-Editing.html#Command-Line-Editing" title="Command Line Editing">
<link rel="prev" href="Cursor-Motion.html#Cursor-Motion" title="Cursor Motion">
<link rel="next" href="Commands-For-Text.html#Commands-For-Text" title="Commands For Text">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Killing-and-Yanking"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Commands-For-Text.html#Commands-For-Text">Commands For Text</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Cursor-Motion.html#Cursor-Motion">Cursor Motion</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Command-Line-Editing.html#Command-Line-Editing">Command Line Editing</a>
<hr>
</div>

<h4 class="subsection">2.4.2 Killing and Yanking</h4>

<p><dfn>Killing</dfn> text means to delete the text from the line, but to save
it away for later use, usually by <dfn>yanking</dfn> it back into the line. 
If the description for a command says that it `kills' text, then you can
be sure that you can get the text back in a different (or the same)
place later.

   <p>Here is the list of commands for killing text.

     <dl>
<dt><kbd>C-k</kbd><dd>Kill the text from the current cursor position to the end of the line.

     <br><dt><kbd>M-d</kbd><dd>Kill from the cursor to the end of the current word, or if between
words, to the end of the next word.

     <br><dt><kbd>M-&lt;DEL&gt;</kbd><dd>Kill from the cursor to the start of the previous word, or if between
words, to the start of the previous word.

     <br><dt><kbd>C-w</kbd><dd>Kill from the cursor to the previous whitespace.  This is different than
<kbd>M-&lt;DEL&gt;</kbd> because the word boundaries differ. 
</dl>

   <p>And, here is how to <dfn>yank</dfn> the text back into the line.  Yanking
means to copy the most-recently-killed text from the kill buffer.

     <dl>
<dt><kbd>C-y</kbd><dd>Yank the most recently killed text back into the buffer at the cursor.

     <br><dt><kbd>M-y</kbd><dd>Rotate the kill-ring, and yank the new top.  You can only do this if
the prior command is <kbd>C-y</kbd> or <kbd>M-y</kbd>. 
</dl>

   <p>When you use a kill command, the text is saved in a <dfn>kill-ring</dfn>. 
Any number of consecutive kills save all of the killed text together, so
that when you yank it back, you get it in one clean sweep.  The kill
ring is not line specific; the text that you killed on a previously
typed line is available to be yanked back later, when you are typing
another line.

   </body></html>