Skip to content

Instantly share code, notes, and snippets.

@srashee
Forked from charlietran/TerminalVim.scpt
Created April 1, 2022 17:53
Show Gist options
  • Select an option

  • Save srashee/ff207ff65024c7436d92f752f08d7aaa to your computer and use it in GitHub Desktop.

Select an option

Save srashee/ff207ff65024c7436d92f752f08d7aaa to your computer and use it in GitHub Desktop.

Revisions

  1. @charlietran charlietran revised this gist Dec 16, 2016. 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
    @@ -6,7 +6,7 @@
    -- 2. Add the "Run Applescript" action
    -- 3. Paste this script into the Run Applescript section
    -- 4. Save the application as TerminalVim.app in your Applications folder
    -- 5. In the Finder, right click on a file and select Open With...
    -- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default

    on run {input, parameters}
    tell application "iTerm"
  2. @charlietran charlietran revised this gist Dec 16, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions TerminalVim.scpt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    -- TerminalVim.app
    -- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm

    -- To use this script:
    -- 1. Open Automator and create a new Application
    -- 2. Add the "Run Applescript" action
  3. @charlietran charlietran revised this gist Dec 16, 2016. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions TerminalVim.scpt
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    // To use this script:
    // 1. Open Automator and create a new Application
    // 2. Add the "Run Applescript" action
    // 3. Paste this script into the Run Applescript section
    // 4. Save the application as TerminalVim.app in your Applications folder
    // 5. In the Finder, right click on a file and select Open With...
    -- To use this script:
    -- 1. Open Automator and create a new Application
    -- 2. Add the "Run Applescript" action
    -- 3. Paste this script into the Run Applescript section
    -- 4. Save the application as TerminalVim.app in your Applications folder
    -- 5. In the Finder, right click on a file and select Open With...

    on run {input, parameters}
    tell application "iTerm"
    @@ -14,4 +14,4 @@ on run {input, parameters}
    end tell
    end tell
    end tell
    end run
    end run
  4. @charlietran charlietran created this gist Dec 16, 2016.
    17 changes: 17 additions & 0 deletions TerminalVim.scpt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // To use this script:
    // 1. Open Automator and create a new Application
    // 2. Add the "Run Applescript" action
    // 3. Paste this script into the Run Applescript section
    // 4. Save the application as TerminalVim.app in your Applications folder
    // 5. In the Finder, right click on a file and select Open With...

    on run {input, parameters}
    tell application "iTerm"
    create window with default profile
    tell front window
    tell current session
    write text ("vim " & quote & POSIX path of input & quote & "; exit")
    end tell
    end tell
    end tell
    end run