vim¶
tabs as spaces¶
In the .vimrc
file:
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
In vim
:
:set tabstop=4
:set expandtab
Move to character position¶
Move to column 80
80|
Format json using python¶
:%!python -m json.tool
remove blank lines¶
:g/^\s*$/d