]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.424
- new
[packages/vim.git] / 7.2.424
CommitLineData
e7d66cb1
AM
1To: vim-dev@vim.org
2Subject: Patch 7.2.424
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.424
11Problem: ":colorscheme" without an argument doesn't do anything.
12Solution: Make it echo the current color scheme name. (partly by Christian
13 Brabandt)
14Files: runtime/doc/syntax.txt, src/ex_cmds.h, src/ex_docmd.c
15
16
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
19***************
20*** 113,118 ****
21--- 113,121 ----
22 :syntax off $VIMRUNTIME/syntax/nosyntax.vim
23 Also see |syntax-loading|.
24
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.
27+
28 ==============================================================================
29 2. Syntax files *:syn-files*
30
31***************
32*** 3829,3841 ****
33 in their own color.
34
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
38 is found is loaded.
39! To see the name of the currently active color scheme
40! (if there is one): >
41! :echo g:colors_name
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.
46--- 3871,3890 ----
47 in their own color.
48
49 *:colo* *:colorscheme* *E185*
50+ :colo[rscheme] Output the name of the currently active color scheme.
51+ This is basically the same as >
52+ :echo g:colors_name
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".
56+
57 :colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
58 for the file "colors/{name}.vim. The first one that
59 is found is loaded.
60! To see the name of the currently active color scheme: >
61! :colo
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.
67***************
68*** 4032,4038 ****
69 colors.
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.
73
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"
76--- 4081,4087 ----
77 colors.
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.
81
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
86***************
87*** 256,262 ****
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,
95--- 256,262 ----
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
105***************
106*** 6226,6232 ****
107 ex_colorscheme(eap)
108 exarg_T *eap;
109 {
110! if (load_colors(eap->arg) == FAIL)
111 EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
112 }
113
114--- 6226,6256 ----
115 ex_colorscheme(eap)
116 exarg_T *eap;
117 {
118! if (*eap->arg == NUL)
119! {
120! #ifdef FEAT_EVAL
121! char_u *expr = vim_strsave((char_u *)"g:colors_name");
122! char_u *p = NULL;
123!
124! if (expr != NULL)
125! {
126! ++emsg_off;
127! p = eval_to_string(expr, NULL, FALSE);
128! --emsg_off;
129! vim_free(expr);
130! }
131! if (p != NULL)
132! {
133! MSG(p);
134! vim_free(p);
135! }
136! else
137! MSG("default");
138! #else
139! MSG(_("unknown"));
140! #endif
141! }
142! else if (load_colors(eap->arg) == FAIL)
143 EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
144 }
145
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
148***************
149*** 683,684 ****
150--- 683,686 ----
151 { /* Add new patch number below this line */
152+ /**/
153+ 424,
154 /**/
155
156--
157Everyone has a photographic memory. Some don't have film.
158
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 ///
This page took 0.046697 seconds and 4 git commands to generate.