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

Commands are tightly coupled/giant switch statement #8

Open
yarbelk opened this issue Apr 3, 2014 · 3 comments
Open

Commands are tightly coupled/giant switch statement #8

yarbelk opened this issue Apr 3, 2014 · 3 comments

Comments

@yarbelk
Copy link

yarbelk commented Apr 3, 2014

Editor commands should not be tightly coupled. Change from a switch to a map of function pointers (interface type)

Eg,

type NCommander interface {}

type VCommander interface {}

etc.

and then have a map (or two?) to link command to function, or key mapping to function. THis would also make it much easier to set bindings in a config file.

@kisielk
Copy link
Owner

kisielk commented Apr 6, 2014

I like this idea, I was planning on doing something like this eventually. I would say low priority for now (as is changing keybindings) until other things are working.

@gchp
Copy link
Contributor

gchp commented May 29, 2014

This could probably be closed off at this stage. This was implemented in #17 I think

@kisielk
Copy link
Owner

kisielk commented May 29, 2014

We did the first part, we still don't have reconfigurable keybindings.

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

3 participants