Vim tips: Difference between revisions

From EggeWiki
mNo edit summary
mNo edit summary
Line 15: Line 15:


When I paste code into vim, often it's already formatted.  To avoid double formatting, I type ":set paste" before pasting my text.
When I paste code into vim, often it's already formatted.  To avoid double formatting, I type ":set paste" before pasting my text.
[[Category:Unix]]
[[Category:Vim]]

Revision as of 20:29, 24 August 2009

Install color scheme

<geshi lang="bash"> mkdir -p ~/.vim/colors cd ~/.vim/colors/ wget http://vimcolorschemetest.googlecode.com/svn/colors/darkslategray.vim echo "colorscheme darkslategray" >> ~/.vimrc </geshi>

View tab characters in a file

One easy way is ":set list". It also shows other control characters, including the line ending. Turn it off with ":set nolist".

Paste text without reformat

When I paste code into vim, often it's already formatted. To avoid double formatting, I type ":set paste" before pasting my text.