Daily Shaarli

All links of one day in a single page.

May 6, 2020

Vim Weekly Tips #3

Ça, je connaissais pas et c'est terriblement utile:
gf dans vim ouvre le fichier mentionné dans le fichier sur lequel se trouve votre curseur.
Je crois que je vais utiliser ça presque tous les jours....

An other tip that not a lot of people know about is that you can use the gf command to open a file name under the cursor when editing a file. Say you have these lines in your file :

  You included this line in your file :
    /usr/share/doc/linux-image-5.3.0-3-amd64/copyright

If you put your cursor on /usr/share/doc/linux-image-5.3.0-3-amd64/copyright and type gf, go file, it will open the file in a new buffer.