Commit 68408d9d authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Rework neovim-remote launching of vim

parent 2bf106e9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -8,9 +8,13 @@ export FIGNORE='.o:.pyc:~:.swp:.swa'
export VIRTUAL_ENV_DISABLE_PROMPT=yes
export GIT_SSH=$HOME/.ssh/ssh

has vim &&
	export EDITOR=vim ||
if has nvr; then
	export EDITOR="$HOME/.vim/bin/vim.remote"
elif has vim; then
	export EDITOR=vim
else
	export EDITOR=vi
fi

has gpg-agent &&
	export SSH_AUTH_SOCK=`gpgconf --list-dirs agent-ssh-socket`
+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ alias egrep='~/.shell/bin/grep-auto-exclude egrep -n'
# special SSH
alias ssh='~/.ssh/ssh'

# special vim
alias vim="FROM_ALIAS=yes $EDITOR"


## Common miss-spellings
## =====================
@@ -38,3 +41,6 @@ alias pyhton3=python3
alias ipyhton=ipython
alias ipyhton2=ipython2
alias ipyhton3=ipython3


# vim: ft=sh

.vim/bin/vim.remote

0 → 100755
+8 −0
Original line number Diff line number Diff line
#!/bin/sh
if ! type nvr >/dev/null 2>&1; then
	exec vim "$@"
elif [ -n "$FROM_ALIAS" ]; then
	exec nvr -s --remote "$@"
else
	exec nvr -s --remote-tab-wait -c 'setl bufhidden=wipe' "$@"
fi