Last active
December 11, 2015 16:58
-
-
Save yamaya/4631251 to your computer and use it in GitHub Desktop.
VimからXcodeでActiveなtargetをRunする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! <SID>XcodeRunCurrentTarget() | |
let l:apple_script = 'tell application "Xcode"' | |
\. "\n". ' activate' | |
\. "\n". ' tell application "System Events"' | |
\. "\n". ' key code 15 using {command down}' | |
\. "\n". ' end tell' | |
\. "\n". 'end tell' | |
call system(printf("osascript -e '%s'", l:apple_script)) | |
endfunction | |
nnoremap <buffer> <F5> :call <SID>XcodeRunCurrentTarget()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment