X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vimrc;h=7d8ebf35f983f408c538fcfee99dcf48cc25dede;hb=66aeeee1ce808a92a59f6ea4276c2eff069d1006;hp=d5555c48b1f39a0b1ddcfc2ae387cf1cfac9a476;hpb=2ed2c5e01f661ac81ffb78ba465333eb401f9ac9;p=config%2Fdotfiles.git diff --git a/vimrc b/vimrc index d5555c4..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, trailing space and non breakable spaces. +" Display tabs, trailing space, non breakable spaces and long lines (when +" wrapping is enabled). set list -set listchars=trail:-,nbsp:! +set listchars=trail:-,nbsp:!,extends:> " MAPPINGS (except for plugins, see PLUGIN SETTINGS below) @@ -117,6 +122,18 @@ set listchars=trail:-,nbsp:! 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. if v:version >= 700 map sn :set nospell @@ -156,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