Skip to content
Search

Vim:Configure

lastmod 2018-09-19created 2015-02-264 edits

Removing trailing whitespace

To highlight whitespace characters at the end of lines, apply the following.

highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/

And to remove trailing whitespace on save:

autocmd FileType c,cpp,java,php,javascript autocmd BufWritePre <buffer> :%s/\s\+$//e

Printing options

Print only options that differ from the defaults:

set

Print all options:

set all

Splitting the screen

Split the screen:

split
vsplit

Split with a size of 10:

10split
10vsplit

Set where split windows open:

set splitbelow
set splitright

Favorite site

References


  1. Vi_vim_gvim-Google_doc.pdf ↩

author Zer0 sitemap