Last active
March 16, 2016 14:20
-
-
Save ikuwow/e8a52ed8cb6586bf3363 to your computer and use it in GitHub Desktop.
sshした先に.bashrcや.vimrcを持って行きたい人のためのsshrc ref: http://qiita.com/ikuwow/items/ba4ca57fd67c06fd1b19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install sshrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo "alias ll='ls -l'" >> ~/.sshrc | |
$ sshrc me@myserver | |
$ type ll | |
ll is aliased to `ls -a' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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が読まれてる!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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