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

1
nvim/ftplugin/python.vim Normal file
View File

@@ -0,0 +1 @@
set foldmethod=indent

View File

@@ -199,14 +199,14 @@ let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
let g:easytags_async = 1 let g:easytags_async = 1
" make " 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 cwindow "Open the quickfix window
"autocmd QuickFixCmdPost make nested lwindow "Change to the quickfix window "autocmd QuickFixCmdPost make nested lwindow "Change to the quickfix window
set switchbuf=split "nmap <F9> :silent! make<CR>:redraw!<CR>
nmap <F9> :silent! make<CR>:redraw!<CR> "nmap <Leader>m :silent! make<CR>:redraw!<CR>
nmap <Leader>m :silent! make<CR>:redraw!<CR> "nmap <Leader>x :silent! make ex<CR>:redraw!<CR>
nmap <Leader>x :silent! make ex<CR>:redraw!<CR> "imap <F9> <ESC>:make<CR>:redraw!<CR>i
imap <F9> <ESC>:make<CR>:redraw!<CR>i
" vim-templates config-file " vim-templates config-file
try try
@@ -229,6 +229,19 @@ let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="vertical" let g:UltiSnipsEditSplit="vertical"
set rtp+=~/.config/nvim/my-snippets 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 try
source ~/.config/nvim/.vimrc_config_expand_region source ~/.config/nvim/.vimrc_config_expand_region
catch catch