Clean up functions
parent
3b6f5d1315
commit
ba34edd8ae
16
.vimrc
16
.vimrc
|
@ -37,10 +37,6 @@ let g:netrw_banner = 0
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" https://alok.github.io/2018/04/26/using-vim-s-conceal-to-make-languages-more-tolerable/
|
|
||||||
fu! ToggleConceal()
|
|
||||||
if (&cole == 0) | se cole =2 | else | set cole =0 | endif
|
|
||||||
endfu
|
|
||||||
" Folds {{{
|
" Folds {{{
|
||||||
|
|
||||||
" Insert date
|
" Insert date
|
||||||
|
@ -49,19 +45,11 @@ fu! Today()
|
||||||
endfu
|
endfu
|
||||||
set foldmethod=marker
|
set foldmethod=marker
|
||||||
|
|
||||||
" Add command line functions names
|
|
||||||
com! -nargs=0 Today :call Today()
|
|
||||||
com! -nargs=0 ToggleLineNumbers :call ToggleLineNumbers()
|
|
||||||
com! -nargs=0 ToggleConceal :call ToggleConceal()
|
|
||||||
augroup filetype_vim
|
augroup filetype_vim
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FileType vim setlocal foldmethod=marker
|
autocmd FileType vim setlocal foldmethod=marker
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" Setup Man command for reading man pages
|
|
||||||
if exists(":Man") != 2
|
|
||||||
source $VIMRUNTIME/ftplugin/man.vim
|
|
||||||
endif
|
|
||||||
augroup filetype_python
|
augroup filetype_python
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FileType python setlocal foldmethod=indent
|
autocmd FileType python setlocal foldmethod=indent
|
||||||
|
@ -111,8 +99,8 @@ ino <right> <nop>| " "
|
||||||
" Search
|
" Search
|
||||||
nn <leader>/ :noh<cr>
|
nn <leader>/ :noh<cr>
|
||||||
nn <leader>f :Ag <cr>
|
nn <leader>f :Ag <cr>
|
||||||
" Line numbers
|
" Toggle line numbers
|
||||||
nn <leader>n :call ToggleRnu()<cr>
|
nn <leader>n :set nu! rnu!<cr>
|
||||||
" Vim configuration
|
" Vim configuration
|
||||||
nn <leader>ec :split $MYVIMRC<cr>
|
nn <leader>ec :split $MYVIMRC<cr>
|
||||||
nn <leader>so :so %<cr>
|
nn <leader>so :so %<cr>
|
||||||
|
|
Loading…
Reference in New Issue