Default editor

Karl Larsen k5di at zianet.com
Sat Sep 13 21:16:57 UTC 2008


Smoot Carl-Mitchell wrote:
> On Sat, 2008-09-13 at 13:37 -0600, Karl Larsen wrote:
>
>   
>>     Well for some reason it does not work for me at all. In a terminal I 
>> write sudo vim /etc/X11 and then a Tab and it looks like /etc/X11\ and 
>> it does not work. What have I done wrong?
>>     
>
> Typing
>
> vi /etc/X11<tab>
>
> will complete the directory name with a trailing "/".
>
> At this point typing <tab><tab> will show you the list of files in
> the /etc/X11 directory.  What the shell is doing when you type the first
> <tab> is returning the common prefix of all the files in the /etc/X11
> directory which in this case is the <null> string.  The 2nd <tab>
> enumerates all the choices of files in the /etc/X11 directory with the
> common prefix.  In this case since the common prefix is the null string,
> it enumerates all the files in /etc/X11/.
>
>   
    Exactly! Here is what I have now using your method:

karl at karl-hardy:~$ sudo vim /etc/X11/
app-defaults/            X                        xserver/
cursors/                 xinit/                   Xsession
default-display-manager  xkb/                     Xsession.d/
fonts/                   xorg.conf                Xsession.options
rgb.txt                  Xresources/              Xwrapper.config
karl at karl-hardy:~$ sudo vim /etc/X11/

    What I had to do was hit Tab THREE TIMES. The original suggestion 
was to hit Tab once.
So now the actual thing to do is this:

$ sudo vim /etc/X11 Tab Tab Tab and you get the result above before even 
using vi or vim.

Thanks for the tip and now it works on my computer too.


Karl


-- 

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
   PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7





More information about the ubuntu-users mailing list