summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-01-14 00:39:35 +0100
committertv <tv@krebsco.de>2023-01-15 15:46:17 +0100
commit5506be2844bd0093ae55681feda0077bbf568103 (patch)
tree538b0fd789af35061b6865471fdd0515942a3b44 /tv/2configs
parent9645b6d112bb43a5de31ef580fc031c9608a03a5 (diff)
tv vim: scroll linewise when there's a touchscreen
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/vim.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index b8819ee..a022580 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -140,5 +140,16 @@ with import ./lib;
" edit alternate buffer
" For some reason neither putting <ctrl>6 nor <ctrl>^ works here...
nnoremap <esc>a 
+
+ if $TOUCHSCREEN == 1
+ nnoremap <ScrollWheelUp> <C-y>
+ nnoremap <ScrollWheelDown> <C-e>
+ nnoremap <C-ScrollWheelUp> 3<C-y>
+ nnoremap <C-ScrollWheelDown> 3<C-e>
+ nnoremap <S-ScrollWheelUp> 3<C-y>
+ nnoremap <S-ScrollWheelDown> 3<C-e>
+ nnoremap <C-S-ScrollWheelUp> <PageUp>
+ nnoremap <C-S-ScrollWheelDown> <PageDown>
+ endif
'';
}