- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
Latest commit
107 lines (97 loc) · 3.38 KB
/
Copy pathvimrc
File metadata and controls
107 lines (97 loc) · 3.38 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
filetypepluginindenton
syntaxon
setautoindent
settabstop=4
setnonu
colorscheme default
setlistchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:·
" F3: Toggle list (display unprintable characters).
nnoremap<F3>:set list!<CR>
map<C-n>:NERDTreeToggle<CR>
nnoremap<C-g>:YcmCompleter GoToReferences<CR>
nnoremap<C-f>:YcmCompleter GoToDefinitionElseDeclaration<CR>
map<silent><F2>:TagbarToggle<CR>
settags+=tags;/
nmap<silent><C-e><Plug>(ale_next_wrap)
map<leader>] :bnext<CR>
map<leader>[ :bprevious<CR>
nnoremap<leader>f :ALENextWrap<CR>
nnoremap<leader>b :ALEPreviousWrap<CR>
nnoremap<leader>F :ALELast<CR>
nnoremap<leader>B :ALEFirst<CR>
" Vundle Vim
setnocompatible" be iMproved, required
filetypeoff" required
" set the runtime path to include Vundle and initialize
setrtp+=~/.vim/bundle/Vundle.vim
callvundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin'VundleVim/Vundle.vim'
" vim-python-pep8-indent
Plugin'Vimjas/vim-python-pep8-indent'
" You Complete Me
Plugin'Valloric/YouCompleteMe'
" NERDTree
Plugin'preservim/nerdtree'
" ALE
Plugin'dense-analysis/ale'
" VIM-Airline
Plugin'vim-airline/vim-airline'
Plugin'vim-airline/vim-airline-themes'
" Tagbar
Plugin'preservim/tagbar'
" Cuda syntax highlight
Plugin'bfrg/vim-cuda-syntax'
" All of your Plugins must be added before the following line
callvundle#end()" required
filetypepluginindenton" required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Uncomment the following to have Vim jump to the last position when
" reopening a file
ifhas("autocmd")
auBufReadPost*ifline("'\"") > 1&&line("'\"") <=line("$") | exe"normal! g'\"" | endif
endif
letg:NERDTreeShowGitStatus=1
let NERDTreeShowHidden=1
letg:ale_linters= {'python': ['mypy', 'bandit', 'pydocstyle']}
letg:ale_fixers= {'*': [], 'python': ['black', 'isort']}
letg:ale_fix_on_save=1
" let g:ale_sign_error = '●'
" let g:ale_sign_warning = '.'
letg:ale_sign_error='💣'
letg:ale_sign_warning='🚩'
letg:ale_statusline_format= ['💣 %d', '🚩 %d', '']
letg:ale_lint_on_save=1
function!LinterStatus() abort
letl:counts=ale#statusline#Count(bufnr(''))
letl:all_errors=l:counts.error+l:counts.style_error
letl:all_non_errors=l:counts.total -l:all_errors
returnl:counts.total ==0 ? 'OK' : printf(
\ '%d⨉ %d⚠ ',
\ all_non_errors,
\ all_errors
\)
endfunction
setstatusline+=%=
setstatusline+=\ %{LinterStatus()}
letg:ale_set_highlights=0
letg:ale_virtualtext_cursor='disabled'
letg:airline#extensions#ale#enabled =1
letg:airline#extensions#tabline#enabled =1
auBufRead,BufNewFile*.cusetfiletype=cuda
auBufRead,BufNewFile*.cuhsetfiletype=cuda
" This will check the current folder for tags file and keep going one directory up all the way to the root folder.
settags=tags;/
sethidden