Sunday, November 19, 2006

How to launch Vim

We have to begin with the beginning: it is not easy to use Vim at 100%, but as soon as you will you can win a huge amount of time ;-)

To open a file:
vim myfile
To have a list of all the file you can recover:
vim -r
To recover a file after a crash:
vim -r to find recovery files available (they end with .swp)
Then, when you find it, type
vim -r .pass.txt.swp
if you want to open a file at the line N for example: just type:
vim +N myfile
to open it and go directly to the end of the file:
vim + myfile
To open file at the first line containing some regular expression regexp
vim +/regexp myfile
Enough for this post...

No comments: