I am currently learning to use Vim. It has been a very good experience so far and I believe the Vim approach to be generally much more powerful than GUI based text editors.
There is however one feature that I miss. I sometimes have to read my document to correct potential mistakes. If I spot a mistake I need to move quickly to the position of the mistake, say in a middle of a sentence. In a standard text editor I will reach briefly for the mouse and point/click to move the cursor to this position.
This is slow, but in VIM it will take me much longer. Generally it is impractical to search for the word, because it may have spelling mistakes or occur many times. The fastest way I found is move to the line using line numbers, then move across sentences, then words, then letters. It is still much slower than reaching for the mouse, pointing and clicking.
My question is two-fold: is there a way to click with the mouse to move the cursor in Vim? I know that's not really the spirit but I think it could be useful occasionally. If not, am I doing something wrong? How do Vim users generally handle this problem of moving to a specific word you're looking at, far from where the cursor currently is, for example when you're reading back what you typed for mistakes?
Thanks
The keys h , j , k , and l , right under your fingertips, will move the cursor: h. left, one space.
j : Moves the cursor down one line. h : Moves the cursor to the left one character position. l : Moves the cursor to the right one character position. 0 or | : Positions cursor at beginning of line.
If your terminal supports it adding
set mouse=a
to your vimrc will enable mouse support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With