Tuesday, October 10, 2017

Re: How to set comment character as double dash in front of formatted text?

@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.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: