Friday, December 29, 2017

Re: toggle cursor guide from via command line?

On Fri, Dec 29, 2017 at 6:23 PM, Richard Mitchell <rwmitchell@gmail.com> wrote:
> Can the cursor guide be toggled via a script/command line?
>
> Normally I like the cursor guide on, but I'm writing some code that moves the cursor around the screen quit a bit and the cursor guide is distracting. I'd like the program to be able to disable it on start and then restore it at the end.
>
> Thanks!

What exactly do you call the cursor guide?

If you mean the horizontal and/or vertical highlight on the line
and/or column containing the cursor, that's governed by an option:
:help 'cursorcolumn'
:help 'cursorline'

If you want to freeze the viewport while your script makes changes
above the first visible line or below the last one, I'm afraid you
can't, but maybe there is some subtlety I missed.

If you mean the variously shaped spot at the very character cell
you're changing, then:
- in a terminal in a non-Windows OS, it's under control of the
terminal, the only way Vim can act on it is by means of the termcap
codes t_SI, t_SR and t_EI (qq.v.)
- in the Windows console and in gvim, it is under control of
the 'guicursor' option (q.v.)

If you mean the (left, right and/or bottom) scrollbars, then in gvim
they are under control of the 'guioptions' option (q.v.). In a
terminal they are under control of the terminal and I think Vim can't
touch them.

If you mean the numbers at lower right telling you (in numbers) the
current line and column, that's under control of the 'ruler' and/or
'statusline' options (qq.v.).

Oh, and before you ask, q.v. and qq.v. are common English
abbreviations for the Latin prases "quem/quam/quod vide" ("look it
up") and "quos/quas/quæ vide" ("look them up") respectively.


Best regards,
Tony.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: