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

Flexible mappings #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

calmofthestorm
Copy link

This pull request allows users to define their own mappings by adding an option to prevent default mappings, and defining mappings to allow users to easily define their own. This also fixes what I believe to be a bug in how the area is selected due to use of normal instead of normal! (as elsewhere in the function) which arises when VIM's gv is remapped.

This fixes an issue arising from use of normal instead of normal! inside
the text object function. normal! is used in all places except one, the
final gv. The result is that if a user has remapped built in VIM
commands (gv, in this case), indent objects will not work correctly.
This adds an option, g:indent_object_no_mappings, which users may set to
prevent vim-indent-object from defining any mappings. To allow users to
then define custom mappings, we add <Plug> mappings for each of the
objects. The default setting is to retain previous behavior, and define
mappings.
@michaeljsmith
Copy link
Owner

Hi Alex,

Thank you for your pull request. I have to apologize however, I really
don't have time any more to work on this project. I've been thinking I
should see if someone else wanted to take it over.

Michael

On 13 February 2014 06:15, Alex Roper [email protected] wrote:

This pull request allows users to define their own mappings by adding an
option to prevent default mappings, and defining mappings to allow users to
easily define their own. This also fixes what I believe to be a bug in how
the area is selected due to use of normal instead of normal! (as elsewhere

in the function) which arises when VIM's gv is remapped.

You can merge this Pull Request by running

git pull https://github.com/calmofthestorm/vim-indent-object flexibleMappings

Or view, comment on, or merge it at:

#11
Commit Summary

  • Fix issue arising when used with remapped keys.
  • Allow users to define their own mappings.

File Changes

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/11
.

@calmofthestorm
Copy link
Author

Sorry to hear that. Thanks for letting me know.

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

Successfully merging this pull request may close these issues.

2 participants