4

I usually develop with vim open in multiple tabs/terminals. When I make a change to my vimrc, this means closing and reopening all sessions of vim. Is there a way to automatically reload your vimrc in ALL open sessions? It seems like if this was possible, the answer would be easy to find, but I thought I would ask anyway.

I've already looked here. As the answer suggests, it doesn't work for regular vim (only gvim)

Community
  • 1
  • 1
xthrd
  • 252
  • 3
  • 11
  • 1
    Whether console Vim supports message passing depends on build configuration. If you want to use it in console Vim, just build it with `clientserver` feature turned on. See the question that Connor suggests in his answer below. – xaizek Aug 04 '12 at 20:23

2 Answers2

1

You can reload your vimrc without exiting vim:

:source ~/.vimrc

But you'll need to do this across all open instances of vim.

pb2q
  • 58,613
  • 19
  • 146
  • 147
  • I know you can do this, but I was looking for a more magical way. Also, IIRC this won't work 100% of the time because it doesn't unmap anything. If there was an automatic method you could add in a :mapclear with it. – xthrd Aug 03 '12 at 23:24
1

See this answer about clientserver on a Mac (assuming this might be your problem).

Community
  • 1
  • 1
Conner
  • 30,144
  • 8
  • 52
  • 73