Skip to content

Commit 07402b0

Browse files
committed
Merge branch 'vim' of git://github.com/b4winckler/macvim into kaoriya
Conflicts: .hgtags
2 parents afb054c + 2bdcd40 commit 07402b0

File tree

12 files changed

+566
-25
lines changed

12 files changed

+566
-25
lines changed

.hgtags

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,14 @@ e1c5f69de95b99112fae28c23ce6427ca251e50f v7-3-193
15331533
d641f141f9376b3ecf2146e5d68c38bf0227c970 v7-3-196
15341534
45c536fe48db330c4ee8f1056befe702d9d19cfe v7-3-197
15351535
b0190e93e601f9061a797689a1eb95a86805f769 v7-3-198
1536+
c76efe33a3c1db5767cfa4f4bb433466cba6e351 v7-3-199
1537+
41b17dd070295783af37698b1229a7052ab0549c v7-3-200
1538+
78859ef2982bbc75dcfbc551e3d8a0ec5c9126eb v7-3-201
1539+
f80e67bd627114cf7f16098ec4ed7d878816a46b v7-3-202
1540+
ce1dce2af2a34aec196b7fbe29cf8c653b6ec6de v7-3-203
1541+
e6ce47f06836721108394f0b921af076606cf715 v7-3-204
1542+
8d8bd6307b1aa51fe2f592ce45d32abf0f6666d8 v7-3-205
1543+
46544d3ae7ecb245a2646ae5005a3d67ca380f88 v7-3-206
15361544
1aa9c79ff847cd945974dd6dec5172795ba6ad7a kaoriya-charspace
15371545
fb2739bfd7c786b788ef7bcd988b61071d2ebd82 kaoriya-transparency
15381546
c6ee0daceb5d8ed4c5d6f9c1d29a82c1d37a62f3 kaoriya-migemo

runtime/doc/indent.txt

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,20 @@ have changed the indent by typing <BS>, <Tab>, or <Space> in the indent or
128128
used CTRL-T or CTRL-D.
129129

130130
*cinoptions-values*
131-
The 'cinoptions' option sets how Vim performs indentation. In the list below,
131+
The 'cinoptions' option sets how Vim performs indentation. The value after
132+
the option character can be one of these (N is any number):
133+
N indent N spaces
134+
-N indent N spaces to the left
135+
Ns N times 'shiftwidth spaces
136+
-Ns N times 'shiftwidth spaces to the left
137+
138+
In the list below,
132139
"N" represents a number of your choice (the number can be negative). When
133140
there is an 's' after the number, Vim multiplies the number by 'shiftwidth':
134141
"1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a
135-
decimal point, too: "-0.5s" is minus half a 'shiftwidth'. The examples below
136-
assume a 'shiftwidth' of 4.
137-
142+
decimal point, too: "-0.5s" is minus half a 'shiftwidth'.
143+
The examples below assume a 'shiftwidth' of 4.
144+
*cino->*
138145
>N Amount added for "normal" indent. Used after a line that should
139146
increase the indent (lines starting with "if", an opening brace,
140147
etc.). (default 'shiftwidth').
@@ -145,6 +152,7 @@ assume a 'shiftwidth' of 4.
145152
foo; foo; foo;
146153
} } }
147154
<
155+
*cino-e*
148156
eN Add N to the prevailing indent inside a set of braces if the
149157
opening brace at the End of the line (more precise: is not the
150158
first character in a line). This is useful if you want a
@@ -160,6 +168,7 @@ assume a 'shiftwidth' of 4.
160168
bar; bar; bar;
161169
} } }
162170
<
171+
*cino-n*
163172
nN Add N to the prevailing indent for a statement after an "if",
164173
"while", etc., if it is NOT inside a set of braces. This is
165174
useful if you want a different indent when there is no '{'
@@ -174,6 +183,7 @@ assume a 'shiftwidth' of 4.
174183
bar; bar; bar;
175184
} } }
176185
<
186+
*cino-f*
177187
fN Place the first opening brace of a function or other block in
178188
column N. This applies only for an opening brace that is not
179189
inside other braces and is at the start of the line. What comes
@@ -184,6 +194,7 @@ assume a 'shiftwidth' of 4.
184194
{ { {
185195
int foo; int foo; int foo;
186196
<
197+
*cino-{*
187198
{N Place opening braces N characters from the prevailing indent.
188199
This applies only for opening braces that are inside other
189200
braces. (default 0).
@@ -193,6 +204,7 @@ assume a 'shiftwidth' of 4.
193204
{ { {
194205
foo; foo; foo;
195206
<
207+
*cino-}*
196208
}N Place closing braces N characters from the matching opening
197209
brace. (default 0).
198210

@@ -202,6 +214,7 @@ assume a 'shiftwidth' of 4.
202214
foo; foo; foo;
203215
} } }
204216
<
217+
*cino-^*
205218
^N Add N to the prevailing indent inside a set of braces if the
206219
opening brace is in column 0. This can specify a different
207220
indent for whole of a function (some may like to set it to a
@@ -216,6 +229,7 @@ assume a 'shiftwidth' of 4.
216229
} } }
217230
} } }
218231
<
232+
*cino-L*
219233
LN Controls placement of jump labels. If N is negative, the label
220234
will be placed at column 1. If N is non-negative, the indent of
221235
the label will be the prevailing indent minus N. (default -1).
@@ -229,6 +243,7 @@ assume a 'shiftwidth' of 4.
229243
} } }
230244
} } }
231245
<
246+
*cino-:*
232247
:N Place case labels N characters from the indent of the switch().
233248
(default 'shiftwidth').
234249

@@ -240,13 +255,15 @@ assume a 'shiftwidth' of 4.
240255
default: default:
241256
} }
242257
<
258+
*cino-=*
243259
=N Place statements occurring after a case label N characters from
244260
the indent of the label. (default 'shiftwidth').
245261

246262
cino= cino==10 >
247263
case 11: case 11: a = a + 1;
248264
a = a + 1; b = b + 1;
249265
<
266+
*cino-l*
250267
lN If N != 0 Vim will align with a case label instead of the
251268
statement after it in the same line.
252269

@@ -256,6 +273,7 @@ assume a 'shiftwidth' of 4.
256273
break; break;
257274
} }
258275
<
276+
*cino-b*
259277
bN If N != 0 Vim will align a final "break" with the case label,
260278
so that case..break looks like a sort of block. (default: 0).
261279
When using 1, consider adding "0=break" to 'cinkeys'.
@@ -272,6 +290,7 @@ assume a 'shiftwidth' of 4.
272290
break; break;
273291
} }
274292
<
293+
*cino-g*
275294
gN Place C++ scope declarations N characters from the indent of the
276295
block they are in. (default 'shiftwidth'). A scope declaration
277296
can be "public:", "protected:" or "private:".
@@ -283,6 +302,7 @@ assume a 'shiftwidth' of 4.
283302
private: private:
284303
} }
285304
<
305+
*cino-h*
286306
hN Place statements occurring after a C++ scope declaration N
287307
characters from the indent of the label. (default
288308
'shiftwidth').
@@ -291,6 +311,21 @@ assume a 'shiftwidth' of 4.
291311
public: public: a = a + 1;
292312
a = a + 1; b = b + 1;
293313
<
314+
*cino-N*
315+
NN Indent inside C++ namespace N characters extra compared to a
316+
normal block. (default 0).
317+
318+
cino= cino=N-s >
319+
namespace { namespace {
320+
void function(); void function();
321+
} }
322+
323+
namespace my namespace my
324+
{ {
325+
void function(); void function();
326+
} }
327+
<
328+
*cino-p*
294329
pN Parameter declarations for K&R-style function declarations will
295330
be indented N characters from the margin. (default
296331
'shiftwidth').
@@ -300,13 +335,15 @@ assume a 'shiftwidth' of 4.
300335
int a; int a; int a;
301336
char b; char b; char b;
302337
<
338+
*cino-t*
303339
tN Indent a function return type declaration N characters from the
304340
margin. (default 'shiftwidth').
305341

306342
cino= cino=t0 cino=t7 >
307343
int int int
308344
func() func() func()
309345
<
346+
*cino-i*
310347
iN Indent C++ base class declarations and constructor
311348
initializations, if they start in a new line (otherwise they
312349
are aligned at the right side of the ':').
@@ -320,6 +357,7 @@ assume a 'shiftwidth' of 4.
320357
BaseClass(3) BaseClass(3)
321358
{} {}
322359
<
360+
*cino-+*
323361
+N Indent a continuation line (a line that spills onto the next)
324362
inside a function N additional characters. (default
325363
'shiftwidth').
@@ -330,6 +368,7 @@ assume a 'shiftwidth' of 4.
330368
a = b + 9 * a = b + 9 *
331369
c; c;
332370
<
371+
*cino-c*
333372
cN Indent comment lines after the comment opener, when there is no
334373
other text with which to align, N characters from the comment
335374
opener. (default 3). See also |format-comments|.
@@ -339,6 +378,7 @@ assume a 'shiftwidth' of 4.
339378
text. text.
340379
*/ */
341380
<
381+
*cino-C*
342382
CN When N is non-zero, indent comment lines by the amount specified
343383
with the c flag above even if there is other text behind the
344384
comment opener. (default 0).
@@ -349,12 +389,14 @@ assume a 'shiftwidth' of 4.
349389
********/ ********/
350390
< (Example uses ":set comments& comments-=s1:/* comments^=s0:/*")
351391

392+
*cino-/*
352393
/N Indent comment lines N characters extra. (default 0).
353394
cino= cino=/4 >
354395
a = b; a = b;
355396
/* comment */ /* comment */
356397
c = d; c = d;
357398
<
399+
*cino-(*
358400
(N When in unclosed parentheses, indent N characters from the line
359401
with the unclosed parentheses. Add a 'shiftwidth' for every
360402
unclosed parentheses. When N is 0 or the unclosed parentheses
@@ -370,13 +412,15 @@ assume a 'shiftwidth' of 4.
370412
(c2 || c3)) (c2 || c3))
371413
{ {
372414
<
415+
*cino-u*
373416
uN Same as (N, but for one level deeper. (default 'shiftwidth').
374417

375418
cino= cino=u2 >
376419
if (c123456789 if (c123456789
377420
&& (c22345 && (c22345
378421
|| c3)) || c3))
379422
<
423+
*cino-U*
380424
UN When N is non-zero, do not ignore the indenting specified by
381425
( or u in case that the unclosed parentheses is the first
382426
non-white character in its line. (default 0).
@@ -388,6 +432,7 @@ assume a 'shiftwidth' of 4.
388432
c3 c3
389433
) && c4; ) && c4;
390434
<
435+
*cino-2*
391436
wN When in unclosed parentheses and N is non-zero and either
392437
using "(0" or "u0", respectively, or using "U0" and the unclosed
393438
parentheses is the first non-white character in its line, line
@@ -400,6 +445,7 @@ assume a 'shiftwidth' of 4.
400445
|| c3)) || c3))
401446
foo; foo;
402447
<
448+
*cino-W*
403449
WN When in unclosed parentheses and N is non-zero and either
404450
using "(0" or "u0", respectively and the unclosed parentheses is
405451
the last non-white character in its line and it is not the
@@ -414,6 +460,7 @@ assume a 'shiftwidth' of 4.
414460
a_short_line(argument, a_short_line(argument,
415461
argument); argument);
416462
<
463+
*cino-m*
417464
mN When N is non-zero, line up a line starting with a closing
418465
parentheses with the first character of the line with the
419466
matching opening parentheses. (default 0).
@@ -428,6 +475,7 @@ assume a 'shiftwidth' of 4.
428475
) )
429476
foo; foo;
430477
<
478+
*cino-M*
431479
MN When N is non-zero, line up a line starting with a closing
432480
parentheses with the first character of the previous line.
433481
(default 0).
@@ -437,7 +485,7 @@ assume a 'shiftwidth' of 4.
437485
cond2 cond2
438486
) )
439487
<
440-
*java-cinoptions* *java-indenting*
488+
*java-cinoptions* *java-indenting* *cino-j*
441489
jN Indent java anonymous classes correctly. The value 'N' is
442490
currently unused but must be non-zero (e.g. 'j1'). 'j1' will
443491
indent for example the following code snippet correctly: >
@@ -448,7 +496,7 @@ assume a 'shiftwidth' of 4.
448496
}
449497
});
450498
<
451-
*javascript-cinoptions* *javascript-indenting*
499+
*javascript-cinoptions* *javascript-indenting* *cino-J*
452500
JN Indent JavaScript object declarations correctly by not confusing
453501
them with labels. The value 'N' is currently unused but must be
454502
non-zero (e.g. 'J1'). >
@@ -466,24 +514,27 @@ assume a 'shiftwidth' of 4.
466514
}
467515
}
468516
<
517+
*cino-)*
469518
)N Vim searches for unclosed parentheses at most N lines away.
470519
This limits the time needed to search for parentheses. (default
471520
20 lines).
472521

522+
*cino-star*
473523
*N Vim searches for unclosed comments at most N lines away. This
474524
limits the time needed to search for the start of a comment.
475525
If your /* */ comments stop indenting afer N lines this is the
476526
value you will want to change.
477527
(default 70 lines).
478528

529+
*cino-#*
479530
#N When N is non-zero recognize shell/Perl comments, starting with
480531
'#'. Default N is zero: don't recognizes '#' comments. Note
481532
that lines starting with # will still be seen as preprocessor
482533
lines.
483534

484535

485536
The defaults, spelled out in full, are:
486-
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,
537+
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s,
487538
c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0
488539

489540
Vim puts a line in column 1 if:

runtime/doc/os_win32.txt

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,36 @@ A. When using :! to run an external command, you can run it with "start": >
313313
with :!start do not get passed Vim's open file handles, which means they do
314314
not have to be closed before Vim.
315315
To avoid this special treatment, use ":! start".
316-
The optional "/min" argument causes the window to be minimized.
316+
There are two optional arguments (see the next Q):
317+
/min the window will be minimized.
318+
/b" no console window will be opened
319+
You can only one of these flags at a time. A second second one will be
320+
treated as the start of the command.
321+
322+
Q. How do I avoid getting a window for programs that I run asynchronously?
323+
A. You have two possible solutions depending on what exactly do you want:
324+
1) You may use the /min flag that would run program in minimized state with
325+
no other changes. It will work equally for console and GUI applications.
326+
2) You can use /b flag to run console applications without creating a
327+
console window for them (GUI applications are not affected). But you
328+
should use this flag only if application you run doesn't require any
329+
input. Otherwise it will get an EOF error because it's input stream
330+
(stdin) would be redirected to \\.\NUL (stdour and stderr too).
331+
332+
Example for a console application, run Exuberant ctags: >
333+
:!start /min ctags -R .
334+
< When it has finished you should see file named "tags" in your current
335+
directory. You should notice the window title blinking on your taskbar.
336+
This is more noticable for commands that take longer.
337+
Now delete the "tags" file and run this command: >
338+
:!start /b ctags -R .
339+
< You should have the same "tags" file, but this time there will be no
340+
blinking on the taskbar.
341+
Example for a GUI application: >
342+
:!start /min notepad
343+
:!start /b notepad
344+
< The first command runs notepad minimized and the second one runs it
345+
normally.
317346

318347
Q. I'm using Win32s, and when I try to run an external command like "make",
319348
Vim doesn't wait for it to finish! Help!

src/ex_docmd.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3861,13 +3861,24 @@ set_one_cmd_context(xp, buff)
38613861
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
38623862
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
38633863
case CMD_language:
3864-
if (*skiptowhite(arg) == NUL)
3864+
p = skiptowhite(arg);
3865+
if (*p == NUL)
38653866
{
38663867
xp->xp_context = EXPAND_LANGUAGE;
38673868
xp->xp_pattern = arg;
38683869
}
38693870
else
3870-
xp->xp_context = EXPAND_NOTHING;
3871+
{
3872+
if ( STRNCMP(arg, "messages", p - arg) == 0
3873+
|| STRNCMP(arg, "ctype", p - arg) == 0
3874+
|| STRNCMP(arg, "time", p - arg) == 0)
3875+
{
3876+
xp->xp_context = EXPAND_LOCALES;
3877+
xp->xp_pattern = skipwhite(p);
3878+
}
3879+
else
3880+
xp->xp_context = EXPAND_NOTHING;
3881+
}
38713882
break;
38723883
#endif
38733884
#if defined(FEAT_PROFILE)

src/gui_w32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@ gui_mch_init(void)
16321632

16331633
#ifdef FEAT_EVAL
16341634
/* set the v:windowid variable */
1635-
set_vim_var_nr(VV_WINDOWID, (long)s_hwnd);
1635+
set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd));
16361636
#endif
16371637

16381638
theend:

0 commit comments

Comments
 (0)