I am using the latest version of Gvim on Windows 10.
When I type / and some expression, for example /a, I see all matches in the document highlighted.
The documentation says that the asterisk symbol * ...
Suppose I have a file and littered throughout are a bunch of placeholder strings for images, they all have img1.gif at present.
Is there a way to search for that string and increment the number each ...
I am using NeoVim, and I automatically define an abbreviation for the string W every time the commandline mode starts.
However, it seems that commandline mode includes the search modes as well.
I do ...
How does one effectively find today's date in a file?
The format of the date is given by GNU's date(1)'s command as:
$ date '+%a %d-%m-%Y'
What I already tried
This is how I ...
If I am searching for a word inside a file,
if I do not hit ENTER after the search pattern,
my vi loses the current match and jumps back to where it was.
Let's say I entered a folder with many files and I opened them with vim *. I know that if I want to list all the files inside the buffer I can use the command :ls, and then I can navigate those files ...
I can jump to a function definition thanks to :tjump.
Or I can search for a function call in a file with / but is there a way
to iterate through function calls across various files ?
If the solution ...
I need to replace the first number that comes after AAA, with 0.05
Opening all 49 files in my working folder in separate buffers, I wanted to see if there were any em dashes.
I typed :bufdo /— and vim immediately went to work, processing a page of buffers at a time. ...
I have hlsearch activated. Sometimes I search for terms I want to correct or delete via / and then selecting for the individual instance via n. Is there a command to delete the current word on which ...
How can I make vim :find only files with .c or .h extensions?
For example, I am interested in finding .c files starting with tsv so I would run :find tsv*. This gives too many results; how do I make ...
Basically I need to search only in areas marked red, not pink (in the default color scheme).
All I can find is how to search the unfolded areas. This is not very useful to me. I have long lines which ...
I am trying to write a couple of simple functions to find the next and previous links in Vimwiki and move to them. Links in Vimwiki are indicated with the syntax [[link to something]]. Since I only ...
I am trying to make a mapping that performs what f would normally do if there is a character match on the line, and to do something else if no such character exists. For example,
suppose if I had the ...
Before upgrading to ubuntu 20.04, the line
g/;/s//CTRL V CTRL M/
would replace the ; with a new line.
Now, in ubuntu 20.04 this string translates to
which obviously doesn't have ...
When I have hlsearch on and my cursor is somewhere in a highlighted search match, is it possible to detect the search highlight hl-Search with synIDattr() or a similar function?
As far as I can tell ...
I have a file with data that goes like this.
This pattern repeats throughout the file.
I want to do the following ...
So you search /needle, and end up trapped in a haystack of result lines. Is there a quick way to skip to the first non-matching line (and then the next batch of results)?
E.g. I'm viewing the results ...
When I open a log file in vi or view and I need to search for a word, the first thing I do is to press G to get to the bottom. Then I'll start a search using a / followed by whatever word I'm looking ...
In normal mode with default mappings, suppose I type /[,_@]. This then causes all matches of that pattern to be highlighted. Is there some way to examine the results of this search? I am specifically ...
I use * and # for quick and basic typo checking.
If I type AVeryLongVariableName, I can put my cursor on the word, press * and see all the other places that word is used. I know I spelled it correctly....
Sometimes I type a long substitute command
and while I am typing it or only after hiting enter
I notice that I have mistakenly
used a the search key (/) instead of the ex-command key (...
Finding the line with a specific character before the last character. Suppose, I have the following string