Saturday, October 10, 2020

Re: How to grep #tag?

Hi, Life!

On Sat, 10 Oct 2020 21:09:26 -0000 (UTC)
Lifepillar <lifepillar@lifepillar.me> wrote:

> How can I grep text with a special symbol, such as #?
>
> I would like to search a bunch of files containing various #tags, but if
> I try from the command line:
>
> :grep #sometag
>
> that does not work. Escaping the hash causes grep to exit with an error:
>
> :grep \#sometag
>

Either:

:grep \\#p

Or:

:grep '\#p'

Seem to work here in gvim (Linux; shell is either bash or zsh).

> Any idea?
>
> Thanks,
> Life.
>



--

Shlomi Fish https://www.shlomifish.org/
The Case for File Swapping - https://shlom.in/file-swap

SGlau: shut up, Mr. Frog! I'm here on a mission from the Grammar God. Herr
Norris and I are loyal servants of Grammar Nazism, which aims to unite Grammar
Europe under the reign of the Third Grammar Reich. Hail Grammar!
https://is.gd/htmOCv

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201011081112.27473f84%40telaviv1.shlomifish.org.

No comments: