search

Home  >  Q&A  >  body text

[vim operation] How to quickly select a word and query it in the current window when developing a program?

does not mean selecting words with the mouse and then querying in this way

/word

Instead, I want to use shortcut keys to quickly complete this operation.

Step1 end

By the way, how can I quickly copy the current word? Don't use the "v" and then slowly cross your way through it.
Instead, I want to quickly pick it up on the current word, so that I can query it immediately when opening other files.

Step2 end

Thank you for your enthusiastic replies, which make this question more valuable. Please post these two links in the question for future reference:

  1. http://eastcoastefx.vaesite.com/vim
  2. http://www.fprintf.net/vimCheatSheet....
为情所困为情所困2743 days ago696

reply all(4)I'll reply

  • 阿神

    阿神2017-05-16 16:44:35

    Press * or # on the word

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 16:44:35

    Copy word: yiw
    If you use * or # to search for a word, use n or N in another file

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-16 16:44:35

    When the cursor is on the word, just press gD. There is no need to select the complete word first
    Then jump via n/N

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-16 16:44:35

    It is recommended that you learn the commonly used shortcuts in vim

    http://wiki.wutianqi.com/vim/vim_shor...

    I wrote this article based on a foreign article, you can check out the #Search section

    reply
    0
  • Cancelreply