简体   繁体   中英

How to write a GUI function/command in gVim?

I only found three types of dialog in gVim:

:let n = inputdialog("value for shiftwidth", &sw)
:call confirm("Save changes?", "&Yes\n&No\n&Cancel")
:browse e

Can I write a GUI Dialog, such as a ColorPick-Dialog to choose RGB value?
Does gVim support custom GUI widget?

No, it is not possible.

However you can make up your own DLL and libcall() . If your library must return a string (pointer to a zero-terminated array of characters) it will leak.

我不相信gVim支持任何自定义“GUI”小部件,但您总是可以使用显示该对话框的外部程序并将输出写入stdout

No, it's not possible.

Vim (in general) does not support any GUI boxes. However, if you wish to extend Vim, it is open source, so all you have to do is go to www.vim.org , download the source and hack. Though, it will probably take a bit more effort to accomplish what you want than just three lines.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM