Skip to content

Instantly share code, notes, and snippets.

View kitsuyui's full-sized avatar
🐢

kitsuyui kitsuyui

🐢
View GitHub Profile
@charlietran
charlietran / TerminalVim.scpt
Last active June 19, 2024 09:37
Open file in iTerm vim for MacOS Sierra
-- 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. 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". In that window you can set TerminalVim as a default
@brablc
brablc / TerminalVim.scpt
Last active December 24, 2016 01:30
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)