X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vimrc;h=7d8ebf35f983f408c538fcfee99dcf48cc25dede;hb=66aeeee1ce808a92a59f6ea4276c2eff069d1006;hp=ebda7f3759aa21143a9091b6ee5faa488410a59a;hpb=34d00d871954d3afa40c784ee3d311a68d05782e;p=config%2Fdotfiles.git diff --git a/vimrc b/vimrc index ebda7f3..7d8ebf3 100644 --- a/vimrc +++ b/vimrc @@ -11,6 +11,10 @@ set nocompatible set runtimepath-=~/.vim set runtimepath^=~/.vim,~/.vim/plugins,~/.vim/runtime +" Disable modelines as they may cause security problems. Instead use +" securemodelines (Vim script #1876). +set nomodeline + " When completing paths first use the longest path then display a list of all " possible files. set wildmode=longest,list @@ -64,7 +68,7 @@ set formatoptions+=l set virtualedit=block " Already display matches while typing the search command. This makes spotting -" errors easily. +" errors easy. set incsearch " Activate syntax folding. @@ -106,9 +110,10 @@ if v:version >= 700 set cursorline endif -" Display tabs as "^I" and trailing space as "-". +" Display tabs, trailing space, non breakable spaces and long lines (when +" wrapping is enabled). set list -set listchars=trail:- +set listchars=trail:-,nbsp:!,extends:> " MAPPINGS (except for plugins, see PLUGIN SETTINGS below) @@ -117,10 +122,24 @@ set listchars=trail:- nnoremap nnoremap - +" Fast access to buffers. +nnoremap 1 :1b +nnoremap 2 :2b +nnoremap 3 :3b +nnoremap 4 :4b +nnoremap 5 :5b +nnoremap 6 :6b +nnoremap 7 :7b +nnoremap 8 :8b +nnoremap 9 :9b +nnoremap 0 :10b + " Maps to change spell language between English and German and disable it. -map sn :set nospell -map se :set spell spelllang=en_us -map sd :set spell spelllang=de_de +if v:version >= 700 + map sn :set nospell + map se :set spell spelllang=en_us + map sd :set spell spelllang=de_de +endif " Add semicolon to the end of the line. Thanks to " http://www.van-laarhoven.org/vim/.vimrc for this idea and godlygeek in #vim @@ -154,7 +173,8 @@ else endif " Make sure xa0 (alt + space) is automatically changed to a normal whitespace -" if pressed accidentally while in insert mode (happens on Mac sometimes). +" if pressed accidentally while in insert mode (happens on Mac when alt +" doesn't send escape). if has("mac") imap endif