Update some vim

git-svn-id: http://photonzero.com/dotfiles/trunk@107 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
michener 2011-08-30 00:57:41 +00:00
parent 4d900323e5
commit f39782a1ad
5 changed files with 86 additions and 310 deletions

18
.vimrc
View file

@ -83,7 +83,6 @@ let Tlist_Show_One_File = 0
let g:ConqueTerm_CWInsert = 1
let g:ConqueTerm_InsertOnEnter = 0
let g:ConqueTerm_SendVisKey = '<Leader>ss'
let b:auto_trim_whitespace = 0
"MiniBufExplore Options
"let g:miniBufExplMapWindowNavVim = 1
@ -101,6 +100,7 @@ let b:auto_trim_whitespace = 0
"nnoremap gp gT
nmap gt :NERDTreeToggle<CR>
nmap gT :TlistToggle<CR>
nnoremap gx :Kwbd<CR>
nnoremap gc :bdelete<CR>
nnoremap gK :bdelete!<CR>
nnoremap gn :bn<CR>
@ -332,11 +332,19 @@ endfunction
" Removes trailing spaces
function AutoTrimWhitespace()
if b:auto_trim_whitespace == 1
m'
:%s/\s\+$//e
''
if exists("b:auto_trim_whitespace")
if b:auto_trim_whitespace == 1
m'
:%s/\s\+$//e
''
endif
endif
endfunction
autocmd BufWritePre * :call AutoTrimWhitespace()
" Test fold mappings
nnoremap <silent> <Space> @=(foldlevel('.')?'za':'l')<CR>
vnoremap <Space> zf
inoremap jj <Esc>