feature(vimscript-mappings): add support to extend base keymaps with vimscript#146
Open
christphralden wants to merge 9 commits into
Open
feature(vimscript-mappings): add support to extend base keymaps with vimscript#146christphralden wants to merge 9 commits into
christphralden wants to merge 9 commits into
Conversation
…ettings UI; move toVimSequence to vim-mappings, import findConflictingKeymaps and diagnoseVimMappings to flag per-row conflicts in the shortcut editor with count badge, inline vimrc warnings, and vimrc-overridden chips on affected keymaps
|
i would love a way of adding my vim config into zennotes. |
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.
Issue #143
Goal
Vimscript support to enable flexible remapping
Design desicion
Currently codebase has contracts for keymaps with different scopes of
KeymapScope. What this PR aims to do is not do a full refactor of existing architecture, but to allow flexibility for users to define their own keymapuser-mappings are treated as a different entity from
KeymapDefinition. Why?user-mappings interact directly with codemirror's api
user-mappings are defined inside settings > keymaps > Vimrc opposed as to source it using the file system to give reactive feedback like conflicting keymaps and errors. This is also because we could not possibly support every syntax for example setting a variable.
Going with this direction, to improve UX, conflicting keymaps should be surfaced as warnings for users to manage
Summary
Supported syntax are as such
Notes
There are noisy diffs from differences in linter, if you could specify a .prettierrc it would be great :)