Skip to content

Commit

Permalink
Merge pull request #3954 from J-Fields/ctrl-f-cmdline
Browse files Browse the repository at this point in the history
`<C-f>` shows command history when pressed on command line
  • Loading branch information
J-Fields authored Aug 21, 2019
2 parents 3c0dacf + 4c05d72 commit 65d5c30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ class CommandTabInCommandline extends BaseCommand {
@RegisterAction
class CommandInsertInCommandline extends BaseCommand {
modes = [ModeName.CommandlineInProgress];
keys = [['<character>'], ['<up>'], ['<down>'], ['<C-h>'], ['<C-p>'], ['<C-n>']];
keys = [['<character>'], ['<up>'], ['<down>'], ['<C-h>'], ['<C-p>'], ['<C-n>'], ['<C-f>']];
runsOnceForEveryCursor() {
return this.keysPressed[0] === '\n';
}
Expand All @@ -2014,6 +2014,8 @@ class CommandInsertInCommandline extends BaseCommand {
vimState.currentCommandlineText.slice(0, vimState.statusBarCursorCharacterPos - 1) +
vimState.currentCommandlineText.slice(vimState.statusBarCursorCharacterPos);
vimState.statusBarCursorCharacterPos = Math.max(vimState.statusBarCursorCharacterPos - 1, 0);
} else if (key === '<C-f>') {
new CommandShowCommandHistory().exec(position, vimState);
} else if (key === '\n') {
await commandLine.Run(vimState.currentCommandlineText, vimState);
await vimState.setCurrentMode(ModeName.Normal);
Expand Down

0 comments on commit 65d5c30

Please sign in to comment.