gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] vim and Arch precious files : a work-around


From: Jean-Michel FAYARD
Subject: [Gnu-arch-users] vim and Arch precious files : a work-around
Date: Fri, 12 Mar 2004 13:26:59 +0000
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

Hello,

    $ vim -- ++foo.vim
and
    $ vim
    :e ./++foo.vim
works, so to automate this, you can do (assuming you use bash)


    $ echo 'alias edit="vim --"'  >> ~/.bashrc
    $ cat <<EOF >> ~/.vimrc
fun! ArchPreciousFiles(A,L,P)
     return system( "ls | grep '^++' ")
endfun
command! -nargs=1 -complete=custom,ArchPreciousFiles Edit :edit ./<args>
EOF


Now, you can safely use "edit" in the shell and ":Edit" in vim to edit those files with a leading '++' (for ":Edit", <tab> and <Ctrl-D> are used to have an autocompletion for Arch's precious files)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]