1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 06:29:02 -08:00

refactor and disable resCur

This commit is contained in:
Connor Olding 2013-07-04 02:07:41 -07:00
parent 764df407b5
commit 75a0479ac3

21
vimrc
View file

@ -81,9 +81,9 @@ set nolinebreak
set tabstop=8 shiftwidth=8 smarttab " 8 space tabs
function! TabFour()
fu! TabFour()
setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4
endfunction
endf
if has('autocmd')
augroup tabs " 4 spaces as tabs for various languages
@ -92,12 +92,17 @@ if has('autocmd')
au BufRead,BufNewFile *.json call TabFour()
augroup END
" attempt to preserve cursor position
" FIXME: waits for input after running
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" FIXME: this requires input upon starting vim, annoying
fu! ResCur() " attempt to preserve cursor position
if line("'\"") > 1 && line("'\"") <= line("$")
normal! g`"
return 1
endif
endf
augroup resCur
au!
"au BufWinEnter * call ResCur()
augroup END
endif
set backspace=eol,start,indent " make backspace useful