coolesting
coolesting

Reputation: 1451

Moving the point between in charactors by quick search

I'm looking for quicker ways to navigate in vim.

Say, I open the following text in a buffer:

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. Vim is distributed free as charityware. If you find Vim a useful addition to your life

Currently, my cursor is on line 1, character 1.

If I want to move the cursor to the start of the word version, that would rather slow by using simple cursor movement (hjkl keys) to move to the specific line and character.

Now, I'm looking for the command that you could use, like ' perhaps?. So you'd just need to type something like 'version, and the cursor jumps to that word.

I hope this is possible (do I need a plugin for this?)

Upvotes: 0

Views: 113

Answers (2)

sehe
sehe

Reputation: 392931

I took the time to write the question a bit clearer.

In addition to the search functionality already mentioned:

/version

I suggest to

:set incsearch

which enables incremental search while doing that (sweet)

:se hlsearch

for on the fly highlighting of (incremental) matches

Character searches:

  1. Within lines, you can use fv to jump to the next v (Fv to search backwards).

  2. You can navigate sentences (using ), ()

  3. paragraphs (using }, {)
  4. words (using b, e as well as B, E and many others)

It's all you can eat, like a kid in the candy store! Here is the candy store:

:he motion.txt

Upvotes: 4

Eric Fortis
Eric Fortis

Reputation: 17350

If you are before the point you want to go:

/version then <Enter>

If you are after you want to go:

?version then <Enter>


For more info type:

:help search-commands

Upvotes: 1

Related Questions