X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.vimrc;h=6f6a46296ce8f56bbaa0dfaf72c4db902bb611f2;hb=164fe482fb8720ccca04c0cf2a696e867cbece67;hp=9128b9448e7b4d9d850680e1e5980822cf9cb5e6;hpb=c1fb9100f55005a4d854b99cee25d4ef056569ce;p=dotfiles.git diff --git a/.vimrc b/.vimrc index 9128b94..6f6a462 100644 --- a/.vimrc +++ b/.vimrc @@ -22,6 +22,10 @@ if exists("b:wrap") " Only do this on the second and subsequent :source's set nomodified endif unlet fenc ftype mod + +elseif filereadable($VIMRUNTIME . "/defaults.vim") + unlet! skip_defaults_vim + source $VIMRUNTIME/defaults.vim endif " No, it is not VI, it is VIM! It is important to set this first, because this @@ -47,6 +51,7 @@ set list " listchars only works with 'list' " Show tabs, non-breaking/trailing spaces, long lines set listchars=tab:>_,nbsp:_,trail:_,extends:+,precedes:+ " Another usefull additions: eol:$,space:_ +set scrolloff=0 " number of screen lines to show around the cursor set wrap " Visually wrap long lines " With 'set wrap' wrap long lines at a character in 'breakat' @@ -315,7 +320,8 @@ if version >= 700 " Save all files before running any quickfix command (grep, makeprg, etc.) autocmd QuickFixCmdPre * wall " automatically close quickfix if it's the only window left -autocmd WinEnter * if winnr('$') == 1 && &buftype == "quickfix" | quit | endif +autocmd WinEnter * if winnr('$') == 1 && + \ index(["nofile", "quickfix"], &buftype) >= 0 | quit | endif endif " Syntax highlighting