-
Notifications
You must be signed in to change notification settings - Fork 108
VmpUniqueKeymaps
t9md edited this page Mar 20, 2018
·
3 revisions
- Normal keymap addition
- Operator-pending-mode specific shorthand keymaps
- Conditional keymap enabled by setting.
-
g /is mapped totoggle-line-comments- So you can toggle comment for paragraph by
g / i porg / p.
- So you can toggle comment for paragraph by
-
g Cis mapped tocamel-case- You can convert to CamelCase for dash-case-ed word by
g C c.
- You can convert to CamelCase for dash-case-ed word by
-
g -is mapped todash-case- You can convert to dash-case for CamelCase-ed word by
g - c.
- You can convert to dash-case for CamelCase-ed word by
-
g spaceis mapped tocompact-spaces- You can convert to
(a b c)to(a b c)byg space i (.
- You can convert to
-
g |is mapped totrim-string- You can convert to
" abc "to"abc"byg | i ".
- You can convert to
-
subwordtext-object have default keymap, you can change subword byc i d.-
i d:inner-subword -
a d:a-subword
-
-
cmd-ais mapped toinner-entireinoperator-pendingandvisual-modefor macOS user.- So macOS user can use
cmd-aas shorthand ofi e(inner-entire). - E.g. Change all occurrence in text by
c o cmd-ainstead ofc o i e
- So macOS user can use
- In
operator-pending-mode, next command must betext-objectormotion - So all
operatorcommand inoperator-pending-modeis INVALID. - This mean, we can safely use operator command's keymap in
operator-pending-modeas shorthand keymap oftext-objectormotion. - But using these keymap for
motionis meaningless since motion is single-key, but text-object key is two keystroke(e.g.i w). - So I pre-defined short-hand keymap for text-object which was work for me.
-
cas shorthand ofinner-smart-word, butc cis not affected.- You can
yank wordbyy cinstead ofy i w. ( change byc cif you enabled it in setting ) - To make
c cworks forchange inner-smart-word, setkeymapCCToChangeInnerSmartWordtotrue(falseby default ) -
smart-wordis similar towordbut it's include-char.
- You can
-
Cas shorthand ofinner-whole-word- You can
yank whole-wordbyy Cinstead ofy i W. ( change byc C)
- You can
-
das shorthand ofinner-subword, butd dis not affected.- You can
yank subwordbyy dinstead ofy i d. ( change byc d)
- You can
-
pas shorthand ofinner-paragraph- You can
yank paragraphbyy pinstead ofy i p. ( change byc p)
- You can
- Several configuration option each is 1-to-1 mapped to keymap.
- When set to
true, corresponding keymap is defined. - This is just as helper to define complex keymap via checkbox.
- For me, I enabled all of these setting and I want strongly recommend you to evaluate these setting at least once.
- These keymaps are picked from my local keymap which was realy work well for a log time.
- Here is new setting, all
falseby default. Effect(good and bad) of these keymap is explained in vmp's setting-view.
-
keymapCCToChangeInnerSmartWord- Can:
c ctochange inner-smart-word
- Conflicts:
c c( change-current-line ) keystroke which is equivalent toSorc i letc.
- Can:
-
keymapUnderscoreToReplaceWithRegister- Can:
_ i (to replace inner-parenthesis with register's value
- Can:
_ i ;to replace inner-any-pair if you enabledkeymapSemicolonToInnerAnyPairInOperatorPendingMode
- Conflicts:
_(move-to-first-character-of-line-and-down) motion. Who use this??
- Can:
-
keymapSemicolonToInnerAnyPairInOperatorPendingMode- Can:
c ;tochange inner-any-pair, Conflicts with original;(repeat-find) motion.
- Conflicts:
;(repeat-find).
- Can:
-
keymapSemicolonToInnerAnyPairInVisualMode- Can:
v ;toselect inner-any-pair, Conflicts with original;(repeat-find) motion.
L - Conflicts:
;(repeat-find).
- Can:
-
keymapBackslashToInnerCommentOrParagraphWhenToggleLineCommentsIsPending- Can:
g / /to comment-in already commented region,g / /to comment-out paragraph.
- Conflicts:
/(search) motion only wheng /is pending. you no longe cang /with search.
- Can: