From c2f2dc4c9269ca3a114fce4a4e6ff6025e6ffa35 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 15 Dec 2017 12:25:40 +0000 Subject: Treat all mapping commands as lower case. On the options page, treat all user-defined mapping commands as lower case. Why? - `unmapAll` is not very vim-ish, and is inconsistent with `mapkey`. - If we were to introduce `vmap` for visual mode, then we would get `vUnmapAll`, which is hideous capitalisation. Possible down side? - I guess somebody might have disabled a `map` by capitalising it. --- background_scripts/commands.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 4d2e1606..f3ae3bd9 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -20,7 +20,7 @@ Commands = unmapAll = false for line in configLines.reverse() tokens = line.split /\s+/ - switch tokens[0] + switch tokens[0].toLowerCase() when "map" if 3 <= tokens.length and not unmapAll [_, key, command, optionList...] = tokens @@ -32,7 +32,7 @@ Commands = when "unmap" if tokens.length == 2 seen[tokens[1]] = true - when "unmapAll" + when "unmapall" unmapAll = true when "mapkey" if tokens.length == 3 -- cgit v1.2.3