VIM
- VIM home page
- VIM quick reference card
- VIM syntax highlighting HOWTO and more
- AWESOME page on VIM regular expressions
- VIM web ring
- Using ISpell with VIM
- Dr. Chip's VIM page -- useful stuff and lots of links
Plain old VI
Tricks
- Swap two characters xp
- Swap two lines ddp
- Reverse the order of all lines :g/^/m0/
- Remove all lines with only whitespace :g/^\s*$/d
- Move all lines onto one logical line :%j
- Remove all blank lines :g/^$/d
- Insert a newline at the end of every line :%s/$/^m/ (keystrokes to get this one are: Ctrl+V, Ctrl+M)
- Text completion before, after cursor: Ctrl+N, Ctrl+P (thanks to neha for this link )
- Get a command prompt :shell
- Execute a shell command :!<command>
- Append the contents of a file into your vi session :r!cat <file>
- Omni-completion Ctrl+X Ctrl+O
- Whole line completion Ctrl+X Ctrl+L
- Search for a word forward under the cursor *
- Search for a word backwards under the cursor #
- Move to a percentage of the file: type the number, then hit %
1 comment:
Ultimate Vi tip
http://unixdesk.blogspot.com/2006/06/10-most-valuable-tips-vi-editor.html
Post a Comment