惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threat Research - Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
Secure Thoughts
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
AWS News Blog
AWS News Blog
美团技术团队
G
Google Developers Blog
宝玉的分享
宝玉的分享
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
InfoQ
小众软件
小众软件
Google DeepMind News
Google DeepMind News
P
Privacy & Cybersecurity Law Blog
Stack Overflow Blog
Stack Overflow Blog
Webroot Blog
Webroot Blog
D
DataBreaches.Net
IT之家
IT之家
PCI Perspectives
PCI Perspectives
人人都是产品经理
人人都是产品经理
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
SecWiki News
SecWiki News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
T
Threatpost
P
Proofpoint News Feed
Y
Y Combinator Blog
Cloudbric
Cloudbric
T
Tor Project blog
量子位
博客园_首页
B
Blog
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
D
Darknet – Hacking Tools, Hacker News & Cyber Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Build Real Dialogs in Vim — No Python, No Dependencies
Linwei · 2026-04-30 · via DEV Community

Have you ever tried to build a form in Vim? Not just a single prompt — a real form, with text inputs, radio buttons, checkboxes, and buttons, all in one window?

If you have, you know the pain.

The Old Way Hurts

Vim gives you input() for single-line prompts and inputlist() for picking from a list. That's it.

Want to ask the user for a project name? Easy:

let name = input('Project name: ')

Enter fullscreen mode Exit fullscreen mode

Now add an email field:

let name = input('Project name: ')
let email = input('Email: ')

Enter fullscreen mode Exit fullscreen mode

Two blocking prompts. The user fills in the name, presses Enter, then fills in the email. They can't go back to fix the name. There is no visual layout. No way to see both fields at once.

Now add a language choice:

let name = input('Project name: ')
let email = input('Email: ')
let lang = inputlist(['1. Python', '2. Go', '3. Rust'])

Enter fullscreen mode Exit fullscreen mode

Three separate interactions for three fields. This is not a form. This is an interrogation.

What if the user wants to change the project name after picking a language? Start over.

What if you also need a checkbox for "Initialize git repo"? There is no inputcheck() in Vim. You would have to fake it with yet another input() call — input('Init git? (y/n): ') — and parse the answer yourself.

This does not scale.

A Better Way: vim-quickui Dialog

vim-quickui is a TUI widget library for Vim and NeoVim. It provides menus, listboxes, textboxes, and more — all in pure VimScript with no external dependencies.

In version 1.5.0, it ships a data-driven dialog system. You declare your controls as a list of dictionaries. QuickUI renders them in a popup window. When the user is done, you get all values back as a single dictionary.

No +python. No Lua. No external tools. Just VimScript.

Install

With vim-plug:

Plug 'skywind3000/vim-quickui'

Enter fullscreen mode Exit fullscreen mode

Or use Vim's built-in packages:

cd ~/.vim/pack/vendor/start && git clone https://github.com/skywind3000/vim-quickui

Enter fullscreen mode Exit fullscreen mode

Optional step, you can tell quickui to use Unicode borders:

let g:quickui_border_style = 2

Enter fullscreen mode Exit fullscreen mode

That's it. No build step. No dependencies.

Your First Dialog

Let's build a simple settings dialog. Put this in a function and call it:

function! MySettings()
    let items = [
        \ {'type': 'label', 'text': 'Settings:'},
        \ {'type': 'input', 'name': 'name', 'prompt': 'Name:',
        \  'value': 'test'},
        \ {'type': 'radio', 'name': 'choice', 'prompt': 'Pick:',
        \  'items': ['A', 'B', 'C']},
        \ {'type': 'check', 'name': 'flag',
        \  'text': 'Enable Feature'},
        \ {'type': 'button', 'name': 'confirm',
        \  'items': [' &OK ', ' &Cancel ']},
        \ ]
    let result = quickui#dialog#open(items, {'title': 'Settings'})
    echo result
endfunc

Enter fullscreen mode Exit fullscreen mode

Call :call MySettings() and you get this:

dialog screenshot

A real dialog. In Vim. With multiple controls.

Let's break down what happened:

  • label — static text at the top, not focusable
  • input — a text field with a prompt label and a default value
  • radio — a group of options, only one can be selected
  • check — a checkbox you can toggle on or off
  • button — a row of buttons at the bottom

You navigate with Tab and Shift-Tab. You type in input fields. You press Space to toggle checkboxes or switch radio options. You press Enter or click a button to confirm.

All values come back in the result dictionary.

How Did the User Exit?

When the dialog closes, you need to know: did the user confirm or cancel? And if they confirmed, did they press a button or hit Enter from an input field?

The return value has two key fields:

  • button_index — which button was pressed (1-based), or 0 for Enter, or -1 for cancel
  • button — the name of the button control, or '' if none

Here is the pattern you will use in every dialog:

let r = quickui#dialog#open(items, opts)

if r.button_index == -1
    " User pressed ESC, Ctrl-C, or clicked the close button.
    " Dialog was cancelled.
    echo 'Cancelled'
elseif r.button_index == 0
    " User pressed Enter while on an input, radio, or checkbox.
    " Treat this as a confirm.
    echo 'Confirmed (Enter): name=' . r.name
else
    " User clicked a button. button_index is 1-based:
    " 1 = first button, 2 = second button, etc.
    echo 'Button pressed: ' . r.button . ' #' . r.button_index
endif

Enter fullscreen mode Exit fullscreen mode

A few things to note:

  • button_index is 1-based, not 0-based. The first button returns 1. This is consistent with Vim's built-in confirm().
  • Cancel still returns values. Even after ESC, r.name and other fields contain whatever the user typed before cancelling. This is useful if you want to restore state when reopening the dialog.
  • button tells you which button row was clicked. If you have multiple button rows with different names, this field tells you which group the click came from.

In most cases, you just need this:

let r = quickui#dialog#open(items, opts)

if r.button_index >= 1
    " User clicked a button — do something with the values
    echo 'Name: ' . r.name
endif

Enter fullscreen mode Exit fullscreen mode

Or if you have OK and Cancel buttons:

" ' &OK ' is button 1, ' &Cancel ' is button 2
if r.button_index == 1
    echo 'Accepted: ' . r.name
endif

Enter fullscreen mode Exit fullscreen mode

A Real-World Example

Let's build something closer to a real plugin. A "New Project" form with all the control types:

function! NewProject()
    let items = [
        \ {'type': 'label', 'text': 'Create New Project:'},
        \ {'type': 'input', 'name': 'project_name', 'prompt': 'Project:'},
        \ {'type': 'input', 'name': 'email', 'prompt': 'Email:'},
        \ {'type': 'dropdown', 'name': 'language', 'prompt': 'Language:',
        \  'items': ['Python', 'JavaScript', 'Go', 'Rust', 'C++'],
        \  'value': 0},
        \ {'type': 'dropdown', 'name': 'build', 'prompt': 'Build:',
        \  'items': ['Make', 'CMake', 'Cargo', 'npm', 'pip'],
        \  'value': 0},
        \ {'type': 'radio', 'name': 'license', 'prompt': 'License:',
        \  'items': ['&MIT', '&Apache', '&GPL', '&Proprietary'],
        \  'value': 0},
        \ {'type': 'check', 'name': 'git_init',
        \  'text': 'Initialize git repo', 'value': 1},
        \ {'type': 'check', 'name': 'ci',
        \  'text': 'Add CI config'},
        \ {'type': 'button', 'name': 'confirm',
        \  'items': [' &Create ', '  Cancel  ']},
        \ ]

    let opts = {'title': 'New Project', 'w': 50, 'focus': 'project_name'}
    let result = quickui#dialog#open(items, opts)

    " Check if the user clicked "Create" (button 1)
    if result.button_index == 1
        " dropdown returns an index — convert it to text
        let languages = ['Python', 'JavaScript', 'Go', 'Rust', 'C++']
        let builds = ['Make', 'CMake', 'Cargo', 'npm', 'pip']

        echo 'Project:  ' . result.project_name
        echo 'Email:    ' . result.email
        echo 'Language: ' . languages[result.language]
        echo 'Build:    ' . builds[result.build]
        echo 'License:  ' . result.license
        echo 'Git:      ' . (result.git_init ? 'yes' : 'no')
        echo 'CI:       ' . (result.ci ? 'yes' : 'no')
    else
        echo 'Cancelled'
    endif
endfunc

Enter fullscreen mode Exit fullscreen mode

Screenshot:

This example shows several things:

Dropdown controls display a collapsed selection field. Press Enter or Space to open a popup list and pick an option. The return value is a 0-based index — you need to map it back to the text yourself.

opts.focus sets the initial focus to the project_name input, so the user can start typing right away.

Prompt alignment happens automatically. Notice how Project:, Email:, Language:, Build:, and License: are all left-aligned, and their controls start at the same column. QuickUI calculates the longest prompt and pads the rest.

Hotkeys are marked with & in button, radio, and checkbox text. &Create makes C a hotkey — press C anywhere in the dialog (when not typing in an input) to activate that button. Same for &MIT, &Apache, etc. in the radio group.

Tips

A few things I learned while building dialogs:

Start with opts.w. If you don't set a width, QuickUI auto-calculates one. This works for simple dialogs, but for forms with multiple fields, setting an explicit width (like 50) gives a more consistent layout.

Use 'value' for defaults. Every control accepts a value field. Inputs take a string, radios/dropdowns/checkboxes take a number. Pre-filling defaults saves the user time.

Checkboxes don't need prompts. Unlike input and radio, checkboxes look natural without a prompt — the text is the label. But if you want them to align with other prompted controls, you can add a 'prompt' field.

Name your button rows. If you have one button row, the default name 'button' is fine. But if you have two rows (e.g., "Apply/Reset" and "OK/Cancel"), give them different names so you can tell which row was clicked.

What's Next

This tutorial covered the basics. The dialog system has more to offer:

  • Input history — inputs can share history across calls with the history field
  • Vertical radio — when options are long, radio groups auto-switch to vertical layout
  • Validator — a callback function that checks values before the dialog closes
  • Mouse support — click on any control to focus, toggle, or activate it
  • Custom colors and borders — match your Vim color scheme

For the full reference, see the Dialog Guide in the vim-quickui repository.

Beyond Dialogs

vim-quickui is more than just dialogs. It also provides:

  • Menu bar — a dropdown menu at the top of the screen, like Borland/Turbo C++
  • Context menu — a right-click style popup menu
  • Listbox — a scrollable list with search
  • Textbox — display text in a popup window
  • Preview window — peek at file contents near the cursor
  • Input box — a simple single-line prompt (lighter than a full dialog)
  • Terminal — run shell commands in a popup

All in pure VimScript. All working on both Vim and NeoVim.

Check out the full documentation for details.


If you find vim-quickui useful, star it on GitHub. It helps others discover the project.

Questions or ideas? Open an issue or leave a comment below.