mirror of
https://github.com/neovim/neovim.git
synced 2026-07-12 04:19:45 +00:00
feat(docs): numbered listitems
This commit is contained in:
@@ -135,18 +135,14 @@ procedure:
|
|||||||
|
|
||||||
1. Invoke |nvim_get_api_info()|, if needed to setup the client library and/or
|
1. Invoke |nvim_get_api_info()|, if needed to setup the client library and/or
|
||||||
to get the list of supported UI extensions.
|
to get the list of supported UI extensions.
|
||||||
|
|
||||||
2. Do any configuration that should be happen before user config is loaded.
|
2. Do any configuration that should be happen before user config is loaded.
|
||||||
Buffers and windows are not available at this point, but this could be used
|
Buffers and windows are not available at this point, but this could be used
|
||||||
to set |g:| variables visible to init.vim
|
to set |g:| variables visible to init.vim
|
||||||
|
|
||||||
3. If the UI wants to do additional setup after user config is loaded,
|
3. If the UI wants to do additional setup after user config is loaded,
|
||||||
register a VimEnter autocmd: >lua
|
register a VimEnter autocmd: >lua
|
||||||
nvim_command("autocmd VimEnter * call rpcrequest(1, 'vimenter')")
|
nvim_command("autocmd VimEnter * call rpcrequest(1, 'vimenter')")
|
||||||
|
|
||||||
4. Now invoke |nvim_ui_attach()|. The UI must handle user input by now:
|
4. Now invoke |nvim_ui_attach()|. The UI must handle user input by now:
|
||||||
sourcing init.vim and loading buffers might lead to blocking prompts.
|
sourcing init.vim and loading buffers might lead to blocking prompts.
|
||||||
|
|
||||||
5. If step 3 was used, Nvim will send a blocking "vimenter" request to the UI.
|
5. If step 3 was used, Nvim will send a blocking "vimenter" request to the UI.
|
||||||
Inside this request handler, the UI can safely do any initialization before
|
Inside this request handler, the UI can safely do any initialization before
|
||||||
entering normal mode, for example reading variables set by init.vim.
|
entering normal mode, for example reading variables set by init.vim.
|
||||||
|
|||||||
@@ -204,18 +204,17 @@ About the `functions` map:
|
|||||||
External programs (clients) can use the metadata to discover the API, using
|
External programs (clients) can use the metadata to discover the API, using
|
||||||
any of these approaches:
|
any of these approaches:
|
||||||
|
|
||||||
1. Connect to a running Nvim instance and call |nvim_get_api_info()| via
|
1. Connect to a running Nvim instance and call |nvim_get_api_info()| via
|
||||||
msgpack-RPC. This is best for clients written in dynamic languages which
|
msgpack-RPC. This is best for clients written in dynamic languages which
|
||||||
can define functions at runtime.
|
can define functions at runtime.
|
||||||
|
2. Use the |--api-info| startup arg. Useful for statically-compiled clients.
|
||||||
2. Start Nvim with |--api-info|. Useful for statically-compiled clients.
|
Example (requires Python "pyyaml" and "msgpack-python" modules): >
|
||||||
Example (requires Python "pyyaml" and "msgpack-python" modules): >
|
|
||||||
nvim --api-info | python -c 'import msgpack, sys, yaml; yaml.dump(msgpack.unpackb(sys.stdin.buffer.read()), sys.stdout)'
|
nvim --api-info | python -c 'import msgpack, sys, yaml; yaml.dump(msgpack.unpackb(sys.stdin.buffer.read()), sys.stdout)'
|
||||||
<
|
3. Use the |api_info()| function. >vim
|
||||||
3. Use the |api_info()| Vimscript function. >vim
|
|
||||||
:lua vim.print(vim.fn.api_info())
|
:lua vim.print(vim.fn.api_info())
|
||||||
< Example using |filter()| to exclude non-deprecated API functions: >vim
|
" Example using filter() to exclude non-deprecated API functions:
|
||||||
:new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val.name')
|
:new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val.name')
|
||||||
|
<
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
API contract *api-contract*
|
API contract *api-contract*
|
||||||
|
|||||||
@@ -369,18 +369,18 @@ CTRL-A Add [count] to the number or alphabetic character at
|
|||||||
highlighted, each one will be incremented by an
|
highlighted, each one will be incremented by an
|
||||||
additional [count] (so effectively creating a
|
additional [count] (so effectively creating a
|
||||||
[count] incrementing sequence).
|
[count] incrementing sequence).
|
||||||
For Example, if you have this list of numbers:
|
For Example, if you have this list of numbers: >
|
||||||
1. ~
|
1.
|
||||||
1. ~
|
1.
|
||||||
1. ~
|
1.
|
||||||
1. ~
|
1.
|
||||||
Move to the second "1." and Visually select three
|
< Move to the second "1." and Visually select three
|
||||||
lines, pressing g CTRL-A results in:
|
lines, pressing g CTRL-A results in: >
|
||||||
1. ~
|
1.
|
||||||
2. ~
|
2.
|
||||||
3. ~
|
3.
|
||||||
4. ~
|
4.
|
||||||
|
<
|
||||||
*CTRL-X*
|
*CTRL-X*
|
||||||
CTRL-X Subtract [count] from the number or alphabetic
|
CTRL-X Subtract [count] from the number or alphabetic
|
||||||
character at or after the cursor.
|
character at or after the cursor.
|
||||||
@@ -1207,7 +1207,10 @@ Rationale: In Vi the "y" command followed by a backwards motion would
|
|||||||
With a linewise yank command the cursor is put in the first line, but the
|
With a linewise yank command the cursor is put in the first line, but the
|
||||||
column is unmodified, thus it may not be on the first yanked character.
|
column is unmodified, thus it may not be on the first yanked character.
|
||||||
|
|
||||||
There are ten types of registers: *registers* *{register}* *E354*
|
=============================================================================
|
||||||
|
Registers *registers* *{register}* *E354*
|
||||||
|
|
||||||
|
There are ten types of registers:
|
||||||
1. The unnamed register ""
|
1. The unnamed register ""
|
||||||
2. 10 numbered registers "0 to "9
|
2. 10 numbered registers "0 to "9
|
||||||
3. The small delete register "-
|
3. The small delete register "-
|
||||||
@@ -1219,7 +1222,9 @@ There are ten types of registers: *registers* *{register}* *E354*
|
|||||||
9. The black hole register "_
|
9. The black hole register "_
|
||||||
10. Last search pattern register "/
|
10. Last search pattern register "/
|
||||||
|
|
||||||
1. Unnamed register "" *quote_quote* *quotequote*
|
-----------------------------------------------------------------------------
|
||||||
|
1. Unnamed register "" *quote_quote* *quotequote*
|
||||||
|
|
||||||
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
|
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
|
||||||
or copied with the yank "y" command, regardless of whether or not a specific
|
or copied with the yank "y" command, regardless of whether or not a specific
|
||||||
register was used (e.g. "xdd). This is like the unnamed register is pointing
|
register was used (e.g. "xdd). This is like the unnamed register is pointing
|
||||||
@@ -1232,20 +1237,25 @@ which does not specify a register. Additionally you can access it with the
|
|||||||
name '"'. This means you have to type two double quotes. Writing to the ""
|
name '"'. This means you have to type two double quotes. Writing to the ""
|
||||||
register writes to register "0.
|
register writes to register "0.
|
||||||
|
|
||||||
2. Numbered registers "0 to "9 *quote_number* *quote0* *quote1*
|
-----------------------------------------------------------------------------
|
||||||
*quote2* *quote3* *quote4* *quote9*
|
2. Numbered registers "0 to "9 *quote_number*
|
||||||
|
*quote0* *quote1* *quote2* *quote3* *quote4* *quote9*
|
||||||
|
|
||||||
Vim fills these registers with text from yank and delete commands.
|
Vim fills these registers with text from yank and delete commands.
|
||||||
Numbered register 0 contains the text from the most recent yank command,
|
Numbered register 0 contains the text from the most recent yank command,
|
||||||
unless the command specified another register with ["x].
|
unless the command specified another register with ["x].
|
||||||
Numbered register 1 contains the text deleted by the most recent delete or
|
|
||||||
|
Numbered register 1 contains the text deleted by the most recent delete or
|
||||||
change command (even when the command specified another register), unless the
|
change command (even when the command specified another register), unless the
|
||||||
text is less than one line (the small delete register is used then). An
|
text is less than one line (the small delete register is used then). An
|
||||||
exception is made for the delete operator with these movement commands: |%|,
|
exception is made for the delete operator with these movement commands: |%|,
|
||||||
|(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|.
|
|(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|.
|
||||||
|
|
||||||
Register "1 is always used then (this is Vi compatible). The "- register is
|
Register "1 is always used then (this is Vi compatible). The "- register is
|
||||||
used as well if the delete is within a line. Note that these characters may
|
used as well if the delete is within a line. Note that these characters may
|
||||||
be mapped. E.g. |%| is mapped by the matchit plugin.
|
be mapped. E.g. |%| is mapped by the matchit plugin.
|
||||||
With each successive deletion or change, Vim shifts the previous contents
|
|
||||||
|
With each successive deletion or change, Vim shifts the previous contents
|
||||||
of register 1 into register 2, 2 into 3, and so forth, losing the previous
|
of register 1 into register 2, 2 into 3, and so forth, losing the previous
|
||||||
contents of register 9.
|
contents of register 9.
|
||||||
*yankring*
|
*yankring*
|
||||||
@@ -1260,92 +1270,110 @@ To also store yanks (not only deletions) in registers 1-9, try this: >lua
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
<
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
3. Small delete register "- *quote_-* *quote-*
|
||||||
|
|
||||||
3. Small delete register "- *quote_-* *quote-*
|
|
||||||
This register contains text from commands that delete less than one line,
|
This register contains text from commands that delete less than one line,
|
||||||
except when the command specifies a register with ["x].
|
except when the command specifies a register with ["x].
|
||||||
|
|
||||||
4. Named registers "a to "z or "A to "Z *quote_alpha* *quotea*
|
-----------------------------------------------------------------------------
|
||||||
|
4. Named registers "a to "z or "A to "Z *quote_alpha* *quotea*
|
||||||
|
|
||||||
Vim fills these registers only when you say so. Specify them as lowercase
|
Vim fills these registers only when you say so. Specify them as lowercase
|
||||||
letters to replace their previous contents or as uppercase letters to append
|
letters to replace their previous contents or as uppercase letters to append
|
||||||
to their previous contents. When the '>' flag is present in 'cpoptions' then
|
to their previous contents. When the '>' flag is present in 'cpoptions' then
|
||||||
a line break is inserted before the appended text.
|
a line break is inserted before the appended text.
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
5. Read-only registers ":, ". and "%
|
5. Read-only registers ":, ". and "%
|
||||||
|
|
||||||
These are '%', ':' and '.'. You can use them only with the "p", "P",
|
These are '%', ':' and '.'. You can use them only with the "p", "P",
|
||||||
and ":put" commands and with CTRL-R.
|
and ":put" commands and with CTRL-R.
|
||||||
*quote_.* *quote.* *E29*
|
|
||||||
". Contains the last inserted text (the same as what is inserted
|
|
||||||
with the insert mode commands CTRL-A and CTRL-@). Note: this
|
|
||||||
doesn't work with CTRL-R on the command-line. It works a bit
|
|
||||||
differently, like inserting the text instead of putting it
|
|
||||||
('textwidth' and other options affect what is inserted).
|
|
||||||
*quote_%* *quote%*
|
|
||||||
"% Contains the name of the current file.
|
|
||||||
*quote_:* *quote:* *E30*
|
|
||||||
": Contains the most recent executed command-line. Example: Use
|
|
||||||
"@:" to repeat the previous command-line command.
|
|
||||||
The command-line is only stored in this register when at least
|
|
||||||
one character of it was typed. Thus it remains unchanged if
|
|
||||||
the command was executed completely from a mapping.
|
|
||||||
|
|
||||||
*quote_#* *quote#*
|
*quote_.* *quote.* *E29*
|
||||||
6. Alternate file register "#
|
- ". Contains the last inserted text (the same as what is inserted
|
||||||
|
with the insert mode commands CTRL-A and CTRL-@). Note: this doesn't
|
||||||
|
work with CTRL-R on the command-line. It works a bit differently,
|
||||||
|
like inserting the text instead of putting it ('textwidth' and other
|
||||||
|
options affect what is inserted).
|
||||||
|
*quote_%* *quote%*
|
||||||
|
- "% Contains the name of the current file.
|
||||||
|
*quote_:* *quote:* *E30*
|
||||||
|
- ": Contains the most recent executed command-line. Example: Use
|
||||||
|
"@:" to repeat the previous command-line command. The command-line is
|
||||||
|
only stored in this register when at least one character of it was
|
||||||
|
typed. Thus it remains unchanged if the command was executed
|
||||||
|
completely from a mapping.
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
6. Alternate file register "# *quote_#* *quote#*
|
||||||
|
|
||||||
Contains the name of the alternate file for the current window. It will
|
Contains the name of the alternate file for the current window. It will
|
||||||
change how the |CTRL-^| command works.
|
change how the |CTRL-^| command works. This register is writable, mainly to
|
||||||
This register is writable, mainly to allow for restoring it after a plugin has
|
allow for restoring it after a plugin has
|
||||||
changed it. It accepts buffer number: >
|
changed it.
|
||||||
let altbuf = bufnr(@#)
|
|
||||||
...
|
It accepts buffer number: >
|
||||||
let @# = altbuf
|
let altbuf = bufnr(@#)
|
||||||
|
...
|
||||||
|
let @# = altbuf
|
||||||
|
|
||||||
It will give error |E86| if you pass buffer number and this buffer does not
|
It will give error |E86| if you pass buffer number and this buffer does not
|
||||||
exist.
|
exist.
|
||||||
It can also accept a match with an existing buffer name: >
|
|
||||||
let @# = 'buffer_name'
|
|
||||||
Error |E93| if there is more than one buffer matching the given name or |E94|
|
|
||||||
if none of buffers matches the given name.
|
|
||||||
|
|
||||||
7. Expression register "= *quote_=* *quote=* *@=*
|
It can also accept a match with an existing buffer name: >
|
||||||
|
let @# = 'buffer_name'
|
||||||
|
|
||||||
|
Error |E93| if there is more than one buffer matching the given name or
|
||||||
|
|E94| if none of buffers matches the given name.
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
7. Expression register "= *quote_=* *quote=* *@=*
|
||||||
|
|
||||||
This is not really a register that stores text, but is a way to use an
|
This is not really a register that stores text, but is a way to use an
|
||||||
expression in commands which use a register. The expression register is
|
expression in commands which use a register. The expression register is
|
||||||
read-write.
|
read-write.
|
||||||
|
|
||||||
When typing the '=' after " or CTRL-R the cursor moves to the command-line,
|
- When typing the '=' after " or CTRL-R the cursor moves to the command-line,
|
||||||
where you can enter any expression (see |expression|). All normal
|
where you can enter any expression (see |expression|). All normal
|
||||||
command-line editing commands are available, including a special history for
|
command-line editing commands are available, including a special history for
|
||||||
expressions. When you end the command-line by typing <CR>, Vim computes the
|
expressions. When you end the command-line by typing <CR>, Vim computes the
|
||||||
result of the expression. If you end it with <Esc>, Vim abandons the
|
result of the expression. If you end it with <Esc>, Vim abandons the
|
||||||
expression. If you do not enter an expression, Vim uses the previous
|
expression. If you do not enter an expression, Vim uses the previous
|
||||||
expression (like with the "/" command).
|
expression (like with the "/" command).
|
||||||
|
- The expression must evaluate to a String. A Number is always automatically
|
||||||
The expression must evaluate to a String. A Number is always automatically
|
converted to a String. For the "p" and ":put" command, if the result is
|
||||||
converted to a String. For the "p" and ":put" command, if the result is a
|
a Float it's converted into a String. If the result is a List each element
|
||||||
Float it's converted into a String. If the result is a List each element is
|
is turned into a String and used as a line. A Dictionary is converted into
|
||||||
turned into a String and used as a line. A Dictionary is converted into a
|
a String. A Funcref results in an error message (use string() to convert).
|
||||||
String. A Funcref results in an error message (use string() to convert).
|
- If the "= register is used for the "p" command, the String is split up at
|
||||||
|
<NL> characters. If the String ends in a <NL>, it is regarded as a linewise
|
||||||
If the "= register is used for the "p" command, the String is split up at <NL>
|
register.
|
||||||
characters. If the String ends in a <NL>, it is regarded as a linewise
|
|
||||||
register.
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
8. Selection registers "* and "+
|
8. Selection registers "* and "+
|
||||||
|
|
||||||
Use these registers for storing and retrieving the selected text for the GUI.
|
Use these registers for storing and retrieving the selected text for the GUI.
|
||||||
See |quotestar| and |quoteplus|. When the clipboard is not available or not
|
See |quotestar| and |quoteplus|. When the clipboard is not available or not
|
||||||
working, the unnamed register is used instead. For Unix systems and Mac OS X,
|
working, the unnamed register is used instead. For Unix systems and Mac OS X,
|
||||||
see |primary-selection|.
|
see |primary-selection|.
|
||||||
|
|
||||||
9. Black hole register "_ *quote_*
|
-----------------------------------------------------------------------------
|
||||||
When writing to this register, nothing happens. This can be used to delete
|
9. Black hole register "_ *quote_*
|
||||||
text without affecting the normal registers. When reading from this register,
|
|
||||||
nothing is returned.
|
When writing to this register, nothing happens. This can be used to delete
|
||||||
|
text without affecting the normal registers. When reading from this
|
||||||
|
register, nothing is returned.
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
10. Last search pattern register "/ *quote_/* *quote/*
|
||||||
|
|
||||||
10. Last search pattern register "/ *quote_/* *quote/*
|
|
||||||
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
|
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
|
||||||
It is writable with `:let`, you can change it to have 'hlsearch' highlight
|
It is writable with `:let`, you can change it to have 'hlsearch' highlight
|
||||||
other matches without actually searching. You can't yank or delete into this
|
other matches without actually searching. You can't yank or delete into this
|
||||||
register. The search direction is available in |v:searchforward|.
|
register. The search direction is available in |v:searchforward|. Note that
|
||||||
Note that the value is restored when returning from a function
|
the value is restored when returning from a function |function-search-undo|.
|
||||||
|function-search-undo|.
|
|
||||||
|
|
||||||
*@/*
|
*@/*
|
||||||
You can write to a register with a `:let` command |:let-@|. Example: >
|
You can write to a register with a `:let` command |:let-@|. Example: >
|
||||||
|
|||||||
@@ -15,17 +15,13 @@ Channels are Nvim's way of communicating with external processes.
|
|||||||
|
|
||||||
There are several ways to open a channel:
|
There are several ways to open a channel:
|
||||||
|
|
||||||
1. Through stdin/stdout when `nvim` is started with `--headless` and a startup
|
1. Through stdin/stdout when `nvim` is started with `--headless` and a startup
|
||||||
script or `--cmd` command opens the stdio channel using |stdioopen()|.
|
script or `--cmd` command opens the stdio channel using |stdioopen()|.
|
||||||
|
2. Through stdin, stdout and stderr of a process spawned by |jobstart()|.
|
||||||
2. Through stdin, stdout and stderr of a process spawned by |jobstart()|.
|
3. Through the PTY master end opened with `jobstart(…, {'pty': v:true})`.
|
||||||
|
4. By connecting to a TCP/IP socket or named pipe with |sockconnect()|.
|
||||||
3. Through the PTY master end opened with `jobstart(…, {'pty': v:true})`.
|
5. By another process connecting to a socket listened to by Nvim. This only
|
||||||
|
supports RPC channels, see |rpc-connecting|.
|
||||||
4. By connecting to a TCP/IP socket or named pipe with |sockconnect()|.
|
|
||||||
|
|
||||||
5. By another process connecting to a socket listened to by Nvim. This only
|
|
||||||
supports RPC channels, see |rpc-connecting|.
|
|
||||||
|
|
||||||
Channels support multiple modes or protocols. In the most basic
|
Channels support multiple modes or protocols. In the most basic
|
||||||
mode of operation, raw bytes are read and written to the channel.
|
mode of operation, raw bytes are read and written to the channel.
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ Examples:
|
|||||||
1. In the Vim source code, clipboard logic accounts for more than 1k lines of
|
1. In the Vim source code, clipboard logic accounts for more than 1k lines of
|
||||||
C source code (ui.c), to perform two tasks that are now accomplished with
|
C source code (ui.c), to perform two tasks that are now accomplished with
|
||||||
shell commands such as xclip or pbcopy/pbpaste.
|
shell commands such as xclip or pbcopy/pbpaste.
|
||||||
|
|
||||||
2. Python scripting support: Vim has three files dedicated to embedding the
|
2. Python scripting support: Vim has three files dedicated to embedding the
|
||||||
Python interpreter: if_python.c, if_python3.c and if_py_both.h. Together
|
Python interpreter: if_python.c, if_python3.c and if_py_both.h. Together
|
||||||
these files sum about 9.5k lines of C source code. In contrast, Nvim Python
|
these files sum about 9.5k lines of C source code. In contrast, Nvim Python
|
||||||
@@ -340,7 +339,7 @@ preference):
|
|||||||
4. `on_error` callback
|
4. `on_error` callback
|
||||||
- For async and "visitors" traversing a graph, where many errors may be
|
- For async and "visitors" traversing a graph, where many errors may be
|
||||||
collected while work continues.
|
collected while work continues.
|
||||||
5. `vim.notify` (sometimes with optional `opts.silent` (async, visitors ^))
|
5. `vim.notify` (sometimes with optional `opts.silent` (async, visitors))
|
||||||
- High-level / application-level messages. End-user invokes these directly.
|
- High-level / application-level messages. End-user invokes these directly.
|
||||||
|
|
||||||
*dev-patterns*
|
*dev-patterns*
|
||||||
|
|||||||
@@ -22,19 +22,13 @@ See |dev-vimpatch-quickstart| to get started immediately.
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
QUICKSTART *dev-vimpatch-quickstart*
|
QUICKSTART *dev-vimpatch-quickstart*
|
||||||
|
|
||||||
1. Pull the Nvim source:
|
1. Pull the Nvim source: >bash
|
||||||
>bash
|
git clone https://github.com/neovim/neovim.git
|
||||||
git clone https://github.com/neovim/neovim.git
|
|
||||||
<
|
|
||||||
2. Run `./scripts/vim-patch.sh -l` to see the list of missing Vim patches.
|
2. Run `./scripts/vim-patch.sh -l` to see the list of missing Vim patches.
|
||||||
|
|
||||||
3. Choose a patch from the list (usually the oldest one), e.g. `8.0.0123`.
|
3. Choose a patch from the list (usually the oldest one), e.g. `8.0.0123`.
|
||||||
|
|
||||||
- Check for open vim-patch PRs
|
- Check for open vim-patch PRs
|
||||||
https://github.com/neovim/neovim/pulls?q=is%3Apr+is%3Aopen+label%3Avim-patch.
|
https://github.com/neovim/neovim/pulls?q=is%3Apr+is%3Aopen+label%3Avim-patch.
|
||||||
|
|
||||||
4. Run `./scripts/vim-patch.sh -p 8.0.0123`
|
4. Run `./scripts/vim-patch.sh -p 8.0.0123`
|
||||||
|
|
||||||
5. Follow the instructions given by the script.
|
5. Follow the instructions given by the script.
|
||||||
|
|
||||||
NOTES ~
|
NOTES ~
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ requires a namespace.
|
|||||||
|
|
||||||
*vim.diagnostic.severity* *diagnostic-severity*
|
*vim.diagnostic.severity* *diagnostic-severity*
|
||||||
The "severity" key in a diagnostic is one of the values defined in
|
The "severity" key in a diagnostic is one of the values defined in
|
||||||
`vim.diagnostic.severity`:
|
`vim.diagnostic.severity`: >
|
||||||
|
|
||||||
vim.diagnostic.severity.ERROR
|
vim.diagnostic.severity.ERROR
|
||||||
vim.diagnostic.severity.WARN
|
vim.diagnostic.severity.WARN
|
||||||
@@ -54,20 +54,17 @@ Functions that take a severity as an optional parameter (e.g.
|
|||||||
|
|
||||||
vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
|
vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
|
||||||
|
|
||||||
2. A table with a "min" or "max" key (or both): >lua
|
2. A table with a "min" or "max" key (or both). This form allows users to
|
||||||
|
specify a range of severities: >lua
|
||||||
|
|
||||||
vim.diagnostic.get(0, { severity = { min = vim.diagnostic.severity.WARN } })
|
vim.diagnostic.get(0, { severity = { min = vim.diagnostic.severity.WARN } })
|
||||||
<
|
3. A list-like table. This form allows filtering for specific severities: >lua
|
||||||
This form allows users to specify a range of severities.
|
|
||||||
|
|
||||||
3. A list-like table: >lua
|
|
||||||
|
|
||||||
vim.diagnostic.get(0, { severity = {
|
vim.diagnostic.get(0, { severity = {
|
||||||
vim.diagnostic.severity.WARN,
|
vim.diagnostic.severity.WARN,
|
||||||
vim.diagnostic.severity.INFO,
|
vim.diagnostic.severity.INFO,
|
||||||
} })
|
} })
|
||||||
<
|
<
|
||||||
This form allows users to filter for specific severities
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
DEFAULTS *diagnostic-defaults*
|
DEFAULTS *diagnostic-defaults*
|
||||||
|
|||||||
@@ -1620,30 +1620,27 @@ The completions provided by CTRL-X CTRL-O are sensitive to the context:
|
|||||||
|
|
||||||
CONTEXT COMPLETIONS PROVIDED ~
|
CONTEXT COMPLETIONS PROVIDED ~
|
||||||
|
|
||||||
1. Not inside a class definition Classes, constants and globals
|
1. Not inside a class definition: Classes, constants and globals
|
||||||
|
2. Inside a class definition: Methods or constants defined in the class
|
||||||
2. Inside a class definition Methods or constants defined in the class
|
3. After '.', '::' or ':': Methods applicable to the object being
|
||||||
|
dereferenced
|
||||||
3. After '.', '::' or ':' Methods applicable to the object being
|
4. After ':' or ':foo': Symbol name (beginning with "foo")
|
||||||
dereferenced
|
|
||||||
|
|
||||||
4. After ':' or ':foo' Symbol name (beginning with "foo")
|
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- Vim will load/evaluate code in order to provide completions. This may
|
- Vim will load/evaluate code in order to provide completions. This may
|
||||||
cause some code execution, which may be a concern. This is no longer
|
cause some code execution, which may be a concern. This is no longer
|
||||||
enabled by default, to enable this feature add >
|
enabled by default, to enable this feature add >
|
||||||
let g:rubycomplete_buffer_loading = 1
|
let g:rubycomplete_buffer_loading = 1
|
||||||
<- In context 1 above, Vim can parse the entire buffer to add a list of
|
- In context 1 above, Vim can parse the entire buffer to add a list of
|
||||||
classes to the completion results. This feature is turned off by default,
|
classes to the completion results. This feature is turned off by default,
|
||||||
to enable it add >
|
to enable it add >
|
||||||
let g:rubycomplete_classes_in_global = 1
|
let g:rubycomplete_classes_in_global = 1
|
||||||
< to your vimrc
|
< to your vimrc
|
||||||
- In context 2 above, anonymous classes are not supported.
|
- In context 2 above, anonymous classes are not supported.
|
||||||
- In context 3 above, Vim will attempt to determine the methods supported by
|
- In context 3 above, Vim will attempt to determine the methods supported by
|
||||||
the object.
|
the object.
|
||||||
- Vim can detect and load the Rails environment for files within a rails
|
- Vim can detect and load the Rails environment for files within a rails
|
||||||
project. The feature is disabled by default, to enable it add >
|
project. The feature is disabled by default, to enable it add >
|
||||||
let g:rubycomplete_rails = 1
|
let g:rubycomplete_rails = 1
|
||||||
< to your vimrc
|
< to your vimrc
|
||||||
|
|
||||||
@@ -1737,15 +1734,15 @@ SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
|
|||||||
various groups and syntax items. For example: >
|
various groups and syntax items. For example: >
|
||||||
syntax list
|
syntax list
|
||||||
|
|
||||||
Yields data similar to this:
|
Yields data similar to this: >
|
||||||
sqlOperator xxx some prior all like and any escape exists in is not ~
|
sqlOperator xxx some prior all like and any escape exists in is not
|
||||||
or intersect minus between distinct ~
|
or intersect minus between distinct
|
||||||
links to Operator ~
|
links to Operator
|
||||||
sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier ~
|
sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier
|
||||||
date money long tinyint unsigned xml text smalldate ~
|
date money long tinyint unsigned xml text smalldate
|
||||||
double datetime nchar smallint numeric time bit char ~
|
double datetime nchar smallint numeric time bit char
|
||||||
varbinary binary smallmoney ~
|
varbinary binary smallmoney
|
||||||
image float integer timestamp real decimal ~
|
image float integer timestamp real decimal
|
||||||
|
|
||||||
There are two syntax groups listed here: sqlOperator and sqlType. To retrieve
|
There are two syntax groups listed here: sqlOperator and sqlType. To retrieve
|
||||||
a List of syntax items you can call OmniSyntaxList a number of different
|
a List of syntax items you can call OmniSyntaxList a number of different
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ Follow these steps to get LSP features:
|
|||||||
1. Install language servers using your package manager or by following the
|
1. Install language servers using your package manager or by following the
|
||||||
upstream installation instructions. You can find language servers here:
|
upstream installation instructions. You can find language servers here:
|
||||||
https://microsoft.github.io/language-server-protocol/implementors/servers/
|
https://microsoft.github.io/language-server-protocol/implementors/servers/
|
||||||
|
|
||||||
2. Define a new config |lsp-new-config| (or install https://github.com/neovim/nvim-lspconfig).
|
2. Define a new config |lsp-new-config| (or install https://github.com/neovim/nvim-lspconfig).
|
||||||
Example: >lua
|
Example: >lua
|
||||||
vim.lsp.config['lua_ls'] = {
|
vim.lsp.config['lua_ls'] = {
|
||||||
@@ -49,18 +48,14 @@ Follow these steps to get LSP features:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
3. Use |vim.lsp.enable()| to enable the config.
|
3. Use |vim.lsp.enable()| to enable the config.
|
||||||
Example: >lua
|
Example: >lua
|
||||||
vim.lsp.enable('lua_ls')
|
vim.lsp.enable('lua_ls')
|
||||||
<
|
|
||||||
4. Open a code file matching one of the `filetypes` specified in the config.
|
4. Open a code file matching one of the `filetypes` specified in the config.
|
||||||
Note: Depending on the LSP server, you may need to ensure your project has
|
Note: Depending on the LSP server, you may need to ensure your project has
|
||||||
a |lsp-root_markers| file so the workspace can be recognized.
|
a |lsp-root_markers| file so the workspace can be recognized.
|
||||||
|
|
||||||
5. Check that LSP is active ("attached") for the buffer: >vim
|
5. Check that LSP is active ("attached") for the buffer: >vim
|
||||||
:checkhealth vim.lsp
|
:checkhealth vim.lsp
|
||||||
<
|
|
||||||
6. (Optional) Configure keymaps and autocommands to use LSP features.
|
6. (Optional) Configure keymaps and autocommands to use LSP features.
|
||||||
|lsp-attach|
|
|lsp-attach|
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,8 @@ layers:
|
|||||||
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.
|
||||||
|
|
||||||
2. The "Nvim API" written in C for use in remote plugins and GUIs; see |api|.
|
2. The "Nvim API" written in C for use in remote plugins and GUIs; see |api|.
|
||||||
These functions are accessed through |vim.api|.
|
These functions are accessed through |vim.api|.
|
||||||
|
|
||||||
3. The "Lua API" written in and specifically for Lua. These are any other
|
3. The "Lua API" written in and specifically for Lua. These are any other
|
||||||
functions accessible through `vim.*` not mentioned already; see
|
functions accessible through `vim.*` not mentioned already; see
|
||||||
|lua-stdlib|.
|
|lua-stdlib|.
|
||||||
|
|||||||
@@ -25,11 +25,9 @@ You can try it right now:
|
|||||||
|
|
||||||
1. Visit your config directory: >
|
1. Visit your config directory: >
|
||||||
:exe 'edit' stdpath('config')
|
:exe 'edit' stdpath('config')
|
||||||
<
|
|
||||||
2. Create a `plugin/foo.lua` file in there.
|
2. Create a `plugin/foo.lua` file in there.
|
||||||
3. Add something to it, like: >lua
|
3. Add something to it, like: >lua
|
||||||
vim.print('Hello World')
|
vim.print('Hello World')
|
||||||
<
|
|
||||||
4. Start `nvim` and notice that it prints "Hello World" in the messages area.
|
4. Start `nvim` and notice that it prints "Hello World" in the messages area.
|
||||||
Check `:messages` if you don't see it.
|
Check `:messages` if you don't see it.
|
||||||
|
|
||||||
|
|||||||
@@ -2541,10 +2541,10 @@ lua_toboolean *lua_toboolean()*
|
|||||||
<
|
<
|
||||||
Converts the Lua value at the given acceptable index to a C boolean
|
Converts the Lua value at the given acceptable index to a C boolean
|
||||||
value (0 or 1). Like all tests in Lua, `lua_toboolean` returns 1 for
|
value (0 or 1). Like all tests in Lua, `lua_toboolean` returns 1 for
|
||||||
any Lua value different from `false` and `nil`; otherwise it returns
|
any Lua value different from `false` and `nil`; otherwise it returns 0.
|
||||||
0. It also returns 0 when called with a non-valid index. (If you want
|
It also returns 0 when called with a non-valid index. (If you want to
|
||||||
to accept only actual boolean values, use `lua_isboolean`
|
accept only actual boolean values, use `lua_isboolean`
|
||||||
|lua_isboolean()| to test the value's type.)
|
|lua_isboolean()| to test the value's type.)
|
||||||
|
|
||||||
lua_tocfunction *lua_tocfunction()*
|
lua_tocfunction *lua_tocfunction()*
|
||||||
>c
|
>c
|
||||||
|
|||||||
@@ -690,7 +690,7 @@ doesn't always work. See the system specific remarks below, and 'langmenu'.
|
|||||||
USING UTF-8 IN X-WINDOWS *utf-8-in-xwindows*
|
USING UTF-8 IN X-WINDOWS *utf-8-in-xwindows*
|
||||||
|
|
||||||
You need to specify a font to be used. For double-wide characters another
|
You need to specify a font to be used. For double-wide characters another
|
||||||
font is required, which is exactly twice as wide. There are three ways to do
|
font is required, which is exactly twice as wide. There are two ways to do
|
||||||
this:
|
this:
|
||||||
|
|
||||||
1. Set 'guifont' and let Nvim find a matching 'guifontwide'
|
1. Set 'guifont' and let Nvim find a matching 'guifontwide'
|
||||||
|
|||||||
@@ -77,19 +77,19 @@ because mouse support is always enabled if possible. If you use the same
|
|||||||
like so:
|
like so:
|
||||||
>vim
|
>vim
|
||||||
if !has('nvim')
|
if !has('nvim')
|
||||||
set ttymouse=xterm2
|
set ttymouse=xterm2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
And for Nvim-specific configuration, you can do this:
|
And for Nvim-specific configuration, you can do this:
|
||||||
>vim
|
>vim
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
tnoremap <Esc> <C-\><C-n>
|
tnoremap <Esc> <C-\><C-n>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
For a more granular approach use |exists()|:
|
For a more granular approach use |exists()|:
|
||||||
>vim
|
>vim
|
||||||
if exists(':tnoremap')
|
if exists(':tnoremap')
|
||||||
tnoremap <Esc> <C-\><C-n>
|
tnoremap <Esc> <C-\><C-n>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Now you should be able to explore Nvim more comfortably. Check |nvim-features|
|
Now you should be able to explore Nvim more comfortably. Check |nvim-features|
|
||||||
|
|||||||
@@ -12,34 +12,16 @@ merchantability. No guarantees of suitability for any purpose. By using this
|
|||||||
plugin, you agree that in no event will the copyright holder be liable for any
|
plugin, you agree that in no event will the copyright holder be liable for any
|
||||||
damages resulting from the use of this software. Use at your own risk!
|
damages resulting from the use of this software. Use at your own risk!
|
||||||
|
|
||||||
==============================================================================
|
Type |gO| to see the table of contents.
|
||||||
1. Contents *msgpack.vim-contents*
|
|
||||||
|
|
||||||
1. Contents..............................: |msgpack.vim-contents|
|
|
||||||
2. Msgpack.vim introduction..............: |msgpack.vim-intro|
|
|
||||||
3. Msgpack.vim manual....................: |msgpack.vim-manual|
|
|
||||||
Function arguments....................: |msgpack.vim-arguments|
|
|
||||||
msgpack#is_int function...............: |msgpack#is_int()|
|
|
||||||
msgpack#is_uint function..............: |msgpack#is_uint()|
|
|
||||||
msgpack#strftime function.............: |msgpack#strftime()|
|
|
||||||
msgpack#strptime function.............: |msgpack#strptime()|
|
|
||||||
msgpack#int_dict_to_str function......: |msgpack#int_dict_to_str()|
|
|
||||||
msgpack#special_type function.........: |msgpack#special_type()|
|
|
||||||
msgpack#type function.................: |msgpack#type()|
|
|
||||||
msgpack#deepcopy function.............: |msgpack#deepcopy()|
|
|
||||||
msgpack#string function...............: |msgpack#string()|
|
|
||||||
msgpack#eval function.................: |msgpack#eval()|
|
|
||||||
msgpack#equal function................: |msgpack#equal()|
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
2. Msgpack.vim introduction *msgpack.vim-intro*
|
Msgpack.vim introduction *msgpack.vim-intro*
|
||||||
|
|
||||||
This plugin contains utility functions to be used in conjunction with
|
This plugin contains utility functions to be used in conjunction with
|
||||||
|msgpackdump()| and |msgpackparse()| functions.
|
|msgpackdump()| and |msgpackparse()| functions.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
3. Msgpack.vim manual *msgpack.vim-manual*
|
Msgpack.vim manual *msgpack.vim-manual*
|
||||||
|
|
||||||
FUNCTION ARGUMENTS *msgpack.vim-arguments*
|
FUNCTION ARGUMENTS *msgpack.vim-arguments*
|
||||||
|
|
||||||
|
|||||||
@@ -682,30 +682,32 @@ positions are stored and used to decide whether there was a change.
|
|||||||
7. Argument and buffer list commands *buffer-list*
|
7. Argument and buffer list commands *buffer-list*
|
||||||
|
|
||||||
args list buffer list meaning ~
|
args list buffer list meaning ~
|
||||||
1. :[N]argument [N] 11. :[N]buffer [N] to arg/buf N
|
>
|
||||||
2. :[N]next [file ..] 12. :[N]bnext [N] to Nth next arg/buf
|
1. :[N]argument [N] 11. :[N]buffer [N] to arg/buf N
|
||||||
3. :[N]Next [N] 13. :[N]bNext [N] to Nth previous arg/buf
|
2. :[N]next [file ..] 12. :[N]bnext [N] to Nth next arg/buf
|
||||||
4. :[N]previous [N] 14. :[N]bprevious [N] to Nth previous arg/buf
|
3. :[N]Next [N] 13. :[N]bNext [N] to Nth previous arg/buf
|
||||||
5. :rewind / :first 15. :brewind / :bfirst to first arg/buf
|
4. :[N]previous [N] 14. :[N]bprevious [N] to Nth previous arg/buf
|
||||||
6. :last 16. :blast to last arg/buf
|
5. :rewind / :first 15. :brewind / :bfirst to first arg/buf
|
||||||
7. :all 17. :ball edit all args/buffers
|
6. :last 16. :blast to last arg/buf
|
||||||
18. :unhide edit all loaded buffers
|
7. :all 17. :ball edit all args/buffers
|
||||||
19. :[N]bmod [N] to Nth modified buf
|
18. :unhide edit all loaded buffers
|
||||||
|
19. :[N]bmod [N] to Nth modified buf
|
||||||
|
<
|
||||||
split & args list split & buffer list meaning ~
|
split & args list split & buffer list meaning ~
|
||||||
21. :[N]sargument [N] 31. :[N]sbuffer [N] split + to arg/buf N
|
>
|
||||||
22. :[N]snext [file ..] 32. :[N]sbnext [N] split + to Nth next arg/buf
|
21. :[N]sargument [N] 31. :[N]sbuffer [N] split + to arg/buf N
|
||||||
23. :[N]sNext [N] 33. :[N]sbNext [N] split + to Nth previous arg/buf
|
22. :[N]snext [file ..] 32. :[N]sbnext [N] split + to Nth next arg/buf
|
||||||
24. :[N]sprevious [N] 34. :[N]sbprevious [N] split + to Nth previous arg/buf
|
23. :[N]sNext [N] 33. :[N]sbNext [N] split + to Nth previous arg/buf
|
||||||
25. :srewind / :sfirst 35. :sbrewind / :sbfirst split + to first arg/buf
|
24. :[N]sprevious [N] 34. :[N]sbprevious [N] split + to Nth previous arg/buf
|
||||||
26. :slast 36. :sblast split + to last arg/buf
|
25. :srewind / :sfirst 35. :sbrewind / :sbfirst split + to first arg/buf
|
||||||
27. :sall 37. :sball edit all args/buffers
|
26. :slast 36. :sblast split + to last arg/buf
|
||||||
38. :sunhide edit all loaded buffers
|
27. :sall 37. :sball edit all args/buffers
|
||||||
39. :[N]sbmod [N] split + to Nth modified buf
|
38. :sunhide edit all loaded buffers
|
||||||
|
39. :[N]sbmod [N] split + to Nth modified buf
|
||||||
40. :args list of arguments
|
|
||||||
41. :buffers list of buffers
|
|
||||||
|
|
||||||
|
40. :args list of arguments
|
||||||
|
41. :buffers list of buffers
|
||||||
|
<
|
||||||
The meaning of [N] depends on the command:
|
The meaning of [N] depends on the command:
|
||||||
[N] is the number of buffers to go forward/backward on 2/12/22/32,
|
[N] is the number of buffers to go forward/backward on 2/12/22/32,
|
||||||
3/13/23/33, and 4/14/24/34
|
3/13/23/33, and 4/14/24/34
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
-- * visit_node() is the core function used by gen() to traverse the document tree and produce HTML.
|
-- * visit_node() is the core function used by gen() to traverse the document tree and produce HTML.
|
||||||
-- * visit_validate() is the core function used by validate().
|
-- * visit_validate() is the core function used by validate().
|
||||||
-- * Files in `new_layout` will be generated with a "flow" layout instead of preformatted/fixed-width layout.
|
-- * Files in `new_layout` will be generated with a "flow" layout instead of preformatted/fixed-width layout.
|
||||||
|
--
|
||||||
|
-- TODO:
|
||||||
|
-- * Conjoin listitem "blocks" (blank-separated). Example: starting.txt
|
||||||
|
|
||||||
local pending_urls = 0
|
local pending_urls = 0
|
||||||
local tagmap = nil ---@type table<string, string>
|
local tagmap = nil ---@type table<string, string>
|
||||||
@@ -78,6 +81,7 @@ local new_layout = {
|
|||||||
['dev_theme.txt'] = true,
|
['dev_theme.txt'] = true,
|
||||||
['dev_tools.txt'] = true,
|
['dev_tools.txt'] = true,
|
||||||
['dev_vimpatch.txt'] = true,
|
['dev_vimpatch.txt'] = true,
|
||||||
|
['diagnostic.txt'] = true,
|
||||||
['help.txt'] = true,
|
['help.txt'] = true,
|
||||||
['faq.txt'] = true,
|
['faq.txt'] = true,
|
||||||
['gui.txt'] = true,
|
['gui.txt'] = true,
|
||||||
@@ -629,25 +633,33 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
|
|||||||
and root:child(0)
|
and root:child(0)
|
||||||
and vim.list_contains({ 'column_heading', 'h1', 'h2', 'h3' }, root:child(0):type())
|
and vim.list_contains({ 'column_heading', 'h1', 'h2', 'h3' }, root:child(0):type())
|
||||||
return string.format('%s%s', div and trim(text) or text, div and '' or '\n')
|
return string.format('%s%s', div and trim(text) or text, div and '' or '\n')
|
||||||
|
elseif parent == 'line_li' and node_name == 'prefix' then
|
||||||
|
return ''
|
||||||
elseif node_name == 'line_li' then
|
elseif node_name == 'line_li' then
|
||||||
|
local prefix = first(root, 'prefix')
|
||||||
|
local numli = prefix and trim(node_text(prefix)):match('%d') -- Numbered listitem?
|
||||||
local sib = root:prev_sibling()
|
local sib = root:prev_sibling()
|
||||||
local prev_li = sib and sib:type() == 'line_li'
|
local prev_li = sib and sib:type() == 'line_li'
|
||||||
|
local cssclass = numli and 'help-li-num' or 'help-li'
|
||||||
|
|
||||||
if not prev_li then
|
if not prev_li then
|
||||||
opt.indent = 1
|
opt.indent = 1
|
||||||
else
|
else
|
||||||
-- The previous listitem _sibling_ is _logically_ the _parent_ if it is indented less.
|
local sib_ws = ws(sib)
|
||||||
local parent_indent = get_indent(node_text(sib))
|
local this_ws = ws()
|
||||||
local this_indent = get_indent(node_text())
|
if get_indent(node_text()) == 0 then
|
||||||
if this_indent > parent_indent then
|
opt.indent = 1
|
||||||
|
elseif this_ws > sib_ws then
|
||||||
|
-- Previous sibling is logically the _parent_ if it is indented less.
|
||||||
opt.indent = opt.indent + 1
|
opt.indent = opt.indent + 1
|
||||||
elseif this_indent < parent_indent then
|
elseif this_ws < sib_ws then
|
||||||
|
-- TODO(justinmk): This is buggy. Need to track exact whitespace length for each level.
|
||||||
opt.indent = math.max(1, opt.indent - 1)
|
opt.indent = math.max(1, opt.indent - 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local margin = opt.indent == 1 and '' or ('margin-left: %drem;'):format((1.5 * opt.indent))
|
local margin = opt.indent == 1 and '' or ('margin-left: %drem;'):format((1.5 * opt.indent))
|
||||||
|
|
||||||
return string.format('<div class="help-li" style="%s">%s</div>', margin, text)
|
return string.format('<div class="%s" style="%s">%s</div>', cssclass, margin, text)
|
||||||
elseif node_name == 'taglink' or node_name == 'optionlink' then
|
elseif node_name == 'taglink' or node_name == 'optionlink' then
|
||||||
local helppage, tagname, ignored = validate_link(root, opt.buf, opt.fname)
|
local helppage, tagname, ignored = validate_link(root, opt.buf, opt.fname)
|
||||||
if ignored or not helppage then
|
if ignored or not helppage then
|
||||||
@@ -1211,13 +1223,31 @@ local function gen_css(fname)
|
|||||||
/* font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; */
|
/* font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; */
|
||||||
}
|
}
|
||||||
.help-li {
|
.help-li {
|
||||||
white-space: normal;
|
|
||||||
display: list-item;
|
display: list-item;
|
||||||
|
white-space: normal;
|
||||||
margin-left: 1.5rem; /* padding-left: 1rem; */
|
margin-left: 1.5rem; /* padding-left: 1rem; */
|
||||||
|
/* margin-top: .1em; */
|
||||||
|
/* margin-bottom: .1em; */
|
||||||
|
}
|
||||||
|
.help-li-num {
|
||||||
|
display: list-item;
|
||||||
|
list-style: none;
|
||||||
|
/* Sibling UNordered help-li items will increment the builtin counter :( */
|
||||||
|
/* list-style-type: decimal; */
|
||||||
|
white-space: normal;
|
||||||
|
margin-left: 1.5rem; /* padding-left: 1rem; */
|
||||||
|
margin-top: .1em;
|
||||||
|
margin-bottom: .1em;
|
||||||
|
}
|
||||||
|
.help-li-num::before {
|
||||||
|
margin-left: -1em;
|
||||||
|
counter-increment: my-li-counter;
|
||||||
|
content: counter(my-li-counter) ". ";
|
||||||
}
|
}
|
||||||
.help-para {
|
.help-para {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
counter-reset: my-li-counter; /* Manually manage listitem numbering. */
|
||||||
}
|
}
|
||||||
|
|
||||||
.old-help-para {
|
.old-help-para {
|
||||||
@@ -1229,6 +1259,7 @@ local function gen_css(fname)
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
|
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
counter-reset: my-li-counter; /* Manually manage listitem numbering. */
|
||||||
}
|
}
|
||||||
.old-help-para pre, .old-help-para pre:hover {
|
.old-help-para pre, .old-help-para pre:hover {
|
||||||
/* Text following <pre> is already visually separated by the linebreak. */
|
/* Text following <pre> is already visually separated by the linebreak. */
|
||||||
|
|||||||
Reference in New Issue
Block a user