Closed jgarte closed 1 year ago
This feature isn't built-in, and it shouldn't be, because it's really easy to write it in Lua:
vis:command_register("mx", function(argv, force, cur_win, selection, range)
vis:feedkeys("<"..argv[1]..">")
end, "emacs' M-x")
I'm not really sure how this would be useful though, all those things have handy keybindings attached to them.
Also you didn't have to copy-paste half the help page to make your point.
It would also be cool to combine this with vis-complete to make a nice interactive selection menu, if that's what you're interested in.
This feature isn't built-in, and it shouldn't be, because it's really easy to write it in Lua:
vis:command_register("mx", function(argv, force, cur_win, selection, range) vis:feedkeys("<"..argv[1]..">") end, "emacs' M-x")
Also you didn't have to copy-paste half the help page to make your point.
@ninewise Thanks for showing that example! I added it to my config :)
:mx vis-mode-insert
didn't work but :mx vis-window-next
did work.
I'm not really sure how this would be useful though, all those things have handy keybindings attached to them.
I'm primarily interested in exploring that API interactively (that is, while using the editor instead of a repl) for study purposes at the moment without having to create a keybinding for each function, so your example helped.
It would also be cool to combine this with vis-complete to make a nice interactive selection menu, if that's what you're interested in.
@mizlan I would definitely be interested in that to. I'll attempt that next.
@ninewise OK, this bug is still opened, although in my opinion it just a chatting about something which has been resolved already.
I am thinking of some command equivalent of emacs' M-x (execute-extended-command).
Is this feature out of the scope of this project, too emacsy, or succeptable to introducing bloat to the core of vis?
Is there currently a way of doing this that I missed from the man page?
What do you think are the pros and cons of having this feature?
I see for example that @ninewise calls
vis-window-next
in his config by using thevis:map
function to bind the function to;;
:I'd like to also be able to call
vis-window-next
something alongs the line of the following in command-mode::vis-window-next
Other commands I'd like to access from command-mode: