elsonwx elsonwx - 2 years ago 99
Linux Question

vim move cursor to the line that the first character is that I want?

I known there are

to move the cursor to the next/previous
occurrence in one line.but this command is in one line.

now I want to move cursor to the next line which first character is
is there any command the vim supply can achive this?

Answer Source

Try using search command by typing /^\s*x in normal mode

/ starts forward search
^ stands for the start of a line
\s* stands for none or some white space
x stands for x, the character you want to search

You may want read some vim help manuals first; For example:

:help /
:help usr_27
:help pattern
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download