I cant live without vim. Today is the day I understand this and have install vim on my home windows:) I hope that no one will start it accidently.
Ok. Here i will keep track of the commands that I use in vim.
configuring vim and nice screenshots tutorial
Here is more on the topic
- Open many files in tabs: vim -p file*
- Search & Replace: %s/something/nothing/g
- cntrl-space in vim is: cntr-n / cntrl-p
load words from all pl/pm files: ctags *.p?
- windows: :split / :vsplit
cntr-w – switch
:close
:only - tabs:
set tabstop=2
set autoindent
<< >> size is controller:shiftwidth=4
VimDiff
Keyboard Shortcuts:
do – Get changes from other window into the current window.
dp – Put the changes from current window into the other window.
]c – Jump to the next change.
[c – Jump to the previous change.
Ctrl W + Ctrl W – Switch to the other split window.
J August, 2008 at 9:18 am
wrap long lines in vim:
:set wrap
J October, 2008 at 1:36 pm
set encoding=”utf8″
set background=dark /light
J October, 2008 at 2:41 pm
Replacing special characters:
Putting this line in your .vimrc or .exrc file.
:set magic
Next, do:
:s/,/,^M/g
To get the ^M character, type ctrl-v and hit enter.