configuration - How to use local chdir in vim by default -


with vim, can change default behaviour of :cd run :lcd without creating new command? feels bit hacky, , seems there'd global setting kind of thing.

background

  • the :cd command changes working directory of vim.
  • the :lcd command changes current buffer.

such setting highly confusing unsuspecting users, wouldn't it?! if want have :lcd, have use command. there plugins cmdalias.vim - create aliases vim commands let redefine :cd -- interactive use, not in plugins (who might break such change, anyway).

another option (rather trivial) change source code, , compiling own version of vim. what's bad :lcd?!

ps: :lcd local current window, not current buffer. matters when :edit different buffer in window.


Comments