Getting the .vimrc setup the way you like
As with many programs in Linux, Vim has the option to read settings from a run-control file. This can be centralized via the /etc/vimrc
file, or for each user via the ~/.vimrc
file. With this file, especially with our own version, you can customize how Vim appears and controls its functionalities.
Firstly, we will look at line numbering. Often when we edit a file, we do so as the console has reported an error on a particular line just after we have tried running a script or starting a service; we know we have a syntax error. Let's say we want to go directly to the offending line 97
of the test.php
file. Then, we would duly type:
$ vi +97 test.php
This is assuming that we were in the same directory as our ...
Get CentOS System Administration Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.