Thursday, April 13, 2023

Re: Quick Vim question

On 2023-04-13, 'Susan McElheny' via vim_use wrote:
> Sorry I don't understand.  I currently have hlsearch in my _vimrc
> file so the search words are highlighted but I can't see the
> cursor and I don't know how to make it a black blinking square.

When 'hlsearch' is set, the search matches will be highlighted by
the Search highlight group. You can change the color and other
attributes of that highlight group with the :highlight command.
Similarly, the search match under the cursor will be highlighted by
the CurSearch highlight group. The CurSearch group defaults to be
the same as the Search group, so that all matches are highlighted
the same. You can change that by redefining the CurSearch group.

That may help you see your cursor, but that's not really the
problem. The problem is that you can't see the cursor itself.

Unfortunately for you, my Vim cursor has always "just worked", so
I don't know anything about changing it. As I understand it, when
Vim runs as a GUI, it has full control over the cursor, but when it
runs in a terminal, the terminal determines the characteristics of
the cursor and applications have only limited control over it, and
that depends on the terminal.

Are you running the GUI version of Vim or the console version in
a Windows Console or other terminal?

If you're running the GUI version in Windows, you might take a look
at

:help 'guicursor'

> Also in Unix Vi I was able to type a number and the letter
> l - lower case L (100l for example) and it would take the cursor
> to column 100.  Is there a way to do this in Vim for windows?

This should work the same in all versions of vim, or of vi for that
matter. Actually, 100l will move the cursor 100 character positions
to the right. To move to column 100, use 100|.

But back to the problem. If a number followed by l does not move
the cursor that number of characters to the right, what happens
instead? The more details we know, the better we will be able to
figure out the problem and a solution.

> I really appreciate the help!

You're welcome. We should be able figure this all out.

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230413234947.GB21381%40phoenix.

No comments: