1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-26 15:30:04 +08:00
SpaceVim/docs/cn/api/cmdlinemenu.md

32 lines
597 B
Markdown
Raw Normal View History

2020-08-25 15:55:19 +08:00
---
title: "cmdlinemenu 函数"
2020-08-25 17:06:48 +08:00
description: "cmdlinemenu 函数提供了一套通过命令行进行选择的快捷接口。"
2020-08-25 15:55:19 +08:00
lang: zh
---
# [公共 API](../) >> cmdlinemenu
<!-- vim-markdown-toc GFM -->
- [简介](#简介)
<!-- vim-markdown-toc -->
## 简介
2020-08-25 17:06:48 +08:00
cmdlinemenu 函数提供了一套通过命令行进行选择的快捷接口。
以下是一个使用该函数的示例:
```vim
let menu = SpaceVim#api#import('cmdlinemenu')
let ques = [
\ ['basic mode', function('s:basic_mode')],
\ ['dark powered mode', function('s:awesome_mode')],
\ ]
call menu.menu(ques)
```
2020-08-25 15:55:19 +08:00