Skip to content

Commit

Permalink
fix: closes #2390. enables remapping using '<enter>' in addition to '…
Browse files Browse the repository at this point in the history
…<cr>'
  • Loading branch information
jpoon committed Jun 19, 2018
1 parent 1f6789a commit 86d4140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/configuration/notation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class Notation {
return ' ';
}

if (key.toLocaleLowerCase() === '<cr>') {
if (key.toLocaleLowerCase() === '<cr>' || key.toLocaleLowerCase() === '<enter>') {
return '\n';
}

Expand Down
6 changes: 4 additions & 2 deletions test/configuration/notation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Notation } from '../../src/configuration/notation';

suite('Notation', () => {
test('Normalize', () => {
let leaderKey = '//';
let testCases = {
const leaderKey = '//';
const testCases = {
'<cTrL+w>': '<C-w>',
'cTrL+x': '<C-x>',
'CtRl+y': '<C-y>',
Expand All @@ -14,6 +14,8 @@ suite('Notation', () => {
eScapE: '<Esc>',
'<LeAder>': '//',
LEaDer: '//',
'<cR>': '\n',
'<EnTeR>': '\n',
'<space>': ' ',
'<uP>': '<up>',
};
Expand Down

0 comments on commit 86d4140

Please sign in to comment.