* Gary Johnson <[email protected]> [2009-08-26 17:17]:
> I am forwarding this post from comp.editors because
> I think it will receive more attention here.
> After reading this, I observed the issue
> using vim 7.2.148 on a Red Hat Linux system.
> My ~/.vimrc is a symlink to ~/.vim/vimrc.
> When I execute this in my home directory:
>
>     vim .vimrc .vim/vimrc
>
> and then execute this within vim:
>
>     :args
>
> I see this:
>
>     [.vimrc] .vimrc


when i do this with vim-7.2.79 then i get:

      [.vimrc] .vim/vimrc

> If you do
>         $ vi is_this_a_vim_bug*
> or
>         $ vi is_this_a_vim_bug.hardlink is_this_a_vim_bug.softlink
>
> Given
>
>         $ ls -l is_this_a_vim_bug*
>         -rw-rw-r--    2 marky    marky          29 Aug 26 11:46 
> is_this_a_vim_bug
>         -rw-rw-r--    2 marky    marky          29 Aug 26 11:46 
> is_this_a_vim_bug.hardlink
>         lrwxrwxrwx    1 marky    marky           6 Aug 26 11:46 
> is_this_a_vim_bug.softlink -> is_this_a_vim_bug
>
> and then use :n to move to the next file then vi doesn't
> change the filename in the status bar at the bottom.
> I think it should.

let's make this testing a little shorter:

 mkdir /tmp/foo
 cd    /tmp/foo
 touch bar
 ln    bar hard
 ln -s bar soft
 vim bar hard soft

and within vim:

 :args
 [bar] bar bar
 :n
 :args
 bar [bar] bar
 :n
 :args
 bar bar [bar]

"notice the consistent interface!" ;-)

note: there is only this one "file" in the buffer list:

 :ls
   1 %a   "bar"                          line 1

> I've reproduced this on RHEL v3 with vim v6.3.81 and
> on Debian v4.0 with vim v7.0.235, v7.0.305 & v7.2.245.
> I think this is a bug, or at least an opportunity
> to make it clearer to the user what is happening.

yep - an indication for a softlink would be great.
maybe even give for a hardlink when there is more than one?

mind you - in the todo.txt there already is a similar issue:

8   When editing a file which is a symbolic link, and then opening another
    symbolic link on the same file, Vim uses the name of the first one.
    Adjust the file name in the buffer to the last one used?  Use several file
    names in one buffer???
    Also: When first editing file "test", which is symlink to "test2", and
    then editing "test2", you end up editing buffer "test" again.  It's not
    logical that the name that was first used sticks with the buffer.

actually,
i wouldnt mind if ":ls" had better info.
and i would really like to move the
"line NNN" indication to the *front*.

example:

:ls
  1  h   "[No Name]"                    line 1
  2  h   ".mutt/NEW"                    line 1080
  4      ".mutt/personal"               line 5
  4  h   ".zshrc.mine"                  line 25
  5 %a   ".cal.dat"                     line 3711
  6  h   ".procmailrc"                  line 2343
  7  h   ".mutt/aliases"                line 1
  8      ".ssh/config"                  line 152
  9  h   "~/.P/filter/index.html"       line 862
 10 #h   "~/.P/cal/TODO.txt"            line 11
 11  h   "~/.vim/vimrc.mine"            line 7
 12  h   ".mutt/aliases"                line 1
 13  h   ".P/har/index.html"            line 148
 14  h   "~/.P/quotes/collection"       line 5
 15      "/home/www/guckes/public_html/har2009/pics.2009-08-17/index.html" line 
59
 16  h   "/home/www/guckes/public_html/Sig/SIGS" line 5860
 17  h   "/home/www/guckes/public_html/HOMEPAGE.html" line 12
 18      "/home/www/guckes/public_html/Irc/channels.2009-08-11" line 1

new layout:
line numbers before filenames.
no quotes around filename - unless they contain spaces.
and paths like "/home/www/guckes/public_html/"
abbreviated to "~/.P/" to save space.

result:

:ls
  1  h    1  [No Name]
  2  h 1080  .mutt/NEW
  4       5  .mutt/personal
  4  h   25  .zshrc.mine
  5 %a 3711  .cal.dat
  6  h 2343  .procmailrc
  7  h    1  .mutt/aliases
  8     152  .ssh/config
  9  h  862  ~/.P/filter/index.html
 10 #h   11  ~/.P/cal/TODO.txt
 11  h    7  ~/.vim/vimrc.mine
 12  h    1  .mutt/aliases
 13  h  148  .P/har/index.html
 14  h    5  ~/.P/quotes/collection
 15      59  ~/.P/har2009/pics.2009-08-17/index.html
 16  h 5860  ~/.P/Sig/SIGS
 17  h   12  ~/.P/HOMEPAGE.html
 18       1  ~/.P/Irc/channels.2009-08-11

now imagine this with an indicator for hard/soft link,
ie a number for the hard links - and an '@'
for soft links (add a little zsh style here ;-),
pointed out here within brackets around the data:

:ls
  1  h [  ]    1  [No Name]
  2  h [  ] 1080  .mutt/NEW
  4    [  ]    5  .mutt/personal
  4  h [23]   25  .zshrc.mine
  5 %a [42] 3711  .cal.dat
  6  h [  ] 2343  .procmailrc
  7  h [ 2]    1  .mutt/aliases
  8    [  ]  152  .ssh/config
  9  h [@ ]  862  ~/.P/filter/index.html
 10 #h [@ ]   11  ~/.P/cal/TODO.txt
 11  h [  ]    7  ~/.vim/vimrc.mine
 12  h [ 2]    1  .mutt/aliases
 13  h [  ]  148  .P/har/index.html
 14  h [@ ]    5  ~/.P/quotes/collection
 15    [@ ]   59  ~/.P/har2009/pics.2009-08-17/index.html
 16  h [@ ] 5860  ~/.P/Sig/SIGS
 17  h [@ ]   12  ~/.P/HOMEPAGE.html
 18    [@ ]    1  ~/.P/Irc/channels.2009-08-11

so... anyone else want this?  i am sure
Bram does want to redo the layout for that.
maybe someone can put this into a script
so we can try this a little before changing?

Sven

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui