diff options
| author | Stephen Blott | 2017-12-15 12:25:40 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2017-12-15 12:25:40 +0000 | 
| commit | c2f2dc4c9269ca3a114fce4a4e6ff6025e6ffa35 (patch) | |
| tree | 7e00994a71be37eac78ab4565f77c40f7768b25a | |
| parent | 2a2eff708e3880c5d3e29abfff3f2c863e3467e5 (diff) | |
| download | vimium-c2f2dc4c9269ca3a114fce4a4e6ff6025e6ffa35.tar.bz2 | |
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.
| -rw-r--r-- | background_scripts/commands.coffee | 4 | 
1 files 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 | 
