Vim sql omnicomplete

I am trying to use SQL dynamic auto-completion (omni menu) function in vim, but it does not work.

I use the Yakuake terminal in Linux Mint, and the DBext vim plugin works.

I can make Cx Co , but it only shows tables, and I need columns. I also cannot drill left and right.

If Im is in insert mode and I press Cc , then it acts like I pressed Esc and returns to normal mode.

When I type :SQLSetType pgsql , it says "not an editor command".

+4
source share
3 answers

I added

 filetype plugin on 

in my .vimrc file and the hotkey is crtl + shift + c (for example, if you want to copy from the terminal) after you press this combination, you press t to show all the tables and then to the left to go to the columns selected table

the rest is in

 :h sql.txt 
+1
source

OK, so the ft_sql documentation seems that the shortcut to access the columns is not Cc , but actually CC c , which can mean Ctrl - Shift - C and then press C , or it can mean Ctrl - LCtrl - C.

Unfortunately, this is more than a little strange, so keep trying combining and see if you can find what works!

+1
source

For those who land here: I created a sql plugin for VIM that also has intellisense: https://github.com/cosminadrianpopescu/vim-sql-workbench . It is based on SQL Workbench.

+1
source

All Articles