When searching with /pattern in vim, the cursor lands at the start of the
pattern. This is not always ideal. By adding /e to the end of your search
pattern, you can have the cursor land at the end of the search pattern. This
can come in handy when you would like to cycle through a number of instance of
a search pattern and repeat an edit with the dot operator ..
Consider the following where you’d like to remove a parameter from multiple
Executing a search /param2,/e will land you on the comma after param2. Then
executing dt) will delete up to the ) character. Using n followed by .
will skip to the next occurrence of param2,, and the dot will repeat the
previous delete to right praren. A few repeats of n followed by . and our
work is finished:
Not surprisingly, there are a number of search modifiers that will impact cursor
positioning. The following excerpt from :help search-offset:
You might consider the following books, each of which comes recommended by Vim Tricks contributors. In particular, Practical Vim
is a great resource with a useful format, filled with many essential Vim tricks and tips. It was written by Drew Neil of Vimcasts fame, with introduction by legendary Vim plugin writer Tim Pope.
Book links include Amazon affiliate attribution which helps support Vim Tricks. Thank you.