mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 10:01:49 +00:00
docs: starting.txt new layout
This commit is contained in:
@@ -1127,7 +1127,7 @@ to terminal mode.
|
|||||||
You found it, Arthur! *holy-grail*
|
You found it, Arthur! *holy-grail*
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
6. EX commands *Ex-commands* *ex-cmd-index* *:index*
|
6. EX commands *Ex-command* *ex-cmd-index* *:index*
|
||||||
|
|
||||||
This is a brief but complete listing of all the ":" commands, without
|
This is a brief but complete listing of all the ":" commands, without
|
||||||
mentioning any arguments. The optional part of the command name is inside [].
|
mentioning any arguments. The optional part of the command name is inside [].
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ The purpose of this guide is to introduce the different ways of interacting
|
|||||||
with Nvim through Lua (the "API"). This API consists of three different
|
with Nvim through Lua (the "API"). This API consists of three different
|
||||||
layers:
|
layers:
|
||||||
|
|
||||||
1. The "Vim API" inherited from Vim: |Ex-commands| and |vimscript-functions|
|
1. The "Vim API" inherited from Vim: |Ex-command|s and |vimscript-functions|
|
||||||
as well as |user-function|s in Vimscript. These are accessed through
|
as well as |user-function|s in Vimscript. These are accessed through
|
||||||
|vim.cmd()| and |vim.fn| respectively, which are discussed under
|
|vim.cmd()| and |vim.fn| respectively, which are discussed under
|
||||||
|lua-guide-vimscript| below.
|
|lua-guide-vimscript| below.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ get an idea of what lurks beneath: >vim
|
|||||||
:lua vim.print(package.loaded)
|
:lua vim.print(package.loaded)
|
||||||
|
|
||||||
Nvim includes a "standard library" |lua-stdlib| for Lua. It complements the
|
Nvim includes a "standard library" |lua-stdlib| for Lua. It complements the
|
||||||
"editor stdlib" (|vimscript-functions| + |Ex-commands|) and the |API|, all of
|
"editor stdlib" (|vimscript-functions| + |Ex-command|s) and the |API|, all of
|
||||||
which can be used from Lua code (|lua-vimscript| |vim.api|). These three
|
which can be used from Lua code (|lua-vimscript| |vim.api|). These three
|
||||||
namespaces form the Nvim programming interface.
|
namespaces form the Nvim programming interface.
|
||||||
|
|
||||||
@@ -1231,7 +1231,7 @@ vim.wo[{winid}][{bufnr}] *vim.wo*
|
|||||||
Lua module: vim *lua-vim*
|
Lua module: vim *lua-vim*
|
||||||
|
|
||||||
vim.cmd({command}) *vim.cmd()*
|
vim.cmd({command}) *vim.cmd()*
|
||||||
Executes Vimscript (|Ex-commands|).
|
Executes Vimscript (|Ex-command|s).
|
||||||
|
|
||||||
Can be indexed with a command name to get a function, thus you can write
|
Can be indexed with a command name to get a function, thus you can write
|
||||||
`vim.cmd.echo(…)` instead of `vim.cmd{cmd='echo',…}`.
|
`vim.cmd.echo(…)` instead of `vim.cmd{cmd='echo',…}`.
|
||||||
|
|||||||
@@ -192,9 +192,8 @@ Using Vim scripts *using-scripts*
|
|||||||
For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||||
|
|
||||||
*:so* *:source*
|
*:so* *:source*
|
||||||
:so[urce] {file} Runs |Ex-commands| or Lua code (".lua" files) from
|
:so[urce] {file} Runs |Ex-command|s or Lua code (".lua" files) from
|
||||||
{file}.
|
{file}. Triggers the |SourcePre| autocommand.
|
||||||
Triggers the |SourcePre| autocommand.
|
|
||||||
|
|
||||||
:[range]so[urce] Read Ex commands or Lua code from the [range] of lines
|
:[range]so[urce] Read Ex commands or Lua code from the [range] of lines
|
||||||
in the current buffer. When [range] is omitted read
|
in the current buffer. When [range] is omitted read
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -304,7 +304,7 @@ end
|
|||||||
|
|
||||||
local VIM_CMD_ARG_MAX = 20
|
local VIM_CMD_ARG_MAX = 20
|
||||||
|
|
||||||
--- Executes Vimscript (|Ex-commands|).
|
--- Executes Vimscript (|Ex-command|s).
|
||||||
---
|
---
|
||||||
--- Can be indexed with a command name to get a function, thus you can write `vim.cmd.echo(…)`
|
--- Can be indexed with a command name to get a function, thus you can write `vim.cmd.echo(…)`
|
||||||
--- instead of `vim.cmd{cmd='echo',…}`.
|
--- instead of `vim.cmd{cmd='echo',…}`.
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ local new_layout = {
|
|||||||
['nvim.txt'] = true,
|
['nvim.txt'] = true,
|
||||||
['pack.txt'] = true,
|
['pack.txt'] = true,
|
||||||
['provider.txt'] = true,
|
['provider.txt'] = true,
|
||||||
|
['starting.txt'] = true,
|
||||||
['terminal.txt'] = true,
|
['terminal.txt'] = true,
|
||||||
['tui.txt'] = true,
|
['tui.txt'] = true,
|
||||||
['ui.txt'] = true,
|
['ui.txt'] = true,
|
||||||
|
|||||||
@@ -999,7 +999,7 @@ void ex_mkrc(exarg_T *eap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (eap->cmdidx == CMD_mksession) {
|
if (eap->cmdidx == CMD_mksession) {
|
||||||
if (put_line(fd, "let SessionLoad = 1") == FAIL) {
|
if (put_line(fd, "let g:SessionLoad = 1") == FAIL) {
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1073,7 +1073,7 @@ void ex_mkrc(exarg_T *eap)
|
|||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
if (eap->cmdidx == CMD_mksession) {
|
if (eap->cmdidx == CMD_mksession) {
|
||||||
if (fprintf(fd, "unlet SessionLoad\n") < 0) {
|
if (fprintf(fd, "unlet g:SessionLoad\n") < 0) {
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user