Question:
How to change vimrc file in linux?
Sean Jhones
2012-02-13 08:37:12 UTC
Hi everybody.

I'm new in linux, and just want to change couple default settings in vi.
I want to always show line numbers and my tab to be equal 4 instead of 8.
Instead of typing every time
:set number
:set tabstop=4
How can I make it default?
Three answers:
2012-02-13 09:03:14 UTC
In terminal

vim .vimrc



Use arrow or right home row keys (in qwerty) to navigate.



Use "i" or "o" to go into insert mode.



Add or modify so that you have

set number

set tabstop=4



Once done,

Ctrl + c

:wq

Enter
2012-02-13 16:46:49 UTC
Just add those lines to $HOME/.vimrc
Dozo
2012-02-13 16:53:51 UTC
or $HOME/.exrc


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...