For some reason I can't for the life of me figure out how to pass single quotation marks to external tools when using vim. For example, I might want to call Vim's external grep to search for the text "foo (that is, a single quotation mark then the word foo)
So I might try the command:
:grep \"foo *.txt
But this results in the following error message:
!findstr /n \"foo *.txt >C:\Users\[username]\AppData\Local\Temp\VIeC244.tmp 2>&1
shell returned 1
E40: Can't open errorfile C:\Users\[username]\AppData\Local\Temp\VIeC244.tmp
Note that grep is changed to use 'findstr /n' since I'm on windows (and can be verified by running echo &grepprg). What I find is that I can easily execute the search I want if I do it myself from the command line by typing the following:
findstr /n \"foo *.txt
Which works exactly as I'd expect