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
commit983b993e4c764e4e9f8071c23d9ede13b8eedf67 (patch)
treef55d6eea72ab9ac0b098cde61723d2fe306f60f1 /tv/2configs
parent99667ab5fbb90adaaa1c40aae0fedd9b480c2474 (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 b8819ee36..a0225807c 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
'';
}