about summary refs log tree commit diff
path: root/vim/.vim/vimrc
blob: 75ba1d76f35afb6fcdb4769c67a6397dc59e0b3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
set nocompatible
set undodir=~/.cache/vim/undo
set directory=~/.cache/vim/swap
set backupdir=~/.cache/vim/backup
set viminfo+=n~/.cache/vim/viminfo
set clipboard=unnamedplus autochdir
set showcmd noshowmode ruler wildmenu confirm number relativenumber
set nostartofline
if has("patch-7.4.710")
  set list listchars+=space:·,tab:\ \ 
endif
set tabstop=8 expandtab shiftwidth=4 softtabstop=-1 smarttab
set ignorecase infercase dictionary=/usr/share/dict/words
set keymap=vietnamese-telex imdisable iminsert=0 imsearch=-1
set omnifunc=syntaxcomplete#Complete
set diffopt+=algorithm:patience

augroup vimrc
  autocmd!
  autocmd BufNewFile,BufRead *.PAS setlocal filetype=pascal
  autocmd BufNewFile,BufRead *.sql setlocal filetype=mysql
  autocmd BufNewFile,BufRead *.m setlocal filetype=octave
  autocmd FileType asm,c,h,go,glsl
        \ setlocal cindent cinoptions=(0 noexpandtab shiftwidth=8
  autocmd FileType vim,sh,lua,tex,cmake,cpp,mysql,html,octave,pascal
        \ setlocal shiftwidth=2
  autocmd FileType rst setlocal shiftwidth=3
  autocmd FileType java setlocal omnifunc=javacomplete#Complete
  autocmd BufWinEnter *
        \ if &filetype ==# 'python' || &filetype ==# 'cython'
        \ | let w:m1=matchadd('ColorColumn', '\%<80v.\%>73v', -1) |
        \ else
        \ | let w:m1=matchadd('ColorColumn', '\%<81v.\%>80v', -1) |
        \ endif
augroup END

let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:srcery_italic = 1
let g:jedi#popup_on_dot = 0
let g:jedi#popup_select_first = 0
let g:jedi#show_call_signatures = 2
let g:jedi#smart_auto_mappings = 0
let g:polyglot_disabled = ['latex']

call plug#begin('~/.vim/plugged')
Plug 'https://github.com/vim/killersheep'
Plug 'https://github.com/francoiscabrol/ranger.vim'
Plug 'https://github.com/sheerun/vim-polyglot'
Plug 'https://github.com/srcery-colors/srcery-vim'
Plug 'https://github.com/knsh14/vim-github-link'
Plug 'https://github.com/lervag/vimtex', {'for': 'tex'}
Plug 'https://github.com/kovisoft/slimv', {'for': 'lisp'}
Plug 'https://github.com/anntzer/vim-cython', {'for': 'cython'}
Plug 'https://github.com/racer-rust/vim-racer', {'for': 'rust'}
Plug 'https://github.com/rhysd/rust-doc.vim', {'for': 'rust'}
call plug#end()
source /usr/share/doc/fzf/examples/fzf.vim

set t_Co=256
colorscheme srcery
map Q gq
command Q q
command W w