From 231336dc4f6a2f21884c118842faecc795a20710 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Thu, 12 Apr 2012 23:42:06 -0500 Subject: [PATCH] Added vim as default editor, block/bar switching + block/bar switching now enabled with vitality plugin while in tmux + set EDITOR variable as vim --- bashrc.bash | 1 + vimrc | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/bashrc.bash b/bashrc.bash index 70a9db2..be813f9 100644 --- a/bashrc.bash +++ b/bashrc.bash @@ -8,6 +8,7 @@ export MY_BIN=~/bin export PATH=$MY_BIN:$PATH export MY_EDITOR="mvim -v"; +export EDITOR="vim" # export EDITOR='subl -w' # add ~/.node_libraries to the node path diff --git a/vimrc b/vimrc index 33daa0e..5ac96fe 100644 --- a/vimrc +++ b/vimrc @@ -47,6 +47,8 @@ if has("autocmd") " automatically resize panes on resize autocmd VimResized * exe "normal! \=" "autocmd BufWritePost .vimrc source $MYVIMRC + " save all files on focus lost, ignoring warnings about untitled buffers + autocmd FocusLost * silent! wa endif " code folding settings @@ -84,6 +86,12 @@ set magic " Set magic on, for regex set showmatch " show matching braces set mat=2 " how many tenths of a second to blink +" switch to line when editing and block when not +let cursor_to_bar = "\]50;CursorShape=1\x7" +let cursor_to_block = "\]50;CursorShape=0\x7" +let &t_SI = cursor_to_bar +let &t_EI = cursor_to_block + " error bells set noerrorbells set visualbell