-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.vim
47 lines (40 loc) · 1.26 KB
/
config.vim
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
" Telescope {{{
nnoremap <leader>f <cmd>Telescope find_files<cr>
nnoremap <leader>g <cmd>Telescope git_files<cr>
nnoremap <leader>dd <cmd>Telescope diagnostics<cr>
nnoremap <leader>bf <cmd>Telescope buffers<cr>
nnoremap <leader>td <cmd>Telescope diagnostics bufnr=0<cr>
nnoremap <leader>tg <cmd>Telescope live_grep<cr>
nnoremap <leader>th <cmd>Telescope help_tags<cr>
nnoremap <leader>tt <cmd>Telescope builtin<cr>
" }}}
" Sneak {{{
function! ReturnHighlightTerm(group, term)
" Store output of group to variable
let output = execute('hi ' . a:group)
" Find the term we're looking for
return matchstr(output, a:term.'=\zs\S*')
endfunction
let g:sneak#label = 1
map s <Plug>Sneak_s
let fg = ReturnHighlightTerm('IncSearch', 'guibg')
let bg = ReturnHighlightTerm('IncSearch', 'guifg')
exec 'hi SneakLabel guibg='.bg.' guifg='.fg
exec 'hi SneakLabelMask guibg='.bg.' guifg=cleared'
" }}}
" Fugitive {{{
nnoremap ]c :GitGutterNextHunk<CR>zz
nnoremap [c :GitGutterPrevHunk<CR>zz
nnoremap <leader>dg :diffget<CR>
nnoremap <leader>dp :diffput<CR>
vnoremap <leader>dg :diffget<CR>
vnoremap <leader>dp :diffput<CR>
" }}}
" Vimtex {{{
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
" }}}
" Vim Slime {{{
let g:slime_target = "tmux"
"}}}