Vim iš pradžių daug kam įvaro siaubą ir depresiją. Ačiū Dievui, jį padoriai sukonfigūravus galima pasidaryti labai labai labai powerful editor'ių.
Čia yra mano ~/.vimrc bylos pavyzdys. Jei manote, kad galite prirašyti ką nors gudraus - taip ir padarykite!
" Tikri vyrai naudoja UTF-8!
set encoding=utf-8
" Įjungiame sintaksės rodymą
syntax on
" Tamsesnė spalvinė schema
colorscheme evening
" Išjungiame Vi bug'us (kad ir kokie jie ten būtų)
set nocompatible
" Be backup'o, nerašome nereikalingų bylų
set nobackup
set nowb
set noswapfile
" Folding'as
set nofen
set fdl=0
" Rodome linijos numerį
set nu
" Padoriai veikiantis backspace'as
set backspace=eol,start,indent
" Paieškai
set magic
set showmatch
set hlsearch
" Programą galima išjungti paspaudus "q"
nnoremap q :q<CR>
" Naują bylą kuriame paspaudę "n"
"nnoremap n :enew<CR>
" Išsaugome paspaudę "w"
nnoremap w :w<CR>
" Atidarome bylą paspaudę "o"
nnoremap o :e
" Visada rodome pelę
set mouse=a
" Newrap'iname eilučių
set nowrap
" Ident'ai
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set smarttab
set noexpandtab
" Automatiškai nustatome bylos tipą
filetype on
" Nustatymai kelioms programavimo kalboms
autocmd FileType c,cpp,slang set cindent
autocmd FileType perl set smartindent
autocmd FileType css set smartindent
autocmd FileType php set smartindent
autocmd FileType html set formatoptions+=tl
" Naudojame tab'us ("t" - sukuria tab'ą, "x" - uždaro tab'ą, "[" ir "]" - vaikščiojimas tarp tab'ų)
nnoremap t :tabnew<cr>
nnoremap x :tabclose<cr>
nnoremap [ :tabprev<cr>
nnoremap ] :tabnext<cr>
" Naujiems langams (pvz. help'ui) naudojame tab'us
try
set switchbuf=usetab
set stal=2
catch
endtry
" HTML
let xml_use_xhtml = 1
let html_use_css = 1
let html_number_lines = 0
let use_xhtml = 1
autocmd FileType html set ft=xml
autocmd FileType html set syntax=html
" PHP
autocmd FileType php compiler php