Skip to content

Instantly share code, notes, and snippets.

@kyoh86
Created October 25, 2018 04:49
Show Gist options
  • Save kyoh86/be47fbcf5e14ee1f30cde12b4b8e69ef to your computer and use it in GitHub Desktop.
Save kyoh86/be47fbcf5e14ee1f30cde12b4b8e69ef to your computer and use it in GitHub Desktop.
terminal in vim で zsh を使う上でクッソ役立つ
# 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