gofk Blog — Vim Tools This is the first in a series of brief...

1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna

Vim Tools

This is the first in a series of brief articles looking at one of my favourite applications, Vim (a contraction of VI IMproved). Just in case you don’t know, Vim is an advanced, cross-platform, free and open source text editor designed for use both from a command-line interface and as a standalone application in a graphical user interface.

One of the main reasons why I love Vim is because of its flexibility. Besides the virtues of Vim (which would take a month of Sundays to explain), my fascination stems, in part, from the sheer number and range of excellent plugins that extend the functionality of the editor.

Having grown up using vi, it’s not that surprising I’m still using Vim today. Vim has a vi compatibility mode but when not in this mode Vim has many enhancements over vi. But I’m not looking to start an editor flame war. There is immense rivalry between users of Emacs and Vim. To set the record straight, I have immense respect for Emacs. While it’s not my editor of choice (can you teach an old dog new tricks?), I will be writing a series on Emacs packages and libraries in the future. But for now, let me cosset myself in covering a couple of indispensable plugins for Vim. Both do similar things, and both are a great starting point to explore the power of Vim plugins, helping users explore functionality in Vim that otherwise is likely to be missed. The first is Powerline.

Powerline

Powerline in action

Powerline is a statusline plugin for Vim. It displays useful information and attractive statusline and prompts for Vim, zsh,bash, tmux, IPython, Awesome and Qtile. Powerline uses several special glyphs to generate the arrow effect and some custom symbols for developers.

Powerline is derived from vim-powerline. When vim-powerline came out in 2012, it was received warmly by Vim users, particularly when the plugin was rewritten in Python. This enabled it to work with more applications.

Features:

  • Extensible and feature rich, written in Python
  • Stable and testable code base
  • Support for prompts and statuslines in many applications. The project has evolved to provide statuslines in tmux and several window managers, and prompts for shells like bash/zsh and other applications. It’s simple to write renderers for any other applications
  • Configuration and colorschemes written in JSON. JSON (JavaScript Object Notation) is a lightweight data-interchange format.
  • Fast and lightweight, with daemon support. The code base is a couple of thousand lines of code, but the main focus is on good performance and as little code as possible while still providing a rich set of features

As Powerline is dependent on Python, it may be a little resource heavy for some Vim users. So if you use Vim on a low-spec machine, I would recommend checking out vim-airline. But much of its success is due to Powerline.


vim-airline

vim-airline in action

vim-airline is a lightweight open source statusline for Vim. It is easily configurable, extendable, and integrates with Powerline font symbols. vim-airline also automatically integrates with a variety of third party plugins and provides many themes out of the box.

vim-airline doesn’t seem to get much attention in the Linux press. But it is such a useful Vim utility that deserves to be better known. vim-airline supports many plugins and the number is increasing.

Features:

  • Tiny core written with extensibility in mind
  • Integrates with a variety of plugins, including: vim-bufferline, fugitive, unite, ctrlp, minibufexpl, gundo, undotree, nerdtree, tagbar, vim-gitgutter, vim-signify, quickfixsigns, syntastic, eclim, lawrencium, virtualenv, tmuxline, taboo.vim, ctrlspace and more
  • Looks attractive with regular fonts and provides configuration points so you can use unicode or powerline symbols
  • Optimized for speed; it loads in under a millisecond
  • Ships with many themes for popular color schemes including solarized (dark and light), tomorrow (all variants), base16 (all variants), molokai, jellybeans and others; have a look at the screenshots in the wiki. The themes use a 256 terminal color pallete
  • Unit testing suite

Bookmark and Share