-
-
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 corresponding 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 parentheses (..) |
{, }, 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 except 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 | accept-single-line-or-newline |
Run command or insert a new line |
C-g, C-\, C-^ | bell |
Ring bell and cancel the current operation |
C-l | clear-screen |
Clear 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 |
Delete 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 | accept-line |
Run the command |
C-m, RET | 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 |
6.3 Setting Vim editing mode†
The settings for Vim editing mode can be performed through the hook keymap_vi_load
.
# blerc (Example)
function my/vim-load-hook {
bleopt keymap_vi_mode_string_nmap=$'\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
These options control the cursor shapes for the corresponding modes.
The value has the same meaning with the bleopt variable term_cursor_external
.
The options keymap_vi_?map_cursor
have been taken over by the setting ble-bind -m KEYMAP --cursor CODE
.
Please also check ble-bind
.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
# default
ble-bind -m vi_cmap --cursor ''
ble-bind -m vi_imap --cursor ''
ble-bind -m vi_nmap --cursor ''
ble-bind -m vi_omap --cursor ''
ble-bind -m vi_smap --cursor ''
ble-bind -m vi_xmap --cursor ''
# Until ble-0.3
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
ble-bind -m vi_cmap --cursor 0
ble-bind -m vi_imap --cursor 5
ble-bind -m vi_nmap --cursor 2
ble-bind -m vi_omap --cursor 4
ble-bind -m vi_smap --cursor 2
ble-bind -m vi_xmap --cursor 2
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# 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
6.3.3 Bleopt keymap_vi_keymodel
(v0.2)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# 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 commas.
When the word stopsel
is contained in this option,
ble.sh
exits the select mode with a motion in select mode.
6.3.4 Bleopt keymap_vi_macro_depth
(v0.2)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# 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.
6.3.5 Bleopt keymap_vi_mode_update_prompt
(Empty/Non-empty) (v0.4)†
This option specifies that the prompt should be recalculated on the mode change. When this option has a non-empty value, the prompt will be recalculated.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
# default
bleopt keymap_vi_mode_update_prompt=
6.3.6 Bleopt prompt_vi_mode_indicator
(Prompt string) (v0.4)†
This option specifies the content of the mode indicator shown in the information line as a prompt sequence.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
# default
bleopt prompt_vi_mode_indicator='\q{keymap:vi/mode-indicator}'
6.3.7 Bleopt keymap_vi_mode_show
(Empty/Non-empty) (v0.4)†
This option controls if the mode indicator is shown by \q{keymap:vi/mode-indicator}
.
When this option has a non-empty value, \q{keymap:vi/mode-indicator}
is expanded to an empty string.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
# default
bleopt keymap_vi_mode_show=1
These options sets the name of modes used by \q{keymap:vi/mode-indicator}
.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
# default
bleopt keymap_vi_mode_name_insert='INSERT'
bleopt keymap_vi_mode_name_replace='REPLACE'
bleopt keymap_vi_mode_name_vreplace='VREPLACE'
bleopt keymap_vi_mode_name_visual='VISUAL'
bleopt keymap_vi_mode_name_select='SELECT'
bleopt keymap_vi_mode_name_linewise='LINE'
bleopt keymap_vi_mode_name_blockwise='BLOCK'
# example (Japanese mode names)
bleopt keymap_vi_mode_name_{insert=挿入,replace=置換,vreplace=仮想置換}
bleopt keymap_vi_mode_name_{visual=ビジュアル,select=選択}
bleopt keymap_vi_mode_name_{linewise=行,blockwise=矩形}
6.3.9 Bleopt keymap_vi_mode_string_nmap
(v0.2)†
This option specifies the string used by \q{keymap:vi/mode-indicator}
in the normal mode.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
# default
bleopt keymap_vi_mode_string_nmap=$'\e[1m~\e[m' # ble-0.4
bleopt keymap_vi_nmap_name=$'\e[1m~\e[m' # ble-0.2 (obsolete)
For example, if you want to show an explicit name of the mode like in other modes, please use the following setting:
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
bleopt keymap_vi_mode_string_nmap=$'\e[1m-- NORMAL --\e[m'
If you do not want to show anything in normal mode, please use the following setting:
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
bleopt keymap_vi_mode_string_nmap=
6.3.10 Bleopt keymap_vi_operatorfunc
(v0.2)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# 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.
6.3.11 Bleopt keymap_vi_search_match_current
(Empty/Non-empty) (v0.2)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# 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
.
6.3.12 Bleopt keymap_vi_imap_undo
(v0.3)†
This option controls the frequency of recording undo
.
When the value more
is specified, undo
will be recorded for various operations in vi_imap
.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
# default
bleopt keymap_vi_imap_undo=
# Example
bleopt keymap_vi_imap_undo=more
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
ble-import lib/vim-surround
6.4.1 Bleopt vim_surround_omap_bind
(Empty/Non-empty)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-surround"
# 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.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-surround"
# default
bleopt vim_surround_45:=$'$(\r)'
bleopt vim_surround_61:=$'$((\r))'
bleopt vim_surround_Q:=\"
bleopt vim_surround_q:=\'
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
ble-import lib/vim-arpeggio
6.5.1 Bleopt vim_arpeggio_timeoutlen
(Integer)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-arpeggio"
# 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.
6.5.2 Function ble/lib/vim-arpeggio.sh/bind
†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-arpeggio"
# Usage
ble/lib/vim-arpeggio.sh/bind [-m KEYMAP] -[fxcs@] KEYS COMMAND
KEYS
specifies the key combination: 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 specified for KEYS
, it sets up the binding for the keys C-d and C-f pressed simultaneously.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load
ble-import lib/vim-airline
6.6.1 Bleopt vim_airline_theme
(Enumerate) (v0.4)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-airline"
# default
bleopt vim_airline_theme=dark
This option specifies the theme for the airline.
Please find the files contrib/airline/*.bash
for the available theme names.
6.6.2 Bleopt vim_airline_section_?
(Prompt string) (v0.4)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-airline"
# default
bleopt vim_airline_section_a='\e[1m\q{lib/vim-airline/mode}'
bleopt vim_airline_section_b='\q{lib/vim-airline/gitstatus}'
bleopt vim_airline_section_c='\w'
bleopt vim_airline_section_x='bash'
bleopt vim_airline_section_y='$_ble_util_locale_encoding[unix]'
bleopt vim_airline_section_z=' \q{history-percentile} \e[1m!\q{history-index}/\!\e[22m \q{position}'
These options specify the contents of corresponding sections in the airline.
Sections are named a
, b
, c
, x
, y
, and z
from left to right.
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-airline"
# default
bleopt vim_airline_left_sep=$'\uE0B0'
bleopt vim_airline_left_alt_sep=$'\uE0B1'
bleopt vim_airline_right_sep=$'\uE0B2'
bleopt vim_airline_right_alt_sep=$'\uE0B3'
These options specify the separater characters on the section boundaries.
The options whose name contain left
and right
specify the separaters between the sections a
-c
and sections c
-z
, respectively.
If the sections around the boundary have the same background colors, the separaters specified by the option whose name contains sep
is used.
Otherwise, the option whose name does not contain sep
is used.
6.6.4 Bleopt vim_airline_symbol_branch
(v0.4)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-airline"
# default
bleopt vim_airline_symbol_branch=$'\uE0A0'
This option specifies the character placed before the branch name.
6.6.5 Bleopt vim_airline_symbol_dirty
(v0.4)†
[ Note: Please specify the following settings through the hook keymap_vi_load
.
See the code example at the section beginning. ]
# hook:keymap_vi_load after importing "lib/vim-airline"
# default
bleopt vim_airline_symbol_dirty=$'\u26A1'
This option specifies the character placed after the branch name when the repository is in a dirty state.
6.6.6 Face vim_airline_{a,b,c,x,y,z,error,term,warning}{,_normal,_insert,_replace,_visual,_commandline,_inactive}{,_modified}
(v0.4)†
# default
ble-face -s vim_airline_a fg=17,bg=45
ble-face -s vim_airline_b fg=231,bg=27
ble-face -s vim_airline_c fg=231,bg=18
ble-face -s vim_airline_x ref:vim_airline_c
ble-face -s vim_airline_y ref:vim_airline_b
ble-face -s vim_airline_z ref:vim_airline_a
ble-face -s vim_airline_error fg=16,bg=88
ble-face -s vim_airline_term fg=158,bg=234
ble-face -s vim_airline_warning fg=16,bg=166
These faces specify the graphics settings for different states of sections.
[ 日本語 | English ] ≫ Manual [§1 Intro | §2 Color | §3 Bind | §4 Edit | §5 Emacs | §6 Vim | §7 Comp | §8 Misc]