config/nvim: add FoldCycle
This commit is contained in:
parent
d486261ea8
commit
4b87a10bd9
|
@ -52,7 +52,7 @@ autocmd BufRead $XDG_CONFIG_HOME/yadm/bootstrap setlocal filetype=sh
|
|||
|
||||
" shebang shortcut - https://www.reddit.com/r/vim/comments/4z7z7s/add_shebang_lines_to_your_vim_files_automatically/d6v7op8 and https://stackoverflow.com/a/52135425
|
||||
inoreabbrev <expr> #!! "#!/usr/bin/env" . (empty(&filetype) ? '' : ' '.&filetype)
|
||||
autocmd BufNewFile *.sh,$HOME/.local/bin/* execute 'silent! 1s/.*/#!\/bin\/sh\r# '| setlocal filetype=sh | :startinsert
|
||||
autocmd BufNewFile *.sh,$HOME/.local/bin/* execute 'silent! 1s/.*/#!\/bin\/sh -e\r# '| setlocal filetype=sh | :startinsert
|
||||
"autocmd BufNewFile * if !empty(&filetype) | execute 'silent! 1s/.*/#!\/usr\/bin\/' . &filetype . '\r\r'| :startinsert | endif
|
||||
|
||||
set spelllang=en_us,de_de
|
||||
|
|
|
@ -21,6 +21,16 @@ noremap q: <Nop>
|
|||
" Alias replace all to S
|
||||
nnoremap S :%s//gI<Left><Left><Left>
|
||||
|
||||
" TODO first only open current one
|
||||
function FoldCycle()
|
||||
if &foldlevel
|
||||
:normal zm
|
||||
else
|
||||
:normal zR
|
||||
endif
|
||||
endfunction
|
||||
nnoremap <S-TAB> :call FoldCycle()<CR>
|
||||
|
||||
" Jump around without shift
|
||||
nnoremap gl $
|
||||
nnoremap gh 0
|
||||
|
|
Loading…
Reference in New Issue