vimrc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. syntax on
  2. filetype plugin indent on
  3. set nocompatible nomodeline
  4. set noswapfile nobackup nowritebackup
  5. set noconfirm hidden
  6. set viminfo='100,<500,s100,h,n~/.cache/viminfo
  7. set backspace=indent,eol,start
  8. set belloff=all mouse=a clipboard=unnamed
  9. set omnifunc=syntaxcomplete#Complete
  10. set completeopt=menuone,longest,preview
  11. set wildmenu showmatch nonumber scrolloff=5
  12. set wrap wrapscan diffopt+=followwrap linebreak
  13. set showmode showcmd ruler title
  14. set showtabline=1 laststatus=1
  15. set smartindent autoindent cindent
  16. set tabstop=4 shiftwidth=4 expandtab
  17. set hlsearch incsearch ignorecase smartcase
  18. set encoding=utf-8 termencoding=utf-8
  19. set fileencoding=utf-8 fileencodings=utf-8,cp1251
  20. set fileformat=unix fileformats=unix,dos,mac
  21. set background=dark
  22. colorscheme quiet
  23. nnoremap <Tab> gt
  24. nnoremap <S-Tab> gT
  25. nnoremap <silent> gt :tabnew<CR>
  26. nnoremap <silent> gw :tabc<CR>
  27. nnoremap <silent> gb :qa<CR>
  28. nnoremap <silent> gB :qa!<CR>
  29. nnoremap <silent> gc :bw<CR>
  30. nnoremap <silent> gC :bw!<CR>
  31. nnoremap <silent> gh :bp<CR>
  32. nnoremap <silent> gl :bn<CR>
  33. nnoremap <silent> gz :pclose<CR>
  34. nnoremap <silent> <Esc>h :bp<CR>
  35. nnoremap <silent> <Esc>l :bn<CR>
  36. nnoremap <silent> <Esc>k :N<CR>
  37. nnoremap <silent> <Esc>j :n<CR>
  38. nnoremap <silent> <Esc><Esc> :nohlsearch<CR>
  39. nnoremap <silent> <F9> :let &list =
  40. \ ( &list == 0 ? 1 : 0 )<CR>
  41. nnoremap <silent> <F10> :let &background =
  42. \ ( &background == "dark" ? "light" : "dark" )<CR>
  43. let g:netrw_dirhistmax = 0
  44. autocmd CompleteDone * pclose
  45. autocmd FileType text,markdown setlocal nolist