Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #9 from ringerc/readme-pathogen

Document installation using Pathogen
  • Loading branch information...
commit 7f5591cd3fdabd294e240cc9574b1cb8b7803077 2 parents 2e8d8ab + a74a6fc
@exu authored
Showing with 33 additions and 4 deletions.
  1. +33 −4
@@ -8,11 +8,40 @@ Vim Postgresql syntax file
* Filenames: *.pgsql *.plpgsql
* URL:
-If you need to highlight any of \*.sql files
-you can insert this lines to your *filetype.vim*
- au BufNewFile,BufRead *.sql setf pgsql
+If you use [Pathogen]( for plugin
+management, simply clone this repository into `~/.vim/bundle` to make the
+`pgsql` syntax type available:
-Or load it using the default sql.vim:
+ git clone ~/.vim/bundle/pgsql.vim
+If you prefer to install manually, copy `syntax/pgsql.vim` into your
+`~/.vim/syntax/` directory, creating it if necessary.
+Files with the suffix `.pgsql` will use the pgsql highlighting automatically.
+To enable `pgsql` syntax for any open buffer, use:
+ :set syntax=pgsql
+Enabling for all .sql files
+You can make `pgsql.vim` the default for SQL syntax by adding this line to your
let g:sql_type_default = 'pgsql'
+This tells the `sql.vim` module to use the `pgsql` dialect.
+Alternately, you can use an autocmd in your `~/.vim/filetype.vim` to enable it
+for all `.sql` files or some finer pattern:
+ autocmd BufNewFile,BufRead *.sql setf pgsql
+You do not need both. If in doubt, use the first method.
Please sign in to comment.
Something went wrong with that request. Please try again.