4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: ":colorscheme" without an argument doesn't do anything.
12 Solution: Make it echo the current color scheme name. (partly by Christian
14 Files: runtime/doc/syntax.txt, src/ex_cmds.h, src/ex_docmd.c
17 *** ../vim-7.2.423/runtime/doc/syntax.txt 2008-08-09 19:36:52.000000000 +0200
18 --- runtime/doc/syntax.txt 2010-05-14 15:27:47.000000000 +0200
22 :syntax off $VIMRUNTIME/syntax/nosyntax.vim
23 Also see |syntax-loading|.
25 + NOTE: If displaying long lines is slow and switching off syntax highlighting
26 + makes it fast, consider setting the 'synmaxcol' option to a lower value.
28 ==============================================================================
29 2. Syntax files *:syn-files*
35 *:colo* *:colorscheme* *E185*
36 :colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
37 for the file "colors/{name}.vim. The first one that
39 ! To see the name of the currently active color scheme
40 ! (if there is one): >
42 ! < Doesn't work recursively, thus you can't use
43 ":colorscheme" in a color scheme script.
44 After the color scheme has been loaded the
45 |ColorScheme| autocommand event is triggered.
49 *:colo* *:colorscheme* *E185*
50 + :colo[rscheme] Output the name of the currently active color scheme.
51 + This is basically the same as >
53 + < In case g:colors_name has not been defined :colo will
54 + output "default". When compiled without the |+eval|
55 + feature it will output "unknown".
57 :colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
58 for the file "colors/{name}.vim. The first one that
60 ! To see the name of the currently active color scheme: >
62 ! < The name is also stored in the g:colors_name variable.
63 ! Doesn't work recursively, thus you can't use
64 ":colorscheme" in a color scheme script.
65 After the color scheme has been loaded the
66 |ColorScheme| autocommand event is triggered.
70 When a colorscheme is being used, changing 'background' causes it to
71 be reloaded, which may reset all colors (including Normal). First
72 ! delete the "colors_name" variable when you don't want this.
74 When you have set "ctermfg" or "ctermbg" for the Normal group, Vim
75 needs to reset the color when exiting. This is done with the "op"
78 When a colorscheme is being used, changing 'background' causes it to
79 be reloaded, which may reset all colors (including Normal). First
80 ! delete the "g:colors_name" variable when you don't want this.
82 When you have set "ctermfg" or "ctermbg" for the Normal group, Vim
83 needs to reset the color when exiting. This is done with the "op"
84 *** ../vim-7.2.423/src/ex_cmds.h 2010-05-13 16:46:16.000000000 +0200
85 --- src/ex_cmds.h 2010-05-14 13:08:45.000000000 +0200
88 EX(CMD_colder, "colder", qf_age,
89 RANGE|NOTADR|COUNT|TRLBAR),
90 EX(CMD_colorscheme, "colorscheme", ex_colorscheme,
91 ! NEEDARG|WORD1|TRLBAR|CMDWIN),
92 EX(CMD_command, "command", ex_command,
93 EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN),
94 EX(CMD_comclear, "comclear", ex_comclear,
96 EX(CMD_colder, "colder", qf_age,
97 RANGE|NOTADR|COUNT|TRLBAR),
98 EX(CMD_colorscheme, "colorscheme", ex_colorscheme,
99 ! WORD1|TRLBAR|CMDWIN),
100 EX(CMD_command, "command", ex_command,
101 EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN),
102 EX(CMD_comclear, "comclear", ex_comclear,
103 *** ../vim-7.2.423/src/ex_docmd.c 2010-03-02 15:55:51.000000000 +0100
104 --- src/ex_docmd.c 2010-05-14 15:26:14.000000000 +0200
110 ! if (load_colors(eap->arg) == FAIL)
111 EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
118 ! if (*eap->arg == NUL)
121 ! char_u *expr = vim_strsave((char_u *)"g:colors_name");
127 ! p = eval_to_string(expr, NULL, FALSE);
142 ! else if (load_colors(eap->arg) == FAIL)
143 EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
146 *** ../vim-7.2.423/src/version.c 2010-05-14 12:16:19.000000000 +0200
147 --- src/version.c 2010-05-14 15:23:20.000000000 +0200
151 { /* Add new patch number below this line */
157 Everyone has a photographic memory. Some don't have film.
159 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
160 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
161 \\\ download, build and distribute -- http://www.A-A-P.org ///
162 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///