SkyBison icon indicating copy to clipboard operation
SkyBison copied to clipboard

SkyBison doesn't handle command line abbreviations/mappings

Open hoelzro opened this issue 10 years ago • 4 comments

I have a few command line abbreviations defined (mainly because I fat finger a lot of things!), and SkyBison doesn't seem to respect them. =(

To reproduce:

cnoreabbrev su sus
cnoremap <C-a> <Home>
" Typing :su or <C-a> after entering SkyBison doesn't apply the abbreviations or mappings

I realize that this is probably a tall order, but I thought the issue should at least be documented.

hoelzro avatar Dec 30 '13 10:12 hoelzro

Hmmmmm. It may be possible to implement those.

I can get a list of cmdline abbreviations and mappings via :redir, then after the input loop over them and see if any are applicable. It won't respect 'timeout'/'ttimeout' but it should still be better than what we have now. I may make it a toggle-able option that defaults to off in case anyone was purposefully using SkyBison as a quick-and-dirty way to toggle off the abbreviations and mappings.

However, I should note that even if the mapping example you had worked, <home> doesn't actually move the cursor. At the moment SkyBison's input is all at the end of the line; you can't insert things mid-line. This is totally fixable, I've just not gotten around to that part of my TODO.

paradigm avatar Dec 31 '13 02:12 paradigm

@paradigm Good to know, thanks for your input!

hoelzro avatar Dec 31 '13 09:12 hoelzro

Looks like another option I have to implement this is to use maparg() or mapcheck(), both of which should tell me if a given string has a mapping (and I can filter by mode, such as the cmdline). There are difficulties there as well, but it's another option.

It may take me a bit to get to implementing this, but I do think one way or anther I should be able to do it. If in a few months I've not updated SkyBison with a patch to implement this do feel free to post here again reminding me.

paradigm avatar Jan 01 '14 20:01 paradigm

@paradigm Thanks for looking into this!

hoelzro avatar Jan 02 '14 09:01 hoelzro