diff options
| -rw-r--r-- | commands.js | 13 | ||||
| -rw-r--r-- | options.html | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/commands.js b/commands.js index d7c8b12a..77277c73 100644 --- a/commands.js +++ b/commands.js @@ -27,16 +27,17 @@ function parseCustomKeyMappings(customKeyMappings) { lines = customKeyMappings.split("\n"); for (var i = 0; i < lines.length; i++) { - line = lines[i].split(" "); // TODO(ilya): Support all whitespace. - if (line.length < 2) { continue } + if (lines[i][0] == "\"" || lines[i][0] == "#") { continue } + split_line = lines[i].split(" "); // TODO(ilya): Support all whitespace. + if (split_line.length < 2) { continue } - var lineCommand = line[0]; - var key = line[1]; + var lineCommand = split_line[0]; + var key = split_line[1]; if (lineCommand == "map") { - if (line.length != 3) { continue } + if (split_line.length != 3) { continue } - var vimiumCommand = line[2]; + var vimiumCommand = split_line[2]; if (!availableCommands[vimiumCommand]) { continue } diff --git a/options.html b/options.html index 6110b09e..5fc965a3 100644 --- a/options.html +++ b/options.html @@ -193,6 +193,8 @@ Enter commands to remap your keys. Available commands:<br/> map j scrollDown<br/> unmap j</br> + " this is a comment<br/> + # this is also a comment<br/> </div> </div> <textarea id="keyMappings" type="text"></textarea> |
