Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
allow for argument prefixing #1
this plugin is excellent - I'm definitely going to use it with a lot of my common commands. one use I'm already getting great mileage out of is supplanting my vim-fuzzee plugin without having to manually tab to the result of the globbed files.
something I thought could be pretty cool is to create mappings that prefix a command to reduce typing common arguments. I've modified the source so that it will allow for this, but I haven't done too much extensive testing into what I've possibly broken.
as an example:
This will call the F command with
I should note you can do something comparable without your pull:
nnoremap js :call SkyBison("F",0)app/java*
The mapping keeps feeding keys into the function's getchar()'s after the is called.
We seem to have very different coding styles (you use spaces for indentation where I use tabs, you drop the variable scope prefix when unnecessary where as I tend to be explicit about it every time). Since I'm going to refactor everything to be more readable anyways, rather than pulling in your code, unifying the style, and then refactoring, I might turn down your pull and re-implement your idea myself when I'm refactoring. Not that there's anything wrong with your code, it just seems like a path of lesser resistance to the same end result.
Currently, SkyBison internally differentiates between the command and the argument (as I'm sure you've noticed). With that in mind, there are three major ways to go about implementing your idea:
Any preferences? I'm probably going to leave it to churn in the back of my mind for a while, as all three have appealing aspects.
I'm totally cool with you declining the pull and I apologize for introducing a different coding style into your file.
This pull serves my needs and might not be applicable to most users. Unfortunately,
What I want is a mapping that prefixes what I type after
All 3 options you've introduced don't seem too bad. Coincidentally, my attempt at thinking about an auto-completion system for the command line had to do with adding a new option to
If I had to pick one though, I probably wouldn't. You could add an optional, additional third argument (I know, blech), that determines whether any of the passed in
As to the flickering - it's only present for me in Terminal Vim (which, thankfully, I don't use often) and isn't in MacVim (at least for me). The cause of which are your calls to
Hope that helps!
No need to apologize, that's just how life without a universal coding style standard is.
To make sure I understand the situation:
If so, I'll likely do that. Shouldn't be hard to implement.