diff options
author | Christian Brabandt <cb@256bit.org> | 2024-06-17 13:06:34 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-17 13:09:25 +0200 |
commit | ca471145321fa8089071330b7637ad3950ac4f11 (patch) | |
tree | a7377c1263260a9f42486c4928e6e75b03a3db42 | |
parent | c52a8560792b47a19fd0686377f588ef25e5a7d4 (diff) |
runtime(doc): improve the vim-shebang example
Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | runtime/doc/various.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index d9bcdfa548..1ce892733a 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 9.1. Last change: 2024 Jun 15 +*various.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -141,9 +141,15 @@ g8 Print the hex values of the bytes used in the *:#!* *vim-shebang* :#!{anything} Ignored, so that you can start a Vim script with: > #!vim -S - echo "this is a Vim script" - quit + let mylogbook='$HOME/logbook.md' + exe $':e {mylogbook}' + $ + put ='## ' .. strftime('%d. %b %Y') + norm! o < + Make that script executable and run it to create a + new diary entry. + *:z* *E144* :[range]z[+-^.=][count] Display several lines of text surrounding the line specified with [range], or around the current line |