Skip to content

DEPRECATED!!! - Easy rails schema (or structure.sql) table finder for neovim / vim

Notifications You must be signed in to change notification settings

rafcamlet/show-me-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShowMeDB

Easy rails schema (or structure.sql) table finder for neovim / vim

show me db

Instalation

Use your favorite plugin manager or copy this repo and put files in corensponding folders.

Example for vim-plug
call plug#begin('~/.vim/plugged')

Plug 'rafcamlet/show-me-db'

call plug#end()

Usage

ShowMeDB prefers schema.rb over structure.sql. All commands has bang version, which force using structure.sql. Respectively for mappings is force sufix.

:ShowMeDB

Moves you to table in your schema.rb / structure.sql file, based on your model's name or self.table_name if specified.

:ShowMeDB table_name

Moves you to table, based on typed table's name. Press <tab> to autocomplete.

:ShowMeDBList

Open buffer with tables names listed. Press <enter> to jump to table.

<plug>show_me_db_fzf
<plug>show_me_db_fzf_force

If junegunn/fzf is instaled, open fuzzy seraching with tables. You can map these to custom keys. Don't forget use recursing allow mapping. Example nmap <leader>db <plug>show_me_db_fzf_force.

<plug>show_me_db_word_under_cursor
<plug>show_me_db_word_under_cursor_force

Lookup for table name under currsor.

Settings

Default mappings:

  nmap <leader>db <plug>show_me_db_fzf
  nmap <leader>gdb <plug>show_me_db_word_under_cursor

Set let g:ShowMeDB_default_mapping = 0 to disable default mappings.

FZF integration

fzf integration gif

About

DEPRECATED!!! - Easy rails schema (or structure.sql) table finder for neovim / vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published