Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/statico/vim-javascript-sql
Vim plugin for highlighting SQL inside JavaScript template literals
https://github.com/statico/vim-javascript-sql
javascript neovim sql vim
Last synced: 4 days ago
JSON representation
Vim plugin for highlighting SQL inside JavaScript template literals
- Host: GitHub
- URL: https://github.com/statico/vim-javascript-sql
- Owner: statico
- Created: 2017-11-15T04:39:15.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T20:10:44.000Z (over 3 years ago)
- Last Synced: 2024-05-02T06:02:04.008Z (6 months ago)
- Topics: javascript, neovim, sql, vim
- Language: Vim script
- Size: 58.6 KB
- Stars: 14
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Template Literal SQL Highlighting for Vim
This is a [Vim](http://www.vim.org/) plugin that provides highlighting inside SQL [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) when using a module like [sql-template-strings](https://github.com/felixfbecker/node-sql-template-strings). It kind of works.
![screenshot](https://raw.githubusercontent.com/statico/vim-javascript-sql/master/screenshot.png)
This module is experimental and strongly inspired by [vim-graphql](https://github.com/jparise/vim-graphql).
## Installation
### Using [Plug](https://github.com/junegunn/vim-plug)
1. Add `Plug 'statico/vim-javascript-sql'` to `~/.vimrc`
1. `vim +PluginInstall +qall`### Using [Vundle](https://github.com/VundleVim/Vundle.vim)
1. Add `Plugin 'statico/vim-javascript-sql'` to `~/.vimrc`
1. `vim +PluginInstall +qall`### Using [Pathogen](https://github.com/tpope/vim-pathogen)
1. `cd ~/.vim/bundle`
1. `git clone https://github.com/statico/vim-javascript-sql.git`## Configuration
This plugin uses the generic SQL syntax by default. If you want to use a different dialect, like PostgreSQL, put something like this in your .vimrc:
```vim
let g:javascript_sql_dialect = 'pgsql'
```