Vim Revision as of Sunday, 20 December 2015 at 19:57 UTC
Tricks
- Reload
.vimrc
without restarting
vim:
:so ~/.vimrc
:so $MYVIMRC
:so %
: The last command is for when you’re editing it.
Package management
Pathogen seem slike a
Color Schemes
Installation
As an example, I’ll install the Base16
Eighties theme.
mkdir ~/.vim/colors
curl https://raw.githubusercontent.com/chriskempson/base16-vim/master/colors/base16-eighties.vim > ~/.vim/colors/base16-eighties.vim
Fire up vim, then :colorscheme base16-eighties
(tab-completion works!)
and voila. Add your favorite to ~/.vimrc
Finding Themes
- Vivify is a nice GUI.
Villustrator is another. - Base16: themes and
preview. You can also make
your own.
vim-airline
To get all the nice arrows and symbols in vim-airline
, you’ll either
have to
If you just want the symbols, see
this. This guy
has some great
observations
on the amount of effort necessary to get a simple status bar. You can
always use Sublime
Text.
I stopped caring:
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.paste = ''
let g:airline_symbols.whitespace = ''
Themes
Here’s a list
of included themes. Find one and set it in .vimrc with
let g:airline_theme = 'base16'
Customization
let g:airline_section_a (mode, paste, iminsert)
let g:airline_section_b (hunks, branch)
let g:airline_section_c (bufferline or filename)
let g:airline_section_gutter (readonly, csv)
let g:airline_section_x (tagbar, filetype, virtualenv)
let g:airline_section_y (fileencoding, fileformat)
let g:airline_section_z (percentage, line number, column number)
let g:airline_section_warning (syntastic, whitespace)
References etc
- Look for Unicode symbols
- Add this to
~/.vimrc
to see the airline bar
https://github.com/bling/vim-airline/wiki/FAQ#vim-airline-doesnt-appear-until-i-create-a-new-split
1.
set laststatus=2
Footnotes
-
In iTerm2, you’ll have to change the regular and non-ASCII
fonts to the same
patched one. ↩︎