@@ -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 
219227cliCmds [ ":" ] . 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
221232cliCmds [ ":" ] . commands . set  =  { 
222233    vimOpts : [ 
@@ -343,7 +354,7 @@ function endCommandInput(cmdLine) {
343354exports . 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