Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkyBison doesn't handle command line abbreviations/mappings #14

Open
hoelzro opened this issue Dec 30, 2013 · 4 comments
Open

SkyBison doesn't handle command line abbreviations/mappings #14

hoelzro opened this issue Dec 30, 2013 · 4 comments

Comments

@hoelzro
Copy link

hoelzro commented Dec 30, 2013

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.

@paradigm
Copy link
Owner

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.

@hoelzro
Copy link
Author

hoelzro commented Dec 31, 2013

@paradigm Good to know, thanks for your input!

@paradigm
Copy link
Owner

paradigm commented Jan 1, 2014

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.

@hoelzro
Copy link
Author

hoelzro commented Jan 2, 2014

@paradigm Thanks for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants