Skip to content

Instantly share code, notes, and snippets.

@ashleyh
Created February 23, 2014 16:35
Show Gist options
  • Save ashleyh/9173725 to your computer and use it in GitHub Desktop.
Save ashleyh/9173725 to your computer and use it in GitHub Desktop.
neovim debug script
#!/bin/bash
if [[ "$1" = "--helper" ]] ; then
exec sleep 1000 # XXX
fi
session=$(tmux new-session -d -P -F '#{session_name}' "$0 --helper")
echo "session name: $session"
tty=$(tmux list-panes -t "$session" -F '#{pane_tty}')
echo "inferior tty: $tty"
pane=$(tmux list-panes -t "$session" -F '#{pane_id}')
echo "pane id: $pane"
tmux split-window -h -t "$pane" "gdb build/src/vim -ex 'set inferior-tty $tty'"
tmux attach -t "$session"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment