Wednesday, May 23, 2012

Re: netrw-plugin: Hide files with names starting with dot

On May 21, 10:26 am, Charles Campbell <Charles.E.Campb...@nasa.gov>
wrote:
>Paul wrote:
>> Ben Fritz wrote:
>>> On Wednesday, May 16, 2012 10:26:37 AM UTC-5, Paul wrote:
>>>> One thing I found not to be remembered is "setl ts=14" (or
>>>> whatever number you use to get the file timestamp column closer
>>>> to the filename column). Is there a way to have this setting
>>>> stick?
>>>
>>> I don't have input for your main problem, sorry about that.
>>>
>>> But this one I can handle.
>>>
>>> netrw sets the 'netrw' filetype on its buffers.
>>>
>>> So simply use a FileType autocmd, or a filetype plugin file (in
>>> the after directory).
>>>
>>> I.e., either create this autocmd:
>>>
>>> au FileType netrw setl ts=14
>>>
>>> or create file ~/.vim/after/ftplugin/netrw.vim with contents:
>>>
>>> setl ts=14
>>
>> Ben, thanks for that. Unfortunately, the specific local value for
>> tabstop depends on the longest filename of interest (not
>> necessarily the longest filename in the directory. This is set on
>> a per-directory basis (and may change if the directory contents
>> change). I just need the local tabstop value to stick to the
>> buffer for a particular directory. So I need (or rather, want) vim
>> to treat a netrw window in the same manner as it does other
>> buffers. That way, even if I close the window, then open it again
>> (for example, using :e Directory/Path), the ts value stays the same
>> as it was set to last time.
>>
>> I get the feeling that I'm asking for the impossible, but there
>> have been occassions in the past in which I have been pleasantly
>> surprised.
>
> Try putting
>
> let g:netrw_list_hide =
> '\(^\|\s\s\)\zs\.\S\+,\(^\|\s\s\)ntuser\.\S\+'
>
> in your .vimrc and see if that does what you want. (see :help
> g:netrw_list_hide )

I already have:

let g:netrw_list_hide= '.*\.swp\*,.*\.swp$,.*\.swp\s,.*/$,.*/\s'

I'm not sure how the above hide expression helps with a variable
tabstop that sticks with each folder. Can you elaborate on the
thinking behind that?

Note that I found that it's easy to get thrown off by the many places
where vimrc can reside. In Windows, there's the location for all
users, then there is the one in each user's home directory. Same with
cygwin on the same PC (cygwin is a unix environment operating within
the Windows environment). I can think that I've defined the proper
g:netrw_... variable in all places, but after much mucking, find that
I haven't.

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

No comments: