Setting up

To use modeline on OpenSUSE 10.3,we need to add:-

set modelines=1

to the .vimrc files

The modelines sample:-

// vim:sw=4:ts=4:ft=project:

Vim Tips

NERDTree

:NERDTreeToggle
nmap <F12> :TlistToggle<CR>
nmap nt :NERDTreeToggle<CR>

Moving around

  • Jump back to previous location - '' (single quote twice)
  • Jump to next/previous occurence of search (n / shift+n)
  • add at the end of line - shift+a
  • add at the beginning of line - shift+i
  • use bookmark - m<name>, '<name>

Selection

  • insert character at beginning of lines - ctrl+v, up/down, shift+i, character_to_insert

Delete

  • delete from the cursor to specified character - df <character>

Window

  • increase window width by N - ctrl+w+>
 
misc/vim.txt · Last modified: 2008/08/28 06:26 by artakus
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki