set nocompatible " use vim defaults set ls=2 " allways show status line set tabstop=4 " numbers of spaces of tab character set shiftwidth=4 " numbers of spaces to (auto)indent set nocompatible " use vim defaults set ls=2 " allways show status line set tabstop=4 " numbers of spaces of tab character set shiftwidth=4 " numbers of spaces to (auto)indent set nocompatible " use vim defaults set ls=2 " allways show status line set tabstop=4 " numbers of spaces of tab character set shiftwidth=4 " numbers of spaces to (auto)indent set visualbell t_vb= " turn off error beep/flash set novisualbell " turn off visual bell set nobackup " do not keep a backup file set number " show line numbers set ignorecase " ignore case when searching "set noignorecase " don't ignore case set title " show title in console title bar set ttyfast " smoother changes "set ttyscroll=0 " turn off scrolling, didn't work well with PuTTY set modeline " last lines in document sets vim mode set modelines=3 " number lines checked for modelines set shortmess=atI " Abbreviate messages set nostartofline " don't jump to first character when paging set whichwrap=b,s,h,l,<,>,[,] " move freely between files "set autowrite " auto saves changes when quitting and swiching buffer "set expandtab " tabs are converted to spaces, use only when required set sm " show matching braces, somewhat annoying... "set nowrap " don't wrap lines if version>=600 syntax on " syntax highlighing "---- Options for Windows if has("gui_running") set guifont=Courier " use this font set lines=50 " height = 50 lines set columns=100 " width = 100 columns set background=light " adapt colors for background set selectmode=mouse,key,cmd set keymodel= else set background=dark " adapt colors for dark background colorscheme elflord " use this color scheme endif " Filetypes (au = autocmd) au filetype help set nonumber " no line numbers when viewing help au filetype help nnoremap " Enter selects subject au filetype help nnoremap " Backspace to go back " When using mutt, text width=72 "au filetype mail set textwidth=72 "au filetype tex set textwidth=72 "au BufRead mutt*[0-9] set tw=72 " Automatically chmod +x Shell and Perl scripts au BufWritePost *.sh !chmod +x % au BufWritePost *.pl !chmod +x % " File formats au BufNewFile,BufRead *.pls set syntax=dosini au BufNewFile,BufRead modprobe.conf set syntax=modconf endif " Keyboard mappings map :previous " map F1 to open previous buffer map :next " map F2 to open next buffer map :silent noh " turn off highlighted search map ,v :sp ~/.vimrc " edit my .vimrc file in a split map ,e :e ~/.vimrc " edit my .vimrc file map ,u :source ~/.vimrc " update the system settings from my vimrc file "----- write out html file map ,h :source $VIM/vim70/syntax/2html.vim:w:clo:n,h " Common command line typos "cmap W w "cmap Q q " Keyboard mapping for numeric keypad imap OM map OM imap OP map OP imap OQ / map OQ / imap OR * map OR * imap OS - map OS - imap Ol + imap Om - imap On , imap Op 0 imap Oq 1 imap Or 2 imap Os 3 imap Ot 4 imap Ou 5 imap Ov 6 imap Ow 7 imap Ox 8 imap Oy 9 imap Oz 0