![]() Let $VIMSRC = expand('~/.build/vim/vim-hg/src', ':p')Ĭnoreabbrev csa ((getcmdtype() = ':' & getcmdpos() csf ((getcmdtype() = ':' & getcmdpos() csfs ((getcmdtype() = ':' & getcmdpos() csfg ((getcmdtype() = ':' & getcmdpos() csfd ((getcmdtype() = ':' & getcmdpos() csfc ((getcmdtype() = ':' & getcmdpos() csft ((getcmdtype() = ':' & getcmdpos() csfe ((getcmdtype() = ':' & getcmdpos() csff ((getcmdtype() = ':' & getcmdpos() csfi ((getcmdtype() = ':' & getcmdpos() csh ((getcmdtype() = ':' & getcmdpos() css ((getcmdtype() = ':' & getcmdpos() <= 6)?Ĭommand -nargs=0 -bar Cscope cs add $VIMSRC/cscope. I also used the -F flag to search for a fixed string to avoid escaping the ellipsis. ![]() ![]() " define $VIMSRC as the src directory in our Vim source clone The command above returns no matches, although the word mortal does appear in the text: this is because by default grep performs a search in case-sensitive mode, so, since the word Mortal is capitalized, it doesnât match the pattern we provided. 3 Answers Sorted by: 399 You can use the -i flag which makes your pattern case insensitive: grep -iF 'success.' file1 Also, there is no need for cat. That is probably not necessary but it looks "cleaner" to me than doing However, if you want your search to be case insensitive, you can use the -i command line option. The :cnoreabbrev commands are just typing shortcuts, but the :CscopeĬommand defined at the end makes sure that I run cscope to use itsÄatabase in the same src directory where I ran it (manually, and afterĪ cd command) to create its database. Of them, maybe with a directory argument instead of hardcoding The POSIX 1003.2 mode of gsub and gregexpr does not work correctly with. It wasn't working for me because I didn't realize the "pre-path" parameter ("/usr/local/vim" in the example) is obligatoryįWIW, I have the following lines in my vimrc I use cscope almostÄ®xclusively to look at the Vim source, where case matters, so my useĬase is not identical to yours, but maybe you could use some variation grep(pattern, x, ignore.case FALSE, perl FALSE, value FALSE, fixed FALSE. If anyone is still paying attention, it does work just as stated in the help. Rather than transforming the input strings, another approach is to specify that the matching should be case insensitive.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |