" Gluek's .vimrc config file for VIM, version 2009-01-08. " " Feel free to contact me if you have any questions/suggestions. " Email and Jabber: [ [email protected] ] or Skype: [ gluek42 ] " " Get latest version of this file at: [ http://gluek.info/wiki/linux/my-vimrc ] " *** Basic options *** syntax on " turn syntax highlighting on filetype on " filetype detection on " *** Set section *** set mouse=a " enable mouse support set background=dark " force dark background set hlsearch " search selected word by pressing * (asterisk) set incsearch " on search instantly go to found text when typing set backup " create backup files (by default: <oldname>~) set listchars+=precedes:<,extends:> " show ">" or "<" if text string is longer than screen set ignorecase " ingore lower/UPPER case on search set backspace=indent,eol,start whichwrap+=<,>,[,] " allow to use backspace instead of "x" " encoding is utf-8 by default: set encoding=utf-8 set termencoding=utf-8 "set statusline=%<%f%h%m%r%=%b\ %{&encoding}\ 0x%B\ \ %l,%c%V\ %P set statusline=%<%f%h%m%r%=format=%{&fileformat}\ file=%{&fileencoding}\ enc=%{&encoding}\ %b\ 0x%B\ %l,%c%V\ %P " *** Key bindings *** " CTRL-C and CTRL-Insert are Copy vnoremap <C-C> "+y vnoremap <C-Insert> "+y map <C-V> "+gP map <S-Insert> "+gP imap <S-Insert> <C-V> vmap <S-Insert> <C-V> " Make shift-insert work like in Xterm map <S-Insert> <MiddleMouse> map! <S-Insert> <MiddleMouse> " map Ctrl-y to delete lines inoremap <c-y> <esc>ddi " Exit on F10 imap <F10> <Esc>:qa<CR> nmap <F10> :qa<CR> "imap <Tab> <C-N> " autocompletion by Tab nmap <F7> <C-W>k<C-W>_ " окно вверх imap <F7> <Esc><C-W>k<C-W>_a " окно вверх "nmap <F8> <C-W>j<C-W>_ " окно вниз "imap <F8> <Esc><C-W>j<C-W>_a " окно вниз " Save current buffer (file) imap <F2> <Esc>:w<CR>a nmap <F2> :w<CR> " On/off line numbers by F11 imap <F11> <Esc>:set<Space>nu!<CR>a nmap <F11> :set<Space>nu!<CR>