Created
October 25, 2018 04:49
-
-
Save kyoh86/be47fbcf5e14ee1f30cde12b4b8e69ef to your computer and use it in GitHub Desktop.
terminal in vim で zsh を使う上でクッソ役立つ
This file contains 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
# vimとの連携設定 {{{ | |
if [[ -n "${VIM_TERMINAL}" ]]; then | |
# 現在のパスをタイトルとして渡す | |
function _update_term_title() { | |
# sets the tab title to current dir | |
echo -ne "\033]0;${PWD}\007" | |
} | |
add-zsh-hook precmd _update_term_title | |
# vimを置換える | |
function _drop_vim_file() { | |
echo -ne "\033]51;[\"drop\", \"${1}\"]\07" | |
} | |
alias vim=_drop_vim_file | |
alias vi=_drop_vim_file | |
fi | |
# }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment