You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
496 B
VimL

" open .vim files with all folds closed
set foldlevelstart=0
" vim folds include explicit markers
set foldmethod=marker
" automatically open folds when entering them
set foldopen=all
" automatically close folds when leaving them
set foldclose=all
set shiftwidth=2
set tabstop=2
" in normal mode, leader x will source the whole file
nnoremap <leader>x :source %<cr>
" in visual mode, leader x will source the selected lines
vnoremap <leader>x :<C-w>exe join(getline("'<","'>"),'<Bar>')<CR>