-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 16-Dec-2014 14:30, Axel Bender wrote: > Using autochdir in .vimrc together with the --remote-silent start > option works fine: the first edited file's path is set correctly. > However, the manuals suggest not to use autochdir: > > "This option is provided for backward compatibility with the Vim > released with Sun ONE Studio 4 Enterprise Edition. Note: When this > option is on some plugins may not work."
I think you interpret this a little bit too harsh. I use 100+ plugins, and (now; I had to submit patches to very few) they work just fine with :set autochdir. > In order to avoid using autochdir I tried (a.o.) the following in > .vimrc: > > set noautochdir autocmd BufEnter * lcd %:p:h That simplistic implementation may cause errors when the path to a (newly created) file does not exist yet (when adding BufNew, see below), or when you use the netrw plugin to edit buffer names like http://www.vim.org/. All of that can be handled, but I'd recommend to rather give 'autochdir' another try. > which works for all but the first file. Which event[s] do I have to > use to make this work? BufEnter should work. I'd add BufNew to handle new files and file renames, too. Does this depend on --remote-silent? If so, what's the full command to reproduce? - -- regards, ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) iQEcBAEBAgAGBQJUkFSNAAoJEA7ziXlAzQ/va18IAIx4sJDdeyuECmUkQiPPopME HsTx0gca7wG3Sz0fpRBtNf28/Shf2nZcC750t9J3+JndPSUmY1tyKNqj44KR01Dl 7V1F3xt44X8VjD/07zftmN2kxYyAN621xpS7o3z3dqoRxhSy3cNA5hvd2utpKz1V fYxGB8hJJ/x7QHvtivQ4beiSUsp2xMxQOVDCSqIZg046/Iawu0y/NAcIv50LOQy9 L8vI5IS7Qa+HVxl4/e5Xwvq/DfIppIrWBMAwbaDrL2+YkHpApGEbNTtJHiTU5Iir MsWXpS9vBNL+ZDy5VCDxkAUIBV5d13zplIXchz0HXxwpRsZCAgR2N7a19BcX9HA= =yKIc -----END PGP SIGNATURE----- -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
