Sunday, December 29, 2013

Re: has 7.4 changed behaviour chdir-ing to current file's dir by default?

On 29/12/13 16:00, jmlucjav wrote:
> Hi,
>
> I was using vim-project, to set current dir to the root of my projects.
> I noticed lately that is not working anymore, I tried configuring it to
> no avail. So I thought the plugin was maybe buggy.
> I installed vim-root, that does the same, and also does not work...at
> this point I started looking into it and show that both plugins are
> apparently working, but after they run their chdir, something runs
> another chdir later, to the same dir the current file is, and this
> overwrites the plugin's work.
>
> Thinking it might be another plugin or my settings, I run this
> gvim.exe -u NONE -U NONE -V9vimlog.txt
>
> and when I open a file I can see this:
>
> autocommand au! LoadBufferMenu
> chdir(C:\Users\jm\conf\home\jm\vimfiles)
>
> C:\Users\jm\conf\home\jm\vimfiles
>
> :set autochdir?
> gives
> noautochdir
>
> so I am missing something? How come current dir is being set all the
> time? I am running vim7.4 32b on win7
>
> thanks

What is the answer to

:verbose set acd?

(the :verbose prefix will make it tell you where it was last set). Maybe
it is set back and forth.


OTOH the autocommand you listed above is not in the proper format. Check
where it is being defined. You should see something like

au! BufRead,BufNewFile * chdir C:\Users\jm\conf\home\jm\vimfiles

with no "autocommand" before au! and no parentheses; though even that
seems to me to be a little overdoing it. You ought to be able to set
that current directory once in the vimrc and never change it.

Another thing: Vim 7.4.32b i.e. 7.4.beta32 is very old, even older than
Vim 7.4.000, and now we're at 7.4.131 and counting. Please retry with
the latest Vim found at http://sourceforge.net/projects/cream/files/Vim/


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
59. Your wife says communication is important in a marriage...so you buy
another computer and install a second phone line so the two of you can
chat.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: