how to change current directory permanently

14 views
Skip to first unread message

aj3423

unread,
May 29, 2011, 2:58:40 AM5/29/11
to exVim
Hi,

for example, my project directory is:
g:/test

when i type
cd build
the current dir is changed to:
g:/test/build

if i switch between any buffers, the dir is changed back to:
g:/test

I did some search, found this is caused by some ctags related feature,
since i don't use these feature, how can i disable the dir changing?

Thanks.

Wu Jie

unread,
May 29, 2011, 9:17:14 PM5/29/11
to exVim
Hi,

You can remove the script in .vimrc to fulfill your request:

" only supoort in 7.3 or higher
if v:version >= 703
set noacd " no autochchdir
endif

But you have to take your own risk in doing this. All exVim jumps
depends on base directory, so if you change it, some exVim feature
will not work correctly.

aj3423

unread,
May 29, 2011, 10:20:11 PM5/29/11
to ex...@googlegroups.com
Thanks.

i tried "set noacd" but not work, i searched in vimfiles and found this line in exUtility.vim

" avoid cwd change problem
    if exists( 'g:exES_CWD' )
        " au BufEnter * silent exec 'lcd ' . g:exES_CWD
    endif

seems this is the switch

//Brs

2011/5/30 Wu Jie <kara...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "exVim" group.
To post to this group, send email to ex...@googlegroups.com.
To unsubscribe from this group, send email to exvim+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/exvim?hl=en.


Reply all
Reply to author
Forward
0 new messages