This post is about vim and how you can start using it in your daily work.
At one point in my testing path, I decided that I should start using vim. I opened Google, and start my search journey. I searched for:
“vim development platform”
What got my intention was search result:
spf13-vim – The Ultimate Vim Distribution
This is “spf13-vim is a distribution of vim plugins and resources for Vim, Gvim and MacVim. Which means that you need to install vim by yourself, and this distribution will add a set of useful vim plugins for development. Adding new plugin is also simplified (although, you need to know linux cat basics to do that).
For me, important one are related to ruby language. Here is one rspec file, opened in mvim:
Yes, you have coloured syntax. For me, this is very important, because with colours, I make less syntax errors!
Ok, you are set to go and you expenses so far are 0.
To get to know basic, run vimtutor (linux and mac os have it, for windows read this).
Here is set of vim cmd’s that I use on daily basics:
- fire up vim: cd to your development folder and type:
- enter command mode
- start folder explorer vim plugin (note, tab will complete your commands, so you can type Expl, then hit tab, and vim will do autocomplete
- open file in new tab
select file with arrow keys, then press t
- close file
- go to file bottom
- go to file top
- go to end of line
- go to start of line (this is zero)
- delete line
- undo action
- start edit mode (you know that you are in edit mode when you see this in the bottom of vim
- exit edit mode (you need to do that in order to do all other commands listed here
- delete character on the right
- copy paste action. Note, if you start typing after you hit p, copied item is cleared from the buffer.
v, then with arrow keys make a selection, y, go to position when you want to paste, p, text will be pasted on the right of cursor
/, what you search, enter, found text will be highlighted, with n you move to next found item.
That it is. This is small set of features what vim can do, but for me it is enough to be productive!by