Vim commands for the daily life

05.08.2005 at 12:42

My favorite editor is vim but until recently i didn't really use its great features (well even yet i may only use about 5% of its capabilities). So i decided to read a bit through the documentation and there is lot of interesting stuff, and so i am going to write a short summary about the commands which i use in daily life (not the cryptic ones which were designed to attract perl programmers ;)) However this is not ment as an introduction for newbies or a documentation type :help or checkout vimtutor for these things. Ok here it goes:

args 			# show opened files
args file3 fil4		# set new ones

next	next!	wnext	# go to the next/previous file
prev	prev!	wprev	# in the list depending on what you
			# want to do with your changes.

split [filename]	# split window horizontally / 
vsplit [filename]	# vertically

CTRL + W W		# switch between the windows

CTRL + W _		# maximize current window
:qall			# close all windows
:only			# close all windows expect the current one

"{a-z}y			# yank a line into a register
"{a-z}p			# past the content from a register

:mark {a-z}		# set a mark store it in a register

:'{a-z}			# jump to a given mark

q{a-z}			# record some commands and store 
			# them in a register type q to stop 
@{a-z}			# recording and @{a-z} to play

Oh and here is an excellent VIM Reference Card for those of you who like to further investigate in this topic.

Comments (0)

There are currently no comments available