Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 6498

For questions about searching for text with / or search(). For find/replace operations, use tag [substitute] instead.

0 votes

Searching for a phrase in hard-wrapped text

However, I've found that it has one weakpoint, which is not necessarily negligible: if you abort the special search, i.e. you press //(changed your mind)Escape, you'll get E385: Search hit BOTTOM without … , before mapping Ctrl-S, we first clear the autocmd of point 2 above, because we don't want to cunmap <space> on subsequent searches where we don't hit Ctrl-S. leaving the search cunmaps Ctrl-S. …
Enlico's user avatar
  • 2,276
2 votes
0 answers
37 views

How do search's b and z flags interact?

I'm using searchpos instead of search is I can echo the column where the match happens, which, with example file below coincides with the matched character. 123456789 ^ | +-- cursor is here … So I gather that z in nWbz => search starts in column 0 no z in nWb => search starts at the cursor which is kind of opposite of what z is documented to do. …
Enlico's user avatar
  • 2,276
2 votes

How to search and replace more than character and a string in vim

In addition to other answers, look in the docs for \v which, at the beginning of the search string, makes it behave as "very magic", which means that + will work the way you want, while \+ will refer to …
Enlico's user avatar
  • 2,276
0 votes
0 answers
25 views

autocmd to set hls after having manually :nohls doesn't turn search highlighing on

be at times confusing for the eyes, when the previous search result is no more of interest. … (¹) It reads is automatically turned back on when using a search command, or setting the 'hlsearch' option …
Enlico's user avatar
  • 2,276
2 votes
1 answer
81 views

How to match latin letters + their accented versions?

\a is equivalent to [A-Za-z] so it matches only non-accented letters. I know of [=name-of-equivalence-class=], so I can clearly use something like \(\a\|[[=a=][=e=][=i=][=o=][=u=]]\), but I was wonder …
Enlico's user avatar
  • 2,276
1 vote
Accepted

How to match latin letters + their accented versions?

So one way to accomplish the task is to use \k instead of \a and set iskeyword=@ when the behavior described in the question is needed, e.g. when entering search mode. …
Enlico's user avatar
  • 2,276
8 votes
4 answers
306 views

Use pattern of global ex command found on a line to substitute in another line

In my fortran code I have a lot of blocks like the following subroutine name(arg1,arg2,arg3,...) : end subroutine and I want them to become subroutine name(arg1,arg2,arg3,...) : end subroutine nam …
Enlico's user avatar
  • 2,276
0 votes
0 answers
57 views

How can I get the number of matches of pattern without altering the search buffer nor moving...

From the name, searchcount seemed promising, but in reality it isn't (if I understood correctly), because it has to do with the actual "last search", i.e. what you do with / or :s, whereas I'm actually …
Enlico's user avatar
  • 2,276