On Tue, 10 Aug 2010, Wayne wrote: > > > > I do something similar for PHP with this file: > > > > ===== ~/.vim/after/syntax/php.vim ===== > > syn region phpComment start=+/\*+ end=+\*/+ contained extend > > contains=phpTodo fold > > ======================================= > > > > > > For this, you'd want to create the file (and directories, if they don't > > exist): > > > > ===== ~/.vim/after/syntax/cpp.vim ===== > > syn match comment "\v(^\s*//.*\n)+" contains=cComentGroup fold extend > > ======================================= > > > > > hi Benjamin, > I mean write something to script file such as _vimrc in Win32, not to > write to cpp.vim > Is there any way to do this. >
Sorry, I should have been more explicit. That's what I'm doing above. Note the path of the files: ~/.vim/after/syntax/ The '~' indicates my home directory, so that's in my personal .vim directory. Based on the default setting of 'runtimepath', Windows uses 'vimfiles' instead of '.vim'. Using Vim 7.3e beta under Windows 7, your 'syn match' line worked if I put it in the file: C:\Users\bhaskell\vimfiles\after\syntax\cpp.vim Under pre-Vista rules, IIRC: C:\Documents and Settings\bhaskell\vimfiles\after\syntax\cpp.vim (Replacing bhaskell with your own username, of course.) -- Best, Ben -- 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
