Loading ...
Sorry, an error occurred while loading the content.

13645Re: Improvement to the mvim script

Expand Messages
  • William Douglas
    Apr 4 11:05 AM
    • 0 Attachment
      On Thursday, March 28, 2013 1:20:33 PM UTC-7, björn wrote:
      > On Thu, Mar 28, 2013 at 3:06 AM, William Douglas wrote:
      >
      > > Changed the mvim script so it finds MacVim.app regardless of where it is located.
      >
      > >
      >
      > > If MacVim is not found in the predefined search path, query the OS for the location. The changes are minimal - just add the following at line #26 of "mvim".
      >
      > >
      >
      > > xmlstr="`osascript -e "return POSIX path of (path to application \\"MacVim\\")"`"
      >
      > > VIM_APP_DIR="`echo ${xmlstr:0:${#xmlstr}-12}`"
      >
      > >
      >
      > > Uses AppleScript to query for the location of MacVim. Then trims some characters from the result so it can still be used with the rest of the script. The AppleScript is only run if required - to keep things fast.
      >
      >
      >
      > Initially that sounds sort of useful, but I'm guessing it adds to the
      >
      > startup time a bit which is bad. In that respect, isn't it better to
      >
      > just install MacVim to /Applications or just set VIM_APP_DIR if that
      >
      > is not possible?
      >
      >
      >
      > Björn

      It only adds to the startup time if MacVim is not in one of the normal application directories. The script falls back to the Applescript command only if it is not found normally. For most users, the Applescript code will never get run. The Applescript is basically run in place of the "sorry, MacVim not found" message; so if you normally don't see that message, there will be no impact on the startup time.

      William

      --
      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_mac" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 3 messages in this topic