diff options
| author | jdhao <jdhao@hotmail.com> | 2024-02-27 23:27:20 +0100 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2024-02-28 06:36:05 +0800 |
| commit | 2f8482639db32c665f78a211bd007aa9fc14d0c4 (patch) | |
| tree | f3b7fd656f22c979f47afb8cae0143a3e9f278da /lua/config/zen-mode.lua | |
| parent | 050eacaee27272fa893ea8c0d7279625a05319aa (diff) | |
update some mappings
1. fix a typo in gJ mapping when setting the mark, the correct syntax is
`mz` (set mark `z`), not `zm`
2. fix bug with `iB` text object: previously `viB` does not work as
expected, because it does not select the entire buffer as expected.
After much investigation, I found it is because the `<cmd>` mapping
argument. If we use `<cmd>` argument for mapping, the mode does not
change. So if we use `viB`, inititally we are still in visual mode.
Later in the implementation, when we use `` normal! `<V`> `` to
select the entire buffer, it interferes with original visual mode. As
a result, the entire buffer is not selected. In the text obj
implementation, we can use `exe "normal! \<Esc>"` to clear the visual
mode and make `viB`, but this is not ideal. I think it is eaiser to
just not use the `<cmd>` argument and use `:<C-U>` instead.
Diffstat (limited to 'lua/config/zen-mode.lua')
0 files changed, 0 insertions, 0 deletions
