Linux Format

Vim: command line editing

-

Installing Vim is a good choice if you plan to access remote servers or need to make quick changes with the command line. On top of that, it is a fantastic editor and one you can use for changing files with super user privileges. A few such files where you need super privileges are php.ini and /etc/apache2/ apache2.conf and /etc/php/7.0/apache2/php.ini. apt-get install vim If you don’t want to use Vim to alter files, you can use Nano which ships with Linux. But if you spend some time with Vim, you may find its navigation and saving a real asset. It won’t save the file until you command it to do so. Here is a little list of simple Vim commands, most are preceded by <escape>. G – moves you to the bottom of the file. /stringname – The forward slash followed by string name, then pressing Enter will go to the string name you type. You can then click ‘N’ to go to the next occurrence. :q! <enter> – This will exit the file without changes :wq! <enter> – This will save the file and quit :w <enter> – This will save the file <insert> – allows you to add text <escape> – leaves Insert mode

Newspapers in English

Newspapers from Australia