新增:whichkey插件
This commit is contained in:
@ -169,7 +169,6 @@ export def Install()
|
||||
title: 'Plugins - ' .. tui#core#cached#Get('tui.plug.home'),
|
||||
minwidth: minwidth,
|
||||
callback: (_, index) => {
|
||||
echo index
|
||||
if index > 0
|
||||
var plug_id = tui_plug_ids[index - 1]
|
||||
var plug_info = tui_plug_registed[plug_id]
|
||||
|
@ -6,3 +6,4 @@ TuiLayer plug.nerdtree
|
||||
|
||||
TuiLayer plug.poplar
|
||||
|
||||
TuiLayer plug.whichkey
|
||||
|
20
layers/plug/whichkey.vim
Normal file
20
layers/plug/whichkey.vim
Normal file
@ -0,0 +1,20 @@
|
||||
vim9script
|
||||
|
||||
const g:which_key_map = {
|
||||
f: {
|
||||
name: 'File',
|
||||
o: ['Poplar', 'open']
|
||||
},
|
||||
v: {
|
||||
name: 'View',
|
||||
f: [":NERDTreeToggle", "nerdtree"]
|
||||
}
|
||||
}
|
||||
|
||||
tui#core#plug#Regist('liuchengxu/vim-which-key', {
|
||||
config: () => {
|
||||
which_key#register('<Space>', "g:which_key_map")
|
||||
nnoremap <silent> <Space> :WhichKey '<Space>'<CR>
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user