Re: color loading sequence in GVIM
Thanks folks, I got it working now. From: A.J.Mechelynck [EMAIL PROTECTED] To: Eric Leenman [EMAIL PROTECTED] CC: vim@vim.org, [EMAIL PROTECTED] Subject: Re: color loading sequence in GVIM Date: Tue, 06 Feb 2007 04:01:01 +0100 Eric Leenman wrote: Hi, Following your comments, I've converted my file to a scheme and placed it in C:\Program Files\Vim\vimfiles\colors For testing I also placed a bw.vim and a print_bw.vim in it. The problem now is that it doesn't get loaded. When I type :colorscheme eric it says E185: Can not find colorscheme eric :colorscheme eric loads (on Windows, with the default 'runtimepath') the first one found of the following (and gives an error if none is found): 1. $HOME/vimfiles/colors/eric.vim 2. $VIM/vimfiles/colors/eric.vim 3. $VIMRUNTIME/colors/eric.vim 4. $VIM/vimfiles/after/colors/eric.vim 5. $HOME/vimfiles/after/colors/eric.vim The script should set g:colors_name to eric. 1 and 5 are for private single-user files, 2 and 4 for system-wide files (which all users will see identically on multiuser system), 3 for whatever is distributed together with Vim (and users shouldn't meddle with it, as any upgrade can silently erase any changes you make there). When I type echo g:colors_name it says undefined variable When I type :colorscheme print_bw it switches to this scheme When I type echo g:colors_name it says print_bw Copying the print_bw file to print_bw2.vim and changing only the line let g:colors_name = blabla gives also the same errors with my ëricscheme Why Rgds, Eric The :scriptnames command will tell you exactly which scripts were sourced, and in which sequence. Best regards, Tony. -- Peanut Blossoms 4 cups sugar 16 tbsp. milk 4 cups brown sugar 4 tsp. vanilla 4 cups shortening 14 cups flour 8 eggs 4 tsp. soda 4 cups peanut butter 4 tsp. salt Shape dough into balls. Roll in sugar and bake on ungreased cookie sheet at 375 F. for 10-12 minutes. Immediately top each cookie with a Hershey's kiss or star pressing down firmly to crack cookie. Makes a hell of a lot. _ Search for grocery stores. Find gratitude. Turn a simple search into something more. http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_gratitudeFORM=WLMTAG
Re: color loading sequence in GVIM
Eric Leenman wrote: Hi, I'm doing a reinstall of gvim and placing my color and font setting in a seperate file in the plugin. This file is located in: C:\Program Files\Vim\vimfiles\plugin And it contains the following: [START OF FILE] :hi Commentctermfg=darkgreen gui=None guifg=darkgreen :hi Statement ctermfg=blue gui=None guifg=blue :hi Identifier ctermfg=darkredgui=None guifg=darkred :hi PreProcctermfg=blue gui=None guifg=darkblue :hi Type ctermfg=darkgray gui=None guifg=darkgray :hi Constant ctermfg=redgui=None guifg=red GUI font instellingen set guifont=courier:h7:w7 [END OF FILE] What now happens is that the font is taken over but the colors aren't For example: When I type :hi Comment vim returns: Comment xxx term=bold ctermfg=1 guifg=Blue What do I do wrong? Regards, Eric _ Check out all that glitters with the MSN Entertainment Guide to the Academy Awards® http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2 Colour files should go into the vimfiles/colors directory, and needs to be named according to the filetype you want it to be used for. For instance, sql.vim will be loaded for .sql files. You can further specify what filetype to use for a file by creating a filetypes.vim file in the vimfiles/ftdetect directory. For more info about this, see :help ftdetect Also, :help syntax Hope that helps -- Albie Janse van Rensburg (neonpill) Registered Linux User 438873 | http://counter.li.org
Re: color loading sequence in GVIM
Albie Janse van Rensburg wrote: Eric Leenman wrote: Hi, I'm doing a reinstall of gvim and placing my color and font setting in a seperate file in the plugin. This file is located in: C:\Program Files\Vim\vimfiles\plugin And it contains the following: [START OF FILE] :hi Commentctermfg=darkgreen gui=None guifg=darkgreen :hi Statement ctermfg=blue gui=None guifg=blue :hi Identifier ctermfg=darkredgui=None guifg=darkred :hi PreProcctermfg=blue gui=None guifg=darkblue :hi Type ctermfg=darkgray gui=None guifg=darkgray :hi Constant ctermfg=redgui=None guifg=red GUI font instellingen set guifont=courier:h7:w7 [END OF FILE] What now happens is that the font is taken over but the colors aren't For example: When I type :hi Comment vim returns: Comment xxx term=bold ctermfg=1 guifg=Blue What do I do wrong? Regards, Eric _ Check out all that glitters with the MSN Entertainment Guide to the Academy Awards® http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2 Colour files should go into the vimfiles/colors directory, Yes. and needs to be named according to the filetype you want it to be used for. For instance, sql.vim will be loaded for .sql files. No (see below). You can further specify what filetype to use for a file by creating a filetypes.vim file in the vimfiles/ftdetect directory. ... a filetype.vim file in a directory in 'runtimepath', *and/or* one or more Vim script(s) of _any_ name in the ftdetect subdirectory of a directory in 'runtimepath'. For more info about this, see :help ftdetect Also, :help syntax and also (more important) :help :colorscheme Hope that helps The files in the colors directory are what is called color schemes in Vim parlance, and correspond to what would be called themes or skins in other programs. Their names bear *no relation* to the files to be edited with them. Vim never loads them automatically but only as a result of the :colorscheme name command, which is roughly equivalent to :runtime colors/name.vim where name.vim is the name of an arbitrary colorscheme script. The highlight groups to use for files of a given syntax are in the syntax subdirectory of directories in 'runtimepath', and they may define default colors for highlight groups not predefined in Vim, by using :highlight default commands (see :help :highlight-default). -- Best regards, Tony. The average income of the modern teenager is about 2 a.m.
Re: color loading sequence in GVIM
A.J.Mechelynck wrote: [...] The highlight groups to use for files of a given syntax are in the oops. The highlight groups to use for files of a given syntax are defined by the script syntaxname.vim (where syntaxname is the relevant setting of the 'syntax' option), living in the syntax subdirectory of directories in 'runtimepath', and they may define default colors for highlight groups not predefined in Vim, by using :highlight default commands (see :help :highlight-default). Best regards, Tony. -- Canada Bill Jone's Motto: It's morally wrong to allow suckers to keep their money. Supplement: A .44 magnum beats four aces.
Re: color loading sequence in GVIM
Albie Janse van Rensburg wrote: A.J.Mechelynck wrote: Albie Janse van Rensburg wrote: Eric Leenman wrote: Hi, I'm doing a reinstall of gvim and placing my color and font setting in a seperate file in the plugin. This file is located in: C:\Program Files\Vim\vimfiles\plugin And it contains the following: [START OF FILE] :hi Commentctermfg=darkgreen gui=None guifg=darkgreen :hi Statement ctermfg=blue gui=None guifg=blue :hi Identifier ctermfg=darkredgui=None guifg=darkred :hi PreProcctermfg=blue gui=None guifg=darkblue :hi Type ctermfg=darkgray gui=None guifg=darkgray :hi Constant ctermfg=redgui=None guifg=red GUI font instellingen set guifont=courier:h7:w7 [END OF FILE] What now happens is that the font is taken over but the colors aren't For example: When I type :hi Comment vim returns: Comment xxx term=bold ctermfg=1 guifg=Blue What do I do wrong? Regards, Eric _ Check out all that glitters with the MSN Entertainment Guide to the Academy Awards® http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2 Colour files should go into the vimfiles/colors directory, Yes. and needs to be named according to the filetype you want it to be used for. For instance, sql.vim will be loaded for .sql files. No (see below). You can further specify what filetype to use for a file by creating a filetypes.vim file in the vimfiles/ftdetect directory. ... a filetype.vim file in a directory in 'runtimepath', *and/or* one or more Vim script(s) of _any_ name in the ftdetect subdirectory of a directory in 'runtimepath'. For more info about this, see :help ftdetect Also, :help syntax and also (more important) :help :colorscheme Hope that helps The files in the colors directory are what is called color schemes in Vim parlance, and correspond to what would be called themes or skins in other programs. Their names bear *no relation* to the files to be edited with them. Vim never loads them automatically but only as a result of the :colorscheme name command, which is roughly equivalent to :runtime colors/name.vim where name.vim is the name of an arbitrary colorscheme script. The highlight groups to use for files of a given syntax are in the syntax subdirectory of directories in 'runtimepath', and they may define default colors for highlight groups not predefined in Vim, by using :highlight default commands (see :help :highlight-default). Absolutely. I had my syntax file and colorschemes info mixed up. I hope the OP reads your corrections. _Syntax_ files need to be named according to their application (language), whereas colorscheme files are used to change the colours of text _according_to_the_syntax_ file definition. The colorscheme effectively is applied over the syntax definition. Indeed. This also means that :syntax on reloads the current colorscheme (if any, or sets the default colours if none), which may explain why Eric didn't see his colour highlights. Note that since many syntax scripts define their color highlight groups by linking them to the default groups, setting highlights for said default groups will usually go a long way towards colouring everything. (For instance, by default the colours of the Comment group are reused for cComment, htmlComment, vimComment, etc., so unless you want to use different colours for each of these -- which IMHO would be rather pointless -- you can content yourself with defining Comment highlights and the various somethingComment groups will all be set to that.) :help :colorscheme indeed. The OP is talking about a colorscheme file though (the first part, defining highlight groups), which should be placed in vimfiles/colors. As for the guifont setting, I personally do it in my vimrc file, but afaik it should work in a colorscheme file as well. From what I can see, the highlight settings are loaded into a colorscheme (which will have the name of the .vim file containing them), so by running :colorscheme filename your highlight groups will get set, Eric. First move your file into the vimfiles/colors directory to avoid unpredictable results. Best regards, Tony. -- The USA is so enormous, and so numerous are its schools, colleges and religious seminaries, many devoted to special religious beliefs ranging from the unorthodox to the dotty, that we can hardly wonder at its yielding a more bounteous harvest of gobbledygook than the rest of the world put together. -- Sir Peter Medawar
Re: color loading sequence in GVIM
Hi, Following your comments, I've converted my file to a scheme and placed it in C:\Program Files\Vim\vimfiles\colors For testing I also placed a bw.vim and a print_bw.vim in it. The problem now is that it doesn't get loaded. When I type :colorscheme eric it says E185: Can not find colorscheme eric When I type echo g:colors_name it says undefined variable When I type :colorscheme print_bw it switches to this scheme When I type echo g:colors_name it says print_bw Copying the print_bw file to print_bw2.vim and changing only the line let g:colors_name = blabla gives also the same errors with my ëricscheme Why Rgds, Eric Header information {{{ Remove all existing highlighting. {{{ == set background=light hi clear if exists(syntax_on) syntax reset endif === }}} Name the scheme eric {{{ let g:colors_name = eric === }}} Define colorscheme as visual C++ {{{ == hi Commentcterm=NONE ctermfg=darkgreen ctermbg=white gui=NONE guifg=darkgreen guibg=white hi Statement cterm=NONE ctermfg=blue ctermbg=white gui=NONE guifg=blue guibg=white hi Identifier cterm=NONE ctermfg=darkredctermbg=white gui=NONE guifg=darkred guibg=white hi PreProccterm=NONE ctermfg=blue ctermbg=white gui=NONE guifg=darkblue guibg=white hi Type cterm=NONE ctermfg=darkgray ctermbg=white gui=NONE guifg=darkgray guibg=white hi Constant cterm=NONE ctermfg=red ctermbg=white gui=NONE guifg=red guibg=white === }}} vim60: set foldmethod=marker: {{{ }}} From: A.J.Mechelynck [EMAIL PROTECTED] To: Albie Janse van Rensburg [EMAIL PROTECTED] CC: Eric Leenman [EMAIL PROTECTED], vim@vim.org Subject: Re: color loading sequence in GVIM Date: Mon, 05 Feb 2007 17:01:57 +0100 Albie Janse van Rensburg wrote: A.J.Mechelynck wrote: Albie Janse van Rensburg wrote: Eric Leenman wrote: Hi, I'm doing a reinstall of gvim and placing my color and font setting in a seperate file in the plugin. This file is located in: C:\Program Files\Vim\vimfiles\plugin And it contains the following: [START OF FILE] :hi Commentctermfg=darkgreen gui=None guifg=darkgreen :hi Statement ctermfg=blue gui=None guifg=blue :hi Identifier ctermfg=darkredgui=None guifg=darkred :hi PreProcctermfg=blue gui=None guifg=darkblue :hi Type ctermfg=darkgray gui=None guifg=darkgray :hi Constant ctermfg=redgui=None guifg=red GUI font instellingen set guifont=courier:h7:w7 [END OF FILE] What now happens is that the font is taken over but the colors aren't For example: When I type :hi Comment vim returns: Comment xxx term=bold ctermfg=1 guifg=Blue What do I do wrong? Regards, Eric _ Check out all that glitters with the MSN Entertainment Guide to the Academy Awards® http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2 Colour files should go into the vimfiles/colors directory, Yes. and needs to be named according to the filetype you want it to be used for. For instance, sql.vim will be loaded for .sql files. No (see below). You can further specify what filetype to use for a file by creating a filetypes.vim file in the vimfiles/ftdetect directory. ... a filetype.vim file in a directory in 'runtimepath', *and/or* one or more Vim script(s) of _any_ name in the ftdetect subdirectory of a directory in 'runtimepath'. For more info about this, see :help ftdetect Also, :help syntax and also (more important) :help :colorscheme Hope that helps The files in the colors directory are what is called color schemes in Vim parlance, and correspond to what would be called themes or skins in other programs. Their names bear *no relation* to the files to be edited with them. Vim never loads them automatically but only as a result of the :colorscheme name command, which is roughly equivalent to :runtime colors/name.vim where name.vim is the name of an arbitrary colorscheme script. The highlight groups to use for files of a given syntax are in the syntax subdirectory of directories in 'runtimepath', and they may define default colors for highlight groups not predefined in Vim, by using :highlight default commands (see :help :highlight-default). Absolutely. I had my syntax file and colorschemes info mixed up. I hope the OP reads your corrections. _Syntax_ files need to be named according to their application (language), whereas colorscheme files are used to change the colours of text _according_to_the_syntax_ file definition. The colorscheme effectively is applied over the syntax definition. Indeed. This also means