Incorrect information in ":help autochdir"

3 views
Skip to first unread message

Dominique Pellé

unread,
May 10, 2010, 2:57:17 PM5/10/10
to Vim List
Hi

According to ":help autochdir", the 'autochdir' variable should
be available only if |+netbeans_intg| or |+sun_workshop| feature
is available:

'autochdir' 'acd' boolean (default off)
global
{not in Vi}
{only available when compiled with the
|+netbeans_intg| or |+sun_workshop| feature}

On my version of Vim-7.2.416 (huge), neither +netbeans_intg,
nor +sun_workshop feature is available:

:echo has('netbeans_intg')
0
:echo has('sun_workshop')
0

Yet ":set autochdir" works fine, in contradiction with
information in ":help 'autochdir'":

I stumbled upon this since my ~/.vimrc contains...

if has('netbeans_intg') || has('sun_workshop')
set autochdir
endif

... which did not set 'autochdir' even though ":set autochdir"
works fine in big or huge versions of Vim.

This is how FEAT_AUTOCHDIR is defined in vim/src/feature.h:

1273 /*
1274 * +autochdir 'autochdir' option.
1275 */
1276 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
1277 || defined(FEAT_BIG)
1278 # define FEAT_AUTOCHDIR
1279 #endif

Should there be a +autochdir feature? So has('autochdir')
could be used to check whether 'autochdir' is available.

Or should the doc simply say that 'autochdir' is available:
- if |+netbeans_intg| or |+sun_workshop| feature is available
- or if Vim is compiled with "big" or "huge" features
But then it's awkward to check whether 'autochdir' is available.

Regards
-- Dominique

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

Christian Brabandt

unread,
May 10, 2010, 3:11:11 PM5/10/10
to Vim List
Hi Dominique!

On Mo, 10 Mai 2010, Dominique Pellé wrote:

> Should there be a +autochdir feature? So has('autochdir')
> could be used to check whether 'autochdir' is available.
>
> Or should the doc simply say that 'autochdir' is available:
> - if |+netbeans_intg| or |+sun_workshop| feature is available
> - or if Vim is compiled with "big" or "huge" features

I don't know. However...

> But then it's awkward to check whether 'autochdir' is available.

exists('+autochdir') should work. See :h exists()

regards,
Christian

Dominique Pellé

unread,
May 10, 2010, 3:20:53 PM5/10/10
to vim...@googlegroups.com
Christian Brabandt wrote:

> On Mo, 10 Mai 2010, Dominique Pellé wrote:
>
>> Should there be a +autochdir feature?   So has('autochdir')
>> could be used to check whether 'autochdir' is available.
>>
>> Or should the doc simply say that 'autochdir' is available:
>> - if |+netbeans_intg| or |+sun_workshop| feature is available
>> - or if Vim is compiled with "big" or "huge" features
>
> I don't know. However...
>
>> But then it's awkward to check whether 'autochdir' is available.
>
> exists('+autochdir') should work. See :h exists()

Ah of course, I forgot about exists(). Merci!

-- Dominique
Reply all
Reply to author
Forward
0 new messages