diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-04 00:38:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 07:38:48 +0800 |
commit | 936e191fef9865600af211c29ea4959ffbce81dd (patch) | |
tree | de6d07e200431bf5638c581b1a5bd856e0675682 /runtime/doc/lua-guide.txt | |
parent | 5529b07316b75913188c44698aed6c0f866c5da9 (diff) | |
download | rneovim-936e191fef9865600af211c29ea4959ffbce81dd.tar.gz rneovim-936e191fef9865600af211c29ea4959ffbce81dd.tar.bz2 rneovim-936e191fef9865600af211c29ea4959ffbce81dd.zip |
docs: fix typos (#21427)
Co-authored-by: Gustavo Sampaio <gbritosampaio@gmail.com>
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Tomas Nemec <nemi@skaut.cz>
Diffstat (limited to 'runtime/doc/lua-guide.txt')
-rw-r--r-- | runtime/doc/lua-guide.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/doc/lua-guide.txt b/runtime/doc/lua-guide.txt index b0b2857300..71dc48b715 100644 --- a/runtime/doc/lua-guide.txt +++ b/runtime/doc/lua-guide.txt @@ -285,7 +285,7 @@ work: Instead, you need to create an intermediate Lua table and change this: >lua local temp_table = vim.g.some_global_variable - temp_table = keys = 400 + temp_table.key2 = 400 vim.g.some_global_variable = temp_table vim.pretty_print(vim.g.some_global_variable) --> { key1 = "value", key2 = 400 } @@ -408,7 +408,7 @@ mandatory arguments: • {lhs} is a string with the key sequences that should trigger the mapping. An empty string is equivalent to |<Nop>|, which disables a key. • {rhs} is either a string with a Vim command or a Lua function that should - be execucted when the {lhs} is entered. + be executed when the {lhs} is entered. Examples: >lua @@ -608,25 +608,25 @@ may be reloaded is This is equivalent to the following Lua code: >lua local mygroup = vim.api.nvim_create_augroup('vimrc', { clear = true }) - vim.api.nvim_create_autocmd( {'BufNewFile', 'BufRead' }, { + vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, { pattern = '*.html', group = mygroup, - cmd = 'set shiftwidth=4', + command = 'set shiftwidth=4', }) - vim.api.nvim_create_autocmd( {'BufNewFile', 'BufRead' }, { + vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, { pattern = '*.html', group = 'vimrc', -- equivalent to group=mygroup - cmd = 'set expandtab', + command = 'set expandtab', }) < Autocommand groups are unique for a given name, so you can reuse them, e.g., in a different file: >lua local mygroup = vim.api.nvim_create_augroup('vimrc', { clear = false }) - vim.api.nvim_create_autocmd( {'BufNewFile', 'BufRead' }, { + vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, { pattern = '*.html', group = mygroup, - cmd = 'set shiftwidth=4', + command = 'set shiftwidth=4', }) < ------------------------------------------------------------------------------ |