X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vimrc;h=96fb449245b772e83746e2f0b5f2d6e168a9f097;hb=a52de73f7fdafce4bf2e181b4679895bf7c96fe4;hp=3a48b1e0d4fad2dbfe32059eea07fa29ff907577;hpb=3a241c3323be2dac75d0d28cd3360d99bfb56ff0;p=config%2Fdotfiles.git diff --git a/vimrc b/vimrc index 3a48b1e..96fb449 100644 --- a/vimrc +++ b/vimrc @@ -65,14 +65,25 @@ set nomodeline " matches after another (full). Thanks to pbrisbin " (http://pbrisbin.com:8080/dotfiles/vimrc). set wildmode=list:longest,full +" Ignore case when completing files/directories. +if exists('+wildignorecase') + set wildignorecase +endif + +" Show completion menu even if only one entry matches. +if exists('+completeopt') + set completeopt+=menuone +endif -" Increase history of executed commands (:). +" Increase history of executed commands (:) and search patterns (/). set history=1000 " Increase number of possible undos. set undolevels=1000 -" Remember marks (including the last cursor position) for more files. +" Remember marks (including the last cursor position) for more files. ^= is +" necessary because 'viminfo' is parsed from the beginning and the first match +" is used. if has('viminfo') set viminfo^='1000 endif @@ -83,7 +94,7 @@ if exists('+cryptmethod') endif " Clear all vimrc-related autocmds. Has to be done here as the vimrc augroup -" is used multiple times. +" is used multiple times. Necessary to support reloading the vimrc. if has('autocmd') augroup vimrc autocmd! @@ -166,7 +177,7 @@ endif set virtualedit=block " Already display matches while typing the search command. This makes spotting -" errors easy. +" typos easy and searching faster. set incsearch " Activate syntax folding. @@ -196,7 +207,7 @@ endif " Allow buffers with changes to be hidden. Very important for effective " editing with multiple buffers. Prevents the "E37: No write since last change -" (add ! to override)" warning. +" (add ! to override)" warning when switching buffers. set hidden @@ -353,7 +364,7 @@ if has('statusline') set statusline+=%02n " buffer number set statusline+=%{StatuslineBufferCount()} " highest buffer number set statusline+=: - if has('modify_fname') + if has('modify_fname') && v:version >= 700 " some functions need 7.0 set statusline+=%{StatuslineRelativeFilename()} " path to current file set statusline+=\ " space after path else @@ -561,7 +572,7 @@ endif " In case 'hlsearch' is used disable it with . Thanks to frogonwheels and " vimgor (bot) in #vim on Freenode (2010-03-30 05:58 CEST). -noremap :nohlsearch +nnoremap :nohlsearch " in insert mode deletes a lot, break undo sequence before deleting the " line so the change can be undone. Thanks to the vimrc_example.vim file in @@ -754,8 +765,10 @@ if has('eval') " Settings for securemodelines. " Only allow items I need (also includes spl which is not enabled by " default). - let g:secure_modelines_allowed_items = ['ft', 'spl', 'fdm', - \ 'sw', 'sts', 'noet'] + if v:version >= 700 " need lists + let g:secure_modelines_allowed_items = ['ft', 'spl', 'fdm', + \ 'sw', 'sts', 'noet'] + endif " Settings for the NERD commenter. " Don't create any mappings I don't want to use.