-
-
Notifications
You must be signed in to change notification settings - Fork 86
Manual §6 Vim Mode
[ 日本語 | English ] ≫ Manual [§1 Intro | §2 Color | §3 Bind | §4 Edit | §5 Emacs | §6 Vim | §7 Comp | §8 Misc
In Vim editing mode, the base keymap is insert mode vi_imap
,
and other modes such as normal mode vi_nmap
, operator-pending mode vi_omap
,
visual mode vi_xmap
, select mode vi_smap
and command-line mode vi_cmap
can be entered through various key operations.
Most of the operations available in vi_imap
are described in §4 Edit.
In vi_nmap
, vi_omap
and vi_xmap
, an integer argument called count can be specified for the succeeding command.
Key combination | Widget |
---|---|
0 | vi-command/append-arg |
1 | vi-command/append-arg |
2 | vi-command/append-arg |
3 | vi-command/append-arg |
4 | vi-command/append-arg |
5 | vi-command/append-arg |
6 | vi-command/append-arg |
7 | vi-command/append-arg |
8 | vi-command/append-arg |
9 | vi-command/append-arg |
When no count has been specified, 0 behaves as a motion to the beginning of the line. The key from 1 to 9 specifies a new count. When count is specified, the key from 0 to 9 adds a new digit to the existing count. The interpretation of count depends on the succeeding command.
In vi_nmap
and vi_xmap
, a register for the succeeding command can be set.
Key combination | Widget | Description |
---|---|---|
" {char} | vi-command/register |
Set register |
In vi_nmap
, vi_omap
and vi_xmap
, various operators are available.
When the operator is called in vi_nmap
, it enters vi_omap
after recording the operator.
When the operator is called in vi_xmap
, the operator is applied to the selected region.
When the operator is called in vi_omap
, the operator is applied to the current line if the operator matches with the recorded one.
Key combination | Widget | Description |
---|---|---|
y | vi-command/operator y |
Copy |
d x, delete (vi_xmap) |
vi-command/operator d |
Cut |
c s (vi_xmap) |
vi-command/operator c |
Cut and enter insert mode |
< | vi-command/operator indent-left |
Increase indentation |
> | vi-command/operator indent-right |
Decrease indentation |
! | vi-command/operator filter |
Filter by specified command |
g ~ ~ (vi_omap/vi_xmap) |
vi-command/operator toggle_case |
Toggle cases |
g u u (vi_omap/vi_xmap) |
vi-command/operator u |
Convert to lowercase |
g U U (vi_omap/vi_xmap) |
vi-command/operator U |
Convert to uppercase |
g ? ? (vi_omap) |
vi-command/operator rot13 |
Encrypt by rot13 |
g q q (vi_omap) |
vi-command/operator fold |
Fold lines to fit into some width |
g w | vi-command/operator fold-preserve-point |
Fold lines to fit into some width and go to the original position in the text |
g @ | vi-command/operator map |
See bleopt keymap_vi_operatorfunc
|
Motion is a type of command that moves the cursor position which may be combined with operators.
Motion can be used in vi_nmap
, vi_omap
and vi_xmap
.
When a motion is called in vi_nmap
and vi_xmap
, the cursor is moved to the corresponding position.
When a motion is called in vi_omap
,
the recorded operator is applied to the region between the current position and the target position, and then it turns back to vi_nmap
.
Motion to the beginning or end of the line
Key combination | Widget | type |
---|---|---|
home | vi-command/beginning-of-line |
exclusive |
$, end | vi-command/forward-eol |
inclusive |
^ | vi-command/first-non-space |
exclusive |
_ | vi-command/first-non-space-forward |
linewise |
+, C-m, RET | vi-command/forward-first-non-space |
linewise |
- | vi-command/backward-first-non-space |
linewise |
g 0, g home | vi-command/beginning-of-graphical-line |
exclusive |
g ^ | vi-command/graphical-first-non-space |
exclusive |
g $, g end | vi-command/graphical-forward-eol |
inclusive |
g m | vi-command/middle-of-graphical-line |
exclusive |
g _ | vi-command/last-non-space |
inclusive |
Characterwise motion
Key combination | Widget | type |
---|---|---|
h, left | vi-command/backward-char |
exclusive |
l, right | vi-command/forward-char |
exclusive |
C-?, DEL, C-h, BS | vi-command/backward-char wrap |
exclusive |
SP | vi-command/forward-char wrap |
exclusive |
Linewise motion
Key combination | Widget | type |
---|---|---|
j, down, C-n, C-j | vi-command/forward-line |
linewise |
k, up, C-p | vi-command/backward-line |
linewise |
g j, g down | vi-command/graphical-forward-line |
exclusive |
g k, g up | vi-command/graphical-backward-line |
exclusive |
Wordwise motion
Key combination | Widget | type |
---|---|---|
w | vi-command/forward-vword |
exclusive |
W | vi-command/forward-uword |
exclusive |
b | vi-command/backward-vword |
exclusive |
B | vi-command/backward-uword |
exclusive |
e | vi-command/forward-vword-end |
inclusive |
E | vi-command/forward-uword-end |
inclusive |
g e | vi-command/backward-vword-end |
inclusive |
g E | vi-command/backward-uword-end |
inclusive |
C-right | vi-command/forward-vword |
exclusive |
S-right | vi-command/forward-vword |
exclusive |
C-left | vi-command/backward-vword |
exclusive |
S-left | vi-command/backward-vword |
exclusive |
Other motion
Key combination | Widget | Type | Description |
---|---|---|---|
g o | vi-command/nth-byte |
exclusive | Move before the character that includes N [1]th byte |
| | vi-command/nth-column |
exclusive | Move to the N [1]th column |
H | vi-command/nth-line |
linewise/jump | Go to the non-space beginning of the N [1]th line counting from the top |
L | vi-command/nth-last-line |
linewise/jump | Go to the non-space beginning of the N [1]th line counting from the bottom |
g g | vi-command/history-beginning |
linewise | Load the N [1]th history entry (nmap) / Operate until the non-space beginning of the N [1]th line (omap) |
G | vi-command/history-end |
linewise | Load the N th[last] history entry (nmap) / Operate until the non-space beginning of the N th[last] line (omap) |
C-home | vi-command/first-nol |
linewise | Go to the non-space beginning of the N [1]th line |
C-end | vi-command/last-eol |
inclusive | Go to the end of the N th[last] line |
Motion to corresonding brackets
Key combination | Widget | Type |
---|---|---|
% | vi-command/search-matchpair-or vi-command/percentage-line |
inclusive or linewise |
When count is not specified, it moves to the corresponding bracket. When count is specified, it moves to the line at the position in the document specified by count as percentile.
Character search
Key combination | Widget | Type |
---|---|---|
f | vi-command/search-forward-char |
inclusive |
F | vi-command/search-backward-char |
exclusive |
t | vi-command/search-forward-char-prev |
inclusive |
T | vi-command/search-backward-char-prev |
exclusive |
; | vi-command/search-char-repeat |
exclusive |
, | vi-command/search-char-reverse-repeat |
exclusive |
String search
Key combination | Widget | Type |
---|---|---|
/ | vi-command/search-forward |
exclusive |
? | vi-command/search-backward |
exclusive |
n | vi-command/search-repeat |
exclusive |
N | vi-command/search-reverse-repeat |
exclusive |
* | vi-command/search-word-forward |
exclusive |
# | vi-command/search-word-backward |
exclusive |
Motion to marks
Key combination | Widget | Type |
---|---|---|
` {char} | vi-command/goto-mark |
exclusive |
' {char} | vi-command/goto-mark line |
exclusive |
The text objects are available in vi_omap
and vi_xmap
.
When text objects are used in vi_omap
, the recorded operator is applied to the specified target.
When text objects are used in vi_xmap
, the selection is extended to include the specified target.
Key combination | Widget |
---|---|
i {char} | vi-command/text-object |
a {char} | vi-command/text-object |
{char} |
Description |
---|---|
w | Word (characters of the same kind) |
W | Word (non-space characters) |
" | Range enclosed by double quotations |
' | Range enclosed by single quotations |
` | Range enclosed by back quotations |
(, ), b | Range enclosed by parens (..) |
{, }, B | Range enclosed by braces {..} |
<, > | Range enclosed by angle brackets <..> |
[, ] | Range enclosed by brackets [..] |
t | Range enclosed by HTML tags |
s | Sentence (separated by periods) |
p | Paragraph (separated by double new lines) |
The following commands are available in vi_nmap
, vi_omap
and vi_xmap
.
Key combination | Widget | Description |
---|---|---|
: | vi-command/commandline |
Enter command-line mode |
The following commands are available in any of vi_nmap
, vi_omap
, vi_xmap
and vi_smap
.
Key combination | Widget | Description |
---|---|---|
C-z | (shell command) fg
|
Run fg command |
paste_begin | vi-command/bracketed-paste |
(Internal use) |
Insert mode can be categorized into three minor modes, (usual) insert mode, replace mode and virtual replace mode. The key bindings of insert mode is the same as the one described in §4 Edit exept for the following ones.
Switch mode
Key combination | Widget | Description |
---|---|---|
insert | vi_imap/overwrite-mode |
Switch to replace mode |
ESC, C-[ | vi_imap/normal-mode |
Switch to normal mode |
C-c | vi_imap/normal-mode-without-insert-leave |
Switch to normal mode (without special operation) |
C-o | vi_imap/single-command-mode |
Enter to insert-normal mode |
Edit
Key combination | Widget | Description |
---|---|---|
C-w | vi_imap/delete-backward-word |
Remove a word |
SP | magic-space |
Insert space after some expansions |
Shell operations
Key combination | Widget | Description |
---|---|---|
C-j, C-RET | accept-line |
Run command |
C-m, RET | vi_imap/accept-single-line-or vi_imap/newline |
Run command or insert a new line |
C-g, C-\, C-^ | bell |
Ring bell and cancel the current operation |
C-l | clear-screen |
Clera screen and redraw the line |
f1 | command-help |
Show help of the current command |
C-x C-v | display-shell-version |
Show the shell version |
C-x C-e | edit-and-execute-command |
Edit command in the editor and run |
Internal use
Key combination | Widget |
---|---|
__attach__ | vi_imap/__attach__ |
__default__ | vi_imap/__default__ |
__before_widget__ | vi_imap/__before_widget__ |
Normal mode can be categorized into two modes, (usual) normal mode and insert-normal mode. In insert-normal mode, the mode switches to insert mode after one command is applied.
Cancel
Key combination | Widget | Description |
---|---|---|
ESC, C-[ | vi-command/bell |
Ring bell and cancel |
C-c | vi-command/cancel |
Cancel |
Switch mode
Key combination | Widget | Description |
---|---|---|
C-\ C-n | nop |
vi_nmap (Do nothing) |
a | vi_nmap/append-mode |
vi_imap Enter insert mode after the current character |
A | vi_nmap/append-mode-at-end-of-line |
vi_imap Enter insert mode at the end of the line |
i, insert | vi_nmap/insert-mode |
vi_imap Enter insert mode before the current character |
I | vi_nmap/insert-mode-at-first-non-space |
vi_imap Enter insert mode at the non-space beginning of the line |
g I | vi_nmap/insert-mode-at-beginning-of-line |
vi_imap Enter insert mode at the beginning of the line |
o | vi_nmap/insert-mode-at-forward-line |
vi_imap Enter insert mode at a new line after the current line |
O | vi_nmap/insert-mode-at-backward-line |
vi_imap Enter insert mode at a new line before the current line |
R | vi_nmap/replace-mode |
vi_imap Enter replace mode |
g R | vi_nmap/virtual-replace-mode |
vi_imap Enter virtual replace mode |
g i | vi_nmap/insert-mode-at-previous-point |
vi_imap Enter insert mode at the previous position |
v | vi_nmap/charwise-visual-mode |
vi_xmap Enter characterwise visual mode |
V | vi_nmap/linewise-visual-mode |
vi_xmap Enter linewise visual mode |
C-v, C-q | vi_nmap/blockwise-visual-mode |
vi_xmap Enter blockwise visual mode |
g v | vi-command/previous-visual-area |
vi_xmap Enter previous visual mode with the previous range |
g h | vi_nmap/charwise-select-mode |
vi_smap Enter characterwise select mode |
g H | vi_nmap/linewise-select-mode |
vi_smap Enter linewise select mode |
g C-h | vi_nmap/blockwise-select-mode |
vi_smap Enter blockwise select mode |
Linewise operation
Key combination | Widget | Description |
---|---|---|
Y | vi_nmap/copy-current-line |
Copy current line |
S | vi_nmap/kill-current-line-and-insert |
Cut current line and enter insert mode |
D | vi_nmap/kill-forward-line |
Cut the range between current position and the end of line |
C | vi_nmap/kill-forward-line-and-insert |
Cut the range between current position and the end of line and enter insert mode |
J | vi_nmap/connect-line-with-space |
Join lines by spaces |
g J | vi_nmap/connect-line |
Join lines |
Scroll
Key combination | Widget | Description |
---|---|---|
C-d | vi-command/forward-line-scroll |
Move N lines [a half page] forward and scroll |
C-e | vi-command/forward-scroll |
Scroll forward by N lines [a half page] |
C-u | vi-command/backward-line-scroll |
Move N lines [a half page] backward and scroll |
C-y | vi-command/backward-scroll |
Scroll backward by N lines [a half page] |
C-f, next | vi-command/pagedown |
Move N [1] pages forward and scroll |
C-b, prior | vi-command/pageup |
Move N [1] pages backward and scroll |
Characterwise operation
Key combination | Widget | Description |
---|---|---|
~ | vi_nmap/forward-char-toggle-case |
Move N [1] characters forward toggling the cases |
x, delete | vi_nmap/kill-forward-char |
Delete the current character |
s | vi_nmap/kill-forward-char-and-insert |
Delete the current character and enter insert mode |
X | vi_nmap/kill-backward-char |
Dlete the previous character |
r | vi_nmap/replace-char |
Replace the current character |
g r | vi_nmap/virtual-replace-char |
Replace the current character considering visual width |
Operation to numbers
Key combination | Widget | Description |
---|---|---|
C-a | vi_nmap/increment |
Increase the number by N [1] |
C-x | vi_nmap/decrement |
Decrease the number by N [1] |
Paste/Record/Replay registers
Key combination | Widget | Description |
---|---|---|
p | vi_nmap/paste-after |
Paste after the current character |
P | vi_nmap/paste-before |
Paste before the current character |
q {char} | vi_nmap/record-register |
Start/End recording a macro |
@ {char} | vi_nmap/play-register |
Replay a macro |
Undo and redo
Key combination | Widget | Description |
---|---|---|
. | vi_nmap/repeat |
Repeat the previous command |
u | vi_nmap/undo |
Undo |
C-r | vi_nmap/redo |
Redo |
U | vi_nmap/revert |
Undo all |
Mark
Key combination | Widget | Description |
---|---|---|
m {char} | vi-command/set-mark |
Mark the current position |
Redraw and show information
Key combination | Widget |
---|---|
z t | vi_nmap/scroll-to-top-and-redraw |
z z | vi_nmap/scroll-to-center-and-redraw |
z b | vi_nmap/scroll-to-bottom-and-redraw |
z RET, z C-m | vi_nmap/scroll-to-top-non-space-and-redraw |
z + | vi_nmap/scroll-or-pagedown-and-redraw |
z - | vi_nmap/scroll-to-bottom-non-space-and-redraw |
z . | vi_nmap/scroll-to-center-non-space-and-redraw |
C-g | vi-command/show-line-info |
Shell operations
Key combination | Widget | Description |
---|---|---|
C-j, C-RET | vi-command/accept-line |
Run the command |
C-m, RET | vi-command/accept-single-line-or vi-command/forward-first-non-space |
Run the command or insert a new line |
C-l | clear-screen |
Clear screen and redraw the line |
C-d | vi-command/exit-on-empty-line |
Exit the shell for empty line, or the same as C-e |
K, f1 | vi_nmap/command-help |
Show help of the current command |
Z Z, Z Q | vi-command:q |
Exit the shell |
Internal use
Key combination | Widget |
---|---|
__default__ | vi-command/decompose-meta |
auto_complete_enter | auto-complete-enter |
Key combination | Widget | Description |
---|---|---|
C-\ C-n | nop |
(Do nothing) |
ESC, C-[, C-c | vi_omap/cancel |
Cancel |
v | vi_omap/switch-to-charwise |
Force operand to be characterwise and toggle inclusive/exclusive |
V | vi_omap/switch-to-linewise |
Force operand to be linewise |
C-v, C-q | vi_omap/switch-to-blockwise |
Force operand to be blockwise |
__default__ | vi_omap/__default__ |
(Internal use) |
Visual mode can be categorized into three minor modes, characterwise visual mode, linewise visual mode and blockwise visual mode.
Switch mode
Key combination | Widget | Description |
---|---|---|
ESC, C-[ | vi_xmap/exit |
Exit visual mode |
C-c, C-\ C-n, C-\ C-g | vi_xmap/cancel |
Cancel visual mode |
v | vi_xmap/switch-to-charwise |
Switch to characterwise visual mode |
V | vi_xmap/switch-to-linewise |
Switch to linewise visual mode |
C-v, C-q | vi_xmap/switch-to-blockwise |
Switch to blockwise visual mode |
g v | vi-command/previous-visual-area |
Restore the state of the previous visual mode |
C-g | vi_xmap/switch-to-select |
Switch to select mode |
Move
Key combination | Widget | Description |
---|---|---|
o | vi_xmap/exchange-points |
Exchange the current position and the starting position |
O | vi_xmap/exchange-boundaries |
Exchange the left and right boundaries in blockwise mode, or otherwise the same with above |
Copy, Paste, Insert block
Key combination | Widget | Description |
---|---|---|
C | vi_xmap/replace-block-lines |
Delete the forward text until the end of line and insert (characterwise mode is treated as linewise) |
D, X | vi_xmap/delete-block-lines |
Delete the forward text until the end of line (characterwise mode is treated as linewise) |
S, R | vi_xmap/delete-lines |
Delete linewise |
Y | vi_xmap/copy-block-or-lines |
Copy the forward text until the end of line (characterwise mode is treated as linewise) |
I | vi_xmap/insert-mode |
Insert before the selection |
A | vi_xmap/append-mode |
Insert after the selection |
p | vi_xmap/paste-after |
Insert after the selection and cut the content of the selection |
P | vi_xmap/paste-before |
Insert before the selection and cut the content of the selection |
Conversion
Key combination | Widget | Description |
---|---|---|
r {char} | vi_xmap/visual-replace-char |
Replace characters in the selection |
J | vi_xmap/connect-line-with-space |
Connect lines with spaces |
g J | vi_xmap/connect-line |
Connect lines |
C-a | vi_xmap/increment |
Increase numbers in the selection by N [1] |
C-x | vi_xmap/decrement |
Decrease numbers in the selection by N [1] |
g C-a | vi_xmap/progressive-increment |
Increase k'th number in the selection by N [1]*k |
g C-x | vi_xmap/progressive-decrement |
Decrease k'th number in the selection by N [1]*k |
Shell operation
Key combination | Widget | Description |
---|---|---|
f1, K | vi_xmap/command-help |
Show help of the current command |
Internal use
Key combination | Widget |
---|---|
__default__ | vi-command/decompose-meta |
Select mode has three minor modes, characterwise select mode, linewise select mode and blockwise select mode.
Switch mode
Key combination | Widget | Description |
---|---|---|
ESC, C-[ | vi_xmap/exit |
Exit select mode |
C-c, C-\ C-n, C-\ C-g | vi_xmap/cancel |
Cancel select mode |
C-\ C-n | nop |
(Do nothing) |
C-v, C-q | vi_xmap/switch-to-visual-blockwise |
Switch to blockwise visual mode |
C-g | vi_xmap/switch-to-visual |
Switch to character wise visual mode |
Characterwise motion
Key combination | Widget |
---|---|
left | vi_smap/@nomarked vi-command/backward-char |
right | vi_smap/@nomarked vi-command/forward-char |
C-?, DEL, C-h, BS | vi_smap/@nomarked vi-command/backward-char wrap |
SP | vi_smap/@nomarked vi-command/forward-char wrap |
S-left | vi-command/backward-char |
S-right | vi-command/forward-char |
S-C-?, S-DEL, S-C-h, S-BS | vi-command/backward-char wrap |
S-SP | vi-command/forward-char wrap |
Wordwise motion
Key combination | Widget |
---|---|
C-right | vi_smap/@nomarked vi-command/forward-vword |
C-left | vi_smap/@nomarked vi-command/backward-vword |
S-C-right | vi-command/forward-vword |
S-C-left | vi-command/backward-vword |
Motion to beginning/end of line
Key combination | Widget |
---|---|
home | vi_smap/@nomarked vi-command/beginning-of-line |
end | vi_smap/@nomarked vi-command/forward-eol |
C-m, RET | vi_smap/@nomarked vi-command/forward-first-non-space |
S-home | vi-command/beginning-of-line |
S-end | vi-command/forward-eol |
S-C-m, S-RET | vi-command/forward-first-non-space |
Linewise motion
Key combination | Widget |
---|---|
down, C-n, C-j | vi_smap/@nomarked vi-command/forward-line |
up, C-p | vi_smap/@nomarked vi-command/backward-line |
C-home | vi_smap/@nomarked vi-command/nth-line |
C-end | vi_smap/@nomarked vi-command/last-line |
S-down, S-C-n, S-C-j | vi-command/forward-line |
S-up, S-C-p | vi-command/backward-line |
S-C-home | vi-command/nth-line |
S-C-end | vi-command/last-line |
Edit
Key combination | Widget | Description |
---|---|---|
__defchar__ | vi_smap/self-insert |
Delete the selection and insert the character |
delete, C-?, DEL, C-h, BS | vi-command/operator d |
Delete the selection |
C-a | vi_xmap/increment |
Increment number in the selection |
C-x | vi_xmap/decrement |
Decrement number in the selection |
Shell operation
Key combination | Widget | Description |
---|---|---|
f1 | vi_xmap/command-help |
Show help of the current command |
Internal use
Key combination | Widget |
---|---|
__default__ | vi-command/decompose-meta |
The settings for Vim editing mode need to be performed through the hook keymap_vi_load
.
# blerc (Example)
function my/vim-load-hook {
bleopt keymap_vi_nmap_name:=$'\e[1m-- NORMAL --\e[m'
source "$_ble_base/lib/vim-surround.sh"
}
blehook/eval-after-load keymap_vi my/vim-load-hook
# ble-0.3 and before
# ble/array#push _ble_keymap_vi_load_hook my/vim-load-hook
# hook:keymap_vi_load
# default
bleopt keymap_vi_cmap_cursor=
bleopt keymap_vi_imap_cursor=
bleopt keymap_vi_nmap_cursor=
bleopt keymap_vi_omap_cursor=
bleopt keymap_vi_smap_cursor=
bleopt keymap_vi_xmap_cursor=
# Example
bleopt keymap_vi_cmap_cursor=0
bleopt keymap_vi_imap_cursor=5
bleopt keymap_vi_nmap_cursor=2
bleopt keymap_vi_omap_cursor=4
bleopt keymap_vi_smap_cursor=2
bleopt keymap_vi_xmap_cursor=2
These options control the cursor shapes for the corresponding modes.
The value has the same meaning with the bleopt variable term_cursor_external
.
# hook:keymap_vi_load
# default
bleopt term_vi_cmap=
bleopt term_vi_imap=
bleopt term_vi_nmap=
bleopt term_vi_omap=
bleopt term_vi_smap=
bleopt term_vi_xmap=
These options specify the escape sequences which should be sent to the terminal when ble.sh
enters the corresponding mode
# hook:keymap_vi_load
# default
bleopt keymap_vi_keymodel=
This option controls the behavior of motion in select mode.
The value is a list of words separated by commans.
When the word stopsel
is contained in this option,
ble.sh
exits the select mode with a motion in select mode.
# hook:keymap_vi_load
# default
bleopt keymap_vi_macro_depth=64
This option sets the upper limit of the maximal depth of recurrence of replaying keyboard macros.
# hook:keymap_vi_load
# default
bleopt keymap_vi_nmap_name=$'\e[1m~\e[m'
This option specifies the string shown below the editted line in normal mode. For example, if you want to show an explicit name of the mode like in other modes, please use the following setting:
# hook:keymap_vi_load
bleopt keymap_vi_nmap_name=$'\e[1m-- NORMAL --\e[m'
If you do not want to show anything in normal mode, please use the following setting:
# hook:keymap_vi_load
bleopt keymap_vi_nmap_name=
# hook:keymap_vi_load
# default
bleopt keymap_vi_operatorfunc=
This option specifies the operator name when the user input g@
in normal mode.
The function ble/keymap:vi/operator:$value
, where $value
is the value of this setting,
is used as the implementation of the operator.
# hook:keymap_vi_load
# default
bleopt keymap_vi_search_match_current=
When this option has a non-empty value,
/, ?, n, N search the word on the current position.
When this option has the empty value, these keys follows the behavior of vim
.
This option controls the frequency of recording undo
.
When the value more
is specified, undo
will be recorded for various operations in vi_imap
.
# default
bleopt keymap_vi_imap_undo=
# Example
bleopt keymap_vi_imap_undo=more
# hook:keymap_vi_load
source "$_ble_base/lib/vim-surround.sh"
# hook:keymap_vi_load after source of "vim-surround.sh"
# default
bleopt vim_surround_omap_bind=1
When this option has the empty value, it registers bindings for vim-surround directly to vi_nmap
.
When this option has a non-empty value,
first it enters operator-pending mode by y, d and c,
and s and S in operator-pending mode perform vim-surround operations.
This option sets up the enclosing strings corresponding to the specified character.
The form vim_surround_$INTEGER
sets up the enclosing strings for the character specified by Unicode $INTEGER
.
The other form vim_surround_?
sets up the enclosing strings for the character ?
directly.
When the value contains CR ($'\r'
), the left hand side of the first CR is regarded as the left enclosing string,
and the right hand side is regarded as the right enclosing string.
When the value does not contain CR, the value is used as a common string for the left and right enclosing string.
# hook:keymap_vi_load after source of "vim-surround.sh"
# default
bleopt vim_surround_45:=$'$(\r)'
bleopt vim_surround_61:=$'$((\r))'
bleopt vim_surround_Q:=\"
bleopt vim_surround_q:=\'
# hook:keymap_vi_load
source "$_ble_base/lib/vim-arpeggio.sh"
# hook:keymap_vi_load after source of "vim-arpeggio.sh"
# default
bleopt vim_arpeggio_timeoutlen=40
This option specifies the timeout which are used for ble/lib/vim-arpeggio.sh/bind
in the unit of millisecond.
# hook:keymap_vi_load after source of "vim-arpeggio.sh"
# Usage
ble/lib/vim-arpeggio.sh/bind [-m KEYMAP] -[fxcs@] KEYS COMMAND
KEYS
specifies the keycombination: two characters followed by zero or modifiers such as C-S-M-A-s-H-
.
For example, when jk
is specified for KEYS
, it sets up the binding for the keys j and k pressed simultaneously.
For another example, when C-df
is speficied for KEYS
, it sets up the binding for the keys C-d and C-f pressed simultaneously.
[ 日本語 | English ] ≫ Manual [§1 Intro | §2 Color | §3 Bind | §4 Edit | §5 Emacs | §6 Vim | §7 Comp | §8 Misc