mirror of
https://github.com/vim/vim
synced 2025-07-16 09:12:00 +00:00
runtime(doc): improve the vim-shebang example
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@ -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
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -141,9 +141,15 @@ g8 Print the hex values of the bytes used in the
|
|||||||
*:#!* *vim-shebang*
|
*:#!* *vim-shebang*
|
||||||
:#!{anything} Ignored, so that you can start a Vim script with: >
|
:#!{anything} Ignored, so that you can start a Vim script with: >
|
||||||
#!vim -S
|
#!vim -S
|
||||||
echo "this is a Vim script"
|
let mylogbook='$HOME/logbook.md'
|
||||||
quit
|
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*
|
*:z* *E144*
|
||||||
:[range]z[+-^.=][count] Display several lines of text surrounding the line
|
:[range]z[+-^.=][count] Display several lines of text surrounding the line
|
||||||
specified with [range], or around the current line
|
specified with [range], or around the current line
|
||||||
|
Reference in New Issue
Block a user