Skip to content

hy172574895/popup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

<<<<<<< HEAD

popup-vim

just for download

popup.vim

popup.vim可以让vim在底部弹出你自己定义的菜单,并通过按键触发相应的命令。

演示视频:

添加菜单示例

call popup#add('file', '文件',
    \['n', '新建', ":conf ene\<cr>"],
    \['o', '打开', ":browse confirm e\<cr>"],
    \['s', '保存', ":w\<cr>"],
    \['d', '关闭', ":QuitBuffer\<cr>"],
    \['x', '退出', ":confirm qa\<cr>"])

为菜单绑定按键

nmap <expr><m-f> Popup('file')
nmap <expr><m-w> Popup('window')

重复最后一个命令

map <expr><m-.>     popup#last()

推荐配置

查看我的配置: https://github.com/luzhlon/.vim/tree/master/plugin/popup

其中有一些命令来自我的另一个插件util.vim

init

About

just for download

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published