This is a pretty cool little feature. I am not sure how often it will come into play, but I like it and I thought I would share it.
To edit a file on a remote machine that you have ssh access to, do this:
vim scp://remote_host/filename
Simple as that. Supported protocols are: scp, sftp, ftp and http [...]
Repetitive tasks can be annoying and are easily mitigated using the macro functionality in VIM.
For our simple example, let’s count 1 to 10 with each number on a new line. This will make use of the Auto-increment functionality, discussed in a previous post entitled increment/decrement numbers in VIM, which is CTRL-a and yy, which yanks the [...]
Ever have a very long shell command that when you run you realize has a mistake right in the [...]
Selecting and writing out a portion of a file into another one, or acting on it in some other way is a very handy thing to know how to do in VIM. There are many actions that you can perform, which will save you loads of time, if you just know some basics about [...]
Visual block mode is a great tool when commenting out a section of code, large or small, all at once.
Look at this section of code from a script I am writing. Let’s say I wanted to comment out everything you see.
I start with my cursor on the “%” and enter visual [...]
Recent Comments