VIM

Revision as of 17:37, 28 June 2016 by Mhan (talk | contribs) (add emmet and adding comments to a block)

Editing techniques

Adding comments to a block

Grab lines with visual block and then :norm i# to comment, and then :norm x or :norm ^x with indentation.

Emmet

Also known as Zen Coding previously.

Miscellaneous

Fixing an issue with Python version when using VIM with some packages

  • Last tested on Ubuntu 16.04 LTS (xenial) | easy | less than five minutes

When running vim with Powerline package on Ubuntu 16.04, I get this error message every time I execute it from the CLI.

$ vim
UltiSnips requires py >= 2.7 or py3
You need vim compiled with Python 2.6, 2.7 or 3.2 and later support
for Powerline to work. Please consult the documentation for more
details.
Press ENTER or type command to continue

I'm not sure what this does, but this seems to solve the problem. Thanks to Sergey Khaylov for the answer at Stackoverflow.

$ apt-get install vim-nox