Advertisement
Guest User

Vim AppleScript extample

a guest
Oct 12th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.44 KB | None | 0 0
  1. " Running AppleScript: ----------------------------------------------------------------
  2. func! AppleScriptRunAndForget (ascode)
  3.   silent exec      '!osascript' '-e' shellescape( a:ascode ) | redraw!
  4. endfunc
  5. " testarg: 'tell application "Finder" to make new Finder window'
  6. " find next testarg line, "Wy[to some other register])"
  7.  
  8. func! AppleScriptRunAndForgetAsync (ascode)
  9.   exec 'Dispatch!' 'osascript' '-e' shellescape( a:ascode )
  10. endfunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement