Skip to content

Commit 0421208

Browse files
authored
Added support for .vim folder again
1 parent 8d37813 commit 0421208

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ Your most import configuration files (e.g. vim, inputrc) may not be bash scripts
4545
$ sshrc me@myserver
4646
$ vim # jk -> normal mode will work
4747

48+
If you want to load your .vim folder as well, you can 1) put the .vim folder in ~/.sshrc.d, 2) move your .vimrc into the .vim folder, 3) edit the path above to reflect the new .vimrc location, and 4) add the following lines at the top of the moved .vimrc, which will notify vim of the .vim folder location:
49+
50+
" set default 'runtimepath' (without ~/.vim folders)
51+
let &runtimepath = printf('%s/vimfiles,%s,%s/vimfiles/after', $VIM, $VIMRUNTIME, $VIM)
52+
" what is the name of the directory containing this file?
53+
let s:portable = expand('<sfile>:p:h')
54+
" add the directory to 'runtimepath'
55+
let &runtimepath = printf('%s,%s,%s/after', s:portable, &runtimepath, s:portable)
4856

4957
### Tmux
5058

0 commit comments

Comments
 (0)