Counting Words in Vim
1 | g Ctrl-g |
It counts not only the words of the whole document — text selected in visual mode can be counted too.

Using Vim modeline magic
It all started with this question: how to use your own vim config in Python files.
It revealed a skill (okay, I admit I didn’t read the docs well — there are really too many docs, impossible to finish),
something called Modeline magic. Its use is specifying the format vim should use when opening a given file:
spaces or tabs, whether to show line numbers — it can do all of this.
So later, when writing Python code, I insert this line right at the top; that way even on other vims that aren’t
configured, the display style is basically preserved. Not black magic — just a little trick.
1 | #!/usr/bin/env python |
Multi-Line Operations in Vim
- First press Ctrl-q or Ctrl-v,
- after selecting some rows and columns,
- press capital I to enter insert mode,
- do something on the first line,
- press ESC and the operation is applied to all
The two images below demonstrate inserting spaces and deleting spaces.


The Tabularize Plugin
Enough talk — straight to the pictures.

This part refers to the tabular article. If you use my configured vim,
you can use it right after installing the plugins. Or add
Plug 'vim-scripts/Tabular' to your own vundle section to install it. The blog above is worth a careful read.