Skip to content

Conversation

@FuDesign2008
Copy link

In javascript / php, $ is valid in a variable.

function $sayHello () {}

If we run :Ack<CR> when cursor is under $sayHello, nothing will be found.

So try to escape $ and wrap <cword> in ' .

@benknoble
Copy link

benknoble commented May 30, 2019

I wonder if shellescape or fnameescape might help?

@FuDesign2008
Copy link
Author

  1. This commit is only fix for the word that includes $, is not a universal solution.
  2. The source file has following comment. I'm not familiar with vimscript and can't find a better solution.
  " NOTE: we escape special chars, but not everything using shellescape to
  "       allow for passing arguments etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants