Hi,
I had
  autocmd BufEnter * lcd %:p:h
in my ~/.vimrc

However, when using netrw this yields an error.



My workaround is:

function Lcd()
     let b = bufname("%")
     let pat = ":\/\/"

     if ! (b =~ pat)
        lcd %:p:h
     endif
endfunction

autocmd BufEnter * call Lcd()


My question as a vim newbie: Is this a good solution or is there a much 
simpler and mores idiomatic way to solve the issue?




-- 
Thanks,
Manfred

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to