" Vim main configuration file.
-" Copyright (C) 2008-2013 Simon Ruderich
+" Copyright (C) 2008-2016 Simon Ruderich
"
" This file is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" precaution just in case somebody enables 'exrc'.
set secure
+" Try to use pipes instead of temporary files. Prevents some auto commands
+" from running for temporary files but also prevents the file's content to be
+" written to disk.
+set noshelltemp
+
" Use UTF-8 for all internal data (buffers, registers, etc.). This doesn't
" affect reading files in different encodings, see 'fileencodings' for that.
set encoding=utf-8
endif
" But store them in ~/.tmp or ~/tmp (already set by default) if available.
set directory^=~/.tmp
+" Never use /tmp which gets cleaned on reboot.
+set directory-=/tmp
" Disable modelines as they may cause security problems. Instead use
" securemodelines (Vim script #1876).
cnoremap <C-P> <Up>
cnoremap <C-N> <Down>
+" Use :tjump to lookup tags (instead of :tag) which lists all available tags
+" if there's more than one match. This is really helpful in larger projects
+" where tags may occur multiple times.
+nnoremap <C-]> g<C-]>
+
if has('eval')
" Don't move the cursor to the first column for certain scroll commands (<C-F,
" <C-B>, <C-D>, <C-U>). Thanks to jamessan in #vim on Freenode (2011-08-31