Skip to content

Commit b7837a4

Browse files
committed
Merge pull request #2987 from FreedomKnight/master
inverse direction of tabNext, tabPrevious and add tabn, tabp
2 parents 696a7dc + ceecc35 commit b7837a4

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

plugins-client/ext.vim/cli.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,22 @@ cliCmds[":"].commands = {
200200
"q!": function() {
201201
cliCmds.q(null, {force: true});
202202
},
203-
tabNext: "gototableft",
204-
tabPrevious: "gototabright",
203+
tabn: "gototabright",
204+
tabp: "gototableft",
205205
tabfirst: function() {
206206
tabbehaviors.cycleTab("first");
207207
},
208208
tablast: function() {
209209
tabbehaviors.cycleTab("last");
210210
},
211+
tabnew: function(editor, data) {
212+
path = data.argv[1];
213+
if (!path) {
214+
commands.exec("newfile");
215+
} else {
216+
cliCmds[":"].commands.e(editor, data);
217+
}
218+
},
211219
tabclose: "closetab",
212220
tabmove: function(editor, data) {
213221
// todo
@@ -217,6 +225,9 @@ cliCmds[":"].commands = {
217225

218226
// aliases
219227
cliCmds[":"].commands.write = cliCmds[":"].commands.w;
228+
cliCmds[":"].commands.tabNext = cliCmds[":"].commands.tabn;
229+
cliCmds[":"].commands.tabPrevious = cliCmds[":"].commands.tabp;
230+
cliCmds[":"].commands.tabc = cliCmds[":"].commands.tabclose;
220231

221232
cliCmds[":"].commands.set = {
222233
vimOpts: [
@@ -343,7 +354,7 @@ function endCommandInput(cmdLine) {
343354
exports.initCmdLine = function(cmdLine) {
344355
cmdLine.commands.bindKeys({
345356
"Shift-Return|Ctrl-Return|Alt-Return": function(cmdLine) { cmdLine.insert("\n"); },
346-
"Esc|Shift-Esc": function(cmdLine){
357+
"Esc|Shift-Esc|Ctrl-[": function(cmdLine){
347358
endCommandInput(cmdLine);
348359
},
349360
"Return": function run(cmdLine) {

0 commit comments

Comments
 (0)