From 98d47d4c353f06cd289f9477014e97473789d84d Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 06 Dec 2020 09:07:11 -0500 Subject: README.copyright: Add Vim tips --- diff --git a/README.copyright b/README.copyright index af414f4..a32ed9e 100644 --- a/README.copyright +++ b/README.copyright @@ -126,3 +126,38 @@ Finally compare the differences between the old and new copyright comments, and add these changes to the `copyright` file: $ diff -u .copyright-comments.old .copyright-comments.new | less + +Vim Tips +======== + +Open File Under Cursor +---------------------- + +Open the `copyright` file and one of the `.copyright-comments.*` files by either +running the shell command `vim -O copyright .copyright-comments.gplv2orlater` +from the package root directory or running from `tmp/src/` the shell command +` vim -O ../../copyright ../../.copyright-comments.gplv2orlater`. In the former +case, run `:cd tmp/src/` within Vim. + +Making `tmp/src/` Vim's working directory allows source file names under the +cursor to be opened, for example using `gf` to open a file in a new tab. + +File Name Header +---------------- + +Record a macro to quickly underline headers by entering `qhyypVr-q` from normal +mode. Run the macro by entering `@h`. Note that such a macro cannot be +repeated using `.` and that it will clobber the unnamed register. + +Common Licenses Paragraph +------------------------- + +Position the cursor on the first of the three quoted lines below and, in normal +mode, enter `3"lyy`. Then, those three lines can be pasted in normal mode using +`"lp` or in insert mode using `l`. + +""" + +On this system, a copy of the GNU General Public License may be found at +. +""" -- cgit v0.9.1