<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Vim%2FNotes</id>
	<title>Vim/Notes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Vim%2FNotes"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Vim/Notes&amp;action=history"/>
	<updated>2026-06-19T20:50:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Vim/Notes&amp;diff=2467&amp;oldid=prev</id>
		<title>Admin at 16:44, 28 May 2011</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Vim/Notes&amp;diff=2467&amp;oldid=prev"/>
		<updated>2011-05-28T16:44:11Z</updated>

		<summary type="html">&lt;p&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&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 16:44, 28 May 2011&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-l195&quot;&gt;Line 195:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 195:&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;br/&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;br/&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;&amp;lt;/pre&amp;gt;&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;&amp;lt;/pre&amp;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;&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;&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;&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;[[Category:Vim]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Vim/Notes&amp;diff=2254&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;pre&gt; command line syntax --------------------  -o[num] start vim with num open windows (default is to open 1 window for each file)  -n no swap file, edit files in memory  -s scr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Vim/Notes&amp;diff=2254&amp;oldid=prev"/>
		<updated>2011-05-20T21:16:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; command line syntax --------------------  -o[num] start vim with num open windows (default is to open 1 window for each file)  -n no swap file, edit files in memory  -s scr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
command line syntax&lt;br /&gt;
--------------------&lt;br /&gt;
&lt;br /&gt;
-o[num]&lt;br /&gt;
start vim with num open windows (default is to open 1 window for each file)&lt;br /&gt;
&lt;br /&gt;
-n&lt;br /&gt;
no swap file, edit files in memory&lt;br /&gt;
&lt;br /&gt;
-s scriptfile&lt;br /&gt;
execute commands given in scriptfile as though they were typed from keyboard&lt;br /&gt;
&lt;br /&gt;
-t tag&lt;br /&gt;
edit file contaning tag and position cursor at its definition (see ctags note)&lt;br /&gt;
&lt;br /&gt;
-y&lt;br /&gt;
modeless vi, run in insert mode only w/o command mode&lt;br /&gt;
&lt;br /&gt;
NOTE ON CTAGS:&lt;br /&gt;
&lt;br /&gt;
ctags [options] files&lt;br /&gt;
&lt;br /&gt;
create list of function and macro names defined in the specified C, pascal, fortran, yacc, lex (c++, java, perl, python, flex, bison if exuberant ctags) source &amp;quot;files&amp;quot;&lt;br /&gt;
output list (named tags by default) contains lines of form:&lt;br /&gt;
name   file   context&lt;br /&gt;
where name is functi onor macro name&lt;br /&gt;
file is source file in which name is defined&lt;br /&gt;
context is search pattern that shows line of code containing nae&lt;br /&gt;
&lt;br /&gt;
after list of tags created, you can invoke vi on any file and type&lt;br /&gt;
:set tags=tagfile&lt;br /&gt;
:tag name&lt;br /&gt;
&lt;br /&gt;
this switches vi editor to source file associated wit hthe &amp;quot;name&amp;quot; listed in &amp;quot;tagsfile&amp;quot; (which you specify with -f)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
vi commands&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
commands have syntax:&lt;br /&gt;
[n] operators [m] motion&lt;br /&gt;
&lt;br /&gt;
basic editing operators are:&lt;br /&gt;
c = begin change&lt;br /&gt;
d = begin delete&lt;br /&gt;
y = begin yank/copy&lt;br /&gt;
&lt;br /&gt;
for current line, motion is same as operator (e.g. cc or yy)&lt;br /&gt;
&lt;br /&gt;
cw  	 change word&lt;br /&gt;
cc  	 change line&lt;br /&gt;
c$  	 change text from current position to end of line&lt;br /&gt;
C   	 same as c$&lt;br /&gt;
&lt;br /&gt;
dd   	delete current line&lt;br /&gt;
numdd	delete num lines&lt;br /&gt;
d$   	delete from now to end of line&lt;br /&gt;
D    	same as d$&lt;br /&gt;
dw   	delete word&lt;br /&gt;
d}   	delete up to next paragraph&lt;br /&gt;
d^   	delete back to beginning of line&lt;br /&gt;
d/pat  	delete everything up to first occurence of pattern&lt;br /&gt;
dn   	delete everything up to next occurrence of pattern&lt;br /&gt;
dfx  	delete everything up to and including x on current line&lt;br /&gt;
dtx  	delete everything up to but not including x on current line&lt;br /&gt;
dL   	delete up to last line on screen&lt;br /&gt;
dG   	delete up to end of file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;	shift text described by following motion command left 1 shiftwidth&lt;br /&gt;
&amp;lt;}	shift left all text up to next paragraph&lt;br /&gt;
&amp;lt;&amp;lt;	shift left current line&lt;br /&gt;
&amp;lt;%	shift left until matching parenthesis/brace/bracket (cursor must be on matching symbol)&lt;br /&gt;
&lt;br /&gt;
g~w  	switch case of word&lt;br /&gt;
guw  	change to lowercase&lt;br /&gt;
gUw  	change to uppercase&lt;br /&gt;
&lt;br /&gt;
p    	&amp;quot;push&amp;quot;/insert last deleted/yanked word AFTER cursor&lt;br /&gt;
P(cap) 	insert last deleted/yanked word BEFORE cursor&lt;br /&gt;
gp   	same as p but leave cursor at end of text&lt;br /&gt;
gP   	same as P but leave cursor at end of text&lt;br /&gt;
]p   	same as p but match indention&lt;br /&gt;
[p   	same as ]p&lt;br /&gt;
&lt;br /&gt;
Rtext  	replace with new text (overwrite) beginning at curosr; use ESC to end replace mode&lt;br /&gt;
&lt;br /&gt;
u   	undo last change&lt;br /&gt;
C-R 	redo last change&lt;br /&gt;
U   	restore current line&lt;br /&gt;
.   	repeat last change&lt;br /&gt;
~   	reverse case, move cursor right&lt;br /&gt;
C-A 	increment # under cursor&lt;br /&gt;
C-X 	decrement # under cursor&lt;br /&gt;
&lt;br /&gt;
Y   	copy current line&lt;br /&gt;
yy  	copy current line&lt;br /&gt;
ye  	copy text to end of word&lt;br /&gt;
&amp;quot;xyy  	copy current line to register x&lt;br /&gt;
&amp;quot;xdd 	delete current line into register x&lt;br /&gt;
&amp;quot;xp     put contents of register x&lt;br /&gt;
J       join current line to next line&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
opening/writing/closing/etc&lt;br /&gt;
----------------------------&lt;br /&gt;
&lt;br /&gt;
ZZ  		quit, write only if changes made&lt;br /&gt;
:x  		same as ZZ&lt;br /&gt;
&lt;br /&gt;
:n,mw file     	write lines n thru m to file&lt;br /&gt;
:n,mw &amp;gt;&amp;gt; file  	appends lines n to m to existing file&lt;br /&gt;
&lt;br /&gt;
:e file        	edit another file, current file becomes alternate&lt;br /&gt;
C-G            	show current file and line number&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
window commands&lt;br /&gt;
----------------&lt;br /&gt;
&lt;br /&gt;
:new		open new window&lt;br /&gt;
:new file	open file in new window&lt;br /&gt;
:sp [file]	split current window; with file, edit that file in the new window&lt;br /&gt;
:vsp [file]	like sp but vertical split&lt;br /&gt;
:clo		close current window&lt;br /&gt;
:hid		hide current window&lt;br /&gt;
:on		make current window only visible window&lt;br /&gt;
:res num	resize window to num lines&lt;br /&gt;
:wa 		write all buffers&lt;br /&gt;
:qa		quit all buffers&lt;br /&gt;
&lt;br /&gt;
C-W s		split current window&lt;br /&gt;
C-W n		open new window&lt;br /&gt;
&lt;br /&gt;
C-W j		move cursor to previous window&lt;br /&gt;
C-W k		move cursor to next window&lt;br /&gt;
C-W p		move cursor to previous window&lt;br /&gt;
C-W t		move cursor to top window&lt;br /&gt;
C-W b		move cursor to bottom window&lt;br /&gt;
C-W h 		move cursor to left window&lt;br /&gt;
C-W l           move cursor to right window&lt;br /&gt;
&lt;br /&gt;
C-W H		move current window to far left&lt;br /&gt;
C-W L		move current window to far right&lt;br /&gt;
C-K		move current window to very top&lt;br /&gt;
C-W B 		move current window to very bottom&lt;br /&gt;
&lt;br /&gt;
C-W r		rotate windows down&lt;br /&gt;
C-W R		rotate windows up&lt;br /&gt;
&lt;br /&gt;
C-W +		increase current window size&lt;br /&gt;
C-W -		decrease current window size&lt;br /&gt;
C-W =		make all windows same height&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
interacting with system&lt;br /&gt;
------------------------&lt;br /&gt;
&lt;br /&gt;
:r file		read contents of file in after cursor&lt;br /&gt;
:r !command	read in output from command after current line&lt;br /&gt;
:numr !command	like above, but reads in after line num (0 = top of file)&lt;br /&gt;
:!command	run command, then return&lt;br /&gt;
!motion command		send textcovered by motion to unix command, replace with output&lt;br /&gt;
:n,m! command		send lines n to m to unix command, replace with output&lt;br /&gt;
:!!		repeat last system command&lt;br /&gt;
:sh		create subshell; return to editor with EOF (C-D)&lt;br /&gt;
C-Z		suspend editor; resume with fg&lt;br /&gt;
:so file	read and execute ex commands from file&lt;br /&gt;
&lt;br /&gt;
K		look up word under cursor in man pages&lt;br /&gt;
&lt;br /&gt;
macros&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
:ab in out	use in as an abbreviation for out in insert mode&lt;br /&gt;
:unab in	remove abbreviations for in&lt;br /&gt;
:ab		list abbreviations&lt;br /&gt;
&lt;br /&gt;
:map string sequence	map characters string as sequence of commands&lt;br /&gt;
			use #1, #2, etc as function keys&lt;br /&gt;
:unmap string		remove map for string&lt;br /&gt;
:map			list character strings that are mapped&lt;br /&gt;
:map! string sequence	map characters string to INPUT mode sequence&lt;br /&gt;
:unmap! string		remove input mode map&lt;br /&gt;
:map!			list maps in input mode&lt;br /&gt;
&lt;br /&gt;
(control keys: ^A ^K ^O etc.)&lt;br /&gt;
&lt;br /&gt;
qx			record typed characters into register specified by letter x&lt;br /&gt;
			if letter is uppercase, APPEND to register&lt;br /&gt;
q			stop recording&lt;br /&gt;
@x			execute register specified by letter x&lt;br /&gt;
@@			repeat last @ command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>