mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 02:21:51 +00:00
'cpoptions': remove "<" flag; ignore <special>
Closes #6937 "nvim_get_keymap output is unreliable"
This commit is contained in:
@@ -490,9 +490,6 @@ expression register: >
|
||||
|
||||
:amenu Insert.foobar "='foobar'<CR>P
|
||||
|
||||
Note that the '<' and 'k' flags in 'cpoptions' also apply here (when
|
||||
included they make the <> form and raw key codes not being recognized).
|
||||
|
||||
Note that <Esc> in Cmdline mode executes the command, like in a mapping. This
|
||||
is Vi compatible. Use CTRL-C to quit Cmdline mode.
|
||||
|
||||
|
||||
@@ -570,9 +570,9 @@ Since the '|' character is used to separate a map command from the next
|
||||
command, you will have to do something special to include a '|' in {rhs}.
|
||||
There are three methods:
|
||||
use works when example ~
|
||||
<Bar> '<' is not in 'cpoptions' :map _l :!ls <Bar> more^M
|
||||
<Bar> always :map _l :!ls <Bar> more^M
|
||||
\| 'b' is not in 'cpoptions' :map _l :!ls \| more^M
|
||||
^V| always, in Vim and Vi :map _l :!ls ^V| more^M
|
||||
^V| always :map _l :!ls ^V| more^M
|
||||
|
||||
(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
|
||||
cannot use the <> notation "<C-V>" here).
|
||||
@@ -627,8 +627,7 @@ out about, ^D is CTRL-D).
|
||||
|
||||
1.8 EXAMPLES *map-examples*
|
||||
|
||||
A few examples (given as you type them, for "<CR>" you type four characters;
|
||||
the '<' flag must not be present in 'cpoptions' for this to work). >
|
||||
A few examples (as you type them: for "<CR>" you type four characters). >
|
||||
|
||||
:map <F3> o#include
|
||||
:map <M-g> /foo<CR>cwbar<Esc>
|
||||
@@ -880,7 +879,6 @@ character is mostly ignored otherwise.
|
||||
|
||||
It is possible to move the cursor after an abbreviation: >
|
||||
:iab if if ()<Left>
|
||||
This does not work if 'cpoptions' includes the '<' flag. |<>|
|
||||
|
||||
You can even do more complicated things. For example, to consume the space
|
||||
typed after an abbreviation: >
|
||||
|
||||
@@ -1568,7 +1568,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
results in X being mapped to:
|
||||
'B' included: "\^[" (^[ is a real <Esc>)
|
||||
'B' excluded: "<Esc>" (5 characters)
|
||||
('<' excluded in both cases)
|
||||
*cpo-c*
|
||||
c Searching continues at the end of any match at the
|
||||
cursor position, but not further than the start of the
|
||||
@@ -1751,14 +1750,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
+ When included, a ":write file" command will reset the
|
||||
'modified' flag of the buffer, even though the buffer
|
||||
itself may still be different from its file.
|
||||
*cpo-<*
|
||||
< Disable the recognition of special key codes in |<>|
|
||||
form in mappings, abbreviations, and the "to" part of
|
||||
menu commands. For example, the command
|
||||
":map X <Tab>" results in X being mapped to:
|
||||
'<' included: "<Tab>" (5 characters)
|
||||
'<' excluded: "^I" (^I is a real <Tab>)
|
||||
Also see the 'k' flag above.
|
||||
*cpo->*
|
||||
> When appending to a register, put a line break before
|
||||
the appended text.
|
||||
|
||||
@@ -282,9 +282,7 @@ For Emacs-style editing on the command-line: >
|
||||
:cnoremap <Esc><C-B> <S-Left>
|
||||
" forward one word
|
||||
:cnoremap <Esc><C-F> <S-Right>
|
||||
|
||||
NOTE: This requires that the '<' flag is excluded from 'cpoptions'. |<>|
|
||||
|
||||
<
|
||||
*format-bullet-list*
|
||||
This mapping will format any bullet list. It requires that there is an empty
|
||||
line above and below each list entry. The expression commands are used to
|
||||
@@ -300,8 +298,7 @@ be able to give comments to the parts of the mapping. >
|
||||
:execute m |" define the mapping
|
||||
|
||||
(<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not
|
||||
CTRL-W. You can copy/paste this into Vim if '<' is not included in
|
||||
'cpoptions'.)
|
||||
CTRL-W.)
|
||||
|
||||
Note that the last comment starts with |", because the ":execute" command
|
||||
doesn't accept a comment directly.
|
||||
|
||||
@@ -332,7 +332,7 @@ Test functions:
|
||||
|
||||
Other options:
|
||||
'antialias'
|
||||
'cpoptions' (g j k H w * - and all POSIX flags were removed)
|
||||
'cpoptions' (g j k H w < * - and all POSIX flags were removed)
|
||||
'encoding' ("utf-8" is always used)
|
||||
'esckeys'
|
||||
'guioptions' "t" flag was removed
|
||||
|
||||
@@ -271,7 +271,7 @@ mode. For example, if you would like the "/" command not to extend the Visual
|
||||
area, but instead take the highlighted text and search for that: >
|
||||
:vmap / y/<C-R>"<CR>
|
||||
(In the <> notation |<>|, when typing it you should type it literally; you
|
||||
need to remove the 'B' and '<' flags from 'cpoptions'.)
|
||||
need to remove the 'B' flag from 'cpoptions'.)
|
||||
|
||||
If you want to give a register name using the """ command, do this just before
|
||||
typing the operator character: "v{move-around}"xd".
|
||||
@@ -375,7 +375,7 @@ Here is an example, to replace the selected text with the output of "date": >
|
||||
:vmap _a <Esc>`>a<CR><Esc>`<i<CR><Esc>!!date<CR>kJJ
|
||||
|
||||
(In the <> notation |<>|, when typing it you should type it literally; you
|
||||
need to remove the 'B' and '<' flags from 'cpoptions')
|
||||
need to remove the 'B' flag from 'cpoptions')
|
||||
|
||||
What this does is:
|
||||
<Esc> stop Visual mode
|
||||
@@ -392,7 +392,7 @@ selected text: >
|
||||
:vmap X y/<C-R>"<CR>
|
||||
|
||||
(In the <> notation |<>|, when typing it you should type it literally; you
|
||||
need to remove the 'B' and '<' flags from 'cpoptions')
|
||||
need to remove the 'B' flag from 'cpoptions')
|
||||
|
||||
Note that special characters (like '.' and '*') will cause problems.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user