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

map() functions could take an impl Display for the 2nd param #16

Open
turboladen opened this issue Mar 15, 2022 · 0 comments
Open

map() functions could take an impl Display for the 2nd param #16

turboladen opened this issue Mar 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@turboladen
Copy link
Owner

Initially map() and .noremap() were made with the expectation that you'd pass in a static str:

let n = Mapper::new(MapMode::Normal);
n.noremap("<leader>ev", "<cmd>vsplit $MYVIMRC<CR>");

...which works great. but I find that it's also nice to make some helper functions for generating commands that are similar, which end up using lots of format!(). As such, it'd be nice to allow that 2nd param to also accept a String, etc.

@turboladen turboladen added the enhancement New feature or request label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant