Skip to content

Commit

Permalink
feat: Add TerminalVim app
Browse files Browse the repository at this point in the history
This is just an Applescript application that, when used to open a file,
tries to open that file in iTerm in Vim.
  • Loading branch information
timhwang21 committed Jan 3, 2020
1 parent ab82bb7 commit e221fd7
Show file tree
Hide file tree
Showing 43 changed files with 233 additions and 0 deletions.
109 changes: 109 additions & 0 deletions sources/TerminalVim.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AMIsApplet</key>
<true/>
<key>AMStayOpen</key>
<false/>
<key>BuildMachineOSBuild</key>
<string>17A405001</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeName</key>
<string>Automator workflow file</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>Application Stub</string>
<key>CFBundleIconFile</key>
<string>AutomatorApplet</string>
<key>CFBundleIdentifier</key>
<string>com.apple.automator.TerminalVim</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>TerminalVim</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>444.42</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10P70r</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>10.14</string>
<key>DTSDKBuild</key>
<string>18F82</string>
<key>DTSDKName</key>
<string>macosx10.14internal</string>
<key>DTXcode</key>
<string>1020</string>
<key>DTXcodeBuild</key>
<string>10P70r</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<key>LSUIElement</key>
<true/>
<key>NSAppleEventsUsageDescription</key>
<string>This workflow needs to control other applications to run.</string>
<key>NSAppleMusicUsageDescription</key>
<string>This workflow needs access to your music to run.</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSCalendarsUsageDescription</key>
<string>This workflow needs access to your calendars to run.</string>
<key>NSCameraUsageDescription</key>
<string>This workflow needs access to your camera to run.</string>
<key>NSContactsUsageDescription</key>
<string>This workflow needs access to your contacts to run.</string>
<key>NSHomeKitUsageDescription</key>
<string>This workflow needs access to your HomeKit Home to run.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This workflow needs access to your microphone to run.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This workflow needs access to your photos to run.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSRemindersUsageDescription</key>
<string>This workflow needs access to your reminders to run.</string>
<key>NSServices</key>
<array/>
<key>NSSiriUsageDescription</key>
<string>This workflow needs access to Siri to run.</string>
<key>NSSystemAdministrationUsageDescription</key>
<string>This workflow needs access to administer this system in order to run.</string>
<key>UTExportedTypeDeclarations</key>
<array/>
<key>UTImportedTypeDeclarations</key>
<array/>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
124 changes: 124 additions & 0 deletions sources/TerminalVim.app/Contents/document.wflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AMApplicationBuild</key>
<string>444.42</string>
<key>AMApplicationVersion</key>
<string>2.9</string>
<key>AMDocumentVersion</key>
<string>2</string>
<key>actions</key>
<array>
<dict>
<key>action</key>
<dict>
<key>AMAccepts</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Optional</key>
<true/>
<key>Types</key>
<array>
<string>com.apple.applescript.object</string>
</array>
</dict>
<key>AMActionVersion</key>
<string>1.0.2</string>
<key>AMApplication</key>
<array>
<string>Automator</string>
</array>
<key>AMParameterProperties</key>
<dict>
<key>source</key>
<dict/>
</dict>
<key>AMProvides</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Types</key>
<array>
<string>com.apple.applescript.object</string>
</array>
</dict>
<key>ActionBundlePath</key>
<string>/System/Library/Automator/Run AppleScript.action</string>
<key>ActionName</key>
<string>Run AppleScript</string>
<key>ActionParameters</key>
<dict>
<key>source</key>
<string>on run {input, parameters} set filename to POSIX path of input set cmd to "clear;cd `dirname " &amp; filename &amp; "`;vim " &amp; filename tell application "iTerm" tell the current window create tab with default profile tell the current session write text cmd end tell end tell end tell end run</string>
</dict>
<key>BundleIdentifier</key>
<string>com.apple.Automator.RunScript</string>
<key>CFBundleVersion</key>
<string>1.0.2</string>
<key>CanShowSelectedItemsWhenRun</key>
<false/>
<key>CanShowWhenRun</key>
<true/>
<key>Category</key>
<array>
<string>AMCategoryUtilities</string>
</array>
<key>Class Name</key>
<string>RunScriptAction</string>
<key>InputUUID</key>
<string>9310E34A-8C82-4CBF-A9D5-1DC699406FF7</string>
<key>Keywords</key>
<array>
<string>Run</string>
</array>
<key>OutputUUID</key>
<string>5FD24758-FA67-4DED-960F-9A3CCCA1E5C6</string>
<key>UUID</key>
<string>9AB5906B-43A6-4ECD-8FB8-93093B071A01</string>
<key>UnlocalizedApplications</key>
<array>
<string>Automator</string>
</array>
<key>arguments</key>
<dict>
<key>0</key>
<dict>
<key>default value</key>
<string>on run {input, parameters}

(* Your script goes here *)

return input
end run</string>
<key>name</key>
<string>source</string>
<key>required</key>
<string>0</string>
<key>type</key>
<string>0</string>
<key>uuid</key>
<string>0</string>
</dict>
</dict>
<key>isViewVisible</key>
<true/>
<key>location</key>
<string>309.000000:315.000000</string>
<key>nibPath</key>
<string>/System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib</string>
</dict>
<key>isViewVisible</key>
<true/>
</dict>
</array>
<key>connectors</key>
<dict/>
<key>workflowMetaData</key>
<dict>
<key>workflowTypeIdentifier</key>
<string>com.apple.Automator.application</string>
</dict>
</dict>
</plist>
Expand Down

0 comments on commit e221fd7

Please sign in to comment.