X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.vimrc;h=bc18a76ea2aa263163d917f70f8b5ff875321969;hb=28f1d0428362ae11d5c3cae5a2df2bc960872c07;hp=9128b9448e7b4d9d850680e1e5980822cf9cb5e6;hpb=c1fb9100f55005a4d854b99cee25d4ef056569ce;p=dotfiles.git diff --git a/.vimrc b/.vimrc index 9128b94..bc18a76 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 @@ -34,6 +38,7 @@ behave xterm " 2 moving around, searching and patterns set ignorecase " Ignore case in search patterns +set noincsearch " No incremental searching set smartcase " Match 'word' case-insensitive and 'Word' case-sensitive set nostartofline " Keep cursor's column @@ -47,6 +52,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 +321,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