[svlug] a simple question about vim/vi

Erik Steffl steffl at bigfoot.com
Fri Jun 29 14:45:02 PDT 2001


Gordon Vrololjak wrote:
> 
> This may sound silly,
> I was wondering how I could set up defaults for vi/vim for root.  I'm sick
> of typing :set tabstop=3 and other settings I like each time I edit files
> as root.  I have a .gvimrc file in /root, but it doesn't seem to get read
> as root when I edit files.

  .gvimrc is for gvim (vim with graphical interface - it opens it's own
window and has a menu, other then that it's almost like vim in xterm
(but has better colors, you can move the split border using mouse
etc...))

  .vimrc is for vim

  in case you are have more complex configuration it makes sense to
create a directory .vim and put somme of the files there, e.g. I have
the following line in .vimrc:

let myfiletypefile = "~/.vim/myfiletypes.vim"

  IIRC it also reads .exrc and some toher 'historical' files but you'll
have to consult docs for exact list... there's a fairly good built in
documentation for vim, accessible using :help <keyword>

	erik




More information about the svlug mailing list