Editting Vim Configurations
I have a very simple and easy question, but I do not know开发者_开发问答 how to do it. I am on a ubuntu machine, logged in via ssh. I want to edit my vim so that I dont have to keep typing :set number or :colorscheme elflord. I would like it to remember that information. When browsing around I found out that I need to change a .vimrc file, and that is supposedly located in my home directory, however it is not, and furthermore #locate .vimrc does not locate anything. Can any help me with finding where this file is and editing the above commands?
Create ~/.vimrc
with the lines you want in it:
set number
colorscheme elflord
See :help vimrc
and :help vimrc-intro
for more information.
Your global vimrc
is located in /etc/vim
you can just create a .vimrc
in your home directory. This question however should be asked on http://unix.stackexchange.com or http://askubuntu.com.
You may edit it from anywhere with this command:
:e $MYVIMRC
If the file doesn't exist, just create it in ~/.vimrc
精彩评论