Cleanup init.vim, configure folding

This commit is contained in:
Fabian Ising
2022-02-17 09:11:22 +01:00
parent 1f3b893bbb
commit f511ee7e4c
2 changed files with 20 additions and 6 deletions

View File

@@ -199,14 +199,14 @@ let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
let g:easytags_async = 1
" make
autocmd QuickFixCmdPre make set cmdheight=2
set switchbuf=split
"autocmd QuickFixCmdPre make set cmdheight=2
"autocmd QuickFixCmdPost make nested cwindow "Open the quickfix window
"autocmd QuickFixCmdPost make nested lwindow "Change to the quickfix window
set switchbuf=split
nmap <F9> :silent! make<CR>:redraw!<CR>
nmap <Leader>m :silent! make<CR>:redraw!<CR>
nmap <Leader>x :silent! make ex<CR>:redraw!<CR>
imap <F9> <ESC>:make<CR>:redraw!<CR>i
"nmap <F9> :silent! make<CR>:redraw!<CR>
"nmap <Leader>m :silent! make<CR>:redraw!<CR>
"nmap <Leader>x :silent! make ex<CR>:redraw!<CR>
"imap <F9> <ESC>:make<CR>:redraw!<CR>i
" vim-templates config-file
try
@@ -229,6 +229,19 @@ let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="vertical"
set rtp+=~/.config/nvim/my-snippets
" Folding
set foldmethod=syntax
set foldlevel=100
" Use F9 to toggle folding
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
inoremap <Leader>a <C-O>za
nnoremap <Leader>a za
onoremap <Leader>a <C-C>za
vnoremap <Leader>a zf
try
source ~/.config/nvim/.vimrc_config_expand_region
catch