-
Notifications
You must be signed in to change notification settings - Fork 3
/
.vimrc
159 lines (122 loc) · 3.66 KB
/
.vimrc
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
" ___H:
" ___ ___ /__/\
" /__/\ / /\ | |::\
" \ \:\ / /:/ | |:|:\
" \ \:\ /__/::\ __|__|:|\:\
" ___ \__\:\ \__\/\:\__ /__/::::| \:\
" /__/\ | |:| \ \:\/\ \ \:\~~\__\/
" \ \:\| |:| \__\::/ \ \:\
" \ \:\__|:| /__/:/ \ \:\
" \__\::::/ \__\/ \ \:\
" ~~~~ \__\/
" Massive thanks to @addy-dclxvi and @fehawen <3
" Set compatibility to Vim only.
set nocompatible
" Auto-install missing plugins on startup
autocmd VimEnter *
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | q
\| endif
" Plug
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'fehawen/cs.vim'
Plug 'itchyny/lightline.vim'
Plug 'jeffkreeftmeijer/vim-dim'
Plug 'dense-analysis/ale'
Plug 'triglav/vim-visual-increment'
Plug 'lervag/vimtex'
Plug 'sirver/ultisnips'
Plug 'KeitaNakamura/tex-conceal.vim'
call plug#end()
" tex-conceal
set conceallevel=1
let g:tex_conceal='abdmg'
hi Conceal ctermbg=none
" ultisnips
let g:UltiSnipsExpandTrigger = '<TAB>'
let g:UltiSnipsJumpForwardTrigger = '<TAB>'
let g:UltiSnipsJumpBackwardTrigger = '<S-TAB>'
" vimtex
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
" vim-visual-increment
set nrformats=alpha
" coc
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
inoremap <silent><expr> <C-q>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr> <C-s> pumvisible() ? "\<C-p>" : "\<S-Tab>"
colorscheme cs
set laststatus=2
set noshowmode
" lightline config
let g:lightline = {
\ 'colorscheme': '16color',
\ }
" NERDTRee
map <C-n> :NERDTreeToggle<CR>
let NERDTreeShowHidden=1
" Mappings
noremap <Leader>y "+y
noremap <Leader>p "+p
" Shortcut for editing gtk.css
" removes separators, backdrop color and imports custom.css
map <leader>g Go@import url('custom.css');<ESC>gg/separator<CR>12n3jf(vi(y:%s/<C-r>"/0,0,0,0<CR>gg/backdrop<CR>3nV2jddd
"Always show current position
set ruler
" Turn on syntax highlighting.
syntax on
" Turn on modelines
set modelines=1
" Uncomment below to set the max textwidth. Use a value corresponding to the width of your screen.
" set textwidth=80
set formatoptions=tcqrn1
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set noshiftround
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Don't redraw while executing macros (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Display 5 lines above/below the cursor when scrolling with a mouse.
set scrolloff=5
" Fixes common backspace problems
set backspace=indent,eol,start
" Display options
set showmode
set showcmd
set cmdheight=1
" Highlight matching pairs of brackets. Use the '%' character to jump between them.
set matchpairs+=<:>
" Display different types of white spaces.
"set list
"set listchars=tab:›\ ,trail:•,extends:#,nbsp:.
" Show line numbers
set relativenumber
" Encoding
set encoding=utf-8
" Highlight matching search patterns
set hlsearch
" Enable incremental search
set incsearch
" Include matching uppercase words with lowercase search term
set ignorecase
" Include only uppercase words with uppercase search term
set smartcase
" Store info from no more than 100 files at a time, 9999 lines of text
" 100kb of data. Useful for copying large amounts of data between files.
set viminfo='100,<9999,s100