Skip to content

Instantly share code, notes, and snippets.

@kitsuyui
Forked from brablc/TerminalVim.scpt
Created October 5, 2015 15:37
Show Gist options
  • Save kitsuyui/3614da767252840a0d66 to your computer and use it in GitHub Desktop.
Save kitsuyui/3614da767252840a0d66 to your computer and use it in GitHub Desktop.
Open Vim in Terminal (iTerm) from Finder - copied from http://thepugautomatic.com/2015/02/open-in-iterm-vim-from-finder/ and updated to open in the current terminal
on run {input, parameters}
set cmd to "vim -c startinsert"
if input is not in {} then
set myPath to POSIX path of input
set cmd to "vim " & quote & myPath & quote
end if
tell application "iTerm"
activate
set myTerm to (current terminal)
tell myTerm
set mySession to (make new session at the end of sessions)
tell mySession to exec command cmd
end tell
end tell
end run
@kitsuyui
Copy link
Author

kitsuyui commented Oct 5, 2015

メモ: Automator でアプリ化する。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment