1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 08: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 set tabstop=8 shiftwidth=8 smarttab " 8 space tabs
function! TabFour() fu! TabFour()
setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4 setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4
endfunction endf
if has('autocmd') if has('autocmd')
augroup tabs " 4 spaces as tabs for various languages augroup tabs " 4 spaces as tabs for various languages
@ -92,12 +92,17 @@ if has('autocmd')
au BufRead,BufNewFile *.json call TabFour() au BufRead,BufNewFile *.json call TabFour()
augroup END augroup END
" attempt to preserve cursor position " FIXME: this requires input upon starting vim, annoying
" FIXME: waits for input after running fu! ResCur() " attempt to preserve cursor position
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$")
\ if line("'\"") > 1 && line("'\"") <= line("$") | normal! g`"
\ exe "normal! g`\"" | return 1
\ endif endif
endf
augroup resCur
au!
"au BufWinEnter * call ResCur()
augroup END
endif endif
set backspace=eol,start,indent " make backspace useful set backspace=eol,start,indent " make backspace useful