Hi,

I am not entirely sure how this had managed to work for so long.  

The file hiding function activated by the g:netrw_list_hide variable was
not working for me when I had the following.

let g:netrw_list_hide='^\..*'

in order to hide dot files on a local drive

after some debugging, I realized that the final command that is being
used is (expressed here more simply that in reality to make the point)

exec "g".sep."^\..*'.sep."d"

(ie if sep="/" then "g/^\..*/d" will be executed)

however the function that is responsible for doing this automatically
selects the *sep* character from a list of characters and it does so
incorrectly.  "!" was being used as the separator for this particular
pattern.  This actually does something different than intended since the
"!" character is recognized by the global command.

The attached patch fixes this for the pattern above and a few others
that I tried.

The initial list from which a separator is selected is changed to a more
sane list.

I removed "!" because of the reasons explained above.
I also removed [a-zA-Z] because I read somewhere that a letter cannot
delimit a pattern... and I removed [0-9] just to be safe.

Thanks,
Osei



-- 
Osei Poku
Graduate Student,
Dept. of ECE, CMU
Index: netrw.vim
===================================================================
--- netrw.vim   (revision 30)
+++ netrw.vim   (working copy)
@@ -2035,7 +2035,7 @@
   " find a character not in the "hide" string to used as a separator
   " for :g and :v commands
   let listhide= g:netrw_list_hide
-  let sep     = strpart(substitute('[EMAIL 
PROTECTED]&*{};:,<.>/?|abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
+  let sep     = strpart(substitute('[EMAIL 
PROTECTED]&*{};:,<.>/?|','['.escape(listhide,'-]^\').']','','ge'),0,1)
 "  call Decho("sep=".sep)
 
   while listhide != ""

Reply via email to