vim-iterm2-navigator
vim-iterm2-navigator copied to clipboard
Not working with latest iTerm2
Things weren't working for me, so I ran the command on the command line to see what's going on:
➝ ~/dotfiles/vim/bundle/iterm2-navigator/switch.py h
/Users/thlorenz/dotfiles/vim/bundle/iterm2-navigator/applescript/iterm2_getname.scpt: execution error: iTerm got an error: Can’t get «class Ctrm». (-1728)
Traceback (most recent call last):
File "/Users/thlorenz/dotfiles/vim/bundle/iterm2-navigator/switch.py", line 15, in <module>
name = subprocess.check_output(['osascript',path_to('iterm2_getname.scpt')])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 575, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['osascript', '/Users/thlorenz/dotfiles/vim/bundle/iterm2-navigator/applescript/iterm2_getname.scpt']' returned non-zero exit status 1
I'm using iTerm2 Build 2.9.20141006-nightly
.
It'd be awesome to get this to work, so any idea what's going on? Thanks.
Are there any fixes for iTerm2 Build 3.0.13?
Initiating the scripts directly works just fine, e.g.
$ .vim/bundle/vim-iterm2-navigator/switch.py h
But the mapping within iTerm2 Build 3.0.13 just does nothing, e.g,
Key Combination: Ctrl + Cmd + h Action: Run Coprosses "~/.vim/bundle/vim-iterm2-navigator/switch.py h"
Also posted at iTerm2
I can confirm this issue on Iterm2 3.0.12. However, fix from https://github.com/zephod/vim-iterm2-navigator/pull/3 helper me to resolve this issue.
I rewrote the switching script in bash to make this a little faster if you guys are still using it:
#!/bin/sh
BASE_DIR=$(dirname "$0")
PROC_NAME=$(osascript ${BASE_DIR}/applescript/iterm2_getname.scpt)
if [[ "$PROC_NAME" == *"vim"* ]];
then
echo '\x1b'
echo ":call SwitchWindow(\"$1\")"
echo '\r'
else
osascript "${BASE_DIR}/applescript/iterm2_$1.scpt"
fi