I have Vim version 7.1.138 7.1 and I'm working on Ubuntu Linux.
I installed the vimball package and then I gave the command:
vim netrw.vim
Then:
:so %
It worked fine, but if I try to access a remote address I get this error:
Error detected while processing BufReadCmd Auto commands for "ftp://*":
E117: Unknown function: fnameescape
E15: Invalid expression: "silent doau BufReadPre ".fnameescape(expand("<amatch>"
))|exe '2Nread '.fnameescape(expand("<amatch>"))|exe "silent doau BufReadPost ".
fnameescape(expand("<amatch>"))
What can I do?
Thanks.
Upgrade Vim. fnameescape() was added in version 7.1.299.
If you don't have rights to upgrade software on the box running Vim, I
suppose that you could downgrade your netrw plugin....
> Thanks.
>
> >
--
Erik Falor
Registered Linux User #445632 http://counter.li.org
The one I have now seems to be the newest version available on Ubuntu
repositories. Some months ago I installed Vim froum source, but then I
had some problems: for example, I couldn yank and paste between two
splittet Vim windows, so I installed again the version on
repositories.
Now I deleted netrw.vim, so I think it's using the default version. It
actually works, but for example, when I'm browsing files via ftp, if I
use "t" on a file (to open it in a new tab) I get this error:
Error detected while processing function <SNR>30_NetSplit..<SNR>30_NetBrowseChgD
ir:
line 5:
(NetBrowseChgDir) b:netrw_curdir doesn't exist!
Error detected while processing function <SNR>30_NetSplit..<SNR>30_NetBrowse..ne
trw#NetRead:
line 91:
E121: Undefined variable: b:netrw_fname
E116: Invalid arguments for function s:GetTempfile(b:netrw_fname) " apply correc
t suffix
E15: Invalid expression: s:GetTempfile(b:netrw_fname) " apply correct suffix
line 360:
E108: No such variable: "b:netrw_fname"
It seems to be a similar problem as before :\
It's not a big deal, or maybe my approach is wrong.
What I need is a simple way to come back to the directory tree.
I mean: I access my ftp. Then, if I click enter on any file, for
example index.html, I can edit and save it. It works. But when I'm
finished with it, how can I go back? With :q It just (of course) close
Vim.
Hope I made it clear.
Thanks.
Yanking and pasting between two split windows of a single Vim instance
ought to always be possible: just use y or :yank in one window then p, P
or :put in the other. I suggest you try making your own Vim again; see
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm to see,
step-by-step, how I compile Vim with no problems on Linux (openSUSE
Linux in my case, but I tried to make the page as little "provincial" as
I could).
IIUC, on Debian/Ubuntu systems there exists a quick command to install
all building dependencies for a given package (such as Vim) but I don't
know the details. I'm sure, however, that someone will jump in and give
these details if you don't already know them. Maybe "man apt-get" or
"info apt-get" can help you, if these commands tell you anything at all.
Best regards,
Tony.
--
Keep you Eye on the Ball,
Your Shoulder to the Wheel,
Your Nose to the Grindstone,
Your Feet on the Ground,
Your Head on your Shoulders.
Now ... try to get something DONE!
Mmm, so then the problem was with a register, using +.
I suggest you try making your own Vim again; see
> http://users.skynet.be/antoine.mechelynck/vim/compunix.htm to see,
> step-by-step, how I compile Vim with no problems on Linux (openSUSE
> Linux in my case, but I tried to make the page as little "provincial" as
> I could).
Well, I'll try.
> IIUC, on Debian/Ubuntu systems there exists a quick command to install
> all building dependencies for a given package (such as Vim) but I don't
> know the details. I'm sure, however, that someone will jump in and give
> these details if you don't already know them. Maybe "man apt-get" or
> "info apt-get" can help you, if these commands tell you anything at all.
Of course I know these commands :P
Great guide.
I did follow it and now Vim 7.2 seems to work fine.
I installed again the newest version of netrw, but still the "t"
command doesn't work.
Other similar commands works well, for example with "o" it opens the
file in a splitted window. But when I try to open it in a new tab
something weird happens.
It opens a new tab named NetrwMessage. It is splitted and on the
bottom there is this message:
**warning** (netrw) cannot determine method (format:
protocol://[user@]hostname[:port]/[path])
Error/warning messages should appear in a separate window, not a
separate tab -- sounds like it tried to open the file/directory but
failed. What protocol were you trying?
I need more information to be able to duplicate and address this problem.
Regards,
Chip Campbell
I'm using ftp protocol, and I just want to open a file in a new tab. I
access the ftp. I tried from the shell with:
vim ftp://user@host/
and from vim:
:e ftp://user@host/
It opens the directory tree. Moving the cursor and pressing "o",
splits the windows and opens the file I want to edit. Doing the same,
with "t", doesn't work.
simple.vimrc:
set nocp
vim -u simple.vimrc ftp://user@host/
and using a "t" on either a file or a directory worked as expected.
Caveat: you'll need vim 7.2 for this version of netrw.
Regards,
Chip Campbell
Thanks, this actually worked.
Regards,
Chip Campbell