On 09/16/2012 10:48 PM, Tony Mechelynck wrote:
On 16/09/12 21:14, Timothy Madden wrote:
[...]
About using expand('%'), Vimball documentation says the files should
always be relative (unless I intend to distribute some file like
/etc/opt/plugin-config) that is meant to be absolute).
Thank you,
Timothy Madden
Well, expand('%:.') then. But expand('%') (without :p) ought to be good
enough.
Patch 7.3.154 was released on 2 April 2011. I recommend that you upgrade.
See http://ftp.vim.org/pub/vim/patches/7.3/README for a one-line summary
of each patch to Vim 7.3.
If Slackware distributes no version of Vim later than 7.3.154, then see
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
about how to compile your own Vim on Unix-like systems. (The former of
these web pages obsoletes the part of the latter about getting and
patching the source.)
Slackware-current has a new version, and I am now running 7.3.645.
The behavior has been fixed in some cases, but not in others, so it did
not help me much.
bash-4.2$ vim -V1 -nNes -i NONE -c 'version | echo "" | qall!'
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 29 2012 16:49:50)
Included patches: 1-645
Compiled by <[email protected]>
Huge version without GUI. Features included (+) or not (-):
....
bash-4.2$ vim -V1 -nNes -i NONE -c 'args | echo "" | qall!' \
/home/adrian/.profile ../../.profile
"~/.profile"
"~/.profile" 16L, 376C
[/home/adrian/.profile] /home/adrian/.profile
bash-4.2$
bash-4.2$ vim -V1 -nNes -i NONE -c 'args | echo "" | qall!' \
../../.profile /home/adrian/.profile
"../../.profile"
"../../.profile" 16L, 376C
[../../.profile] ../../.profile
I believe this behavior is intentional, the help files do say the
arguments are added to the buffers list.
About expand(), it does return the relative file name as expected, but
the presence of an already opend buffer with the long ../../ name still
breaks MkVimball...
I believe all I can do in this case is to open each file as returned by
fnamemodify() (that is, expand()) and if the buffer name is not the
requested one, wipe it...
Thank you,
Timothy Madden
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php