From 9d200c78a5e97720ba8a697c4cc0990fdafbc39f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 18 Jun 2024 07:11:17 +0800 Subject: vim-patch:ca47114: runtime(doc): improve the vim-shebang example (#29382) https://github.com/vim/vim/commit/ca471145321fa8089071330b7637ad3950ac4f11 Co-authored-by: Christian Brabandt --- runtime/doc/various.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 63fca2c1aa..9afb871d93 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -143,9 +143,15 @@ gx Opens the current filepath or URL (decided by *:#!* *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 -- cgit