docs: add keymap desc
This commit is contained in:
parent
8d1fc8d569
commit
2422be9df5
11
README.md
11
README.md
@ -109,7 +109,16 @@ require'Trans'.setup{
|
||||
```
|
||||
|
||||
## 快捷键绑定
|
||||
> TODO
|
||||
**示例:**
|
||||
> 示例中展示, 将`mm`映射成快捷键
|
||||
```lua
|
||||
-- normal-mode
|
||||
vim.keymap.set('n', 'mm', '<Cmd>TranslateCurosorWord<CR>')
|
||||
|
||||
-- visual-mode
|
||||
vim.keymap.set('v', 'mm', '<Esc><Cmd>TranslateSelectWord<CR>')
|
||||
|
||||
```
|
||||
|
||||
## 声明
|
||||
- 本插件词典基于[ECDICT](https://github.com/skywind3000/ECDICT)
|
||||
|
@ -29,6 +29,6 @@ if auto_close then
|
||||
end
|
||||
|
||||
|
||||
vim.keymap.set('n', 'mm', '<cmd>TranslateCurosorWord<cr>')
|
||||
vim.keymap.set('v', 'mm', '<Esc><cmd>TranslateSelectWord<cr>')
|
||||
-- vim.keymap.set('n', 'mm', '<cmd>TranslateCurosorWord<cr>')
|
||||
-- vim.keymap.set('v', 'mm', '<Esc><cmd>TranslateSelectWord<cr>')
|
||||
require("Trans.highlight").set_hl()
|
||||
|
Loading…
x
Reference in New Issue
Block a user