Hi! When using TAB for filename completion sometimes you get a few
levels too deep like
:e /a/b/c/d/e/f-long-path-name-here/
so you have to use backspace to get back to
:e /a/b/c/d/e/
and that is annoying.
The patch below makes Ctrl-T remove the last pathname component by
removing chars up to the first found slash or space character. I chose
Ctrl-T very arbitraly, I don't know if this is a good choice.
Is this feature acceptable?
*** vim71-org/src/ex_getln.c 2007-05-07 21:47:23.000000000 +0200
--- vim71/src/ex_getln.c 2008-07-21 13:09:41.000000000 +0200
***************
*** 1411,1416 ****
--- 1411,1427 ----
break;
goto cmdline_changed;
+ //+++- [ ADIPE ] {
+ case Ctrl_T:
+ if ( ccline.cmdlen )
+ do {
+ ccline.cmdlen--;
+ ccline.cmdpos--;
+ } while ( (ccline.cmdlen>0) &&
+ (ccline.cmdbuff[ccline.cmdlen]) != ' ' &&
ccline.cmdbuff[ccline.cmdlen-1] != '/');
+ redrawcmd();
+ goto cmdline_changed;
+ //+++- [ ADIPE ] }
case Ctrl_N: /* next match */
case Ctrl_P: /* previous match */
if (xpc.xp_numfiles > 0)
*** vim71-org/cmdline.txt 2008-06-17 17:31:42.000000000 +0200
--- vim71/cmdline.txt 2008-07-21 13:41:29.000000000 +0200
***************
*** 119,124 ****
--- 119,127 ----
<
Note: if the command-line becomes empty with one of
the
delete commands, Command-line mode is quit.
+ *c_CTRL-T*
+ CTRL-T remove the last path component; removes all characters
up to the first found slash '/' or space character.
+
*c_<Insert>*
<Insert> Toggle between insert and overstrike. {not in Vi}
***************
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---