Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting servername in vimrc as opposed to command line switch

Tags:

vim

Is it possible to set vim's servername from my vimrc instead of using the --servername command line switch? If I try one of

set v:servername="TEX"
let v:servername="TEX"

I get unknown option error and cannot overwrite read-only variable error respectively.

like image 547
nullUser Avatar asked Aug 12 '12 14:08

nullUser


1 Answers

According to documentation (:help v:servername) the v:servername variable is read only.

And according to source code serverRegisterName() in if_xcmdsrv.c is called from three places:

  • main() function
  • X11 main window initialization
  • GTK+ main window initialization

So the answer to your question is no, you can't set server name in your .vimrc or anywhere else except command line arguments.

like image 59
xaizek Avatar answered Sep 19 '22 17:09

xaizek