vim and tcomment

21 views
Skip to first unread message

FlashBurn

unread,
Mar 21, 2013, 11:55:24 AM3/21/13
to vim...@googlegroups.com
I have just loaded tcomment plugin, https://github.com/tomtom/tcomment_vim. I code in C and need to be able to do line comments ( // ). For some reason this plugin does only block comments ( /* ... */). I looked through the documentation but was not able to find a way to configure the plugin to do the line comments. Does anybody know how to do it?

Any help is appreciated.

Marc Weber

unread,
Mar 21, 2013, 12:09:35 PM3/21/13
to vim_use
Use github.com/MarcWeber/vim-adddon-commenting which always prefers
those # // like line prefix comments and you're done.

Otherwise this is not a question for the vim mailinglist, but for
github/tomtom/issues -> improve documentation (I hope you've read that)

This is my "view" - there might be more solutions.

Marc Weber

Chris Lott

unread,
Mar 21, 2013, 12:45:04 PM3/21/13
to vim...@googlegroups.com
On Thu, Mar 21, 2013 at 8:09 AM, Marc Weber <marco-...@gmx.de> wrote:
> Use github.com/MarcWeber/vim-adddon-commenting which always prefers
> those # // like line prefix comments and you're done.

Typo in link, should be: https://github.com/MarcWeber/vim-addon-commenting

Nice plugin.

c
--
Chris Lott <ch...@chrislott.org>

Marcin Sztolcman

unread,
Mar 21, 2013, 12:37:24 PM3/21/13
to vim...@googlegroups.com
On 21 mar 2013, at 16:55, FlashBurn <rail.sh...@gmail.com> wrote:

> I have just loaded tcomment plugin, https://github.com/tomtom/tcomment_vim. I code in C and need to be able to do line comments ( // ). For some reason this plugin does only block comments ( /* ... */). I looked through the documentation but was not able to find a way to configure the plugin to do the line comments. Does anybody know how to do it?


For example, from my .vimrc:

let g:tcommentLineC = {
\ 'commentstring': '// %s',
\}

--
Marcin Sztolcman :: http://urzenia.net/ :: http://sztolcman.eu/

rail shafigulin

unread,
Mar 22, 2013, 9:09:53 AM3/22/13
to vim...@googlegroups.com

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/xA7yBFDXb3I/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Thank you it worked. However if you run pathogen this string must be set before pathogen is called. 

Reply all
Reply to author
Forward
0 new messages