import { op } from "https://deno.land/x/ddc_vim@v4.3.0/deps.ts";
const { whichwrap } = op;
Allow specified keys that move the cursor left/right to move to the
previous/next line when the cursor is on the first/last character in
the line. Concatenate characters to allow this for these keys:
char key mode
b <BS>
Normal and Visual
s <Space>
Normal and Visual
h "h" Normal and Visual (not recommended)
l "l" Normal and Visual (not recommended)
< <Left>
Normal and Visual
> <Right>
Normal and Visual
~
"~"
Normal
[ <Left>
Insert and Replace
] <Right>
Insert and Replace
For example:
:set ww=<,>,[,]
allows wrap only when cursor keys are used.
When the movement keys are used in combination with a delete or change
operator, the <EOL>
also counts for a character. This makes "3h"
different from "3dh" when the cursor crosses the end of a line. This
is also true for "x" and "X", because they do the same as "dl" and
"dh". If you use this, you may also want to use the mapping
":map <BS> X"
to make backspace delete the character in front of the
cursor.
When 'l' is included and it is used after an operator at the end of a
line (not an empty line) then it will not move to the next line. This
makes "dl", "cl", "yl" etc. work normally.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
(Vim default: "b,s", Vi default: "")