Save vim settings across launches?

Put them in your vimrc (see :help vimrc). You can then sync that file between machines.

Another option is to have vimrc set up on the local machine, and use e.g. bcvi to transfer files transparently from remote to local and back again.


When you are in Vim, type :echo $VIM ... that should give you the location where your _vimrc (or .vimrc) should go. Edit a file under that name, put those two lines inside

   set nocompatible
   set number
   set autoindent

and save it.

Yell if you have any problems with this.


There is also the modeline where you can configure vim file-wise and are not dependent on any local vim configuration.

  • One can customise the behaviour of vim for specific files using modelines.
  • Modelines are included at the beginning/end of the file and invoke "setlocal" on vim variables.
  • This is useful for setting options like the behaviour of tabs, the file mode , etc.

Tags:

Vim