Use dict for caser custom mappings#14
Open
mulias wants to merge 9 commits intoarthurxavierx:masterfrom
Open
Conversation
This change rolls back some of the refactors made in the previous commit. While the code could be cleaner, we no longer get error E523 when trying to change the case of a visual selection. The issue seems to be with the way <expr> was being used, but the specifics are still unclear.
* Add TitleKebabCase function TitleKebabCase converts to Title-Kebab-Case like used, for example, in PowerShell. * Add K mapping for TitleKebabCase * Added reference to the TitleKebab case * Added Title-Kebab-Case to the README
Only sets <Plug> mappings, not default bindings
- Refactor mapping generation code to use a dictionary for default mappings. - Check for the presence of a user defined `g:caser_custom_mappings` dictionary to override defaults.
684015c to
fd6224e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a change I made on my fork because I found myself making custom mappings for many caser operations, and it was getting unwieldy. That said, I'm not 100% sure this is a good library API, since the dict approach more directly exposes the plugin internals to the end user.
KEBAB-CASE,DOT.CASEandSPACE CASEg:caser_custom_mappingsdictionary<Plug>bindings.