Skip to content

mmngreco/dbee.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbee.nvim

dbee.nvim is a SQL explorer in vim with Python as backend. Allow you setup a database connection using an url which is processed by SQLAlchemy and returns the query result in a new buffer.

dependencies

Python

  • SQLAlchemy
  • Pandas
  • pynvim

Installation

Add de following in your vimrc:

Plug 'mmngreco/dbee.nvim', { 'do': './install.py' }

Note: python3 ./install.py will install dependencies required in requirements-base.txt

If do your prefer to manage dependencies yourself, you can add the following instead:

Plug 'mmngreco/dbee.nvim'

and then you will need to execute pip install -r requirements-base.py in the python environment used by vim.

Update remote plugins

After running plug installation, you will need to execute :UpdateRemotePlugins to include the python code in vim, and restart.

:UpdateRemotePlugins
:qa

Usage

  • :DBeeSetConnection <url>: replace <url> with your desired connection string.
  • :DBeeInfo: prints out the current connetion string.
  • :'<,'>DBeeQuery: only in visual mode, returns the query output in a new buffer.

Mapping

No mappings defined by default. You can define your own mapping adding something like this in your vimrc:

vnoremap <C-q> :DBeeQuery<cr>
vnoremap <C-c> :DBeeSetConnection<cr><cr>

Development

conda create -n dbee.nvim python=3.8
conda activate dbee.nvim
pip install -r requirements.txt
./run.sh vim
./run.sh ipy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages