Hello! I'm forwarding this message from vim_use - could you specify if it is a "set encoding" bug or not:
On Sat, Oct 3, 2009 at 6:33 PM, Maxim Kim <[email protected]> wrote: > > Hi, > > Could anyone verify the next behaviour: > > 1. _vimrc should only have: > set nocp > set autochdir > set encoding=utf-8 > 2. in the shell do: > mkdir test > echo hello world > test\myfile > vim test\myfile > > My vim do not open test\myfile it just says: "test\myfile" [New > DIRECTORY] > > Now if you delete 'set endoding=utf-8' from your _vimrc so you would > have only: > set nocp > set autochdir > > and run: > vim test\myfile > Vim opens this file successfully. > > Okay, now if I delete 'set autochdir' and return 'set encoding=utf-8' > like this: > set nocp > set encoding=utf-8 > > and run again: > vim test\myfile > Vim opens this file successfully too. > > It looks like with the combination of 'set autochdir' and 'set > encoding=utf-8' one can not open files in another dir from shell. > > So I use autocmd approach now: > autocmd BufEnter * silent! lcd %:p:h:gs/ /\\ / > instead of autochdir. > > > My vim is 7.2 with 1-148 patches applied on winXP. > > Best wishes, > Maxim. > > > > "set encoding" brings up multibyte initialization, which re-writes parameters for buffer using new encoding. During this process, file name is changed from correct "myfile" to the original "test\myfile" and expanded to "test\test\myfile". That breaks result or 'autochdir' processing. Such vimrc: set nocp set encoding=utf-8 set autochdir opens required file correctly. Is this a bug or just "autochdir"-specific behavour? Mikalai --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
