-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_vimrc
More file actions
76 lines (57 loc) · 1.97 KB
/
Copy pathdot_vimrc
File metadata and controls
76 lines (57 loc) · 1.97 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
" Native vim stuff
set number
set encoding=UTF-8
filetype plugin indent on
set tabstop=4 " show existing tab with 4 spaces width
set shiftwidth=4 " when indenting with '>', use 4 spaces width
set expandtab " On pressing tab, insert 4 spaces
set updatetime=100 " https://github.com/airblade/vim-gitgutter#getting-started
autocmd Filetype tex setl updatetime=1
set t_Co=256 " Number of colors allowed
set cursorline " Highlights the cursor line
if exists('+termguicolors')
" Allow true colors. Colors are limited without this.
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
set nowrap " No text wrapping
set hlsearch " Native highlight colors
hi Search ctermbg=LightGray
hi Search ctermfg=Black
" Plugins
call plug#begin('~/.vim/plugged')
"" Developing
Plug 'preservim/nerdtree' |
\ Plug 'Xuyuanp/nerdtree-git-plugin' |
\ Plug 'ryanoasis/vim-devicons'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
let g:coc_global_extensions = [
\ 'coc-tsserver'
\ ]
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint')
let g:coc_global_extensions += ['coc-eslint']
endif
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gr <Plug>(coc-references)
inoremap <expr> <cr> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
Plug 'mileszs/ack.vim'
let g:ackprg = 'ag --vimgrep'
let g:ack_autoclose = 1
nnoremap <silent> <C-f> :Ack!<space>
nnoremap <silent> <C-p> :AckFile!<space>
""" Language Specifics
"""" LaTeX
Plug 'lervag/vimtex'
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
let g:livepreview_previewer = 'okular'
"""" Markdown
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
""" Theme
Plug 'rakr/vim-one'
set background=dark " for the dark version
" set background=light " for the light version
let g:airline_theme='one'
call plug#end()
colorscheme one " Needs to be set after call plug#end()