aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2024-01-13 00:34:25 +1300
committerTom Ryder <tom@sanctum.geek.nz>2024-01-13 00:34:25 +1300
commitca78850b7298cf7af18d7d103a1302b47ca45ecc (patch)
treee3e0d89bb70da964092e9a55093f918b7b79ba60 /vim
parentPrevent loading the manpager plugin (diff)
downloaddotfiles-ca78850b7298cf7af18d7d103a1302b47ca45ecc.tar.gz
dotfiles-ca78850b7298cf7af18d7d103a1302b47ca45ecc.zip
Set 'cdhome' if it exists
Diffstat (limited to 'vim')
-rw-r--r--vim/vimrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index ca0d9952..3b6b8671 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -556,6 +556,14 @@ if exists('+breakindent')
set breakindent
endif
+" I use `cd` with no argument to go $HOME in the shell all the time.
+" Analogous behavior for Vim with :cd makes sense to me. I can use :pwd (or
+" my <Leader>g mapping) if I want to see where I am.
+"
+if exists('+cdhome')
+ set cdhome
+endif
+
" Rather than rejecting operations like :write or :saveas when 'readonly' is
" set or in other situations in which data might be lost, Vim should give me
" a prompt to allow me to confirm that I know what I'm doing.