Problem using 'M-.' 'insert-last-argument' in vi-keymap #568
-
With no other changes than bleopt default_keymap=vi
ble-bind -m vi_imap -f 'C-c' discard-line
my/vim-load-hook() {
bleopt keymap_vi_mode_show=
}
blehook/eval-after-load keymap_vi my/vim-load-hook Demo using $ echo foo
foo
$ echoecho # M-. pressed after 'echo ', expected 'echo foo' Do you have any idea why this could happen? It seems illogical to me as it works just fine with emacs keymap. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
M-. is equivalent to ESC .. Here, in the vi editing mode, ESC (C-[) is taken by the command to "go to the normal mode (vi_nmap)". Then, by pressing M-., you essentially request to go to the normal mode and perform the command Basically, the keybindings that contain the M- modifier are disabled in the vi editing mode by default because it conflicts with ESC. For example, you can see in §4.12 that M-. is only available in the emacs editing mode by default. If you want to enable M-. in the vi editing mode, you can manually set up the keybinding as # blerc
ble-bind -m vi_imap -f 'M-.' insert-last-argument Or as explained here, you can enable all the meta bindings by the following setup: # blerc
my/vim-load-hook() {
bleopt keymap_vi_mode_show=
ble-decode/keymap:vi_imap/define-meta-bindings # <-- add this line
}
blehook/eval-after-load keymap_vi my/vim-load-hook |
Beta Was this translation helpful? Give feedback.
M-. is equivalent to ESC .. Here, in the vi editing mode, ESC (C-[) is taken by the command to "go to the normal mode (vi_nmap)". Then, by pressing M-., you essentially request to go to the normal mode and perform the command
.
(which repeats the previous edit).Basically, the keybindings that contain the M- modifier are disabled in the vi editing mode by default because it conflicts with ESC. For example, you can see in §4.12 that M-. is only available in the emacs editing mode by default.
If you want to enable M-. in the vi editing mode, you can manually set up the keybinding as
Or as explained here, you can enable all the meta b…