support t/T command and fix alter mode
這個提交存在於:
父節點
2b6aca17b0
當前提交
6c01283973
共有 3 個檔案被更改,包括 10 行新增 和 1 行删除
|
@ -25,11 +25,17 @@ const exec = (operation, tab) => {
|
|||
case operations.COMMAND_OPEN:
|
||||
return consoleActions.showCommand('');
|
||||
case operations.COMMAND_TABS_OPEN:
|
||||
if (operations.alter) {
|
||||
if (operation.alter) {
|
||||
// alter url
|
||||
return consoleActions.showCommand('open ' + tab.url);
|
||||
}
|
||||
return consoleActions.showCommand('open ');
|
||||
case operations.COMMAND_TABS_NEW:
|
||||
if (operation.alter) {
|
||||
// alter url
|
||||
return consoleActions.showCommand('tabopen ' + tab.url);
|
||||
}
|
||||
return consoleActions.showCommand('tabopen ');
|
||||
case operations.COMMAND_BUFFER:
|
||||
return consoleActions.showCommand('buffer ');
|
||||
default:
|
||||
|
|
|
@ -4,6 +4,8 @@ const defaultKeymap = {
|
|||
':': { type: operations.COMMAND_OPEN },
|
||||
'o': { type: operations.COMMAND_TABS_OPEN, alter: false },
|
||||
'O': { type: operations.COMMAND_TABS_OPEN, alter: true },
|
||||
't': { type: operations.COMMAND_TABS_NEW, alter: false },
|
||||
'T': { type: operations.COMMAND_TABS_NEW, alter: true },
|
||||
'b': { type: operations.COMMAND_BUFFER },
|
||||
'k': { type: operations.SCROLL_LINES, count: -1 },
|
||||
'j': { type: operations.SCROLL_LINES, count: 1 },
|
||||
|
|
|
@ -2,6 +2,7 @@ export default {
|
|||
// Command
|
||||
COMMAND_OPEN: 'cmd.open',
|
||||
COMMAND_TABS_OPEN: 'cmd.tabs.open',
|
||||
COMMAND_TABS_NEW: 'cmd.tabs.new',
|
||||
COMMAND_BUFFER: 'cmd.buffer',
|
||||
|
||||
SCROLL_LINES: 'scroll.lines',
|
||||
|
|
新增問題並參考