Merge pull request #1734 from georgettica/patch-2

feat(vim-alias): add full screen help
pull/1757/head
Noah Gorny 2020-12-28 21:39:43 +02:00 committed by GitHub
commit 1d4b325ce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -5,15 +5,20 @@ VIM=$(command -v vim)
GVIM=$(command -v gvim) GVIM=$(command -v gvim)
MVIM=$(command -v mvim) MVIM=$(command -v mvim)
[[ -n $VIM ]] && alias v=$VIM if [[ -n $VIM ]]; then
alias v='$VIM'
# open the vim help in fullscreen incorporated from
# https://stackoverflow.com/a/4687513
alias vimh='${VIM} -c ":h | only"'
fi
# open vim in new tab is taken from # open vim in new tab is taken from
# http://stackoverflow.com/questions/936501/let-gvim-always-run-a-single-instancek # http://stackoverflow.com/questions/936501/let-gvim-always-run-a-single-instancek
case $OSTYPE in case $OSTYPE in
darwin*) darwin*)
[[ -n $MVIM ]] && function mvimt { command mvim --remote-tab-silent "$@" || command mvim "$@"; } [[ -n $MVIM ]] && function mvimt { command mvim --remote-tab-silent "$@" || command mvim "$@"; }
;; ;;
*) *)
[[ -n $GVIM ]] && function gvimt { command gvim --remote-tab-silent "$@" || command gvim "$@"; } [[ -n $GVIM ]] && function gvimt { command gvim --remote-tab-silent "$@" || command gvim "$@"; }
;; ;;
esac esac

View File

@ -34,3 +34,6 @@ completion/available/cargo.completion.bash
completion/available/knife.completion.bash completion/available/knife.completion.bash
completion/available/pipx.completion.bash completion/available/pipx.completion.bash
completion/available/rustup.completion.bash completion/available/rustup.completion.bash
# aliases
aliases/available/vim.aliases.bash