From fc844a3428d5f90a3ae286143c1db0aebba116a5 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Wed, 8 Jun 2022 14:12:50 -0400 Subject: [PATCH] Reverse the scroll direction for holding modifiers and scrolling to match other applications --- README.md | 38 +++-- vim/config/keyboard.vim | 300 ++++++++++++++++++++-------------------- 2 files changed, 167 insertions(+), 171 deletions(-) diff --git a/README.md b/README.md index 1393574..57ba4eb 100644 --- a/README.md +++ b/README.md @@ -74,27 +74,23 @@ As usual, to have your system use `vimpager` in place of `less`, you'll need to ### Mouse ### -| Binding | Mode | Action | -|----------------------|------|----------------------------------------------| -| Ctrl+ScrollUp | ALL | Scroll right a few characters at a time | -| Ctrl+ScrollDown | ALL | Scroll left a few characters at a time | -| Alt+ScrollUp | ALL | Scroll right one character at a time | -| Alt+ScrollDown | ALL | Scroll left one character at a time | -| Shift+ScrollUp | ALL | Scroll right one character at a time | -| Shift+ScrollDown | ALL | Scroll left one character at a time | -| | | | -| MiddleClick | ALL | Select between the cursor and the mouse | -| Ctrl+LeftClick | ALL | Select between the cursor and the mouse | -| Alt+LeftClick | ALL | Select the line at the mouse | -| Ctrl+Alt+LeftClick | ALL | Select the paragraph at the mouse | -| | | | -| Ctrl+RightClick | ALL | Copy selection or character under the cursor | -| Ctrl+MiddleClick | ALL | Copy selection or character under the cursor | -| Alt+RightClick | ALL | Cut selection or character under the cursor | -| Alt+MiddleClick | ALL | Cut selection or character under the cursor | -| Ctrl+Alt+RightClick | ALL | Paste at the cursor | -| Ctrl+Alt+MiddleClick | ALL | Paste at the cursor | -| Shift+MiddleClick | ALL | Paste the contents of the xorg buffer | +| Binding | Mode | Action | +|-------------------------------|------|----------------------------------------------| +| (Ctrl\|Alt\|Shift)+ScrollUp | ALL | Scroll left a few characters at a time | +| (Ctrl\|Alt\|Shift)+ScrollDown | ALL | Scroll right a few characters at a time | +| | | | +| MiddleClick | ALL | Select between the cursor and the mouse | +| Ctrl+LeftClick | ALL | Select between the cursor and the mouse | +| Alt+LeftClick | ALL | Select the line at the mouse | +| Ctrl+Alt+LeftClick | ALL | Select the paragraph at the mouse | +| | | | +| Ctrl+RightClick | ALL | Copy selection or character under the cursor | +| Ctrl+MiddleClick | ALL | Copy selection or character under the cursor | +| Alt+RightClick | ALL | Cut selection or character under the cursor | +| Alt+MiddleClick | ALL | Cut selection or character under the cursor | +| Ctrl+Alt+RightClick | ALL | Paste at the cursor | +| Ctrl+Alt+MiddleClick | ALL | Paste at the cursor | +| Shift+MiddleClick | ALL | Paste the contents of the xorg buffer | ### Keyboard ### diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index d8007dc..fc6e326 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -30,12 +30,12 @@ " "Mappings: " (mouse) -" | (A) -> scroll right -" | (A) -> scroll right -" | (A) -> scroll right -" | (A) -> scroll left -" | (A) -> scroll left -" | (A) -> scroll left +" | (A) -> scroll left +" | (A) -> scroll left +" | (A) -> scroll left +" | (A) -> scroll right +" | (A) -> scroll right +" | (A) -> scroll right " " | (A) -> selects from the cursor " | (A) -> selects from the cursor @@ -294,185 +294,185 @@ "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ "MOUSE:{ "hold ctrl to scroll left/right instead of up/down - noremap 4zl - noremap 4zl - noremap 4zl - noremap 4zl + noremap 4zh + noremap 4zh + noremap 4zh + noremap 4zh - nnoremap 4zl - nnoremap 4zl - nnoremap 4zl - nnoremap 4zl + nnoremap 4zh + nnoremap 4zh + nnoremap 4zh + nnoremap 4zh - xnoremap 4zl - xnoremap 4zl - xnoremap 4zl - xnoremap 4zl + xnoremap 4zh + xnoremap 4zh + xnoremap 4zh + xnoremap 4zh - snoremap 4zl - snoremap 4zl - snoremap 4zl - snoremap 4zl + snoremap 4zh + snoremap 4zh + snoremap 4zh + snoremap 4zh - vnoremap 4zl - vnoremap 4zl - vnoremap 4zl - vnoremap 4zl + vnoremap 4zh + vnoremap 4zh + vnoremap 4zh + vnoremap 4zh - inoremap 4zl - inoremap 4zl - inoremap 4zl - inoremap 4zl + inoremap 4zh + inoremap 4zh + inoremap 4zh + inoremap 4zh - noremap 4zl - noremap 4zl - noremap 4zl - noremap 4zl + noremap 4zh + noremap 4zh + noremap 4zh + noremap 4zh - nnoremap 4zl - nnoremap 4zl - nnoremap 4zl - nnoremap 4zl + nnoremap 4zh + nnoremap 4zh + nnoremap 4zh + nnoremap 4zh - xnoremap 4zl - xnoremap 4zl - xnoremap 4zl - xnoremap 4zl + xnoremap 4zh + xnoremap 4zh + xnoremap 4zh + xnoremap 4zh - snoremap 4zl - snoremap 4zl - snoremap 4zl - snoremap 4zl + snoremap 4zh + snoremap 4zh + snoremap 4zh + snoremap 4zh - vnoremap 4zl - vnoremap 4zl - vnoremap 4zl - vnoremap 4zl + vnoremap 4zh + vnoremap 4zh + vnoremap 4zh + vnoremap 4zh - inoremap 4zl - inoremap 4zl - inoremap 4zl - inoremap 4zl + inoremap 4zh + inoremap 4zh + inoremap 4zh + inoremap 4zh - noremap 4zl - noremap 4zl - noremap 4zl - noremap 4zl + noremap 4zh + noremap 4zh + noremap 4zh + noremap 4zh - nnoremap 4zl - nnoremap 4zl - nnoremap 4zl - nnoremap 4zl + nnoremap 4zh + nnoremap 4zh + nnoremap 4zh + nnoremap 4zh - xnoremap 4zl - xnoremap 4zl - xnoremap 4zl - xnoremap 4zl + xnoremap 4zh + xnoremap 4zh + xnoremap 4zh + xnoremap 4zh - snoremap 4zl - snoremap 4zl - snoremap 4zl - snoremap 4zl + snoremap 4zh + snoremap 4zh + snoremap 4zh + snoremap 4zh - vnoremap 4zl - vnoremap 4zl - vnoremap 4zl - vnoremap 4zl + vnoremap 4zh + vnoremap 4zh + vnoremap 4zh + vnoremap 4zh - inoremap 4zl - inoremap 4zl - inoremap 4zl - inoremap 4zl + inoremap 4zh + inoremap 4zh + inoremap 4zh + inoremap 4zh - noremap 4zh - noremap 4zh - noremap 4zh - noremap 4zh + noremap 4zl + noremap 4zl + noremap 4zl + noremap 4zl - nnoremap 4zh - nnoremap 4zh - nnoremap 4zh - nnoremap 4zh + nnoremap 4zl + nnoremap 4zl + nnoremap 4zl + nnoremap 4zl - xnoremap 4zh - xnoremap 4zh - xnoremap 4zh - xnoremap 4zh + xnoremap 4zl + xnoremap 4zl + xnoremap 4zl + xnoremap 4zl - snoremap 4zh - snoremap 4zh - snoremap 4zh - snoremap 4zh + snoremap 4zl + snoremap 4zl + snoremap 4zl + snoremap 4zl - vnoremap 4zh - vnoremap 4zh - vnoremap 4zh - vnoremap 4zh + vnoremap 4zl + vnoremap 4zl + vnoremap 4zl + vnoremap 4zl - inoremap 4zh - inoremap 4zh - inoremap 4zh - inoremap 4zh + inoremap 4zl + inoremap 4zl + inoremap 4zl + inoremap 4zl - noremap 4zh - noremap 4zh - noremap 4zh - noremap 4zh + noremap 4zl + noremap 4zl + noremap 4zl + noremap 4zl - nnoremap 4zh - nnoremap 4zh - nnoremap 4zh - nnoremap 4zh + nnoremap 4zl + nnoremap 4zl + nnoremap 4zl + nnoremap 4zl - xnoremap 4zh - xnoremap 4zh - xnoremap 4zh - xnoremap 4zh + xnoremap 4zl + xnoremap 4zl + xnoremap 4zl + xnoremap 4zl - snoremap 4zh - snoremap 4zh - snoremap 4zh - snoremap 4zh + snoremap 4zl + snoremap 4zl + snoremap 4zl + snoremap 4zl - vnoremap 4zh - vnoremap 4zh - vnoremap 4zh - vnoremap 4zh + vnoremap 4zl + vnoremap 4zl + vnoremap 4zl + vnoremap 4zl - inoremap 4zh - inoremap 4zh - inoremap 4zh - inoremap 4zh + inoremap 4zl + inoremap 4zl + inoremap 4zl + inoremap 4zl - noremap 4zh - noremap 4zh - noremap 4zh - noremap 4zh + noremap 4zl + noremap 4zl + noremap 4zl + noremap 4zl - nnoremap 4zh - nnoremap 4zh - nnoremap 4zh - nnoremap 4zh + nnoremap 4zl + nnoremap 4zl + nnoremap 4zl + nnoremap 4zl - xnoremap 4zh - xnoremap 4zh - xnoremap 4zh - xnoremap 4zh + xnoremap 4zl + xnoremap 4zl + xnoremap 4zl + xnoremap 4zl - snoremap 4zh - snoremap 4zh - snoremap 4zh - snoremap 4zh + snoremap 4zl + snoremap 4zl + snoremap 4zl + snoremap 4zl - vnoremap 4zh - vnoremap 4zh - vnoremap 4zh - vnoremap 4zh + vnoremap 4zl + vnoremap 4zl + vnoremap 4zl + vnoremap 4zl - inoremap 4zh - inoremap 4zh - inoremap 4zh - inoremap 4zh + inoremap 4zl + inoremap 4zl + inoremap 4zl + inoremap 4zl "middle & ctrl+left = select from cursor nnoremap