martanne / vis

A vi-like editor based on Plan 9's structural regular expressions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can a key binding action be executed on a selection without mapping it to something?

honestSalami opened this issue · comments

I want to run "vis-selections-align-indent-left", but I can't use the default mapping, and I don't want to make a new mapping for it right now. Is there a way to run it on the current selection without mapping it first?

There's no such functionality by default, AFAIK. However, you could define a function such as:

vis:command_register("feed", function(argv, force, cur_win, selection, range)
	vis:feedkeys(argv[1])
end, 'feed keys to vis')

Then you can call :feed <vis-selections-align-indent-left>.

Thanks!