Skip to main content
7 events
when toggle format what by license comment
Feb 20, 2015 at 18:00 vote accept Rmano
Feb 20, 2015 at 18:00 comment added Rmano Ok, marking this as answered --- and posting another question. Thanks!
Feb 20, 2015 at 17:10 comment added Martin Tournoij @Rmano Hm, it seems autocmd works different when using --remote? Not sure ... Need to test more ...
Feb 20, 2015 at 16:45 comment added Rmano Ok. Found it. If I call gvim /home/romano/path/file.tex it works, but if I call (as is doing my default action) exec gvim --servername desktop_0 --remote-tab-silent /home/romano/path/file.tex it does not work (desktop_0 is automatically generated for the current desktop). Now I am really puzzled.
Feb 20, 2015 at 16:36 comment added Martin Tournoij @Rmano Hmm, using BufReadPost works for me (tested it, in Nautilus); perhaps there is another autocmd in that's interfering? You can try starting Vim with blank vimrc file except for this one line. You can also replace the lchdir with echoerr(expand("%:p:h")) to show an "error" with the file path (this is useful for debugging).
Feb 20, 2015 at 16:31 comment added Rmano Neither BufReadPost nor BufWinEnter (as suggested by @muru) work. set autochdir do work, but only globally. (BTW, I too think it's a bug/misfeature of Nautilus. Just searching a workaround)
Feb 20, 2015 at 12:16 history answered Martin Tournoij CC BY-SA 3.0