diff --git a/runtime/doc/vimfn.txt b/runtime/doc/vimfn.txt index 26668fbb6e..19e3e4948b 100644 --- a/runtime/doc/vimfn.txt +++ b/runtime/doc/vimfn.txt @@ -8277,7 +8277,7 @@ readdir({directory} [, {expr}]) *readdir()* Each time {expr} is evaluated |v:val| is set to the entry name. When {expr} is a function the name is passed as the argument. For example, to get a list of files ending in ".txt": >vim - echo readdir(dirname, {n -> n =~ '.txt$'}) + echo readdir(dirname, {n -> n =~ '\.txt$'}) < To skip hidden and backup files: >vim echo readdir(dirname, {n -> n !~ '^\.\|\~$'}) diff --git a/runtime/lua/vim/_meta/vimfn.gen.lua b/runtime/lua/vim/_meta/vimfn.gen.lua index b42f17f9c7..8109219a3e 100644 --- a/runtime/lua/vim/_meta/vimfn.gen.lua +++ b/runtime/lua/vim/_meta/vimfn.gen.lua @@ -7425,7 +7425,7 @@ function vim.fn.readblob(fname, offset, size) end --- Each time {expr} is evaluated |v:val| is set to the entry name. --- When {expr} is a function the name is passed as the argument. --- For example, to get a list of files ending in ".txt": >vim ---- echo readdir(dirname, {n -> n =~ '.txt$'}) +--- echo readdir(dirname, {n -> n =~ '\.txt$'}) ---