Monday, August 8, 2022

Re: Setting termcap entries: avoid literal Esc?

> In my vimrc I have entries such as these:
>
> set <s-right>=^[f
> set <a-h>=^[h
>
> where ^[ is a literal Esc. Is it possible to perform such assignments
> without using a literal Esc? For other entries I am able to use the
> & form (say, &t_BE = "\033[?2004h"). I am asking specifically about
> entries like the above, which either don't have a corresponding option
> in Vim AFAIK (<a-h>) or which have an option with special characters
> (t_%i).
>
> I am using Vim 9 script, if that matters.

Something like this doesn't work for options with a <> name:

&<S-right> = "\<Esc>f"

But this does:

exe "set <S-right>=\<Esc>f"


--
GALAHAD: Camelot ...
LAUNCELOT: Camelot ...
GAWAIN: It's only a model.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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/20220808130628.C2A2C1C0EC3%40moolenaar.net.

No comments: