Giter VIP home page Giter VIP logo

Comments (4)

wincent avatar wincent commented on July 18, 2024

See this section in the docs. Let me know if that doesn't help.

from ferret.

lsaint avatar lsaint commented on July 18, 2024

it works, thanks.

from ferret.

lsaint avatar lsaint commented on July 18, 2024

@wincent <Plug>(FerretAckWord) works well, but i would like to match whole word only, like the -w arg in Ack, how should i do ?

from ferret.

wincent avatar wincent commented on July 18, 2024

If you look at the definition of <Plug>(FerretAckWord) you'll see it just maps to:

:Ack <C-r><C-w><CR>

And if you look at the Vim help (:h c_CTRL-R_CTRL-W) for <C-r><C-w> you'll see:

CTRL-R CTRL-F				*c_CTRL-R_CTRL-F* *c_<C-R>_<C-F>*
CTRL-R CTRL-P				*c_CTRL-R_CTRL-P* *c_<C-R>_<C-P>*
CTRL-R CTRL-W				*c_CTRL-R_CTRL-W* *c_<C-R>_<C-W>*
CTRL-R CTRL-A				*c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
CTRL-R CTRL-L				*c_CTRL-R_CTRL-L* *c_<C-R>_<C-L>*
		Insert the object under the cursor:
			CTRL-F	the Filename under the cursor
			CTRL-P	the Filename under the cursor, expanded with
				'path' as in |gf|
			CTRL-W	the Word under the cursor
			CTRL-A	the WORD under the cursor; see |WORD|
			CTRL-L	the line under the cursor

so it is expanding the "word" under the cursor. You could make a similar mapping to instead find the "WORD". If neither of those gives you what you want, then you'd need to cook something else up, but for most intents and purposes, "word" should be pretty close to what -w does.

from ferret.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.