<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://halfface.se/wiki/index.php?action=history&amp;feed=atom&amp;title=Vim</id>
	<title>Vim - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://halfface.se/wiki/index.php?action=history&amp;feed=atom&amp;title=Vim"/>
	<link rel="alternate" type="text/html" href="https://halfface.se/wiki/index.php?title=Vim&amp;action=history"/>
	<updated>2026-04-19T07:28:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://halfface.se/wiki/index.php?title=Vim&amp;diff=16564&amp;oldid=prev</id>
		<title>Ekaanbj: /* delete  words */</title>
		<link rel="alternate" type="text/html" href="https://halfface.se/wiki/index.php?title=Vim&amp;diff=16564&amp;oldid=prev"/>
		<updated>2026-02-25T15:17:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;delete  words&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:17, 25 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l149&quot;&gt;Line 149:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 149:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;dW  delete until space delimiter&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;dW  delete until space delimiter&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;df space  deletes from the cursor position to, and including, the next space.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;df space  deletes from the cursor position to, and including, the next space.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==View tabs in better format==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; :set vartabstop=100,20,20,20,20,20,30,40,40,40&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-15784:rev-16564:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Ekaanbj</name></author>
	</entry>
	<entry>
		<id>https://halfface.se/wiki/index.php?title=Vim&amp;diff=15784&amp;oldid=prev</id>
		<title>Ekaanbj: /* Search for multiple words */</title>
		<link rel="alternate" type="text/html" href="https://halfface.se/wiki/index.php?title=Vim&amp;diff=15784&amp;oldid=prev"/>
		<updated>2024-10-22T11:31:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Search for multiple words&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Useful commands.&lt;br /&gt;
&lt;br /&gt;
=registries=&lt;br /&gt;
List registers.&lt;br /&gt;
 :reg&lt;br /&gt;
Paste register 5&lt;br /&gt;
 &amp;quot;5p&lt;br /&gt;
==spell check==&lt;br /&gt;
Enable spell check. Suggestions. Move between words. Stop spell check.&lt;br /&gt;
 :set spell spelllang=en,sv&lt;br /&gt;
 z=&lt;br /&gt;
 ]s and [s&lt;br /&gt;
 :set nospell&lt;br /&gt;
&lt;br /&gt;
==Switch to last file==&lt;br /&gt;
 :e#&lt;br /&gt;
&lt;br /&gt;
==vim shortcuts==&lt;br /&gt;
 Shortcut      Description                                               &lt;br /&gt;
 ESC           Switch to command mode.                                   &lt;br /&gt;
 i             Insert before cursor.                                     &lt;br /&gt;
 a             Insert after cursor.                                      &lt;br /&gt;
 I             Insert at the beginning of line.                          &lt;br /&gt;
 A             Insert at the end of line.                                &lt;br /&gt;
 C             Change text to the end of line (equivalent to c$).        &lt;br /&gt;
 cc or S       Change current line (equivalent to 0c$).                  &lt;br /&gt;
 s             Delete a single character under the cursor and enter input&lt;br /&gt;
 r             Replaces a single character under the cursor (without leaving command mode).                                    &lt;br /&gt;
 R             Replaces characters under cursor.                         &lt;br /&gt;
 v             Edit (and execute) the current command in the text editor.&lt;br /&gt;
 h             Move one character right.                                 &lt;br /&gt;
 l             Move one character left.                                  &lt;br /&gt;
 w             Move one word or token right.                             &lt;br /&gt;
 b             Move one word or token left.                              &lt;br /&gt;
 W             Move one non-blank word right.                            &lt;br /&gt;
 B             Move one non-blank word left.                             &lt;br /&gt;
 e             Move to the end of the current word.                      &lt;br /&gt;
 E             Move to the end of the current non-blank word.            &lt;br /&gt;
 0             Move to the beginning of line                             &lt;br /&gt;
 ^             Move to the first non-blank character of line.            &lt;br /&gt;
 $             Move to the end of line.                                  &lt;br /&gt;
 %             Move to the corresponding opening/closing bracket.        &lt;br /&gt;
 fc            Move right to the next occurance of char c.               &lt;br /&gt;
 Fc            Move left to the previous occurance of c.                 &lt;br /&gt;
 tc            Move right to the next occurance of c, then one char backward.                                                 &lt;br /&gt;
 Tc            Move left to the previous occurance of c, then one char forward.                                                  &lt;br /&gt;
 ;             Redo the last character finding command.                  &lt;br /&gt;
 ,             Redo the last character finding command in opposite direction.                                                &lt;br /&gt;
 |             Move to the n-th column (you may specify the argument n by typing it on number keys, for example, 20|)               &lt;br /&gt;
 x             Delete a single character under the cursor.               &lt;br /&gt;
 X             Delete a character before the cursor.                     &lt;br /&gt;
 d&amp;lt;mov. comm&amp;gt;  Delete text of a movement command &amp;lt;mov. comm&amp;gt; (see above).&lt;br /&gt;
 D             Delete to the end of the line (equivalent to d$).         &lt;br /&gt;
 dd            Delete current line (equivalent to 0d$).                  &lt;br /&gt;
 CTRL-w        Delete the previous word.                                 &lt;br /&gt;
 CTRL-u        Delete from the cursor to the beginning of line.          &lt;br /&gt;
 u             Undo previous text modification.                          &lt;br /&gt;
 CTRL-r        Undo, undo&lt;br /&gt;
 U             Undo all previous text modifications.                     &lt;br /&gt;
 .             Redo the last text modification.                          &lt;br /&gt;
 y&amp;lt;mov. comm&amp;gt;  Yank a movement into buffer (copy).                       &lt;br /&gt;
 yy            Yank the whole line.                                      &lt;br /&gt;
 p             Insert the yanked text at the cursor.                     &lt;br /&gt;
 P             Insert the yanked text before the cursor.                 &lt;br /&gt;
 k             Insert the yanked text before the cursor.                 &lt;br /&gt;
 j             Insert the yanked text before the cursor.                 &lt;br /&gt;
 G             Insert the yanked text before the cursor.                 &lt;br /&gt;
 /string or    Search history backward for a command matching string.    &lt;br /&gt;
 CTRL-r                                                                  &lt;br /&gt;
 ?string or    Search history forward for a command matching string.     &lt;br /&gt;
 CTRL-s        (Note that on most machines Ctrl-s STOPS the terminal     &lt;br /&gt;
               output, change it with `stty&amp;#039; (Ctrl-q to resume)).        &lt;br /&gt;
 n             Repeat search in the same direction as previous.          &lt;br /&gt;
 N             Repeat search in the opposite direction as previous.      &lt;br /&gt;
 TAB or = or   List all possible completions.                            &lt;br /&gt;
 CTRL-i                                                                  &lt;br /&gt;
 *             Insert all possible completions.                          &lt;br /&gt;
 ~            | Invert case of the character under cursor and move a character right.&lt;br /&gt;
&lt;br /&gt;
==yank buffers==&lt;br /&gt;
Copy data to different buffers.&lt;br /&gt;
 vi /etc/{passwd,group,shadow} /tmp/newfile&lt;br /&gt;
 &amp;quot;a2yy       # Yank two lines to yank buffer a.&lt;br /&gt;
 :n          # Go to next file.&lt;br /&gt;
 &amp;quot;b2yy&lt;br /&gt;
 :n&lt;br /&gt;
 #c2yy&lt;br /&gt;
 :n&lt;br /&gt;
 &amp;quot;ap         # paste yank buffer a. &lt;br /&gt;
 &amp;quot;bp&lt;br /&gt;
 &amp;quot;cp&lt;br /&gt;
&lt;br /&gt;
Delete lines and add to a buffer.&lt;br /&gt;
 vi /tmp/tmp1 /tmp/tmp2&lt;br /&gt;
 &amp;quot;add         # Delete some lines and add to buffer a.&lt;br /&gt;
 &amp;quot;Add        # Go to next lines and add lines to buffer a.&lt;br /&gt;
 :wn&lt;br /&gt;
 &amp;quot;ap         # Paste buffer.&lt;br /&gt;
&lt;br /&gt;
Deleted lines atomically get numbered buffers.&lt;br /&gt;
 &amp;quot;2p         # Get back the deletion you did before this one.&lt;br /&gt;
==filter==&lt;br /&gt;
Sort part of file.&lt;br /&gt;
 :96,99!sort # will pass lines 96 through 99 through the sort filter and replace those lines with the output of sort.&lt;br /&gt;
==sort visual selection==&lt;br /&gt;
Mark text and verify the following command is executed.&lt;br /&gt;
 :&amp;#039;&amp;lt;,&amp;#039;&amp;gt;sort /\ze\%V/&lt;br /&gt;
&lt;br /&gt;
==run command==&lt;br /&gt;
 :!date&lt;br /&gt;
==Add output of command==&lt;br /&gt;
 :r !date&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications]]&lt;br /&gt;
&lt;br /&gt;
==Do something on startup==&lt;br /&gt;
edit file start cursor at first occurance of pts/4&lt;br /&gt;
 vim /tmp/forest -c &amp;quot;/pts\/4&amp;quot;&lt;br /&gt;
==save file as root==&lt;br /&gt;
 :w !sudo tee %&lt;br /&gt;
==search and replace==&lt;br /&gt;
 :%s/foo/bar/gc&lt;br /&gt;
==indent lines==&lt;br /&gt;
mark lines with V&lt;br /&gt;
 &amp;gt; To indent lines&lt;br /&gt;
If you want to indent by two spaces.&lt;br /&gt;
 :set shiftwidth=2&lt;br /&gt;
==vim diff==&lt;br /&gt;
 vim -d passwd1 passwd2&lt;br /&gt;
==vim with many windows==&lt;br /&gt;
New window&lt;br /&gt;
 CTRL + w&lt;br /&gt;
move between windows. &lt;br /&gt;
 CTRL + w + -&amp;gt; or &amp;lt;- ...&lt;br /&gt;
==open two files side by side==&lt;br /&gt;
 vim -O /file1 /file2&lt;br /&gt;
==Search for multiple words==&lt;br /&gt;
 /\(WORD1\|Word2\)&lt;br /&gt;
==search for empty lines where next line does not start with *==&lt;br /&gt;
 /^$ \n\(^\*\)\@!&lt;br /&gt;
&lt;br /&gt;
==stop searching==&lt;br /&gt;
 :noh&lt;br /&gt;
==disable colours==&lt;br /&gt;
 syntax off&lt;br /&gt;
&lt;br /&gt;
==delete  words==&lt;br /&gt;
dw  delete until deimiter.&lt;br /&gt;
dW  delete until space delimiter&lt;br /&gt;
df space  deletes from the cursor position to, and including, the next space.&lt;/div&gt;</summary>
		<author><name>Ekaanbj</name></author>
	</entry>
</feed>