problems (and bugs) with netrw

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

problems (and bugs) with netrw

Matteo Cavalleri
I'm starting to learn netrw (the version shipped with the latest vim 7.4.142) but I already have a couple of problems and maybe a bug. Try to do this:


open any file
:Explore<cr>
press F1 for netrw help (will open in an horizontal split)
go back to netrw split
move over any file and press P
the file opens in the split where the help was displayed
:q the file
press F1 again
the help shows again but it is not formattet nor highlighted


there's also a problem with buffers losing all their rows (as if someone erased them all. a simple "u" brings them back, but the buffer remains marked as modified) but I haven't found yet a reliable way to reproduce it. it seems to happen at random...



and now for the problem: when i open netrw, i don't know how to go back to the file i was editing... I mean, I don't want to select a file and open it, I want to close netrw and go back to whatever i was editing before.

sometimes :b# is enough, but sometimes it doesn't work. e.g. after doing all the steps described before, :b# doesn't do anything, i remain on the netrw buffer. Is there another command? I couldn't find any in the help file.
C-^ seems to have no effects at all.

I tried to write a function to set a variable to current bufnr, then open netrw and map "q" to a command that switches back to the recorder bufnr, but for some reason there's something like a 2 second delay after i pressed "q" before the buffer is switched... here's my attempt:

let g:netrw_list_hide = '^\..*, .*\.sw[op]$'
let g:netrw_browse_split = 0
let g:netrw_liststyle = 3
let g:netrw_banner = 0

function! CloseNetrw()
    exe g:netrw_close_cmd
endfunction

function! OpenNetrw()
    let g:netrw_close_cmd = ":b" . bufnr('%')
    Explore
endfunction

au FileType netrw nnoremap q :call CloseNetrw()<CR>
nnoremap <C-\> :call OpenNetrw()<CR>



another problem: let's say I do :e app/etc/local.xml and then open netrw. I move over ../ and press <cr> to go back up one level in the hierarchy. the cursor move on row 0. is it possibile to let it stay on the first line of the file listings? i.e. after the netrw header. If i disable the header with "let g:netrw_banner=0" there's one empty line on top of the buffer, so a movement is still needed. It also happens when i open a file with <cr>. if I open netrw again the cursor is no longer on the file i opened, but on the first line.

thanks in advance!

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

Charles Campbell
Matteo Cavalleri wrote:

> I'm starting to learn netrw (the version shipped with the latest vim 7.4.142) but I already have a couple of problems and maybe a bug. Try to do this:
>
>
> open any file
> :Explore<cr>
> press F1 for netrw help (will open in an horizontal split)
> go back to netrw split
> move over any file and press P
> the file opens in the split where the help was displayed
> :q the file
> press F1 again
> the help shows again but it is not formattet nor highlighted
Just tried this sequence out and didn't see any problem.  Please try the
latest version of netrw (v150t, available from my website:
http://www.drchip.org/astronaut/vim/index.html#NETRW)
>
>
> there's also a problem with buffers losing all their rows (as if someone erased them all. a simple "u" brings them back, but the buffer remains marked as modified) but I haven't found yet a reliable way to reproduce it. it seems to happen at random...
I haven't seen this one, please let me know if you get a way to
reproduce it (please use v150t, though).
>
>
>
> and now for the problem: when i open netrw, i don't know how to go back to the file i was editing... I mean, I don't want to select a file and open it, I want to close netrw and go back to whatever i was editing before.
:Rexplore
> [snip]
>

> another problem: let's say I do :e app/etc/local.xml and then open netrw. I move over ../ and press <cr> to go back up one level in the hierarchy. the cursor move on row 0. is it possibile to let it stay on the first line of the file listings? i.e. after the netrw header. If i disable the header with "let g:netrw_banner=0" there's one empty line on top of the buffer, so a movement is still needed. It also happens when i open a file with <cr>. if I open netrw again the cursor is no longer on the file i opened, but on the first line.
Netrw v150t's cursor was on the ".." after moving up a directory. Please
try v150t.  I didn't see a blank line with g:netrw_banner= 0, either.

Regards,
C Campbell


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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

Matteo Cavalleri
> Just tried this sequence out and didn't see any problem.  Please try the
> latest version of netrw (v150t, available from my website:
>
> http://www.drchip.org/astronaut/vim/index.html#NETRW)

I installed it. if there's nothing else to do to load the new version then the problem still happens. it might be some interactions with other plugin, but i've no idea how to find out.

I see that the second time i open the help ":echo &ft" outputs "text", but I have no idea why it happens

http://www.freeimagehosting.net/ksvo8



> I haven't seen this one, please let me know if you get a way to
> reproduce it (please use v150t, though).

currently it hasn't happened yet. as I said it was random, but it seemed to happen quite frequently, so the fact that i haven't seen it yet might mean it's solved... anyway, if it happens again i'll report it, thanks :)



> > and now for the problem: when i open netrw, i don't know how to go back to the file i was editing... I mean, I don't want to select a file and open it, I want to close netrw and go back to whatever i was editing before.
>
> :Rexplore

i suppose I didn't explain the problem correctly. I don't want to go back to netrw, I want to close netrw and go back to the file I was editing (I'm opening it in the current window, not in another split)



> Netrw v150t's cursor was on the ".." after moving up a directory. Please
> try v150t.  I didn't see a blank line with g:netrw_banner= 0, either.

i still do

http://www.freeimagehosting.net/ua5m1

thanks for the help

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

Charles Campbell
Matteo Cavalleri wrote:
>> Just tried this sequence out and didn't see any problem.  Please try the
>> latest version of netrw (v150t, available from my website:
>>
>> http://www.drchip.org/astronaut/vim/index.html#NETRW)
> I installed it. if there's nothing else to do to load the new version then the problem still happens. it might be some interactions with other plugin, but i've no idea how to find out.
* what o/s are you using?
* what netrw-oriented options are you using?  In looking at your image,
I see you're using a tree listing with banner off, and so now I see a
blank line at the top.  I'll look into it.
* netrw's banner will tell you what version you're using.  You can also
type  :echo g:loaded_netrw .
* if its interaction with some other plugin -- move them out of your
.vim/plugin directory and see if the problem recurs.  If not, put them
back in and figure out which one is causing the issue.  If you're using
one of the add-ons for plugin management (vundle, etc), well, I don't
use them as they're non-standard, and so you'll have to figure out how
to selectively disable/re-enable them on your own.

>
> I see that the second time i open the help ":echo &ft" outputs "text", but I have no idea why it happens
>
> http://www.freeimagehosting.net/ksvo8
>
>
>
>> I haven't seen this one, please let me know if you get a way to
>> reproduce it (please use v150t, though).
> currently it hasn't happened yet. as I said it was random, but it seemed to happen quite frequently, so the fact that i haven't seen it yet might mean it's solved... anyway, if it happens again i'll report it, thanks :)
>
>
>
>>> and now for the problem: when i open netrw, i don't know how to go back to the file i was editing... I mean, I don't want to select a file and open it, I want to close netrw and go back to whatever i was editing before.
>> :Rexplore
> i suppose I didn't explain the problem correctly. I don't want to go back to netrw, I want to close netrw and go back to the file I was editing (I'm opening it in the current window, not in another split)
:q  -- will quit netrw (and close the window)

How did you open netrw?   :e somedirectory  ?  Hit <c-o> often enough
and you'll get back.  That's the same as for any  :e file ...  :e
something else   (now get back)  sequence in vim.  You might find  
:help :jumps  helpful, too.

>
>
>
>> Netrw v150t's cursor was on the ".." after moving up a directory. Please
>> try v150t.  I didn't see a blank line with g:netrw_banner= 0, either.
> i still do
>
> http://www.freeimagehosting.net/ua5m1
>
> thanks for the help
>
I'm not going to be able to help much more today -- I'm having hard disk
issues.

Regards,
C Campbell

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

Matteo Cavalleri
> * what o/s are you using?

ubuntu 13.10 64bit


> * what netrw-oriented options are you using?  In looking at your image,

let g:netrw_list_hide = '^\..*, .*\.sw[op]$'
let g:netrw_browse_split = 0
let g:netrw_liststyle = 3
let g:netrw_banner = 0


> * netrw's banner will tell you what version you're using.  You can also
> type  :echo g:loaded_netrw .

v150t (now that I'm doing test, otherwise the one shipped with vim)


> * if its interaction with some other plugin -- move them out of your
> .vim/plugin directory and see if the problem recurs.  If not, put them
> back in and figure out which one is causing the issue.  If you're using
> one of the add-ons for plugin management (vundle, etc), well, I don't
> use them as they're non-standard, and so you'll have to figure out how
> to selectively disable/re-enable them on your own.

this will require some time, I'll try to find it.


> > i suppose I didn't explain the problem correctly. I don't want to go back to netrw, I want to close netrw and go back to the file I was editing (I'm opening it in the current window, not in another split)
>
> :q  -- will quit netrw (and close the window)

still not what i want to do. If I have one file open, call :Explore, and then :q vim quits. I want to go back to the file i was editing. The functions I wrote seems to work, except for the weird lag...


> How did you open netrw?   :e somedirectory  ?  Hit <c-o> often enough
> and you'll get back.  That's the same as for any  :e file ...  :e
> something else   (now get back)  sequence in vim.  You might find  
> :help :jumps  helpful, too.

I know jumps, I didn't know I could jump from file to file :) I will try this command and see if I get used to it.


> I'm not going to be able to help much more today -- I'm having hard disk
> issues.

no problem, they are absolutely not urgent. thanks!

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

Justin M. Keyes
In reply to this post by Charles Campbell


On Jan 14, 2014 9:13 AM, "Charles Campbell" <[hidden email]> wrote:
>
> Matteo Cavalleri wrote:
>>
>> I'm starting to learn netrw (the version shipped with the latest vim 7.4.142) but I already have a couple of problems and maybe a bug. Try to do this:
>>
>>
>> open any file
>> :Explore<cr>
>> press F1 for netrw help (will open in an horizontal split)
>> go back to netrw split
>> move over any file and press P
>> the file opens in the split where the help was displayed
>> :q the file
>> press F1 again
>> the help shows again but it is not formattet nor highlighted
>
> Just tried this sequence out and didn't see any problem.  Please try the latest version of netrw (v150t, available from my website: http://www.drchip.org/astronaut/vim/index.html#NETRW)
>
>>
>>
>> there's also a problem with buffers losing all their rows (as if someone erased them all. a simple "u" brings them back, but the buffer remains marked as modified) but I haven't found yet a reliable way to reproduce it. it seems to happen at random...
>
> I haven't seen this one, please let me know if you get a way to reproduce it (please use v150t, though).

Sounds like this issue:
https://code.google.com/p/vim/issues/detail?id=140

--
--
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
 
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

Charles Campbell
In reply to this post by Matteo Cavalleri
Matteo Cavalleri wrote:

<snip>
> still not what i want to do. If I have one file open, call :Explore,
> and then :q vim quits. I want to go back to the file i was editing.
> The functions I wrote seems to work, except for the weird lag...
<snip>

Hello!

Please try netrw v151e
(http://www.drchip.org/astronaut/vim/index.html#NETRW) and its :Rex
command.  I've extended it to not only return to netrw, but when in
netrw, to return to the last file being edited in that window.

Regards,
C Campbell

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

Charles Campbell
In reply to this post by Matteo Cavalleri
Matteo Cavalleri wrote:

  another problem: let's say I do :e app/etc/local.xml and then open
netrw. I move over ../ and press <cr> to go back up one level in the
hierarchy. the cursor move on row 0. is it possibile to let it stay on
the first line of the file listings? i.e. after the netrw header. If i
disable the header with "let g:netrw_banner=0" there's one empty line on
top of the buffer, so a movement is still needed. It also happens when i
open a file with <cr>. if I open netrw again the cursor is no longer on
the file i opened, but on the first line. thanks in advance!

Hello!

With v151e of netrw, I don't see a blank line at the top when
g:netrw_banner=0; I don't think the problem above is present any more.

Regards,
C Campbell


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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problems (and bugs) with netrw

skywind3000
Hi, DrChip

I have encountered a serious netrw bug on windows:
https://groups.google.com/forum/#!topic/vim_use/45FO_l_QakM

I don't know how to contact you, your email is invalid now.

Will you please have a look at it ? thanks

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...