Last active
June 12, 2022 05:29
-
-
Save macrat/d386fc2ffa09ed1db7b5594112b521b4 to your computer and use it in GitHub Desktop.
Vimの:termの中でうっかりVimを開くのを防いでくれるbashrc
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
function flattenvim() { | |
if [ "${VIM_SERVERNAME}" != "" ]; then | |
\vim --servername ${VIM_SERVERNAME} --remote $* | |
else | |
\vim --servername "$(head -c 12 /dev/random | base64)" $* | |
fi | |
} | |
alias vi=flattenvim | |
alias vim=flattenvim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment