On Saturday, October 20, 2012 7:05:41 PM UTC+1, Arindam Mukherjee wrote:
> Hi,
>
>
>
> Is there a way to enforce certain coding standards for C or C++ code,
>
> beyond indentation (for which I found google.vim). Stuff like:
>
>
>
> 1. Always put a single space after an if, while, for, etc and the
>
> following left-parenthesis.
>
> 2. Always put spaces around operators.
>
>
>
> There could be more.
>
>
>
> I tried writing a set of search replace strings and mapping them to a
>
> single key-sequence. However, I'm having difficulty distinguishing
>
> between content that's inside a double-quoted string and outside it.
>
>
>
> Thanks,
>
> Arindam
Wierdly I am just in the process of starting a script that does this sort of thing.
https://github.com/evanswebdesign/vim_tidy_code
It is in the very very early stages and at the minute I'm just concentrating on PHP. I'm basically going through all my code in all my projects to find things that are wrong that I can use the script to correct.
I've only been using vim for a year of so and git even less than that so I'm still learning various things.
I've not posted it in to the scripts site as yet because it's in such an infant stage.
John
--
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
Sunday, October 21, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment