apt-get install vim
Add the options to /etc/vim/vimrc (at the very bottom add:)
set tabstop=4 set ts=4 set sw=4 "expandtab sets tabs to spaces "set expandtab set nowrap syntax enable set autoindent set foldmethod=manual let php_folding = 1 set ignorecase set nu! "Line Numbers set guioptions+=b "Bottom Scroll Bar for gVim set mouse=a
:retab Convert tabs to spaces (# spaces set by tabstop)
zf#j creates a fold from the cursor down # lines. zf/string creates a fold from the cursor to string . zj moves the cursor to the next fold. zk moves the cursor to the previous fold. za toggles fold (open/closed) zo opens a fold at the cursor. zO opens all folds at the cursor. zm increases the foldlevel by one. zM closes all open folds. zr decreases the foldlevel by one. zR decreases the foldlevel to zero -- all folds will be open. zd deletes the fold at the cursor. zE deletes all folds. [z move to start of open fold. ]z move to end of open fold.
I use :mksession! vim to save my current tab/viewpoint sessions Load with vim -S sessionfile
gt switch tabs :tabe open blank new tab :tab ball put all open files in tabs :Sex (or just :S I think) split window and show file manager :e . show file manager in current directory :sp will split the Vim window horizontally. Can be written out entirely as :split can use :sp filename :vsp will split the Vim window vertically. Can be written out as :vsplit Ctrl-w Ctrl-w moves between Vim viewports. Ctrl-w j moves one viewport down. Ctrl-w k moves one viewport up. Ctrl-w h moves one viewport to the left. Ctrl-w l moves one viewport to the right. Ctrl-w = tells Vim to resize viewports to be of equal size. Ctrl-w - reduce active viewport by one line. Ctrl-w + increase active viewport by one line. Ctrl-w q will close the active window. Ctrl-w r will rotate windows to the right. Ctrl-w R will rotate windows to the left. :%s/searchthis/replacewiththis/g :noh (removes your last search highlights) / (just hit / to search for something) :w (write changes) :wq (write changes and quit) :q! (quit without writing changes)
Error: Sorry, this command is not available in this version Solution: Install the full version, with your package manager just install vim (apt-get install vim)