netrw problem

115 views
Skip to first unread message

Mr.SpOOn

unread,
Oct 10, 2008, 12:19:42 PM10/10/08
to vim...@googlegroups.com
Hi,
I'm trying to use Vim to edit some html pages via ftp.

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.

Erik Falor

unread,
Oct 10, 2008, 6:46:09 PM10/10/08
to vim...@googlegroups.com

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

Mr.SpOOn

unread,
Oct 10, 2008, 7:03:03 PM10/10/08
to vim...@googlegroups.com
On Sat, Oct 11, 2008 at 12:46 AM, Erik Falor <ewf...@gmail.com> wrote:
> 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....

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.

Tony Mechelynck

unread,
Oct 10, 2008, 8:16:41 PM10/10/08
to vim...@googlegroups.com
On 11/10/08 01:03, Mr.SpOOn wrote:
> On Sat, Oct 11, 2008 at 12:46 AM, Erik Falor<ewf...@gmail.com> wrote:
>> 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....
>
> 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.
[...]

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!

Mr.SpOOn

unread,
Oct 11, 2008, 5:54:38 AM10/11/08
to vim...@googlegroups.com
On Sat, Oct 11, 2008 at 2:16 AM, Tony Mechelynck
<antoine.m...@gmail.com> wrote:
>
> 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.

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

Mr.SpOOn

unread,
Oct 11, 2008, 12:25:33 PM10/11/08
to vim...@googlegroups.com
On Sat, Oct 11, 2008 at 11:54 AM, Mr. SpOOn <mr.sp...@gmail.com> wrote:
> 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.

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])

Charles E. Campbell, Jr.

unread,
Oct 12, 2008, 5:11:16 PM10/12/08
to vim...@googlegroups.com
I'm using v134e of netrw, available from my website:
http://mysite.verizon.net/astronaut/vim/index.html#NETRW .
I see no problem with the "t" command. So, what exactly are you trying
to do? What non-default netrw settings do you have?

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

Mr.SpOOn

unread,
Oct 13, 2008, 4:57:48 AM10/13/08
to vim...@googlegroups.com
On Sun, Oct 12, 2008 at 11:11 PM, Charles E. Campbell, Jr.
<drc...@campbellfamily.biz> wrote:
> I'm using v134e of netrw, available from my website:
> http://mysite.verizon.net/astronaut/vim/index.html#NETRW .
> I see no problem with the "t" command. So, what exactly are you trying
> to do? What non-default netrw settings do you have?
>
> 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'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.

Charles E. Campbell, Jr.

unread,
Oct 13, 2008, 10:19:55 AM10/13/08
to vim...@googlegroups.com
Please try v134f of netrw (see above for where to get it). The "t"
mapping is working for me.

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

Mr.SpOOn

unread,
Oct 13, 2008, 5:36:28 PM10/13/08
to vim...@googlegroups.com

Thanks, this actually worked.

Charles E. Campbell, Jr.

unread,
Oct 13, 2008, 7:07:09 PM10/13/08
to vim...@googlegroups.com
Presumably, then, your own regular .vimrc must have an option set that
netrw hasn't worked around. Perhaps you could help identify it so that I
could do that work-around...

Regards,
Chip Campbell

Reply all
Reply to author
Forward
0 new messages