env/setup/macos/NvimLauncherITerm.applescript

22 lines
673 B
AppleScript
Raw Normal View History

2022-08-24 17:36:18 -07:00
# From: https://gregrs-uk.github.io/2018-11-01/open-files-neovim-iterm2-macos-finder/
2022-06-09 16:44:15 -07:00
# Instructions:
# - Create new application in Automator
# - Add "run applescript" step
# - Paste in the below script
2022-08-24 17:36:18 -07:00
# From: https://gregrs-uk.github.io/2018-11-01/open-files-neovim-iterm2-macos-finder/
# Instructions:
# - Create new application in Automator
# - Add "run applescript" step
# - Paste in the below script
2022-06-09 16:44:15 -07:00
on run {input, parameters}
set myPath to POSIX path of input
set cmd to "/opt/homebrew/bin/nvim -p " & quote & myPath & quote
tell application "iTerm"
activate
tell current window
create tab with default profile command cmd
end tell
end tell
end run