For example, I have some code and I use “*” to search for something within that code. Not finding what I want in that file, I’d like to use something like ack or grep to search for it within the local directory. I know I can do :! ack whatever to do the search from within vim, but what I’d like to know is is there a way to replace whatever with the currently searched for word within vim.
For example, I have some code and I use * to search for something
Share
Riffing off of Tim Henigan’s answer, put this in your .vimrc
Now when you hit
CTRL-R /in command line mode, it will drop the word boundry markers, so you should be able to use