Skip to content

Instantly share code, notes, and snippets.

@remy-actual
Forked from brablc/TerminalVim.scpt
Created September 16, 2016 15:53
Show Gist options
  • Select an option

  • Save remy-actual/071852832d0e21ab67e555ecbccd9774 to your computer and use it in GitHub Desktop.

Select an option

Save remy-actual/071852832d0e21ab67e555ecbccd9774 to your computer and use it in GitHub Desktop.

Revisions

  1. @brablc brablc revised this gist Feb 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion TerminalVim.scpt
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ 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 " & "\"" & myPath & "\""
    set cmd to "vim " & quote & myPath & quote
    end if

    tell application "iTerm"
  2. @brablc brablc revised this gist Feb 13, 2015. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions TerminalVim.scpt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    on run {input, parameters}
    set myPath to POSIX path of input
    set cmd to "vim " & quote & myPath & quote
    set cmd to "vim -c startinsert"
    if input is not in {} then
    set myPath to POSIX path of input
    set cmd to "vim " & "\"" & myPath & "\""
    end if

    tell application "iTerm"
    activate
  3. @brablc brablc revised this gist Feb 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion TerminalVim.scpt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    on run {input, parameters}
    set myPath to POSIX path of input
    set cmd to "vim " & "\"" & myPath & "\""
    set cmd to "vim " & quote & myPath & quote

    tell application "iTerm"
    activate
  4. @brablc brablc renamed this gist Feb 5, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. @brablc brablc renamed this gist Feb 5, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. @brablc brablc renamed this gist Feb 5, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. @brablc brablc created this gist Feb 5, 2015.
    13 changes: 13 additions & 0 deletions TerminalVim.app
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    on run {input, parameters}
    set myPath to POSIX path of input
    set cmd to "vim " & "\"" & myPath & "\""

    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