RE: Question regarding 'diffput' 'diffget'
meino.cramer wrote: at my work and at home I often I use vimdiff -- its simply great! If there is a change in one of the files, which is missing in the other file and you want to add the difference to the other file, you can diffput the stuff while the cursor is in the according lines. On the other side there is also a diffget which should work from the other files' side. But how can I move the cursor on the non-existing lines? Put the cursor on the line just after the non-existing lines, then type (in normal mode) do (diff obtain = :diffget). Or, in the other window, put the cursor on the existing lines, then type dp (dp = :diffput). 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
Enforcing coding standards using vim
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 -- 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
Re: Enforcing coding standards using vim
Is there a way to enforce certain coding standards for C or C++ code, beyond indentation (for which I found google.vim). Stuff like: If there is a (external) style checker available that fits your needs, you could use it as compiler (or via plugins like syntastic or checksyntax) to identify lines that don't meet your requirements. Alternatively, you could define a after/syntax/c/style.vim file and define syntax groups that match highlight frequent mistakes. But I don't think that's a good idea in your case though. Regards -- 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