X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vimrc;h=3d269fa0634e3c84a5ff08547dda922e8503dfbe;hb=267c1bb661b467c3e663eee4cbde97cffa04b524;hp=631c84405a266078608de28c8243b7b2c124bc88;hpb=5f140efbc41d87dd6338aef64402c7ca0c065a85;p=config%2Fdotfiles.git diff --git a/vimrc b/vimrc index 631c844..3d269fa 100644 --- a/vimrc +++ b/vimrc @@ -89,9 +89,6 @@ set listchars=trail:- " EDITOR SETTINGS -" Don't use any modelines. -set nomodeline - " When completing paths first use the longest path then display a list of all " possible files. set wildmode=longest,list @@ -136,6 +133,12 @@ else \ ((getcmdtype() == ':' && getcmdpos() <= 2) ? 'q' : 'Q') 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 has("mac") + imap +endif + " Disable Apple style movements in MacVim. if has("gui_macvim") let macvim_skip_cmd_opt_movement = 1 @@ -145,7 +148,17 @@ endif " SYNTAX SETTINGS " Activate syntax coloring. -syntax enable +if has("syntax") + syntax enable + +" Highlight text longer then 78 characters. Thanks to Tony Mechelynck +" from the Vim mailing list. + if v:version >= 700 + 2match Todo /\%>78v./ + else + match Todo /\%>78v./ + endif +endif " PLUGIN SETTINGS @@ -155,8 +168,3 @@ syntax enable let NERDCreateDefaultMappings = 0 " Map toggle comment. map NERDCommenterToggle - - -" Automatically save and the load the file state (stored in ~/.vim/view). -autocmd BufWrite * mkview -autocmd BufRead * loadview