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

7712Re: Probably the wrong forum to ask - double click highlight and quick search

Expand Messages
  • Rick
    Jun 1, 2008
      On Sun, Jun 1, 2008 at 2:09 PM, Nico Weber <nicolasweber@...> wrote:
      > Short answer: Hit ⌘E to search for the text that is currently
      > highlighted. This copies the currently highlighted text to the "search
      > pasteboard". You can now hit ⌘G in all applications to search for
      > this text. This is a Mac OS X feature and works in all apps (e.g. you
      > could highlight text in MacVim, hit ⌘E, then switch to Safari and hit
      > ⌘G to search for the text you had highlighted in MacVim). ⌘E is
      > probably what you want.

      Ha! That is so amazingly cool. I'm new to the Mac and LOVE It. I think
      I need to go search now for all the available Mac short cuts.

      Yes ⌘-E is just perfect!

      > Long answer: You could add a mapping for your current approach:
      > map <F3> y/<C-r>"<CR>

      Thanks for this also. Might add this also just for an a cross vim
      approach? (Right now I'm just ecstatic over the ⌘-E thing:)

      > Even better, you can simply hit * to search for the word under the
      > cursor. This requires that the cursor is on the word you want to
      > search for, and you say that you're using the mouse. It is often
      > faster to navigate with the keyboard, so in cases where you're using
      > the keyboard anyways, * might be a nice option.

      Yes I like this one but I'm often needing to select more than just one
      word and quickly find the occurrences.

      > Finally, when you're browsing code, you probably want to search for an
      > identifier to see where it is defined. In this cases, read about ctags
      > or cscope and <C-]>, this is much more efficient to look up
      > definitions (and with cscope, you can even look for all uses of a
      > function, all functions called by a function, etc. -- at least if your
      > programming language is supported by cscope).

      Yea I should look into that. I typically have my IDE open for my Java
      stuff, but I really would like to use ctags more. I assume you can set
      up projects so ctags knows the scope of where to look. I'll look into
      using them. I often don't want my IDE open and would love to use
      macVim instead (even though I do have an Eclipse vim plugin which is
      nice for moving around without the mouse.)

      > HTH,

      It sure did! Thanks.

      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 3 messages in this topic