vim-dadbod (by tpope) is a modern database interface plugin for Vim and Neovim designed to let you run queries and manage database connections directly from your editor. Unlike older database plugins which required many commands or separate UI components, dadbod uses a simple model: you connect using a single connection URL and issue queries with a unified :DB command. It supports a wide array of backends — from PostgreSQL, MySQL, SQLite, Redis, MongoDB, BigQuery, Snowflake and more — via adapters. Results of queries are displayed in preview windows or splits inside Vim, allowing you to stay in your editing context rather than switching to a separate tool. You can also run ranges or whole buffers as SQL queries or pass files to the database CLI. The plugin is designed to be project-aware: connection URLs can be defined per project rather than globally.
Features
- Define database connections via a single URL and connect with :DB command
- Execute queries interactively or on selected ranges/files and display results inside Vim splits/preview
- Support for many database types including relational (PostgreSQL, MySQL, SQLite) and NoSQL/analytics (MongoDB, BigQuery, Snowflake)
- Project-local configuration of connections so you can work per-project context
- Ability to spawn interactive database consoles from within Vim via the same command
- Extensible adapter architecture allowing custom backends or integration with other plugins (e.g., completion or UI enhancements)