However, the commands in the vimrc file are not proceeded with a colon. For example, a line in a vimrc file that reads set ruler, is the same thing as you typing :set ruler enter when you're in Vim. Set another way, it contains a list of commands as you would type Vim after a colon. Each line in the vimrc file is executed as a command. We'll be focusing on our own user vimrc file so we can control our own Vim experience. Now toward the bottom of your screen you can see where the system-wide vimrc file is, as well as the user vimrc file. Let me demonstrate that here, I'll just type :version and press enter and we'll just hit the space bar to keep scrolling down. You can also use the version command to see where the system-wide and user-specific vimrc files are located. You may or may not have a vimrc file already, by default you won't, but if you're working on a system where someone else set up your account, then maybe they've placed a vimrc file in your home directory as part of the user creation process. If you're using windows on the other hand then your vimrc file is located in your home directory but its name is _vimrc. The tilde you see on your screen expands to the current user's home directory.
#VIMR FROM COMMAND LINE MAC#
If you're using Unix, Linux or a Mac your vimrc file is located in your home directory and is named. Each version of Vim has a slightly different set of system-wide defaults. This also explains why sometimes you can see something different than I'm demonstrating. It's a good idea to just leave the system-wide vimrc file alone and let the Vim installation process put the default file in place. This is where you wanna put your customizations.
Additionally each individual user can have their own vimrc file. There's a system-wide Vim vimrc file that will be executed each time anyone on the system starts Vim. So each time Vim starts it runs the commands in the vimrc file. By the way, having files that end in RC is a Unix and Linux convention.
You store these options and settings in your vimrc file. This way you don't have to manually configure a setting you use often each and every time you start Vim thus saving you time and allowing you to make Vim behave the way you want it to behave.
#VIMR FROM COMMAND LINE HOW TO#
Now, in this lesson, you're going to learn how to make Vim, start with your favorite options and settings. At various times throughout this course we've briefly touched upon Vim options when appropriate, for example, way back near the beginning of the course when you were introduced to the control G command, we talked about how the ruler option could affect what is displayed by that control G command.