-1

I am using vi editor in Linux server. I want to set certain configurations like set ai and set ts=4 in my login profile itself so that I don't have to set it each and every time I get into Vi editor. Please assist. Thanks.

SSS
  • 51
  • 6

1 Answers1

-1

You can use a the .vimrc/.exrc file for in this case. vimrc sample

Christina Jacob
  • 665
  • 5
  • 17
  • Will vimrc file work for Vi editor. Thought it's only for Vim. Sorry - I am new to vim – SSS Aug 09 '19 at 06:46
  • It depends. In some distributions vi might actually be vim-minimal which would use ~/.vimrc as config file. Otherwise it is .exrc file in your home directory – Christina Jacob Aug 09 '19 at 07:03
  • I have neither .vimrc nor .exrc files in my home directory. I don't have .bashrc as well. If I create them on my own, how do I ensure it will be executed automatically when I login? – SSS Aug 12 '19 at 01:54
  • you can create one. I should be automatically used. you can source it in case you want to be sure – Christina Jacob Aug 12 '19 at 08:38