From 5f630bd4957986f46648c80e97f75fb3531ace6f Mon Sep 17 00:00:00 2001 From: Shayne Holmes Date: Fri, 22 Mar 2019 08:13:18 -0700 Subject: [PATCH] vim: Fix scroll mappings The included `vimrc` file sets mappings for and , so that scrolling is smooth. Unfortunately, 'compatible' is set by default [0], so the `<>` notation used for those mappings isn't enabled. Instead of the key `` being mapped, the mapping is actually from the typed string "". [0]: `:help compatible-default` explains that vim will turn the 'compatible' option off when "a user vimrc is found", or under various other conditions (note that the system-wide vimrc doesn't count [1]), but even in the case where a user vimrc exists, this system-wide vimrc is executed before that happens. [1]: From `:help compatible-default`: Note that this does NOT happen when a system-wide vimrc file was found. --- packages/vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/vim/vimrc b/packages/vim/vimrc index 33fa59574..7cb8378bd 100644 --- a/packages/vim/vimrc +++ b/packages/vim/vimrc @@ -1,3 +1,6 @@ +" Ensure that <> notation works for the mappings that follow +set nocompatible + " Scroll only one line for mouse wheel events to get smooth scrolling on touch screens map imap