> On 2020-10-11, Shlomi Fish <[email protected]> wrote: > > On Sat, 10 Oct 2020 21:09:26 -0000 (UTC) > > Lifepillar <[email protected]> wrote: > > > >> How can I grep text with a special symbol, such as #? > > > > Either: > > > > :grep \\#p > > > > Or: > > > > :grep '\#p' > > > > Seem to work here in gvim (Linux; shell is either bash or zsh). > > That does it! Double-escaping is always tricking me.
You can use any special character to surround the pattern, it's a lot easier than escaping. I often use ":grep /pattern/ *", unless the pattern contains a slash. -- I'm trying to be an optimist, but I don't think it'll work. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/202010111222.09BCMkFq3991128%40masaka.moolenaar.net.
