Skip to content

Commit a8d87bb

Browse files
committed
add short legacy vimscript intro
1 parent ae5c07e commit a8d87bb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

vim9script.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,22 @@ It improves performance, readability, and structure over legacy Vimscript.
1212
Try [vim9-conversion-aid](https://github.com/ubaldot/vim9-conversion-aid) as a starting point to convert legacy Vimscript to Vim9Script.
1313

1414
```vim
15+
" Vim script (also called VimL) is the subset of Vim's ex-commands which
16+
" supplies a number of features one would expect from a scripting language,
17+
" such as values, variables, functions or loops. Always keep in the back of
18+
" your mind that a Vim script file is just a sequence of ex-commands. It is
19+
" very common for a script to mix programming-language features and raw
20+
" ex-commands.
21+
"
22+
" You can run Vim script directly by entering the commands in command-line mode
23+
" (press : to enter command-line mode), or you can write them to a file
24+
" (without the leading :) and source it in a running Vim instance (:source " path/to/file). Some files are sourced automatically as part of your
25+
" configuration (see |startup|). This guide assumes that you are familiar
26+
" with ex-commands and will only cover the scripting. Help topics to the
27+
" relevant manual sections are included.
28+
1529
vim9script
30+
1631
# The vim9script namespace, above, is required to distinguish a Vim9 script
1732
# *.vim file from a legacy vimscript file. In Vim's command-line mode,
1833
# or in a legacy script, using the command `:vim9cmd` (or just `:vim9`) before

0 commit comments

Comments
 (0)