+" Vim 7 brings cool new features - see ':he version7'!
+" The coolest features of Vim7 by mika
+" ====================================
+" 1) omni/intellisense completion: use CTRL-X CTRL-O in insert mode to start it [:he compl-omni]
+" 2) internal grep: vimgrep foo bar [:he vimgrep]
+" 3) tab pages: vim -p file1 file2 - then use the :tab command [:he tabpage]
+" gt -> next tab
+" gT -> previous tab
+" 4) undo branches: :undolist / :earlier 2h / :later 2h
+" instead of using u (undo) and CTRL-R (redo), you might experiment with g-
+" and g+ to move through the text state [:he undolist]
+" 5) browse remote directories via scp using netrw plugin: :edit scp://host//path/to/ [:he netrw.vim]
+" 6) start editing the filename under the cursor and jump to the line
+" number following the file name: press gF [:he gF]
+" 7) press 'CTRL-W F' to start editing the filename under the cursor in a new
+" window and jump to the line number following the file name. [:he CTRL-W_F]
+" 8) spelling correction (see later for its configuration) [:he spell]:
+" ]s -> Move to next misspelled word after the cursor.
+" zg -> Add word under the cursor as a good word to the first name in 'spellfile'
+" zw -> Like "zg" but mark the word as a wrong (bad) word.
+" z= -> For the word under/after the cursor suggest correctly spelled words.
+" 9) highlight active cursor line using 'set cursorline' [:he cursorline]
+" 10) delete inner quotes inside HTML-code using <C-O>cit (see its mapping later) [:he tag-blocks]
+"
+if version >= 700
+ " Thanks for some ideas to Christian 'strcat' Schneider and Julius Plenz
+ " turn spelling on by default:
+ " set spell
+ " toggle spelling with F12 key:
+ map <F12> :set spell!<CR><Bar>:echo "Spell Check: " . strpart("OffOn", 3 * &spell, 3)<CR>
+ set spellfile=~/.vim/spellfile.add
+ " change language - get spell files from http://ftp.vim.org/pub/vim/runtime/spell/ =>
+ " cd ~/.vim/spell && wget http://ftp.vim.org/pub/vim/runtime/spell/de.{latin1,utf-8}.spl
+ " change to german:
+ " set spelllang=de
+ " highlight spelling correction:
+ " highlight SpellBad term=reverse ctermbg=12 gui=undercurl guisp=Red " badly spelled word
+ " highlight SpellCap term=reverse ctermbg=9 gui=undercurl guisp=Blue " word with wrong caps
+ " highlight SpellRare term=reverse ctermbg=13 gui=undercurl guisp=Magenta " rare word
+ " highlight SpellLocale term=underline ctermbg=11 gui=undercurl guisp=DarkCyan " word only exists in other region
+
+ " set maximum number of suggestions listed top 10 items:
+ set spellsuggest=best,10
+
+ " highlight matching parens:
+ " set matchpairs=(:),[:],{:},< :>
+ " let loaded_matchparen = 1
+ " highlight MatchParen term=reverse ctermbg=7 guibg=cornsilk
+
+ " highlight the cursor line and column:
+ " set cursorline
+ " highlight CursorLine term=reverse ctermbg=7 guibg=#333333
+ " highlight CursorColumn guibg=#333333
+
+ " change inner tag - very useful e.g. within HTML-code!
+ " ci" will remove the text between quotes, also works for ' and `
+ imap <F10> <C-O>cit
+
+ " use the popup menu also when there is only one match:
+ " set completeopt=menuone
+ " determine the maximum number of items to show in the popup menu for:
+ set pumheight=7
+ " set completion highlighting:
+ " highlight Pmenu ctermbg=13 guifg=Black guibg=#BDDFFF " normal item
+ " highlight PmenuSel ctermbg=7 guifg=Black guibg=Orange " selected item
+ " highlight PmenuSbar ctermbg=7 guifg=#CCCCCC guibg=#CCCCCC " scrollbar
+ " highlight PmenuThumb cterm=reverse gui=reverse guifg=Black guibg=#AAAAAA " thumb of the scrollbar
+endif
+
+" To enable persistent undo uncomment following section.
+" The undo files will be stored in $HOME/.cache/vim
+
+" if version >= 703
+" " enable persistent-undo
+" set undofile
+"
+" " store the persistent undo file in ~/.cache/vim
+" set undodir=~/.cache/vim/
+"
+" " create undodir directory if possible and does not exist yet
+" let targetdir=$HOME . "/.cache/vim"
+" if isdirectory(targetdir) != 1 && getftype(targetdir) == "" && exists("*mkdir")
+" call mkdir(targetdir, "p", 0700)
+" endif
+" endif