Thursday, April 30, 2020

Re: visual mode popup menu ?

Am 27.04.2020 um 02:37 schrieb M Kelly:
> Hi,
>
> Is there a way to be in visual mode with some text highlighted and
> popup a menu and keep the highlighted text during and after the popup
> menu ?
>
> thx, -m

I would think it could make sense for some popup menu entries, but not all ...
how about an example?

You can override specific menu entries.

For what to override, see
:vmenu PopUp
:split +/PopUp/ $VIMRUNTIME/menu.vim

For example, original:
:vnoremenu 1.30 PopUp.&Copy "+y
modified (see vimrc below) (do not modify in-place):
:vnoremenu PopUp.&Copy "+ygv

" ------------------------------------------------
" in the vimrc ... more work for delayed execution
augroup KellyVimrc
augroup END

au! KellyVimrc VimEnter * call s:OverrideMenu()

func! s:OverrideMenu()
vnoremenu PopUp.&Copy "+ygv
" ... more ...
endfunc

"" for reloading ...
"if !has('vim_starting')
" doau <nomodeline> KellyVimrc VimEnter
"endif


--
Andy

--
--
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/5EAAF40C.80905%40yahoo.de.

No comments: