Skip to content

Instantly share code, notes, and snippets.

@ikuwow
Last active March 16, 2016 14:20
Show Gist options
  • Save ikuwow/e8a52ed8cb6586bf3363 to your computer and use it in GitHub Desktop.
Save ikuwow/e8a52ed8cb6586bf3363 to your computer and use it in GitHub Desktop.
sshした先に.bashrcや.vimrcを持って行きたい人のためのsshrc ref: http://qiita.com/ikuwow/items/ba4ca57fd67c06fd1b19
$ brew install sshrc
$ echo "alias ll='ls -l'" >> ~/.sshrc
$ sshrc me@myserver
$ type ll
ll is aliased to `ls -a'
$ mkdir ~/.sshrc.d
$ cd ~/.sshrc.d && ln -s ../.vimrc .vimrc/
$ cat << 'EOF' >> ~/.sshrc
export VIMINIT="let \$MYVIMRC='$SSHHOME/.sshrc.d/.vimrc' | source \$MYVIMRC"
EOF
$ sshrc me@myserver
$ vim # .vimrcが読まれてる!!
if isdirectory(expand("~/.vim/bundle/neobundle.vim/"))
NeoBundle 'scrooloose/nerdtree'
NeoBundleCheck
" ほかにもいろいろ...
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment