Skip to content

Instantly share code, notes, and snippets.

@skissane
Created June 14, 2017 22:38
Show Gist options
  • Save skissane/a8cc23949ee38ff3abba8b99b5b6503d to your computer and use it in GitHub Desktop.
Save skissane/a8cc23949ee38ff3abba8b99b5b6503d to your computer and use it in GitHub Desktop.
Script to launch vim
#!/bin/bash
if [ "$#" -eq 0 ]; then
count="$(gvim --serverlist | wc -l)"
if [ "$count" -eq 0 ]; then
gvim
else
gvim --remote-send "$(echo -ne '\033:tabe\r')"
fi
else
gvim --remote-tab-silent "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment