aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2012-01-27 09:58:33 -0800
committerMathias Bynens <mathias@qiwi.be>2012-01-27 09:58:33 -0800
commite979df7a7d817a4c0a5e2af88df25c9d68d60464 (patch)
tree9ca937da4dab19790207e72cb114785177a427f9
parent4f575d23139ec978bfe8ce24b2a5f11aca04cb9b (diff)
parent86a8986225a87716d31b21b966ea7f271751f888 (diff)
downloaddotfiles-e979df7a7d817a4c0a5e2af88df25c9d68d60464.tar.gz
dotfiles-e979df7a7d817a4c0a5e2af88df25c9d68d60464.tar.bz2
dotfiles-e979df7a7d817a4c0a5e2af88df25c9d68d60464.zip
Merge pull request #40 from paulirish/mathias
.vimrc: Use feature detection for new settings that aren’t available in hipster vims
-rw-r--r--.vimrc12
1 files changed, 8 insertions, 4 deletions
diff --git a/.vimrc b/.vimrc
index ba63e87..bffce0e 100644
--- a/.vimrc
+++ b/.vimrc
@@ -18,7 +18,9 @@ set noeol
" Centralize backups, swapfiles and undo history
set backupdir=~/.vim/backups
set directory=~/.vim/swaps
-set undodir=~/.vim/undo
+if exists("&undodir")
+ set undodir=~/.vim/undo
+endif
" Enable line numbers
set number
@@ -53,9 +55,11 @@ set shortmess=atI
set showmode
" Show the filename in the window titlebar
set title
-" Use relative line numbers
-set relativenumber
-au BufReadPost * set relativenumber
+if exists("&relativenumber")
+ " Use relative line numbers
+ set relativenumber
+ au BufReadPost * set relativenumber
+endif
" Start scrolling three lines before the horizontal window border
set scrolloff=3