diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/quickfix.txt | 2 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 12 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 4 | ||||
-rw-r--r-- | runtime/filetype.lua | 3 | ||||
-rw-r--r-- | runtime/ftplugin.vim | 6 | ||||
-rw-r--r-- | runtime/indent.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/synload.vim | 4 |
7 files changed, 16 insertions, 19 deletions
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 7a1649a74b..0bf04034ec 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1246,7 +1246,7 @@ not "b:current_compiler". What the command actually does is the following: - Delete the "current_compiler" and "b:current_compiler" variables. - Define the "CompilerSet" user command. With "!" it does ":set", without "!" it does ":setlocal". -- Execute ":runtime! compiler/{name}.(vim|lua)". The plugins are expected to +- Execute ":runtime! compiler/{name}.{vim,lua}". The plugins are expected to set options with "CompilerSet" and set the "current_compiler" variable to the name of the compiler. - Delete the "CompilerSet" user command. diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index a66d77910b..53f6904170 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -225,15 +225,15 @@ 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 a file has both a `.vim` - and `.lua` extensions, the `.vim` version will be sourced - first. + 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. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 09c935cb9b..631e666b6a 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4895,8 +4895,8 @@ in their own color. output "default". :colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath' - for the file "colors/{name}.(vim|lua)". The first one that - is found is loaded. + for the file "colors/{name}.{vim,lua}". The first one + that is found is loaded. Note: "colors/{name}.vim" is tried first. Also searches all plugins in 'packpath', first below "start" and then under "opt". diff --git a/runtime/filetype.lua b/runtime/filetype.lua index f772785d21..cf5fe39656 100644 --- a/runtime/filetype.lua +++ b/runtime/filetype.lua @@ -32,8 +32,7 @@ vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile', 'StdinReadPost' }, { if not vim.g.did_load_ftdetect then vim.cmd([[ augroup filetypedetect - runtime! ftdetect/*.vim - runtime! ftdetect/*.lua + runtime! ftdetect/*.{vim,lua} augroup END ]]) end diff --git a/runtime/ftplugin.vim b/runtime/ftplugin.vim index f5c411fbe6..7b55134a4b 100644 --- a/runtime/ftplugin.vim +++ b/runtime/ftplugin.vim @@ -30,10 +30,8 @@ augroup filetypeplugin for name in split(s, '\.') " Load Lua ftplugins after Vim ftplugins _per directory_ " TODO(clason): use nvim__get_runtime when supports globs and modeline - exe printf('runtime! ftplugin/%s.vim ftplugin/%s.lua - \ ftplugin/%s_*.vim ftplugin/%s_*.lua - \ ftplugin/%s/*.vim ftplugin/%s/*.lua', - \ name, name, name, name, name, name) + " XXX: "[.]" in the first pattern makes it a wildcard on Windows + exe $'runtime! ftplugin/{name}[.]{{vim,lua}} ftplugin/{name}_*.{{vim,lua}} ftplugin/{name}/*.{{vim,lua}}' endfor endif endfunc diff --git a/runtime/indent.vim b/runtime/indent.vim index 2b64dd44b9..e4ddc09401 100644 --- a/runtime/indent.vim +++ b/runtime/indent.vim @@ -24,8 +24,8 @@ augroup filetypeindent " When there is a dot it is used to separate filetype names. Thus for " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim". for name in split(s, '\.') - exe 'runtime! indent/' . name . '.vim' - exe 'runtime! indent/' . name . '.lua' + " XXX: "[.]" in the pattern makes it a wildcard on Windows + exe $'runtime! indent/{name}[.]{{vim,lua}}' endfor endif endfunc diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim index 056e38bf79..80685a5213 100644 --- a/runtime/syntax/synload.vim +++ b/runtime/syntax/synload.vim @@ -48,8 +48,8 @@ fun! s:SynSet() " load each in sequence. Skip empty entries. for name in split(s, '\.') if !empty(name) - exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" - exe "runtime! syntax/" . name . ".lua syntax/" . name . "/*.lua" + " XXX: "[.]" in the first pattern makes it a wildcard on Windows + exe $'runtime! syntax/{name}[.]{{vim,lua}} syntax/{name}/*.{{vim,lua}}' endif endfor endif |