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

Re: Disable "New Document Containing Selection" option when text is selected

Expand Messages
  • Dan Conner
    ... Thanks for the pointer. The menu item can be disabled by going to System Preferences Keyboard Keyboard Shortcuts, selecting Services in the left
    Message 1 of 6 , Dec 1, 2009
    • 0 Attachment
      On Dec 1, 1:40 pm, björn <bjorn.winck...@...> wrote:
      > Interesting...I did not even know about that menu.  This is apparently
      > a new feature in Snow Leopard -- that menu item is a "Service" that
      > MacVim provides.  It used to be that these only showed up on the
      > "Services" menu (as a submenu to the current application menu).

      Thanks for the pointer. The menu item can be disabled by going to
      System Preferences > Keyboard > Keyboard Shortcuts, selecting Services
      in the left column, and unchecking the "New Document Containing
      Selection" item in the list under the Text category. Which is enough
      for me.

      --
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • björn
      ... That s clever...I (obviously) did not know about that feature either! Thanks for sharing. Björn -- You received this message from the vim_mac maillist.
      Message 2 of 6 , Dec 2, 2009
      • 0 Attachment
        2009/12/2 Dan Conner:
        > On Dec 1, 1:40 pm, björn <bjorn.winck...@...> wrote:
        >> Interesting...I did not even know about that menu.  This is apparently
        >> a new feature in Snow Leopard -- that menu item is a "Service" that
        >> MacVim provides.  It used to be that these only showed up on the
        >> "Services" menu (as a submenu to the current application menu).
        >
        > Thanks for the pointer. The menu item can be disabled by going to
        > System Preferences > Keyboard > Keyboard Shortcuts, selecting Services
        > in the left column, and unchecking the "New Document Containing
        > Selection" item in the list under the Text category. Which is enough
        > for me.

        That's clever...I (obviously) did not know about that feature either!
        Thanks for sharing.

        Björn

        --
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Carl Jacobsen
        ... I notice two things, looking at the NSServices section of Info.plist... First, on Snow Leopard, the initial MacVim/ part of the descriptions doesn t come
        Message 3 of 6 , Dec 3, 2009
        • 0 Attachment
          On Tue, 1 Dec 2009, björn wrote:

          > 2009/12/1 Dan Conner:
          >> ... I see almost no use for the "New Document Containing
          >> Selection" menu option that now appears whenever I right click on
          >> selected text, ...
          >
          > Interesting...I did not even know about that menu. This is apparently
          > a new feature in Snow Leopard -- that menu item is a "Service" that
          > MacVim provides. It used to be that these only showed up on the
          > "Services" menu (as a submenu to the current application menu).
          >
          > Unfortunately there is no easy permanent way of getting rid of this.
          > One way that will work until you update MacVim.app is to open up
          >
          > MacVim.app/Contents/Info.plist
          >
          > and get rid of the line which contains "NSServices" and the <array>
          > ... </array> item that follows (this spans ~63 lines). ...

          I notice two things, looking at the NSServices section of Info.plist...

          First, on Snow Leopard, the initial "MacVim/" part of the descriptions
          doesn't come through, which makes the descriptions in the context menu
          (only) confusing (in the Services menu, there's a little MacVim icon
          in front of the name, and in Leopard's Services menu, the "MacVim/"
          part turns into a nice submenu). Perhaps MacVim should be incorporated
          into the service names? Something like changing the names:

          MacVim/New Document Containing Selection
          MacVim/Open Selected File
          MacVim/New Document Here
          to these:
          MacVim/New MacVim Document Containing Selection
          MacVim/Open Selected File with MacVim
          MacVim/New MacVim Document Here

          (leaving the "MacVim/" on the front so Leopard still gets a submenu
          in Services; it seems to be harmlessly ignored in Snow Leopard).

          Second, the "Open Selected File" and "New Document Here" services don't
          show up in Snow Leopard (in my experience, at least). I would dearly
          love to be able to control-click in a Finder folder and choose "New
          MacVim Document Here"... Any chance of getting this working in Snow
          Leopard?

          If it helps, the one example I have at hand of an app that *does* show
          up in the context menu on Snow Leopard, when control-clicking in a
          Finder window is EagleFiler. Where MacVim has (roughly) this:

          <key>NSRequiredContext</key>
          <dict>
          <key>NSTextContent</key>
          <string>FilePath</string>
          </dict>
          <key>NSSendTypes</key>
          <array>
          <string>NSStringPboardType</string>
          </array>

          EagleFiler appears to instead have this:

          <key>NSRequiredContext</key>
          <dict>
          </dict>
          <key>NSSendTypes</key>
          <array>
          ...
          <string>NSFilenamesPboardType</string>
          ...
          </array>

          essentially not requiring a specific context, but instead expecting
          a NSFilenamesPboardType type.

          Cheers,
          -- Carl

          --
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • björn
          ... Good idea. I ll implement these changes. ... I had a look at Mail.app and it does not specify NSRequiredContext at all (not even an empty dictionary).
          Message 4 of 6 , Dec 3, 2009
          • 0 Attachment
            2009/12/3 Carl Jacobsen:
            >
            > I notice two things, looking at the NSServices section of Info.plist...
            >
            > First, on Snow Leopard, the initial "MacVim/" part of the descriptions
            > doesn't come through, which makes the descriptions in the context menu
            > (only) confusing (in the Services menu, there's a little MacVim icon
            > in front of the name, and in Leopard's Services menu, the "MacVim/"
            > part turns into a nice submenu).  Perhaps MacVim should be incorporated
            > into the service names?  Something like changing the names:
            >
            >        MacVim/New Document Containing Selection
            >        MacVim/Open Selected File
            >        MacVim/New Document Here
            > to these:
            >        MacVim/New MacVim Document Containing Selection
            >        MacVim/Open Selected File with MacVim
            >        MacVim/New MacVim Document Here
            >
            > (leaving the "MacVim/" on the front so Leopard still gets a submenu
            > in Services; it seems to be harmlessly ignored in Snow Leopard).

            Good idea. I'll implement these changes.


            > Second, the "Open Selected File" and "New Document Here" services don't
            > show up in Snow Leopard (in my experience, at least).  I would dearly
            > love to be able to control-click in a Finder folder and choose "New
            > MacVim Document Here"...  Any chance of getting this working in Snow
            > Leopard?
            >
            > If it helps, the one example I have at hand of an app that *does* show
            > up in the context menu on Snow Leopard, when control-clicking in a
            > Finder window is EagleFiler.  Where MacVim has (roughly) this:
            >
            >        <key>NSRequiredContext</key>
            >        <dict>
            >                <key>NSTextContent</key>
            >                <string>FilePath</string>
            >        </dict>
            >        <key>NSSendTypes</key>
            >        <array>
            >                <string>NSStringPboardType</string>
            >        </array>
            >
            > EagleFiler appears to instead have this:
            >
            >        <key>NSRequiredContext</key>
            >        <dict>
            >        </dict>
            >        <key>NSSendTypes</key>
            >        <array>
            >                ...
            >                <string>NSFilenamesPboardType</string>
            >                ...
            >        </array>
            >
            > essentially not requiring a specific context, but instead expecting
            > a NSFilenamesPboardType type.

            I had a look at Mail.app and it does not specify NSRequiredContext at
            all (not even an empty dictionary). I'll fix this as well.

            Thanks for the suggestions!
            Björn

            --
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
          Your message has been successfully submitted and would be delivered to recipients shortly.