diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
commit | 21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch) | |
tree | 84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /runtime/doc/repeat.txt | |
parent | d9c904f85a23a496df4eb6be42aa43f007b22d50 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-colorcolchar.tar.gz rneovim-colorcolchar.tar.bz2 rneovim-colorcolchar.zip |
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'runtime/doc/repeat.txt')
-rw-r--r-- | runtime/doc/repeat.txt | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 1bbd20702b..53f6904170 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -56,7 +56,7 @@ Using the underscore after `:d` avoids clobbering registers or the clipboard. This also makes it faster. Instead of the '/' which surrounds the {pattern}, you can use any other -single byte character, but not an alphabetic character, '\', '"' or '|'. +single byte character, but not an alphabetic character, '\', '"', '|' or '!'. This is useful if you want to include a '/' in the search pattern or replacement string. @@ -183,7 +183,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. *:so* *:source* *load-vim-script* :[range]so[urce] [file] Runs |Ex| commands or Lua code (".lua" files) from - [file], or current buffer if no [file]. + [file]. + If no [file], the current buffer is used, and it is + treated as Lua code if its 'filetype' is "lua" or its + file name ends with ".lua". Triggers the |SourcePre| autocommand. *:source!* :[range]so[urce]! {file} @@ -211,12 +214,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. When [!] is included, all found files are sourced. Else only the first found file is sourced. - When [where] is omitted, first 'runtimepath' is - searched, then directories under "start" in 'packpath' - are searched. + When [where] is omitted only 'runtimepath' is used. Other values: START search only under "start" in 'packpath' - OPT search only under "opt" in 'packpath' + OPT search only under "opt" in 'packpath' PACK search under "start" and "opt" in 'packpath' ALL first use 'runtimepath', then search @@ -224,12 +225,16 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. When {file} contains wildcards it is expanded to all matching files. Example: > - :runtime! plugin/**/*.vim -< This is what Vim uses to load the plugin files when + :runtime! plugin/**/*.{vim,lua} +< This is what Nvim uses to load the plugin files when starting up. This similar command: > - :runtime plugin/**/*.vim + :runtime plugin/**/*.{vim,lua} < would source the first file only. + For each {file} pattern, if two `.vim` and `.lua` file + names match and differ only in extension, the `.vim` + file is sourced first. + When 'verbose' is one or higher, there is a message when no file could be found. When 'verbose' is two or higher, there is a message @@ -259,8 +264,8 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. 'runtimepath'. If the filetype detection was already enabled (this - is usually done with a "syntax enable" or "filetype - on" command in your |init.vim|, or automatically during + is usually done with a `syntax enable` or `filetype on` + command in your |vimrc|, or automatically during |initialization|), and the package was found in "pack/*/opt/{name}", this command will also look for "{name}/ftdetect/*.vim" files. @@ -338,6 +343,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. :scr[iptnames] List all sourced script names, in the order they were first sourced. The number is used for the script ID |<SID>|. + Also see `getscriptinfo()`. :scr[iptnames][!] {scriptId} *:script* Edit script {scriptId}. Although ":scriptnames name" @@ -643,15 +649,15 @@ up-to-date easily, but it requires a program like "git" to be available. You can do both, github can automatically create an archive for a release. Your directory layout would be like this: - start/foobar/plugin/foo.vim " always loaded, defines commands - start/foobar/plugin/bar.vim " always loaded, defines commands - start/foobar/autoload/foo.vim " loaded when foo command used - start/foobar/doc/foo.txt " help for foo.vim - start/foobar/doc/tags " help tags - opt/fooextra/plugin/extra.vim " optional plugin, defines commands - opt/fooextra/autoload/extra.vim " loaded when extra command used - opt/fooextra/doc/extra.txt " help for extra.vim - opt/fooextra/doc/tags " help tags + start/foobar/plugin/foo.vim " always loaded, defines commands + start/foobar/plugin/bar.vim " always loaded, defines commands + start/foobar/autoload/foo.vim " loaded when foo command used + start/foobar/doc/foo.txt " help for foo.vim + start/foobar/doc/tags " help tags + opt/fooextra/plugin/extra.vim " optional plugin, defines commands + opt/fooextra/autoload/extra.vim " loaded when extra command used + opt/fooextra/doc/extra.txt " help for extra.vim + opt/fooextra/doc/tags " help tags This allows for the user to do: > mkdir ~/.local/share/nvim/site/pack |