diff --git a/.vim/ftplugin/vim.vim b/.vim/ftplugin/vim.vim index 81c0e33..5f71f15 100644 --- a/.vim/ftplugin/vim.vim +++ b/.vim/ftplugin/vim.vim @@ -4,6 +4,18 @@ 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 x :source % + +" in visual mode, leader x will source the selected lines +vnoremap x :exe join(getline("'<","'>"),'') diff --git a/.vimrc b/.vimrc index 7884a05..432ed36 100644 --- a/.vimrc +++ b/.vimrc @@ -134,7 +134,7 @@ set mousehide let g:NERDTreeMouseMode = 2 " ---------------------------------------------------------------------------}}} -" Set Colorscheme -----------------------------------------------------------{{{ +" Colorscheme ---------------------------------------------------------------{{{ if &t_Co > 2 || has("gui_running") " enable syntax highlighting syntax on