Skip to content

Commit

Permalink
Ensure the command is only added once.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Jul 3, 2015
1 parent 471434a commit ee7ae78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ftplugin/objc_open_selection_in_xcode.vim
@@ -1 +1,6 @@
command Xcode call system("xcrun xed -l " . line(".") . " " . fnameescape(expand('%:p')) . " && echo 'tell application \"Xcode-Beta\"\\nactivate\\nend tell\\ntell application \"System Events\"\\ntell application process \"Xcode\"\\nclick menu item \"Jump to Selection\" of menu \"Navigate\" of menu bar 1\\nend tell\\nend tell' | osascript")
if exists('s:did_add_open_in_xcode')
finish
endif
let s:did_add_open_in_xcode = 1

command Xcode call system("xcrun xed -l " . line(".") . " " . fnameescape(expand('%:p')) . " && echo 'tell application \"Xcode\"\\nactivate\\nend tell\\ntell application \"System Events\"\\ntell application process \"Xcode\"\\nclick menu item \"Jump to Selection\" of menu \"Navigate\" of menu bar 1\\nend tell\\nend tell' | osascript")

0 comments on commit ee7ae78

Please sign in to comment.