Blog Archives

Search for Strings and Highlight Syntax in the Vim Text Editor

In this article I will show you how to use the search option in the Vim text editor and some settings for syntax highlighting. To use the Vim search, press ESC, type /string . (replace string with the keyword you

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

Vim Trick: Use your user’s .vimrc even when you sudo

I have a huuuuuuuge .vimrc configuration file. When I need to edit an /etc file, for example, I use sudo. like: sudo vim /etc/passwd But, using sudo I loose my user’s ~/.vimrc file, as vim uses it’s default. I have

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

Set A Backup Folder For Vim

As I have mentioned here, Vim creates backups for the files edited everywhere. To avoid this, you can set the backupdir or bdir variable to tell Vim where to put its backups. The default path for the backupdir is the

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

Run A Command Or A Shell Inside Vim

In this article I will show you a usefull Vim trick: how to run commands inside the Vim text editor. Here you can find the other vim tricks. Vim is a powerfull text editor with the ability of doing non-editorish

Tagged with: , , , , , , , ,
Posted in The Linux and Unix Articles!

How to get root access inside Vim

It often happens to forget to use sudo when editing configuration files with vim. You write your modifications and when you want to save, you get the annoying error: “E45: ‘readonly’ option is set (add ! to override)”. The following

Tagged with: , , , ,
Posted in The Linux and Unix Articles!
Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!