On Wed, 11 Aug 2010, Wayne wrote: > On Tue, Aug 10, 2010 at 7:35 PM, Benjamin R. Haskell wrote: > > > > > 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 > > Sorry Ben, I should also have been more explicit. > On my installation of vim, there is no "vimfiles" directory per user, > and maybe caused by lack of full formal installation.
It's not a full vimfiles installation; I created those directories just for the one-line file. It's really the preferred way to do this, as there are built-in mechanisms to handle it. See: :help mysyntaxfile-add (...would've referred you there in the first place if I'd known of its existence) Except, on Windows, the default name for '.vim' is 'vimfiles' (since Windows and the rest of the computing universe deal differently with 'dot' files). > I usually modified the _vimrc file within the installation directory, > or the project specific _vimrc file within the project directory. > My question is, can I just modify these two _vimrc file to achieve the > same object to that by writing a line to cpp.vim Not sure if you were just dissuaded by the lack of a ~/vimfiles directory, but you should really consider just adding the one-line file in your home directory. It's much easier. By adding it to _vimrc explicitly, you have to set up your own handling for changing files. (You wouldn't want a C++ syntax file applied to .txt files, for example.) Plus, the coördination between the system-wide syntax/cpp.vim and your own modifications becomes trickier. -- 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
