I do
find $HOME -type f -name "*.tex" -exec grep -il "$1" {} + | vim -
I cannot exit vim with q only because it gives the error which I do not understand why
E37: No write since last change (add ! to override)
So you have to do q! instead.
However, I would like to let Vim know that there is nothing to override and use instead q. So probably, it could be reached by altering the find command.
How can you find such that Vim knows there is no need of overriding?
viewandvim -R? I cannot understand why to otherwise create a new command. – Léo Léopold Hertz 준영 May 19 '16 at 05:00zcat,gunzip -c, andgzip -cdall do the same thing. If you look in /usr/bin, you'll likely see a lot of commands are just symlinks to other commands. These commands change their behavior based on the name they were called as. – Drew Jun 08 '16 at 22:00