On Di, 10 Okt 2017, Igor Forca wrote: > @Thobias, thanks for tips, but not working in my case. Set ft returns "sql", I > am editing relational database SQL file. Manually setting it to lua (for > test), and execute format command does not solve my problem. > > @Tony, thanks for providing help. I have managed to solve a problem with > setting: > :setlocal comments=:-- > and executing format paragraph command. > > But because I don't want to mess other file types (I sometimes need # as > comment when editing some bash files), I set autocommand to fire up only > for .sql file types. Final command I have written in my .vimrc is now: > :autocmd BufEnter *.sql :setlocal comments=:-- > > Problem solved. Thanks a lot to both of you.
What vim version is this? Because I believe, if you enable filetype plugins, setting this option is already done. Check $VIMRUNTIME/ftplugin/sql.vim Christian -- Lieber zweifelhaft als pinselhaft. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
