From c0a1f83abe1c49b30cab102794d26728a7a133da Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Tue, 30 May 2017 08:52:13 -0500 Subject: [PATCH] dunno if these vimscript changes are good or not --- .vim/ftplugin/vim.vim | 12 ++++++++++++ .vimrc | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) 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