diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-06 09:07:11 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-06 09:07:11 (EST) |
commit | 98d47d4c353f06cd289f9477014e97473789d84d (patch) | |
tree | b38bd1697242582065314c91230067cfb67ecf43 /README.copyright | |
parent | ac8ec2c0be33c0446dd84ac9e114f3df89258e42 (diff) |
README.copyright: Add Vim tips
Diffstat (limited to 'README.copyright')
-rw-r--r-- | README.copyright | 35 |
1 files changed, 35 insertions, 0 deletions
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 `<CTRL-W>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 `<CTRL-R>l`. + +""" + +On this system, a copy of the GNU General Public License may be found at +<file:///usr/share/common-licenses/GPL-2>. +""" |