Jeenu wrote:
> The problem with using BufEnter is that I see Explore running on every
> other buffer. I.e. I don't see any file contents, but all buffers
> would be filled with directory and file listing.
>
> Actually the reason I want this auto command is that I don't need to
> type the full path to start editing it. Instead, I thought I would
> say :new and I can just browse and pick the file to edit.
>
> Thanks
> Jeenu
>
> On Nov 13, 9:17 pm, Charles Campbell <[EMAIL PROTECTED]>
> wrote:
>
>> Jeenu wrote:
>>
>>> Hi,
>>>
>>> I'm trying to use Explore with BufNew auto-command so that I get a
>>> browser whenever I create a new buffer. I did:
>>>
>>> aucmd BufNew * Explore
>>>
>>> But I don't see Explore command working when I create a new buffer.
>>> All I see is an empty buffer. :au BufNew command does list Explore
>>> but.
>>>
>>> BufNew
>>> *.svg setf xml|set matchpairs=<:>
>>> *.gmk setf make
>>> *.make setf make
>>> * Explore
>>>
>>> What might be going wrong?
>>>
>> Well, its au or autocmd. May I suggest trying "BufEnter" instead of
>> "BufNew"?
>>
>>
Perhaps if you try...
au BufEnter * if line("$") == 1 && getline(1) == "" | Explore | endif
Regards,
Chip Campbell
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---