From 63b982695397a1e1c5c7ba283febf69f89a0d9ba Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 13:28:34 +0100 Subject: [PATCH 001/115] updated for version 7.3.402 Problem: When jumping to the first error a line of the buffer is sometimes redrawn on top of the list of errors. Solution: Do not call update_topline_redraw() if the display was scrolled up. --- src/quickfix.c | 6 ++++-- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/quickfix.c b/src/quickfix.c index 26eac7be59..fdf245685f 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -1842,8 +1842,10 @@ win_found: #endif if (print_message) { - /* Update the screen before showing the message */ - update_topline_redraw(); + /* Update the screen before showing the message, unless the screen + * scrolled up. */ + if (!msg_scrolled) + update_topline_redraw(); sprintf((char *)IObuff, _("(%d of %d)%s%s: "), qf_index, qi->qf_lists[qi->qf_curlist].qf_count, qf_ptr->qf_cleared ? _(" (line deleted)") : "", diff --git a/src/version.c b/src/version.c index 4169c3ef05..7aa17efe16 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 402, /**/ 401, /**/ From 7f4314a56ae446f83077f979476593cbfd00ff51 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 13:28:34 +0100 Subject: [PATCH 002/115] Added tag v7-3-402 for changeset 4eda43e1fce0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 99531b9391..0e9fdeaa64 100644 --- a/.hgtags +++ b/.hgtags @@ -1736,3 +1736,4 @@ e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 320cc46d0eb022bfb24d1b636050becc83ac0014 v7-3-400 1251e1ce94610b265d3c1f636d379a0504cf2ae5 v7-3-401 +4eda43e1fce06ef32d0a79721fa0a6850a72b4dc v7-3-402 From 0aa9ee6d1b9b19b700e40f6c99c6e1f760a9f753 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 13:39:07 +0100 Subject: [PATCH 003/115] updated for version 7.3.403 Problem: ":helpgrep" does not trigger QuickFixCmd* autocommands. Solution: Trigger the autocommands. (Christian Brabandt) --- src/quickfix.c | 38 ++++++++++++++++++++++++++++++++++---- src/version.c | 2 ++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/quickfix.c b/src/quickfix.c index fdf245685f..d23b03e2e0 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3878,16 +3878,35 @@ ex_helpgrep(eap) qf_info_T *qi = &ql_info; int new_qi = FALSE; win_T *wp; - - /* Make 'cpoptions' empty, the 'l' flag should not be used here. */ - save_cpo = p_cpo; - p_cpo = empty_option; +#ifdef FEAT_AUTOCMD + char_u *au_name = NULL; +#endif #ifdef FEAT_MULTI_LANG /* Check for a specified language */ lang = check_help_lang(eap->arg); #endif +#ifdef FEAT_AUTOCMD + switch (eap->cmdidx) + { + case CMD_helpgrep: au_name = (char_u *)"helpgrep"; break; + case CMD_lhelpgrep: au_name = (char_u *)"lhelpgrep"; break; + default: break; + } + if (au_name != NULL) + { + apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, + curbuf->b_fname, TRUE, curbuf); + if (did_throw || force_abort) + return; + } +#endif + + /* Make 'cpoptions' empty, the 'l' flag should not be used here. */ + save_cpo = p_cpo; + p_cpo = empty_option; + if (eap->cmdidx == CMD_lhelpgrep) { /* Find an existing help window */ @@ -4036,6 +4055,17 @@ ex_helpgrep(eap) qf_update_buffer(qi); #endif +#ifdef FEAT_AUTOCMD + if (au_name != NULL) + { + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); + if (!new_qi && qi != &ql_info && qf_find_buf(qi) == NULL) + /* autocommands made "qi" invalid */ + return; + } +#endif + /* Jump to first match. */ if (qi->qf_lists[qi->qf_curlist].qf_count > 0) qf_jump(qi, 0, 0, FALSE); diff --git a/src/version.c b/src/version.c index 7aa17efe16..7fc2302824 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 403, /**/ 402, /**/ From 13bb3259ccffc14fb795a354cc46d58ea1e47858 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 13:39:07 +0100 Subject: [PATCH 004/115] Added tag v7-3-403 for changeset 5850b5827691 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0e9fdeaa64..fdd63725b1 100644 --- a/.hgtags +++ b/.hgtags @@ -1737,3 +1737,4 @@ ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 320cc46d0eb022bfb24d1b636050becc83ac0014 v7-3-400 1251e1ce94610b265d3c1f636d379a0504cf2ae5 v7-3-401 4eda43e1fce06ef32d0a79721fa0a6850a72b4dc v7-3-402 +5850b58276918de8edf19ece0bd258e179967af8 v7-3-403 From 366847a604914ac7d2f8c3ae18b21ea53e20f6c2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 14:32:27 +0100 Subject: [PATCH 005/115] updated for version 7.3.404 Problem: When a complete function uses refresh "always" redo will not work properly. Solution: Do not reset compl_leader when compl_opt_refresh_always is set. (Yasuhiro Matsumoto) --- src/edit.c | 19 +++++++++++++++---- src/version.c | 2 ++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/edit.c b/src/edit.c index 4289ff5cda..08b555ba2c 100644 --- a/src/edit.c +++ b/src/edit.c @@ -3465,11 +3465,17 @@ ins_compl_addleader(c) if (ins_compl_need_restart()) ins_compl_restart(); - vim_free(compl_leader); - compl_leader = vim_strnsave(ml_get_curline() + compl_col, + /* When 'always' is set, don't reset compl_leader. While completing, + * cursor don't point original position, changing compl_leader would + * break redo. */ + if (!compl_opt_refresh_always) + { + vim_free(compl_leader); + compl_leader = vim_strnsave(ml_get_curline() + compl_col, (int)(curwin->w_cursor.col - compl_col)); - if (compl_leader != NULL) - ins_compl_new_leader(); + if (compl_leader != NULL) + ins_compl_new_leader(); + } } /* @@ -4554,6 +4560,11 @@ ins_compl_next(allow_get_expansion, count, insert_match) int found_end = FALSE; int advance; + /* When user complete function return -1 for findstart which is next + * time of 'always', compl_shown_match become NULL. */ + if (compl_shown_match == NULL) + return -1; + if (compl_leader != NULL && (compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0) { diff --git a/src/version.c b/src/version.c index 7fc2302824..e2a2fa21d1 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 404, /**/ 403, /**/ From e3cf6a0ff20b1bb255cc6e4e0e411497206ca314 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 14:32:27 +0100 Subject: [PATCH 006/115] Added tag v7-3-404 for changeset 8b928bc814a8 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index fdd63725b1..914b3f157d 100644 --- a/.hgtags +++ b/.hgtags @@ -1738,3 +1738,4 @@ ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 1251e1ce94610b265d3c1f636d379a0504cf2ae5 v7-3-401 4eda43e1fce06ef32d0a79721fa0a6850a72b4dc v7-3-402 5850b58276918de8edf19ece0bd258e179967af8 v7-3-403 +8b928bc814a8d502f25a06ddfa66b0474b89a73f v7-3-404 From eed5ee2b43f51a04feb7694d65eb64009796f436 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 17:15:51 +0100 Subject: [PATCH 007/115] updated for version 7.3.405 Problem: When xterm gets back the function keys it may delete the urxvt mouse termcap code. Solution: Check for the whole code, not just the start. (Egmont Koblinger) --- src/keymap.h | 1 + src/misc2.c | 11 +++++++++++ src/term.c | 6 +++--- src/version.c | 2 ++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/keymap.h b/src/keymap.h index 8ec009387f..4706dfe04f 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -411,6 +411,7 @@ enum key_extra #define K_DEC_MOUSE TERMCAP2KEY(KS_DEC_MOUSE, KE_FILLER) #define K_JSBTERM_MOUSE TERMCAP2KEY(KS_JSBTERM_MOUSE, KE_FILLER) #define K_PTERM_MOUSE TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER) +#define K_URXVT_MOUSE TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER) #define K_SELECT TERMCAP2KEY(KS_SELECT, KE_FILLER) #define K_TEAROFF TERMCAP2KEY(KS_TEAROFF, KE_FILLER) diff --git a/src/misc2.c b/src/misc2.c index 22d1fb46b1..00d1ff4a0f 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -2416,10 +2416,21 @@ static struct key_name_entry {'<', (char_u *)"lt"}, {K_MOUSE, (char_u *)"Mouse"}, +#ifdef FEAT_MOUSE_NET {K_NETTERM_MOUSE, (char_u *)"NetMouse"}, +#endif +#ifdef FEAT_MOUSE_DEC {K_DEC_MOUSE, (char_u *)"DecMouse"}, +#endif +#ifdef FEAT_MOUSE_JSB {K_JSBTERM_MOUSE, (char_u *)"JsbMouse"}, +#endif +#ifdef FEAT_MOUSE_PTERM {K_PTERM_MOUSE, (char_u *)"PtermMouse"}, +#endif +#ifdef FEAT_MOUSE_URXVT + {K_URXVT_MOUSE, (char_u *)"UrxvtMouse"}, +#endif {K_LEFTMOUSE, (char_u *)"LeftMouse"}, {K_LEFTMOUSE_NM, (char_u *)"LeftMouseNM"}, {K_LEFTDRAG, (char_u *)"LeftDrag"}, diff --git a/src/term.c b/src/term.c index f40d39a063..93d325e43e 100644 --- a/src/term.c +++ b/src/term.c @@ -5252,12 +5252,12 @@ find_term_bykeys(src) char_u *src; { int i; - int slen; + int slen = STRLEN(src); for (i = 0; i < tc_len; ++i) { - slen = termcodes[i].len; - if (slen > 1 && STRNCMP(termcodes[i].code, src, (size_t)slen) == 0) + if (slen == termcodes[i].len + && STRNCMP(termcodes[i].code, src, (size_t)slen) == 0) return i; } return -1; diff --git a/src/version.c b/src/version.c index e2a2fa21d1..73bb3abf92 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 405, /**/ 404, /**/ From b4d8fe284f7ad490aaef4282ddb45909c60a64c1 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 17:15:51 +0100 Subject: [PATCH 008/115] Added tag v7-3-405 for changeset c75a8d2404bd --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 914b3f157d..66f867e32a 100644 --- a/.hgtags +++ b/.hgtags @@ -1739,3 +1739,4 @@ ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 4eda43e1fce06ef32d0a79721fa0a6850a72b4dc v7-3-402 5850b58276918de8edf19ece0bd258e179967af8 v7-3-403 8b928bc814a8d502f25a06ddfa66b0474b89a73f v7-3-404 +c75a8d2404bd4f1297aafbb10ab1ae68ba678249 v7-3-405 From b4f28257f90991874e4fad23a3427d28eac42c45 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 17:57:51 +0100 Subject: [PATCH 009/115] updated for version 7.3.406 Problem: Multi-byte characters in b:browsefilter are not handled correctly. Solution: First use convert_filter() normally and then convert to wide characters. (Taro Muraoka) --- src/gui_w48.c | 30 +++++++++++++----------------- src/version.c | 2 ++ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/gui_w48.c b/src/gui_w48.c index a6a8184a7c..80fad9e8f5 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -328,6 +328,10 @@ static LOGFONT norm_logfont; static LRESULT _OnImeNotify(HWND hWnd, DWORD dwCommand, DWORD dwData); #endif +#if defined(FEAT_MBYTE) && defined(WIN3264) +static char_u *convert_filter(char_u *s); +#endif + #ifdef DEBUG_PRINT_ERROR /* * Print out the last Windows error message @@ -3275,28 +3279,20 @@ mch_set_mouse_shape(int shape) # if defined(FEAT_MBYTE) && defined(WIN3264) /* - * Wide version of convert_filter(). Keep in sync! + * Wide version of convert_filter(). */ static WCHAR * convert_filterW(char_u *s) { - WCHAR *res; - unsigned s_len = (unsigned)STRLEN(s); - unsigned i; + char_u *tmp; + int len; - res = (WCHAR *)alloc((s_len + 3) * sizeof(WCHAR)); - if (res != NULL) - { - for (i = 0; i < s_len; ++i) - if (s[i] == '\t' || s[i] == '\n') - res[i] = '\0'; - else - res[i] = s[i]; - res[s_len] = NUL; - /* Add two extra NULs to make sure it's properly terminated. */ - res[s_len + 1] = NUL; - res[s_len + 2] = NUL; - } + tmp = convert_filter(s); + if (tmp == NULL) + return NULL; + len = (int)STRLEN(s) + 3; + res = enc_to_utf16(tmp, &len); + vim_free(tmp); return res; } diff --git a/src/version.c b/src/version.c index 73bb3abf92..0b281a5de9 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 406, /**/ 405, /**/ From 299300ea55b40b1229291306d53d10874b5b8381 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 17:57:51 +0100 Subject: [PATCH 010/115] Added tag v7-3-406 for changeset fbb23bd517f8 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 66f867e32a..9d1f2a2d70 100644 --- a/.hgtags +++ b/.hgtags @@ -1740,3 +1740,4 @@ ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 5850b58276918de8edf19ece0bd258e179967af8 v7-3-403 8b928bc814a8d502f25a06ddfa66b0474b89a73f v7-3-404 c75a8d2404bd4f1297aafbb10ab1ae68ba678249 v7-3-405 +fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 From a270060f6afbbddd6edc3a008f52197a14cc11e6 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 20:44:43 +0100 Subject: [PATCH 011/115] updated for version 7.3.407 Problem: ":12verbose call F()" may duplicate text while trying to truncate. (Thinca) Solution: Only truncate when there is not enough room. Also check the byte length of the buffer. --- src/buffer.c | 5 ++--- src/eval.c | 16 ++++++++++++---- src/ex_getln.c | 2 +- src/message.c | 32 +++++++++++++++++++++++--------- src/proto/message.pro | 2 +- src/version.c | 2 ++ 6 files changed, 41 insertions(+), 18 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 2884b30381..8cf5f8ac00 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3258,9 +3258,8 @@ maketitle() if (maxlen > 0) { /* make it shorter by removing a bit in the middle */ - len = vim_strsize(buf); - if (len > maxlen) - trunc_string(buf, buf, maxlen); + if (vim_strsize(buf) > maxlen) + trunc_string(buf, buf, maxlen, IOSIZE); } } } diff --git a/src/eval.c b/src/eval.c index 16e740f6de..dd1685106f 100644 --- a/src/eval.c +++ b/src/eval.c @@ -22163,8 +22163,12 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict) s = tv2string(&argvars[i], &tofree, numbuf2, 0); if (s != NULL) { - trunc_string(s, buf, MSG_BUF_CLEN); - msg_puts(buf); + if (vim_strsize(s) > MSG_BUF_CLEN) + { + trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN); + s = buf; + } + msg_puts(s); vim_free(tofree); } } @@ -22252,8 +22256,12 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict) s = tv2string(fc->rettv, &tofree, numbuf2, 0); if (s != NULL) { - trunc_string(s, buf, MSG_BUF_CLEN); - smsg((char_u *)_("%s returning %s"), sourcing_name, buf); + if (vim_strsize(s) > MSG_BUF_CLEN) + { + trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN); + s = buf; + } + smsg((char_u *)_("%s returning %s"), sourcing_name, s); vim_free(tofree); } } diff --git a/src/ex_getln.c b/src/ex_getln.c index 97f8305aba..b63ebb6137 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5923,7 +5923,7 @@ ex_history(eap) hist[i].hisnum); if (vim_strsize(hist[i].hisstr) > (int)Columns - 10) trunc_string(hist[i].hisstr, IObuff + STRLEN(IObuff), - (int)Columns - 10); + (int)Columns - 10, IOSIZE - STRLEN(IObuff)); else STRCAT(IObuff, hist[i].hisstr); msg_outtrans(IObuff); diff --git a/src/message.c b/src/message.c index 03a7ea534b..95f626c95d 100644 --- a/src/message.c +++ b/src/message.c @@ -222,15 +222,16 @@ msg_strtrunc(s, force) if (enc_utf8) /* may have up to 18 bytes per cell (6 per char, up to two * composing chars) */ - buf = alloc((room + 2) * 18); + len = (room + 2) * 18; else if (enc_dbcs == DBCS_JPNU) /* may have up to 2 bytes per cell for euc-jp */ - buf = alloc((room + 2) * 2); + len = (room + 2) * 2; else #endif - buf = alloc(room + 2); + len = room + 2; + buf = alloc(len); if (buf != NULL) - trunc_string(s, buf, room); + trunc_string(s, buf, room, len); } } return buf; @@ -241,10 +242,11 @@ msg_strtrunc(s, force) * "s" and "buf" may be equal. */ void -trunc_string(s, buf, room) +trunc_string(s, buf, room, buflen) char_u *s; char_u *buf; int room; + int buflen; { int half; int len; @@ -257,7 +259,7 @@ trunc_string(s, buf, room) len = 0; /* First part: Start of the string. */ - for (e = 0; len < half; ++e) + for (e = 0; len < half && e < buflen; ++e) { if (s[e] == NUL) { @@ -274,7 +276,8 @@ trunc_string(s, buf, room) if (has_mbyte) for (n = (*mb_ptr2len)(s + e); --n > 0; ) { - ++e; + if (++e == buflen) + break; buf[e] = s[e]; } #endif @@ -319,8 +322,19 @@ trunc_string(s, buf, room) } /* Set the middle and copy the last part. */ - mch_memmove(buf + e, "...", (size_t)3); - STRMOVE(buf + e + 3, s + i); + if (e + 3 < buflen) + { + mch_memmove(buf + e, "...", (size_t)3); + len = STRLEN(s + i) + 1; + if (len >= buflen - e - 3) + len = buflen - e - 3 - 1; + mch_memmove(buf + e + 3, s + i, len); + buf[e + 3 + len - 1] = NUL; + } + else + { + buf[e - 1] = NUL; // make sure it is truncated + } } /* diff --git a/src/proto/message.pro b/src/proto/message.pro index c59a9165f4..a12f1200c7 100644 --- a/src/proto/message.pro +++ b/src/proto/message.pro @@ -4,7 +4,7 @@ int verb_msg __ARGS((char_u *s)); int msg_attr __ARGS((char_u *s, int attr)); int msg_attr_keep __ARGS((char_u *s, int attr, int keep)); char_u *msg_strtrunc __ARGS((char_u *s, int force)); -void trunc_string __ARGS((char_u *s, char_u *buf, int room)); +void trunc_string __ARGS((char_u *s, char_u *buf, int room, int buflen)); void reset_last_sourcing __ARGS((void)); void msg_source __ARGS((int attr)); int emsg_not_now __ARGS((void)); diff --git a/src/version.c b/src/version.c index 0b281a5de9..ccd583beba 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 407, /**/ 406, /**/ From d26e6b6d0eaa3fb10be2f84a304ec55958045bf9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 20:44:43 +0100 Subject: [PATCH 012/115] Added tag v7-3-407 for changeset 55cebc7e5de0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9d1f2a2d70..7b7b8c3c4f 100644 --- a/.hgtags +++ b/.hgtags @@ -1741,3 +1741,4 @@ ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 8b928bc814a8d502f25a06ddfa66b0474b89a73f v7-3-404 c75a8d2404bd4f1297aafbb10ab1ae68ba678249 v7-3-405 fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 +55cebc7e5de078ef323a94ad79319c0ab33b09ef v7-3-407 From 6b8c9a8e7c37cee370c0756eb16537629a29c03d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 20:54:19 +0100 Subject: [PATCH 013/115] updated for version 7.3.408 Problem: Missing declaration. Solution: Add the declaration. (John Marriott) --- src/gui_w48.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gui_w48.c b/src/gui_w48.c index 80fad9e8f5..4d38c15100 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -3286,6 +3286,7 @@ convert_filterW(char_u *s) { char_u *tmp; int len; + WCHAR *res; tmp = convert_filter(s); if (tmp == NULL) diff --git a/src/version.c b/src/version.c index ccd583beba..bd91554215 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 408, /**/ 407, /**/ From e1d4b947b07e29f18db1d6630c06a5772f4d8c61 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 20:54:20 +0100 Subject: [PATCH 014/115] Added tag v7-3-408 for changeset 1fec3c62f6e8 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7b7b8c3c4f..34324ccf14 100644 --- a/.hgtags +++ b/.hgtags @@ -1742,3 +1742,4 @@ ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 c75a8d2404bd4f1297aafbb10ab1ae68ba678249 v7-3-405 fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 55cebc7e5de078ef323a94ad79319c0ab33b09ef v7-3-407 +1fec3c62f6e8065c2f7ea7422213e78b50032de6 v7-3-408 From 591d30c69fefe1ba2923e61ce9bb33044c95b453 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 21:08:56 +0100 Subject: [PATCH 015/115] Update runtime files. --- runtime/autoload/getscript.vim | 26 +- runtime/autoload/tar.vim | 12 +- runtime/autoload/vimball.vim | 9 +- runtime/autoload/zip.vim | 14 +- runtime/compiler/erlang.vim | 11 + runtime/doc/autocmd.txt | 5 +- runtime/doc/develop.txt | 13 +- runtime/doc/mlang.txt | 4 +- runtime/doc/options.txt | 7 +- runtime/doc/pi_getscript.txt | 20 +- runtime/doc/pi_tar.txt | 16 +- runtime/doc/pi_vimball.txt | 17 +- runtime/doc/pi_zip.txt | 23 +- runtime/doc/syntax.txt | 76 ++-- runtime/doc/tags | 18 +- runtime/doc/todo.txt | 44 ++- runtime/doc/various.txt | 20 +- runtime/ftplugin/erlang.vim | 150 ++++++++ runtime/ftplugin/logcheck.vim | 4 +- runtime/ftplugin/postscr.vim | 14 +- runtime/indent/erlang.vim | 203 +++++----- runtime/indent/java.vim | 16 +- runtime/plugin/getscriptPlugin.vim | 2 +- runtime/plugin/tarPlugin.vim | 2 +- runtime/plugin/vimballPlugin.vim | 2 +- runtime/plugin/zipPlugin.vim | 8 +- runtime/spell/ga/ga_IE.diff | 2 +- runtime/spell/gd/gd_GB.diff | 2 +- runtime/spell/sv/sv_SE.diff | 2 +- runtime/syntax/c.vim | 22 +- runtime/syntax/d.vim | 161 +++++--- runtime/syntax/erlang.vim | 327 ++++++---------- runtime/syntax/fortran.vim | 523 +++++++++++-------------- runtime/syntax/gp.vim | 29 +- runtime/syntax/groovy.vim | 48 +-- runtime/syntax/idl.vim | 587 +++++++++++++++-------------- runtime/syntax/mail.vim | 2 +- runtime/syntax/sh.vim | 89 +++-- runtime/syntax/tex.vim | 60 ++- runtime/syntax/upstart.vim | 4 +- runtime/syntax/vim.vim | 49 ++- 41 files changed, 1422 insertions(+), 1221 deletions(-) create mode 100644 runtime/compiler/erlang.vim create mode 100644 runtime/ftplugin/erlang.vim diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim index 9e2a1964c6..34f5970c3e 100644 --- a/runtime/autoload/getscript.vim +++ b/runtime/autoload/getscript.vim @@ -1,8 +1,8 @@ " --------------------------------------------------------------------- " getscript.vim " Author: Charles E. Campbell, Jr. -" Date: May 31, 2011 -" Version: 33 +" Date: Jan 17, 2012 +" Version: 34 " Installing: :help glvs-install " Usage: :help glvs " @@ -15,7 +15,7 @@ if exists("g:loaded_getscript") finish endif -let g:loaded_getscript= "v33" +let g:loaded_getscript= "v34" if &cp echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" finish @@ -550,30 +550,42 @@ fun! s:GetOneScript(...) " decompress if sname =~ '\.bz2$' " call Decho("decompress: attempt to bunzip2 ".sname) - exe "silent !bunzip2 ".shellescape(sname) + exe "sil !bunzip2 ".shellescape(sname) let sname= substitute(sname,'\.bz2$','','') " call Decho("decompress: new sname<".sname."> after bunzip2") elseif sname =~ '\.gz$' " call Decho("decompress: attempt to gunzip ".sname) - exe "silent !gunzip ".shellescape(sname) + exe "sil !gunzip ".shellescape(sname) let sname= substitute(sname,'\.gz$','','') " call Decho("decompress: new sname<".sname."> after gunzip") elseif sname =~ '\.xz$' " call Decho("decompress: attempt to unxz ".sname) - exe "silent !unxz ".shellescape(sname) + exe "sil !unxz ".shellescape(sname) let sname= substitute(sname,'\.xz$','','') " call Decho("decompress: new sname<".sname."> after unxz") else " call Decho("no decompression needed") endif - " distribute archive(.zip, .tar, .vba) contents + " distribute archive(.zip, .tar, .vba, ...) contents if sname =~ '\.zip$' " call Decho("dearchive: attempt to unzip ".sname) exe "silent !unzip -o ".shellescape(sname) elseif sname =~ '\.tar$' " call Decho("dearchive: attempt to untar ".sname) exe "silent !tar -xvf ".shellescape(sname) + elseif sname =~ '\.tgz$' +" call Decho("dearchive: attempt to untar+gunzip ".sname) + exe "silent !tar -zxvf ".shellescape(sname) + elseif sname =~ '\.taz$' +" call Decho("dearchive: attempt to untar+uncompress ".sname) + exe "silent !tar -Zxvf ".shellescape(sname) + elseif sname =~ '\.tbz$' +" call Decho("dearchive: attempt to untar+bunzip2 ".sname) + exe "silent !tar -jxvf ".shellescape(sname) + elseif sname =~ '\.txz$' +" call Decho("dearchive: attempt to untar+xz ".sname) + exe "silent !tar -Jxvf ".shellescape(sname) elseif sname =~ '\.vba$' " call Decho("dearchive: attempt to handle a vimball: ".sname) silent 1split diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim index 6355b71113..d67212934b 100644 --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -1,7 +1,7 @@ " tar.vim: Handles browsing tarfiles " AUTOLOAD PORTION -" Date: May 31, 2011 -" Version: 27 +" Date: Jan 17, 2012 +" Version: 28 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) " @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_tar") finish endif -let g:loaded_tar= "v27" +let g:loaded_tar= "v28" if v:version < 702 echohl WarningMsg echo "***warning*** this version of tar needs vim 7.2" @@ -143,7 +143,7 @@ fun! tar#Browse(tarfile) call setline(lastline+2,'" Browsing tarfile '.a:tarfile) call setline(lastline+3,'" Select a file with cursor and press ENTER') keepj $put ='' - keepj 0d + keepj sil! 0d keepj $ let tarfile= a:tarfile @@ -158,10 +158,10 @@ fun! tar#Browse(tarfile) elseif tarfile =~# '\.lrp' " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " - elseif tarfile =~# '\.bz2$' + elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$' " call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " - elseif tarfile =~# '\.lzma$' + elseif tarfile =~# '\.\(lzma\|tlz\)$' " call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.\(xz\|txz\)$' diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim index b510778266..9a5a73c3c1 100644 --- a/runtime/autoload/vimball.vim +++ b/runtime/autoload/vimball.vim @@ -1,7 +1,7 @@ " vimball.vim : construct a file containing both paths and files " Author: Charles E. Campbell, Jr. -" Date: Sep 26, 2011 -" Version: 34 +" Date: Jan 17, 2012 +" Version: 35 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. " The VIM LICENSE applies to Vimball.vim, and Vimball.txt @@ -14,7 +14,7 @@ if &cp || exists("g:loaded_vimball") finish endif -let g:loaded_vimball = "v34" +let g:loaded_vimball = "v35" if v:version < 702 echohl WarningMsg echo "***warning*** this version of vimball needs vim 7.2" @@ -767,6 +767,9 @@ fun! vimball#RestoreSettings() " call Dret("RestoreSettings") endfun +let &cpo = s:keepcpo +unlet s:keepcpo + " --------------------------------------------------------------------- " Modelines: {{{1 " vim: fdm=marker diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index c7b946dea7..ad5cce2ed3 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,10 +1,10 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: May 24, 2011 -" Version: 24 +" Date: Jan 17, 2012 +" Version: 25 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) -" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 2005-2012 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -19,7 +19,7 @@ if &cp || exists("g:loaded_zip") finish endif -let g:loaded_zip= "v24" +let g:loaded_zip= "v25" if v:version < 702 echohl WarningMsg echo "***warning*** this version of zip needs vim 7.2" @@ -104,12 +104,12 @@ fun! zip#Browse(zipfile) " give header call append(0, ['" zip.vim version '.g:loaded_zip, - \ '" Browsing zipfile '.a:zipfile, - \ '" Select a file with cursor and press ENTER']) + \ '" Browsing zipfile '.a:zipfile, + \ '" Select a file with cursor and press ENTER']) keepj $ " call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)) - exe "silent r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1) + exe "keepj sil! r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1) if v:shell_error != 0 redraw! echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None diff --git a/runtime/compiler/erlang.vim b/runtime/compiler/erlang.vim new file mode 100644 index 0000000000..867ba6b508 --- /dev/null +++ b/runtime/compiler/erlang.vim @@ -0,0 +1,11 @@ +" Vim compiler file +" Compiler: Erlang +" Maintainer: none, please volunteer! +" Last Change: 2012 Jan 20 + +if exists("current_compiler") + finish +endif +let current_compiler = "erlang" + +" TODO diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 8c7f647151..ff0b403eef 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.3. Last change: 2011 Oct 26 +*autocmd.txt* For Vim version 7.3. Last change: 2012 Jan 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -699,7 +699,8 @@ MenuPopup Just before showing the popup menu (under the QuickFixCmdPre Before a quickfix command is run (|:make|, |:lmake|, |:grep|, |:lgrep|, |:grepadd|, |:lgrepadd|, |:vimgrep|, |:lvimgrep|, - |:vimgrepadd|, |:lvimgrepadd|, |:cscope|). + |:vimgrepadd|, |:lvimgrepadd|, |:cscope|, + |:helpgrep|, |:lhelpgrep|). The pattern is matched against the command being run. When |:grep| is used but 'grepprg' is set to "internal" it still matches "grep". diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 7cfdd5b221..0a4c03af54 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 7.3. Last change: 2008 Dec 17 +*develop.txt* For Vim version 7.3. Last change: 2012 Jan 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -232,6 +232,17 @@ time shadows global declaration new C++ reserved keyword try Borland C++ doesn't like it to be used as a variable. +clear Mac curses.h +echo Mac curses.h +instr Mac curses.h +meta Mac curses.h +newwin Mac curses.h +nl Mac curses.h +overwrite Mac curses.h +refresh Mac curses.h +scroll Mac curses.h +typeahead Mac curses.h + basename() GNU string function dirname() GNU string function get_env_value() Linux system function diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index c7b3df07c4..bfb30a8b6b 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -1,4 +1,4 @@ -*mlang.txt* For Vim version 7.3. Last change: 2010 Dec 11 +*mlang.txt* For Vim version 7.3. Last change: 2012 Jan 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -59,7 +59,7 @@ use of "-" and "_". system. Some systems accept aliases like "en" or "en_US", but some only accept the full specification like "en_US.ISO_8859-1". On Unix systems you can use - the this command to see what locales are supported: > + this command to see what locales are supported: > :!locale -a < With the "messages" argument the language used for messages is set. This can be different when you want, diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 5af206f25b..e7d6f01846 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2011 Dec 15 +*options.txt* For Vim version 7.3. Last change: 2012 Jan 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -301,9 +301,8 @@ You will not get back the 'list' value as it was the last time you edited copying the value. {not in Vi} -:se[t] {option}< Set the local value of {option} to its global value by - making it empty. Only makes sense for |global-local| - options. +:se[t] {option}< For |global-local| options: Remove the local value of + {option}, so that the global value will be used. {not in Vi} *:setg* *:setglobal* diff --git a/runtime/doc/pi_getscript.txt b/runtime/doc/pi_getscript.txt index 86e3cdd0ce..5543573eba 100644 --- a/runtime/doc/pi_getscript.txt +++ b/runtime/doc/pi_getscript.txt @@ -1,15 +1,21 @@ -*pi_getscript.txt* For Vim version 7.0. Last change: 2011 May 31 +*pi_getscript.txt* For Vim version 7.0. Last change: 2011 Jun 23 > GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr. < Authors: Charles E. Campbell, Jr. (remove NOSPAM from the email address) *GetLatestVimScripts-copyright* -Copyright: (c) 2004-2010 by Charles E. Campbell, Jr. *glvs-copyright* - The VIM LICENSE applies to getscript.vim and - pi_getscript.txt (see |copyright|) except use - "getscript" instead of "Vim". No warranty, express or implied. - Use At-Your-Own-Risk. +Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *glvs-copyright* + The VIM LICENSE (see |copyright|) applies to the files in this + package, including getscriptPlugin.vim, getscript.vim, + GetLatestVimScripts.dist, and pi_getscript.txt, except use "getscript" + instead of "VIM". Like anything else that's free, getscript and its + associated files are provided *as is* and comes with no warranty of + any kind, either expressed or implied. No guarantees of + merchantability. No guarantees of suitability for any purpose. By + using this plugin, you agree that in no event will the copyright + holder be liable for any damages resulting from the use of this + software. Use at your own risk! Getscript is a plugin that simplifies retrieval of the latest versions of the scripts that you yourself use! Typing |:GLVS| will invoke getscript; it will @@ -374,6 +380,8 @@ The AutoInstall process will: ============================================================================== 9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1 +v44 Jun 23, 2011 : * handles additional decompression options for tarballs + (tgz taz tbz txz) v33 May 31, 2011 : * using fnameescape() instead of escape() * *.xz support v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index ab98f4a8cf..1ff4d7c4ca 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -1,4 +1,4 @@ -*pi_tar.txt* For Vim version 7.3. Last change: 2011 May 31 +*pi_tar.txt* For Vim version 7.3. Last change: 2012 Jan 17 +====================+ | Tar File Interface | @@ -6,9 +6,16 @@ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) -Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright* - tar.vim, tarPlugin.vim, and pi_tar.txt. - No warranty, express or implied. Use At-Your-Own-Risk. +Copyright 2005-2012: *tar-copyright* + The VIM LICENSE (see |copyright|) applies to the files in this + package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like + anything else that's except use "tar.vim" instead of "VIM". Like + anything else that's free, tar.vim and its associated files are + provided *as is* and comes with no warranty of any kind, either + expressed or implied. No guarantees of merchantability. No + guarantees of suitability for any purpose. By using this plugin, you + agree that in no event will the copyright holder be liable for any + damages resulting from the use of this software. Use at your own risk! ============================================================================== 1. Contents *tar* *tar-contents* @@ -83,6 +90,7 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright* 4. History *tar-history* + v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz) v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling * inserted additional |:keepj| modifiers * changed silent to sil! (|:silent|) diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt index fd0006df9f..f961ab118d 100644 --- a/runtime/doc/pi_vimball.txt +++ b/runtime/doc/pi_vimball.txt @@ -1,4 +1,4 @@ -*pi_vimball.txt* For Vim version 7.3. Last change: 2011 Sep 26 +*pi_vimball.txt* For Vim version 7.3. Last change: 2012 Jan 17 ---------------- Vimball Archiver @@ -6,11 +6,16 @@ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) -Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. *Vimball-copyright* - The VIM LICENSE applies to Vimball.vim, and Vimball.txt - (see |copyright|) except use "Vimball" instead of "Vim". - No warranty, express or implied. - Use At-Your-Own-Risk! +Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *Vimball-copyright* + The VIM LICENSE (see |copyright|) applies to the files in this + package, including vimballPlugin.vim, vimball.vim, and pi_vimball.txt. + except use "vimball" instead of "VIM". Like anything else that's free, + vimball.vim and its associated files are provided *as is* and comes with + no warranty of any kind, either expressed or implied. No guarantees + of merchantability. No guarantees of suitability for any purpose. By + using this plugin, you agree that in no event will the copyright + holder be liable for any damages resulting from the use of this + software. Use at your own risk! ============================================================================== 1. Contents *vba* *vimball* *vimball-contents* diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index 13c604cfda..d976055ea1 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -1,4 +1,4 @@ -*pi_zip.txt* For Vim version 7.3. Last change: 2011 Aug 14 +*pi_zip.txt* For Vim version 7.3. Last change: 2012 Jan 17 +====================+ | Zip File Interface | @@ -7,14 +7,15 @@ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright* - Permission is hereby granted to use and distribute this code, - with or without modifications, provided that this copyright - notice is copied with it. Like anything else that's free, - zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is* - and it comes with no warranty of any kind, either expressed or - implied. By using this plugin, you agree that in no event will - the copyright holder be liable for any damages resulting from - the use of this software. + The VIM LICENSE (see |copyright|) applies to the files in this + package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use + "zip.vim" instead of "VIM". Like anything else that's free, zip.vim + and its associated files are provided *as is* and comes with no + warranty of any kind, either expressed or implied. No guarantees of + merchantability. No guarantees of suitability for any purpose. By + using this plugin, you agree that in no event will the copyright + holder be liable for any damages resulting from the use of this + software. Use at your own risk! ============================================================================== 1. Contents *zip* *zip-contents* @@ -73,7 +74,7 @@ Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright* ============================================================================== 3. Additional Extensions *zip-extension* - Apparently there are a number of archivers who generate zip files that + Apparently there are a number of archivers which generate zip files that don't use the .zip extension (.jar, .xpi, etc). To handle such files, place a line in your <.vimrc> file: > @@ -84,6 +85,8 @@ Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright* ============================================================================== 4. History *zip-history* {{{1 + v25 Jun 27, 2011 * using keepj with unzip -Z + (consistent with the -p variant) v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames fnameescape'd as well as shellquote'd * (Motoya Kurotsu) inserted keepj before 0d to protect diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 772390463d..fa032fc09f 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.3. Last change: 2012 Jan 04 +*syntax.txt* For Vim version 7.3. Last change: 2012 Jan 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1161,7 +1161,7 @@ should be appropriate for most users most of the time because Fortran 2008 is almost a superset of previous versions (Fortran 2003, 95, 90, and 77). Fortran source code form ~ -Fortran 9x code can be in either fixed or free source form. Note that the +Fortran code can be in either fixed or free source form. Note that the syntax highlighting will not be correct if the form is incorrectly set. When you create a new fortran file, the syntax script assumes fixed source @@ -1242,54 +1242,54 @@ recognized, as will construct names at the end of a do, if, select or forall construct. Non-default fortran dialects ~ -The syntax script supports five Fortran dialects: f95, f90, f77, the Lahey -subset elf90, and the Imagine1 subset F. However, these dialects are outdated; -the next version of the syntax script will support only two variants: modern -Fortran and legacy Fortran. +The syntax script supports two Fortran dialects: f08 and F. You will probably +find the default highlighting (f08) satisfactory. A few legacy constructs +deleted or declared obsolescent in the 2008 standard are highlighted as todo +items. -If you use f77 with extensions, even common ones like do/enddo loops, do/while -loops and free source form that are supported by most f77 compilers including -g77 (GNU Fortran), then you will probably find the default highlighting -satisfactory. However, if you use strict f77 with no extensions, not even free -source form or the MIL STD 1753 extensions, then the advantages of setting the -dialect to f77 are that names such as SUM are recognized as user variable -names and not highlighted as f9x intrinsic functions, that obsolete constructs -such as ASSIGN statements are not highlighted as todo items, and that fixed -source form will be assumed. +If you use F, the advantage of setting the dialect appropriately is that +other legacy features excluded from F will be highlighted as todo items and +that free source form will be assumed. -If you use elf90 or F, the advantage of setting the dialect appropriately is -that f90 features excluded from these dialects will be highlighted as todo -items and that free source form will be assumed as required for these -dialects. +The dialect can be selected in various ways. If all your fortran files use +the same dialect, set the global variable fortran_dialect in your .vimrc prior +to your syntax on statement. The case-sensitive, permissible values of +fortran_dialect are "f08" or "F". Invalid values of fortran_dialect are +ignored. -The dialect can be selected by setting the variable fortran_dialect. The -permissible values of fortran_dialect are case-sensitive and must be "f95", -"f90", "f77", "elf" or "F". Invalid values of fortran_dialect are ignored. - -If all your fortran files use the same dialect, set fortran_dialect in your -.vimrc prior to your syntax on statement. If the dialect depends upon the file -extension, then it is most convenient to set it in a ftplugin file. For more -information on ftplugin files, see |ftplugin|. For example, if all your -fortran files with an .f90 extension are written in the elf subset, your -ftplugin file should contain the code > +If the dialect depends upon the file extension, then it is most convenient to +set a buffer-local variable in a ftplugin file. For more information on +ftplugin files, see |ftplugin|. For example, if all your fortran files with +an .f90 extension are written in the F subset, your ftplugin file should +contain the code > let s:extfname = expand("%:e") if s:extfname ==? "f90" - let fortran_dialect="elf" + let b:fortran_dialect="F" else - unlet! fortran_dialect + unlet! b:fortran_dialect endif Note that this will work only if the "filetype plugin indent on" command precedes the "syntax on" command in your .vimrc file. Finer control is necessary if the file extension does not uniquely identify -the dialect. You can override the default dialect, on a file-by-file basis, by -including a comment with the directive "fortran_dialect=xx" (where xx=f77 or -elf or F or f90 or f95) in one of the first three lines in your file. For -example, your older .f files may be written in extended f77 but your newer -ones may be F codes, and you would identify the latter by including in the -first three lines of those files a Fortran comment of the form > +the dialect. You can override the default dialect, on a file-by-file basis, +by including a comment with the directive "fortran_dialect=xx" (where xx=F or +f08) in one of the first three lines in your file. For example, your older .f +files may be legacy code but your newer ones may be F codes, and you would +identify the latter by including in the first three lines of those files a +Fortran comment of the form > ! fortran_dialect=F -F overrides elf if both directives are present. + +For previous versions of the syntax, you may have set fortran_dialect to the +now-obsolete values "f77", "f90", "f95", or "elf". Such settings will be +silently handled as "f08". Users of "elf" may wish to experiment with "F" +instead. + +The syntax/fortran.vim script contains embedded comments that tell you how to +comment and/or uncomment some lines to (a) activate recognition of some +non-standard, vendor-supplied intrinsics and (b) to prevent features deleted +or declared obsolescent in the 2008 standard from being highlighted as todo +items. Limitations ~ Parenthesis checking does not catch too few closing parentheses. Hollerith diff --git a/runtime/doc/tags b/runtime/doc/tags index e80685a6a4..53f4caa8d1 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -1243,6 +1243,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* +writebackup various.txt /*+writebackup* +xfontset various.txt /*+xfontset* +xim various.txt /*+xim* ++xpm_w32 various.txt /*+xpm_w32* +xsmp various.txt /*+xsmp* +xsmp_interact various.txt /*+xsmp_interact* +xterm_clipboard various.txt /*+xterm_clipboard* @@ -4791,6 +4792,7 @@ beval_col-variable eval.txt /*beval_col-variable* beval_lnum-variable eval.txt /*beval_lnum-variable* beval_text-variable eval.txt /*beval_text-variable* beval_winnr-variable eval.txt /*beval_winnr-variable* +bitwise-function usr_41.txt /*bitwise-function* blockwise-examples visual.txt /*blockwise-examples* blockwise-operators visual.txt /*blockwise-operators* blockwise-register change.txt /*blockwise-register* @@ -7041,8 +7043,8 @@ objects index.txt /*objects* obtaining-exted netbeans.txt /*obtaining-exted* ocaml.vim syntax.txt /*ocaml.vim* octal eval.txt /*octal* +octal-nrformats options.txt /*octal-nrformats* octal-number eval.txt /*octal-number* -octal-number options.txt /*octal-number* oldfiles-variable eval.txt /*oldfiles-variable* ole-activation if_ole.txt /*ole-activation* ole-eval if_ole.txt /*ole-eval* @@ -8357,13 +8359,27 @@ vimdev intro.txt /*vimdev* vimdiff diff.txt /*vimdiff* vimfiles options.txt /*vimfiles* viminfo starting.txt /*viminfo* +viminfo-! options.txt /*viminfo-!* +viminfo-% options.txt /*viminfo-%* +viminfo-' options.txt /*viminfo-'* +viminfo-/ options.txt /*viminfo-\/* +viminfo-: options.txt /*viminfo-:* +viminfo-< options.txt /*viminfo-<* +viminfo-@ options.txt /*viminfo-@* +viminfo-c options.txt /*viminfo-c* viminfo-encoding starting.txt /*viminfo-encoding* viminfo-errors starting.txt /*viminfo-errors* +viminfo-f options.txt /*viminfo-f* viminfo-file starting.txt /*viminfo-file* viminfo-file-marks starting.txt /*viminfo-file-marks* viminfo-file-name starting.txt /*viminfo-file-name* +viminfo-h options.txt /*viminfo-h* +viminfo-n options.txt /*viminfo-n* +viminfo-quote options.txt /*viminfo-quote* +viminfo-r options.txt /*viminfo-r* viminfo-read starting.txt /*viminfo-read* viminfo-read-write starting.txt /*viminfo-read-write* +viminfo-s options.txt /*viminfo-s* viminfo-write starting.txt /*viminfo-write* vimrc starting.txt /*vimrc* vimrc-filetype usr_05.txt /*vimrc-filetype* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 49e245f23a..4d343ccf35 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2012 Jan 10 +*todo.txt* For Vim version 7.3. Last change: 2012 Jan 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,32 +38,35 @@ Go through more coverity reports. Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) -Compilation problem on z/OS, POUND is equal to '#', duplicate case. -(Stephen Bovy, 2011 Dec 16) - Once syntax and other runtime files have been fixed: add "set cp" to check.vim. Use a function to run both with 'cp' and 'nocp'. -Patch to fix regression caused by 7.3.251. (Christian Brabandt, 2012 Jan 5) +Win32: When the taskbar is at the top of the screen creating the tabbar causes +the window to move unnecessarily. (William E. Skeith III, 2012 Jan 12) +Patch: 2012 Jan 13 -Patch to make ":helpgrep" work with non-UTF-8 encoding. (Yasuhiro Matsumoto, -2011 Nov 28, update later that day) +Patch for using DBCS encoding in user command. (Yasuhiro Matsumoto, 2012 Jan +15) Update Jan 17. -Patch to fix messing up terminal when redrawing too early. (Christian -Brabandt, 2012 Jan 5) +Repeating search history entries. (Edwin Steiner, 2012 Jan 17) +Jan 18: Caused by patch 7.3.265? -Patch to fix member confusion in Lua interface. (Taro Muraoka, 2012 Jan 8) -Update Jan 9. -Carvalho will merge the patch. +Hang in using VimEnter. (Alex Efros, 2012 Jan 14) -Possible quickfix bug: Audrius Kažukauskas, 2012 Jan 6 - -Problem reading german spell file? (Jan Stocker, 2012 Jan 5) +":cd" doesn't work when current directory path contains wildcards. +finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10) Win32: When a directory name contains an exclamation mark, completion doesn't complete the contents of the directory. No escaping for the "!"? (Jan Stocker, 2012 Jan 5) +Patch to add support for Solaris ZFS ACLs. (Danek Duvall, 2012 Jan 13) + +Patch to make continued lines work faster. (Yasuhiro Matsumoto, 2012 Jan 11) + +Also an idea to make join() faster. (Yasuhiro Matsumoto, 2012 Jan 11) +Another one from Taro Muraoka, 2012 Jan 12. + ":doau" says it triggers modeline. Should this only happen for events used when loading a buffer? (Kana Natsuno, 2011 Nov 7) @@ -103,6 +106,10 @@ overwritten. (Felipe G. Nievinski, 2011 Dec 22) side effect. Patch by Kana Natsuno, 2011 Nov 12. +Patch to fix member confusion in Lua interface. (Taro Muraoka, 2012 Jan 8) +Update Jan 9. +Carvalho merged the patch: New version 2012 Jan 19. + Patch for option in 'cino' to specify more indent for continued conditions. (Lech Lorens, 2011 Nov 27) Isn't this already possible? @@ -136,6 +143,8 @@ And one for gui_x11.txt. Problem with l: dictionary being locked in a function. (ZyX, 2011 Jul 21) +Issue 48: foldopen error can't be caught by try/catch + Patch to sort functions starting with '<' after others. Omit dict functions, they can't be called. (Yasuhiro Matsumoto, 2011 Oct 11) @@ -180,6 +189,9 @@ New feature, requires testing. Made some remarks. Win32: Patch for alpha-blended icons and toolbar height. (Sergiu Dotenco, 2011 Sep 17) Asked for feedback from others. +Win32: Cannot cd into a directory that starts with a space. (Andy Wokula, 2012 +Jan 19) + Need to escape $HOME on Windows? (ZyX, 2011 Jul 21) "2" in 'formatopions' not working in comments. (Christian Corneliussen, 2011 @@ -803,8 +815,6 @@ the buffer to be unmodified. Unfinished patch by Ian Kelling, 2008 Jul 11. Followup Jul 14, need to have another look at it. -Patch for c.vim and cpp.vim syntax files. (Chung-chieh Shan, 2008 Nov 26) - c.vim: XXX in a comment is colored yellow, but not when it's after "#if 0". (Ilya Dogolazky, 2009 Aug 7) diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index ebb10fb3b2..b039e69d59 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.3. Last change: 2012 Jan 04 +*various.txt* For Vim version 7.3. Last change: 2012 Jan 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -363,30 +363,30 @@ N *+multi_lang* non-English language support |multi-lang| m *+mzscheme* Mzscheme interface |mzscheme| m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| m *+netbeans_intg* |netbeans| -m *+ole* Win32 GUI only: |ole-interface| -N *+path_extra* Up/downwards search in 'path' and 'tags' +m *+ole* Win32 GUI only: |ole-interface| +N *+path_extra* Up/downwards search in 'path' and 'tags' m *+perl* Perl interface |perl| m *+perl/dyn* Perl interface |perl-dynamic| |/dyn| N *+persistent_undo* Persistent undo |undo-persistence| - *+postscript* |:hardcopy| writes a PostScript file + *+postscript* |:hardcopy| writes a PostScript file N *+printer* |:hardcopy| command H *+profile* |:profile| command m *+python* Python 2 interface |python| -m *+python/dyn* Python 2 interface |python-dynamic| |/dyn| +m *+python/dyn* Python 2 interface |python-dynamic| |/dyn| m *+python3* Python 3 interface |python| -m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn| +m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn| N *+quickfix* |:make| and |quickfix| commands N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout, 'redrawtime' option B *+rightleft* Right to left typing |'rightleft'| m *+ruby* Ruby interface |ruby| m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn| -N *+scrollbind* |'scrollbind'| +N *+scrollbind* |'scrollbind'| B *+signs* |:sign| -N *+smartindent* |'smartindent'| +N *+smartindent* |'smartindent'| m *+sniff* SniFF interface |sniff| -N *+startuptime* |--startuptime| argument -N *+statusline* Options 'statusline', 'rulerformat' and special +N *+startuptime* |--startuptime| argument +N *+statusline* Options 'statusline', 'rulerformat' and special formats of 'titlestring' and 'iconstring' m *+sun_workshop* |workshop| N *+syntax* Syntax highlighting |syntax| diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim new file mode 100644 index 0000000000..4899020f85 --- /dev/null +++ b/runtime/ftplugin/erlang.vim @@ -0,0 +1,150 @@ +" Vim ftplugin file +" Language: Erlang +" Author: Oscar Hellström +" Contributors: Ricardo Catalinas Jiménez +" Eduardo Lopez (http://github.com/tapichu) +" License: Vim license +" Version: 2011/11/21 + +if exists('b:did_ftplugin') + finish +else + let b:did_ftplugin = 1 +endif + +if exists('s:did_function_definitions') + call s:SetErlangOptions() + finish +else + let s:did_function_definitions = 1 +endif + +if !exists('g:erlang_keywordprg') + let g:erlang_keywordprg = 'erl -man' +endif + +if !exists('g:erlang_folding') + let g:erlang_folding = 0 +endif + +" Local settings +function s:SetErlangOptions() + compiler erlang + if version >= 700 + setlocal omnifunc=erlang_complete#Complete + endif + + if g:erlang_folding + setlocal foldmethod=expr + setlocal foldexpr=GetErlangFold(v:lnum) + setlocal foldtext=ErlangFoldText() + endif + + setlocal comments=:%%%,:%%,:% + setlocal commentstring=%%s + + setlocal formatoptions+=ro + let &l:keywordprg = g:erlang_keywordprg +endfunction + +" Define folding functions +if !exists('*GetErlangFold') + " Folding params + let s:erlang_fun_begin = '^\a\w*(.*$' + let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$' + let s:erlang_blank_line = '^\s*\(%.*\)\?$' + + " Auxiliary fold functions + function s:GetNextNonBlank(lnum) + let lnum = nextnonblank(a:lnum + 1) + let line = getline(lnum) + while line =~ s:erlang_blank_line && 0 != lnum + let lnum = nextnonblank(lnum + 1) + let line = getline(lnum) + endwhile + return lnum + endfunction + + function s:GetFunName(str) + return matchstr(a:str, '^\a\w*(\@=') + endfunction + + function s:GetFunArgs(str, lnum) + let str = a:str + let lnum = a:lnum + while str !~ '->\s*\(%.*\)\?$' + let lnum = s:GetNextNonBlank(lnum) + if 0 == lnum " EOF + return '' + endif + let str .= getline(lnum) + endwhile + return matchstr(str, + \ '\(^(\s*\)\@<=.*\(\s*)\(\s\+when\s\+.*\)\?\s\+->\s*\(%.*\)\?$\)\@=') + endfunction + + function s:CountFunArgs(arguments) + let pos = 0 + let ac = 0 " arg count + let arguments = a:arguments + + " Change list / tuples into just one A(rgument) + let erlang_tuple = '{\([A-Za-z_,|=\-\[\]]\|\s\)*}' + let erlang_list = '\[\([A-Za-z_,|=\-{}]\|\s\)*\]' + + " FIXME: Use searchpair? + while arguments =~ erlang_tuple + let arguments = substitute(arguments, erlang_tuple, 'A', 'g') + endwhile + " FIXME: Use searchpair? + while arguments =~ erlang_list + let arguments = substitute(arguments, erlang_list, 'A', 'g') + endwhile + + let len = strlen(arguments) + while pos < len && pos > -1 + let ac += 1 + let pos = matchend(arguments, ',\s*', pos) + endwhile + return ac + endfunction + + " Main fold function + function GetErlangFold(lnum) + let lnum = a:lnum + let line = getline(lnum) + + if line =~ s:erlang_fun_end + return '<1' + endif + + if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1 + return '1' + endif + + if line =~ s:erlang_fun_begin + return '>1' + endif + + return '=' + endfunction + + " Erlang fold description (foldtext function) + function ErlangFoldText() + let foldlen = v:foldend - v:foldstart + if 1 < foldlen + let lines = 'lines' + else + let lines = 'line' + endif + let line = getline(v:foldstart) + let name = s:GetFunName(line) + let arguments = s:GetFunArgs(strpart(line, strlen(name)), v:foldstart) + let argcount = s:CountFunArgs(arguments) + let retval = '+' . v:folddashes . ' ' . name . '/' . argcount + let retval .= ' (' . foldlen . ' ' . lines . ')' + return retval + endfunction +endif + +call s:SetErlangOptions() diff --git a/runtime/ftplugin/logcheck.vim b/runtime/ftplugin/logcheck.vim index 765f6b471e..7d4671d875 100644 --- a/runtime/ftplugin/logcheck.vim +++ b/runtime/ftplugin/logcheck.vim @@ -1,8 +1,8 @@ " Vim filetype plugin file " Language: Logcheck " Maintainer: Debian Vim Maintainers -" Last Change: 2010 Jul 29 -" License: GNU GPL, version 2.0 +" Last Change: 2012 Jan 15 +" License: Vim License " URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/logcheck.vim if exists("b:did_ftplugin") diff --git a/runtime/ftplugin/postscr.vim b/runtime/ftplugin/postscr.vim index 56f4e249cf..f7c96a24ea 100644 --- a/runtime/ftplugin/postscr.vim +++ b/runtime/ftplugin/postscr.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: PostScript -" Maintainer: Mike Williams -" Last Change: 27th June 2002 +" Language: PostScript +" Maintainer: Mike Williams +" Last Change: 16th January 2012 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -11,6 +11,9 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + " PS comment formatting setlocal comments=b:% setlocal formatoptions-=t formatoptions+=rol @@ -21,11 +24,12 @@ if !exists("b:match_words") let b:match_words = '<<:>>,\:\,\:\,\:\' endif -set cpo-=C - " Define patterns for the browse file filter if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" . \ "EPS Files (*.eps)\t*.eps\n" . \ "All Files (*.*)\t*.*\n" endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/erlang.vim b/runtime/indent/erlang.vim index 5ce3f82e0e..930f5d1325 100644 --- a/runtime/indent/erlang.vim +++ b/runtime/indent/erlang.vim @@ -1,128 +1,144 @@ " Vim indent file " Language: Erlang -" Maintainer: Csaba Hoch -" Contributor: Edwin Fine -" Last Change: 2008 Mar 12 +" Author: Csaba Hoch +" Contributors: Edwin Fine +" Pawel 'kTT' Salata +" Ricardo Catalinas Jiménez +" License: Vim license +" Version: 2011/09/06 -" Only load this indent file when no other was loaded. +" Only load this indent file when no other was loaded if exists("b:did_indent") - finish + finish +else + let b:did_indent = 1 endif -let b:did_indent = 1 setlocal indentexpr=ErlangIndent() setlocal indentkeys+==after,=end,=catch,=),=],=} -" Only define the functions once. +" Only define the functions once if exists("*ErlangIndent") - finish + finish endif -" The function go through the whole line, analyses it and sets the indentation -" (ind variable). -" l: the number of the line to be examined. -function s:ErlangIndentAtferLine(l) - let i = 0 " the index of the current character in the line - let length = strlen(a:l) " the length of the line +" The function goes through the whole line, analyses it and returns the +" indentation level. +" +" line: the line to be examined +" return: the indentation level of the examined line +function s:ErlangIndentAfterLine(line) + let linelen = strlen(a:line) " the length of the line + let i = 0 " the index of the current character in the line let ind = 0 " how much should be the difference between the indentation of " the current line and the indentation of the next line? " e.g. +1: the indentation of the next line should be equal to " the indentation of the current line plus one shiftwidth - let lastFun = 0 " the last token was a 'fun' - let lastReceive = 0 " the last token was a 'receive'; needed for 'after' - let lastHashMark = 0 " the last token was a 'hashmark' + let last_fun = 0 " the last token was a 'fun' + let last_receive = 0 " the last token was a 'receive'; needed for 'after' + let last_hash_sym = 0 " the last token was a '#' - while 0<= i && i < length + " Ignore comments + if a:line =~# '^\s*%' + return 0 + endif + " Partial function head where the guard is missing + if a:line =~# "\\(^\\l[[:alnum:]_]*\\)\\|\\(^'[^']\\+'\\)(" && a:line !~# '->' + return 2 + endif + + " The missing guard from the split function head + if a:line =~# '^\s*when\s\+.*->' + return -1 + endif + + while 0<=i && i=length || a:l[i+1]!~ "[0-9]") + let last_receive = 0 + elseif a:line[i] == "." && (i+1>=linelen || a:line[i+1]!~ "[0-9]") let m = i+1 - if lastHashMark - let lastHashMark = 0 + if last_hash_sym + let last_hash_sym = 0 else let ind = ind - 1 - end - let lastReceive = 0 - elseif a:l[i] == '-' && (i+1') + endif + let last_receive = 0 + elseif a:line[i] == '-' && (i+1') let m = i+2 let ind = ind + 1 - let lastReceive = 0 - elseif a:l[i] == ';' + let last_receive = 0 + elseif a:line[i] == ';' && a:line[(i):(linelen)] !~# '.*->.*' let m = i+1 let ind = ind - 1 - let lastReceive = 0 - elseif a:l[i] == '#' + let last_receive = 0 + elseif a:line[i] == '#' let m = i+1 - let lastHashMark = 1 - elseif a:l[i] =~# '[({[]' + let last_hash_sym = 1 + elseif a:line[i] =~# '[({[]' let m = i+1 let ind = ind + 1 - let lastFun = 0 - let lastReceive = 0 - let lastHashMark = 0 - elseif a:l[i] =~# '[)}\]]' + let last_fun = 0 + let last_receive = 0 + let last_hash_sym = 0 + elseif a:line[i] =~# '[)}\]]' let m = i+1 let ind = ind - 1 - let lastReceive = 0 + let last_receive = 0 else let m = i+1 endif let i = m - endwhile return ind - endfunction function s:FindPrevNonBlankNonComment(lnum) let lnum = prevnonblank(a:lnum) let line = getline(lnum) - " continue to search above if the current line begins with a '%' + " Continue to search above if the current line begins with a '%' while line =~# '^\s*%.*$' let lnum = prevnonblank(lnum - 1) if 0 == lnum @@ -133,12 +149,20 @@ function s:FindPrevNonBlankNonComment(lnum) return lnum endfunction -function ErlangIndent() +" The function returns the indentation level of the line adjusted to a mutiple +" of 'shiftwidth' option. +" +" lnum: line number +" return: the indentation level of the line +function s:GetLineIndent(lnum) + return (indent(a:lnum) / &sw) * &sw +endfunction - " Find a non-blank line above the current line. +function ErlangIndent() + " Find a non-blank line above the current line let lnum = prevnonblank(v:lnum - 1) - " Hit the start of the file, use zero indent. + " Hit the start of the file, use zero indent if lnum == 0 return 0 endif @@ -146,9 +170,14 @@ function ErlangIndent() let prevline = getline(lnum) let currline = getline(v:lnum) - let ind = indent(lnum) + &sw * s:ErlangIndentAtferLine(prevline) + let ind_after = s:ErlangIndentAfterLine(prevline) + if ind_after != 0 + let ind = s:GetLineIndent(lnum) + ind_after * &sw + else + let ind = indent(lnum) + ind_after * &sw + endif - " special cases: + " Special cases: if prevline =~# '^\s*\%(after\|end\)\>' let ind = ind + 2*&sw endif @@ -158,8 +187,8 @@ function ErlangIndent() if currline =~# '^\s*after\>' let plnum = s:FindPrevNonBlankNonComment(v:lnum-1) if getline(plnum) =~# '^[^%]*\\s*\%(%.*\)\=$' - let ind = ind - 1*&sw " If the 'receive' is not in the same line as the 'after' + let ind = ind - 1*&sw else let ind = ind - 2*&sw endif @@ -181,26 +210,4 @@ function ErlangIndent() let ind = 0 endif return ind - endfunction - -" TODO: -" -" f() -> -" x("foo -" bar") -" , -" bad_indent. -" -" fun -" init/0, -" bad_indent -" -" #rec -" .field, -" bad_indent -" -" case X of -" 1 when A; B -> -" bad_indent - diff --git a/runtime/indent/java.vim b/runtime/indent/java.vim index facbdbf571..3c48d3e35f 100644 --- a/runtime/indent/java.vim +++ b/runtime/indent/java.vim @@ -1,7 +1,12 @@ " Vim indent file " Language: Java -" Maintainer: Toby Allsopp (resigned) -" Last Change: 2005 Mar 28 +" Previous Maintainer: Toby Allsopp +" Current Maintainer: Hong Xu +" Last Change: 2012 Jan 20 +" Version: 1.0 +" License: Same as Vim. +" Copyright (c) 2012 Hong Xu +" Before 2012, this file is maintained by Toby Allsopp. " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -60,6 +65,13 @@ function GetJavaIndent() " find start of previous line, in case it was a continuation line let lnum = SkipJavaBlanksAndComments(v:lnum - 1) + + " If the previous line starts with '@', we should have the same indent as + " the previous one + if getline(lnum) =~ '^\s*@\S\+\s*$' + return indent(lnum) + endif + let prev = lnum while prev > 1 let next_prev = SkipJavaBlanksAndComments(prev - 1) diff --git a/runtime/plugin/getscriptPlugin.vim b/runtime/plugin/getscriptPlugin.vim index 1d67382b69..2697cdbc33 100644 --- a/runtime/plugin/getscriptPlugin.vim +++ b/runtime/plugin/getscriptPlugin.vim @@ -19,7 +19,7 @@ if &cp || exists("g:loaded_getscriptPlugin") endif finish endif -let g:loaded_getscriptPlugin = "v33" +let g:loaded_getscriptPlugin = "v34" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim index 197ab3564a..01ddd48df0 100644 --- a/runtime/plugin/tarPlugin.vim +++ b/runtime/plugin/tarPlugin.vim @@ -14,7 +14,7 @@ if &cp || exists("g:loaded_tarPlugin") finish endif -let g:loaded_tarPlugin = "v27" +let g:loaded_tarPlugin = "v28" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim index bdfca0105e..59279774ca 100644 --- a/runtime/plugin/vimballPlugin.vim +++ b/runtime/plugin/vimballPlugin.vim @@ -16,7 +16,7 @@ if &cp || exists("g:loaded_vimballPlugin") finish endif -let g:loaded_vimballPlugin = "v34" +let g:loaded_vimballPlugin = "v35" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim index a5e1ae458d..ebb6427f53 100644 --- a/runtime/plugin/zipPlugin.vim +++ b/runtime/plugin/zipPlugin.vim @@ -1,9 +1,9 @@ " zipPlugin.vim: Handles browsing zipfiles " PLUGIN PORTION -" Date: Oct 05, 2007 +" Date: Aug 15, 2011 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) -" Copyright: Copyright (C) 2005,2006 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_zipPlugin") finish endif -let g:loaded_zipPlugin = "v24" +let g:loaded_zipPlugin = "v25" let s:keepcpo = &cpo set cpo&vim @@ -40,7 +40,7 @@ augroup zip au FileWriteCmd zipfile:*/* call zip#Write(expand("")) endif - au BufReadCmd *.zip,*.jar,*.xpi,*.war,*.ear,*.celzip call zip#Browse(expand("")) + au BufReadCmd *.zip,*.jar,*.xpi,*.war,*.ear,*.celzip,*.oxt call zip#Browse(expand("")) augroup END " --------------------------------------------------------------------- diff --git a/runtime/spell/ga/ga_IE.diff b/runtime/spell/ga/ga_IE.diff index 3e301b799f..2a64d99607 100644 --- a/runtime/spell/ga/ga_IE.diff +++ b/runtime/spell/ga/ga_IE.diff @@ -29,7 +29,7 @@ + # soundslike mapping from Aspell + # Aspell phonetics for Irish, by Kevin Scannell + # Copyright 2002, 2003 Kevin P. Scannell, distributed under GNU GPL -+ # version 2.0 ++ # version 2.0 or the Vim license (attribution by Kevin Scannell, Jan 2012) + + SAL followup 0 # else breaks QU^, e.g. + SAL collapse_result 1 # no double letters in resulting strings diff --git a/runtime/spell/gd/gd_GB.diff b/runtime/spell/gd/gd_GB.diff index ec4797ca1a..36aa12d8f1 100644 --- a/runtime/spell/gd/gd_GB.diff +++ b/runtime/spell/gd/gd_GB.diff @@ -25,7 +25,7 @@ + # soundslike mapping from Aspell + # Aspell phonetics for Irish, by Kevin Scannell + # Copyright 2002, 2003 Kevin P. Scannell, distributed under GNU GPL -+ # version 2.0 ++ # version 2.0 or the Vim license (attribution by Kevin Scannell, Jan 2012) + + SAL followup 0 # else breaks QU^, e.g. + SAL collapse_result 1 # no double letters in resulting strings diff --git a/runtime/spell/sv/sv_SE.diff b/runtime/spell/sv/sv_SE.diff index 3526175f4a..4089a66d2b 100644 --- a/runtime/spell/sv/sv_SE.diff +++ b/runtime/spell/sv/sv_SE.diff @@ -27,7 +27,7 @@ + # soundslike mapping from Aspell + # swedish_phonet.dat - Swedish phonetic transformation rules for aspell + # Copyright (C) 2000 Martin Norbck -+ # distributed under GNU GPL ++ # distributed under GNU GPL or the Vim license, at your choice. + # version 0.2 + + SAL & & diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 7af0067f8a..4553519b09 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2012 Jan 04 +" Last Change: 2012 Jan 14 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -62,6 +62,25 @@ syn match cSpecialCharacter display "L\='\\\o\{1,3}'" syn match cSpecialCharacter display "'\\x\x\{1,2}'" syn match cSpecialCharacter display "L'\\x\x\+'" +if !exists("c_no_c11") " ISO C11 + if exists("c_no_cformat") + syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell + else + syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell + endif + syn match cCharacter "[Uu]'[^\\]'" + syn match cCharacter "[Uu]'[^']*'" contains=cSpecial + if exists("c_gnu") + syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'" + syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'" + else + syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'" + syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'" + endif + syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'" + syn match cSpecialCharacter display "[Uu]'\\x\x\+'" +endif + "when wanted, highlight trailing white space if exists("c_space_errors") if !exists("c_no_trail_space_error") @@ -211,6 +230,7 @@ if !exists("c_no_c11") syn keyword cStorageClass _Noreturn noreturn syn keyword cOperator _Static_assert static_assert syn keyword cStorageClass _Thread_local thread_local + syn keyword cType char16_t char32_t endif if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") diff --git a/runtime/syntax/d.vim b/runtime/syntax/d.vim index b7f5ebac82..25318d8c4c 100644 --- a/runtime/syntax/d.vim +++ b/runtime/syntax/d.vim @@ -2,20 +2,21 @@ " " Language: D " Maintainer: Jesse Phillips -" Last Change: 2010 Sep 21 -" Version: 0.22 +" Last Change: 2012 Jan 11 +" Version: 0.24 " " Contributors: " - Jason Mills : original Maintainer -" - Kirk McDonald: version 0.17 updates, with minor modifications -" (http://paste.dprogramming.com/dplmb7qx?view=hidelines) -" - Tim Keating: patch to fix a bug in highlighting the `\` literal -" - Frank Benoit: Fixed a bug that caused some identifiers and numbers to highlight as octal number errors. -" - Shougo Matsushita : updates for latest 2.047 highlighting -" - Ellery Newcomer: Fixed some highlighting bugs. -" - Steven N. Oliver: #! highlighting +" - Kirk McDonald +" - Tim Keating +" - Frank Benoit +" - Shougo Matsushita +" - Ellery Newcomer +" - Steven N. Oliver +" - Sohgo Takeuchi " -" Please email me with bugs, comments, and suggestions. +" Please submit bugs/comments/suggestions to the github repo: +" https://github.com/he-the-great/d.vim " " Options: " d_comment_strings - Set to highlight strings and numbers in comments. @@ -23,34 +24,23 @@ " d_hl_operator_overload - Set to highlight D's specially named functions " that when overloaded implement unary and binary operators (e.g. opCmp). " -" Todo: -" - Determine a better method of sync'ing than simply setting minlines -" to a large number. -" -" - Several keywords (e.g., in, out, inout) are both storage class and -" statements, depending on their context. Perhaps use pattern matching to -" figure out which and highlight appropriately. For now I have made such -" keywords storage classes so their highlighting is consistent with other -" keywords that are commonly used with them, but are true storage classes, -" such as lazy. Similarly, I made some statement keywords (e.g. body) storage -" classes. -" -" - Mark contents of the asm statement body as special -" -" - Maybe highlight the 'exit', 'failure', and 'success' parts of the -" scope() statement. -" -" - Highlighting DDoc comments. -" +" d_hl_object_types - Set to highlight some common types from object.di. " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif +" Support cpoptions +let s:cpo_save = &cpo +set cpo&vim + +" Set the current syntax to be known as d +let b:current_syntax = "d" + " Keyword definitions " -syn keyword dExternal import package module extern +syn keyword dExternal import module syn keyword dConditional if else switch syn keyword dBranch goto break continue syn keyword dRepeat while for do foreach foreach_reverse @@ -77,21 +67,34 @@ if exists("d_hl_operator_overload") syn keyword dOpOverload opCall opSlice opSliceAssign opSliceOpAssign syn keyword dOpOverload opPos opAdd_r opMul_r opAnd_r opOr_r opXor_r syn keyword dOpOverload opIn opIn_r opPow opDispatch opStar opDot - syn keyword dOpOverload opApply opApplyReverse + syn keyword dOpOverload opApply opApplyReverse opDollar syn keyword dOpOverload opUnary opIndexUnary opSliceUnary syn keyword dOpOverload opBinary opBinaryRight endif -syn keyword dType void ushort int uint long ulong float -syn keyword dType byte ubyte double bit char wchar ucent cent -syn keyword dType short bool dchar wstring dstring -syn keyword dType real ireal ifloat idouble -syn keyword dType creal cfloat cdouble +syn keyword dType byte ubyte short ushort int uint long ulong cent ucent +syn keyword dType void bool bit +syn keyword dType float double real +syn keyword dType ushort int uint long ulong float +syn keyword dType char wchar dchar string wstring dstring +syn keyword dType ireal ifloat idouble creal cfloat cdouble +syn keyword dType size_t ptrdiff_t sizediff_t equals_t hash_t +if exists("d_hl_object_types") + syn keyword dType Object Throwable AssociativeArray Error Exception + syn keyword dType Interface OffsetTypeInfo TypeInfo TypeInfo_Typedef + syn keyword dType TypeInfo_Enum TypeInfo_Pointer TypeInfo_Array + syn keyword dType TypeInfo_StaticArray TypeInfo_AssociativeArray + syn keyword dType TypeInfo_Function TypeInfo_Delegate TypeInfo_Class + syn keyword dType ClassInfo TypeInfo_Interface TypeInfo_Struct + syn keyword dType TypeInfo_Tuple TypeInfo_Const TypeInfo_Invariant + syn keyword dType TypeInfo_Shared TypeInfo_Inout MemberInfo + syn keyword dType MemberInfo_field MemberInfo_function ModuleInfo +endif syn keyword dDebug deprecated unittest invariant syn keyword dExceptions throw try catch finally -syn keyword dScopeDecl public protected private export +syn keyword dScopeDecl public protected private export package syn keyword dStatement debug return with -syn keyword dStatement function delegate __traits mixin macro +syn keyword dStatement function delegate __ctfe mixin macro syn keyword dStorageClass in out inout ref lazy body syn keyword dStorageClass pure nothrow syn keyword dStorageClass auto static override final abstract volatile @@ -100,15 +103,26 @@ syn keyword dStorageClass synchronized shared immutable const lazy syn keyword dPragma pragma syn keyword dIdentifier _arguments _argptr __vptr __monitor _ctor _dtor syn keyword dScopeIdentifier contained exit success failure +syn keyword dTraitsIdentifier contained isAbstractClass isArithmetic isAssociativeArray +syn keyword dTraitsIdentifier contained isFinalClass isFloating isIntegral isScalar +syn keyword dTraitsIdentifier contained isStaticArray isUnsigned isVirtualFunction +syn keyword dTraitsIdentifier contained isAbstractFunction isFinalFunction isStaticFunction +syn keyword dTraitsIdentifier contained isRef isOut isLazy hasMember identifier getMember +syn keyword dTraitsIdentifier contained getOverloads getVirtualFunctions parent compiles +syn keyword dTraitsIdentifier contained classInstanceSize allMembers derivedMembers isSame +syn keyword dExternIdentifier contained Windows Pascal Java System D syn keyword dAttribute contained safe trusted system syn keyword dAttribute contained property disable -syn keyword dVersionIdentifier contained DigitalMars GNU LDC LLVM -syn keyword dVersionIdentifier contained X86 X86_64 Windows Win32 Win64 -syn keyword dVersionIdentifier contained linux Posix OSX FreeBSD -syn keyword dVersionIdentifier contained LittleEndian BigEndian D_Coverage -syn keyword dVersionIdentifier contained D_Ddoc D_InlineAsm_X86 -syn keyword dVersionIdentifier contained D_InlineAsm_X86_64 D_LP64 D_PIC -syn keyword dVersionIdentifier contained unittest D_Version2 none all +syn keyword dVersionIdentifier contained DigitalMars GNU LDC SDC D_NET +syn keyword dVersionIdentifier contained X86 X86_64 ARM PPC PPC64 IA64 MIPS MIPS64 Alpha +syn keyword dVersionIdentifier contained SPARC SPARC64 S390 S390X HPPA HPPA64 SH SH64 +syn keyword dVersionIdentifier contained linux Posix OSX FreeBSD Windows Win32 Win64 +syn keyword dVersionIdentifier contained OpenBSD BSD Solaris AIX SkyOS SysV3 SysV4 Hurd +syn keyword dVersionIdentifier contained Cygwin MinGW +syn keyword dVersionIdentifier contained LittleEndian BigEndian +syn keyword dVersionIdentifier contained D_InlineAsm_X86 D_InlineAsm_X86_64 +syn keyword dVersionIdentifier contained D_Version2 D_Coverage D_Ddoc D_LP64 D_PIC +syn keyword dVersionIdentifier contained unittest none all " Highlight the sharpbang syn match dSharpBang "\%^#!.*" display @@ -117,23 +131,38 @@ syn match dSharpBang "\%^#!.*" display syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute " Version Identifiers -syn match dVersion "[^.]version" nextgroup=dVersionInside -syn match dVersion "^version" nextgroup=dVersionInside -syn match dVersionInside "([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier +syn match dVersion "[^.]\"hs=s+1 nextgroup=dVersionInside +syn match dVersion "^\" nextgroup=dVersionInside +syn match dVersionInside "\s*([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier " Scope StorageClass -syn match dStorageClass "scope" +syn match dStorageClass "\" + +" Traits Expression +syn match dStatement "\<__traits\>" + +" Extern Modifier +syn match dExternal "\" " Scope Identifiers -syn match dScope "scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier +syn match dScope "\"he=s+5 contains=dScopeIdentifier + +" Traits Identifiers +syn match dTraits "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dTraitsIdentifier + +" Necessary to highlight C++ in extern modifiers. +syn match dExternIdentifier "C\(++\)\?" contained + +" Extern Identifiers +syn match dExtern "\"he=s+6 contains=dExternIdentifier " String is a statement and a module name. -syn match dType "^string" -syn match dType "[^.]\s*\"ms=s+1 +syn match dType "[^.]\"ms=s+1 +syn match dType "^\" " Assert is a statement and a module name. -syn match dAssert "^assert" -syn match dAssert "[^.]\s*\"ms=s+1 +syn match dAssert "[^.]\"ms=s+1 +syn match dAssert "^\" " dTokens is used by the token string highlighting syn cluster dTokens contains=dExternal,dConditional,dBranch,dRepeat,dBoolean @@ -161,12 +190,12 @@ if exists("d_comment_strings") syn region dBlockCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=dCommentStar,dUnicode,dEscSequence,@Spell syn region dNestedCommentString contained start=+"+ end=+"+ end="+"me=s-1,he=s-1 contains=dCommentPlus,dUnicode,dEscSequence,@Spell syn region dLineCommentString contained start=+"+ end=+$\|"+ contains=dUnicode,dEscSequence,@Spell - syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell - syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell + syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold + syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell else - syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell - syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell + syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold + syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell endif @@ -280,6 +309,10 @@ syn case match " TODO: Highlight following Integer and optional Filespec. syn region dPragma start="#\s*\(line\>\)" skip="\\$" end="$" +" Block +" +syn region dBlock start="{" end="}" transparent fold + " The default highlighting. " @@ -330,12 +363,14 @@ hi def link dAnnotation PreProc hi def link dSharpBang PreProc hi def link dAttribute StorageClass hi def link dIdentifier Identifier -hi def link dVersionIdentifier Identifier hi def link dVersion dStatement -hi def link dScopeIdentifier dStatement +hi def link dVersionIdentifier Identifier hi def link dScope dStorageClass - -let b:current_syntax = "d" +hi def link dScopeIdentifier Identifier +hi def link dTraits dStatement +hi def link dTraitsIdentifier Identifier +hi def link dExtern dExternal +hi def link dExternIdentifier Identifier " Marks contents of the asm statment body as special @@ -464,3 +499,5 @@ syn keyword dAsmOpCode contained pfnacc pfpnacc pfrcp pfrcpit1 pfrcpit2 syn keyword dAsmOpCode contained pfrsqit1 pfrsqrt pfsub pfsubr pi2fd syn keyword dAsmOpCode contained pmulhrw pswapd +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/erlang.vim b/runtime/syntax/erlang.vim index 2f39d61437..28bc4a5d35 100644 --- a/runtime/syntax/erlang.vim +++ b/runtime/syntax/erlang.vim @@ -1,229 +1,126 @@ " Vim syntax file -" Language: erlang (ERicsson LANGuage) -" http://www.erlang.se -" http://www.erlang.org -" Maintainer: Csaba Hoch -" Former Maintainer: Kreąimir Marľić (Kresimir Marzic) -" Last update: 12-Mar-2008 -" Filenames: .erl +" Language: Erlang +" Author: Oscar Hellstrm (http://oscar.hellstrom.st) +" Contributors: Ricardo Catalinas Jimnez +" License: Vim license +" Version: 2011/09/11 - -" There are three sets of highlighting in here: -" One is "erlang_characters", second is "erlang_functions" and third -" is "erlang_keywords". -" If you want to disable keywords highlighting, put in your .vimrc: -" let erlang_keywords=1 -" If you want to disable erlang BIF highlighting, put in your .vimrc -" this: -" let erlang_functions=1 -" If you want to disable special characters highlighting, put in -" your .vimrc: -" let erlang_characters=1 - - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists ("b:current_syntax") - finish +if exists("b:current_syntax") + finish +else + let b:current_syntax = "erlang" endif +if !exists("g:erlang_highlight_bif") + let g:erlang_highlight_bif = 1 +endif -" Case sensitive +" Erlang is case sensitive syn case match +" Match groups +syn match erlangStringModifier /\\./ contained +syn match erlangStringModifier /\~\%(-\?[0-9*]\+\)\?\%(\.[0-9*]\+\..\?\)\?\%(c\|f\|e\|g\|s\|w\|p\|W\|P\|B\|X\|#\|b\|+\|n\|i\)/ contained +syn match erlangModifier /\$\\\?./ -if ! exists ("erlang_characters") +syn match erlangInteger /\<\%([0-9]\+#[0-9a-fA-F]\+\|[0-9]\+\)\>/ +syn match erlangFloat /\<[0-9]\+\.[0-9]\+\%(e-\?[0-9]\+\)\?\>/ - " Basic elements - syn match erlangComment "%.*$" contains=erlangAnnotation,erlangTodo - syn match erlangAnnotation " \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)" contained - syn match erlangAnnotation "`[^']*'" contained - syn keyword erlangTodo TODO FIXME XXX contained - syn match erlangModifier "\~\a\|\\\a\|\\\\" contained - syn match erlangSpecialCharacter ":\|_\|@\|\\\|\"\|\." - syn match erlangSeparator "(\|)\|{\|}\|\[\|]\||\|||\|;\|,\|?\|->\|#" contained - syn region erlangString start=+"+ skip=+\\.+ end=+"+ contains=erlangModifier - syn region erlangAtom start=+'+ skip=+\\'+ end=+'+ +syn keyword erlangTodo TODO FIXME XXX contained +syn match erlangComment /%.*$/ contains=@Spell,erlangTodo,erlangAnnotation +syn match erlangAnnotation /\%(%\s\)\@<=@\%(author\|clear\|copyright\|deprecated\|doc\|docfile\|end\|equiv\|headerfile\|hidden\|private\|reference\|see\|since\|spec\|throws\|title\|todo\|TODO\|type\|version\)/ contained +syn match erlangAnnotation /`[^']\+'/ contained - " Operators - syn match erlangOperator "+\|-\|\*\|\/" - syn keyword erlangOperator div rem or xor bor bxor bsl bsr - syn keyword erlangOperator and band not bnot andalso orelse - syn match erlangOperator "==\|/=\|=:=\|=/=\|<\|=<\|>\|>=" - syn match erlangOperator "++\|--\|=\|!\|<-" +syn keyword erlangKeyword band bor bnot bsl bsr bxor div rem xor +syn keyword erlangKeyword try catch begin receive after cond fun let query - " Numbers - syn match erlangNumberInteger "\d\+" contains=erlangSeparator - syn match erlangNumberFloat1 "\d\+\.\d\+" contains=erlangSeparator - syn match erlangNumberFloat2 "\d\+\(\.\d\+\)\=[eE][+-]\=\d\+\(\.\d\+\)\=" contains=erlangSeparator - syn match erlangNumberFloat3 "\d\+[#]\x\+" contains=erlangSeparator - syn match erlangNumberHex "$\x\+" contains=erlangSeparator +syn keyword erlangConditional case if of end +syn keyword erlangConditional not and or andalso orelse +syn keyword erlangConditional when - " Ignore '_' and '-' in words - syn match erlangWord "\h\+\w*" +syn keyword erlangBoolean true false - syn match erlangChar /\$./ +syn keyword erlangGuard is_list is_alive is_atom is_binary is_bitstring is_boolean is_tuple is_number is_integer is_float is_function is_constant is_pid is_port is_reference is_record is_process_alive + +syn match erlangOperator /\/\|*\|+\|-\|++\|--/ +syn match erlangOperator /->\|<-\|||\||\|!\|=/ +syn match erlangOperator /=:=\|==\|\/=\|=\/=\|<\|>\|=<\|>=/ +syn keyword erlangOperator div rem + +syn region erlangString start=/"/ end=/"/ skip=/\\/ contains=@Spell,erlangStringModifier + +syn match erlangVariable /\<[A-Z_]\w*\>/ +syn match erlangAtom /\%(\%(^-\)\|#\)\@\%(\s*[(:]\)\@!/ +syn match erlangAtom /\\\@/ +syn match erlangBitSize /:\@<=[0-9]\+/ + +syn match erlangBinary /<<\|>>/ + +" BIFs +syn match erlangBIF /\%([^:0-9A-Za-z_]\|\= 508 || !exists ("did_erlang_inits") - if version < 508 - let did_erlang_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - " erlang_characters - HiLink erlangComment Comment - HiLink erlangAnnotation Special - HiLink erlangTodo Todo - HiLink erlangSpecialCharacter Special - HiLink erlangSeparator Normal - HiLink erlangModifier Special - HiLink erlangOperator Operator - HiLink erlangString String - HiLink erlangAtom Type - - HiLink erlangNumberInteger Number - HiLink erlangNumberFloat1 Float - HiLink erlangNumberFloat2 Float - HiLink erlangNumberFloat3 Float - HiLink erlangNumberFloat4 Float - HiLink erlangNumberHex Number - - HiLink erlangWord Normal - - " erlang_functions - HiLink erlangFCall Function - HiLink erlangBIF Function - HiLink erlangFunction Function - HiLink erlangModuleFunction Function - - " erlang_keywords - HiLink erlangDirective Type - HiLink erlangConstant Type - HiLink erlangKeyword Keyword - HiLink erlangProcess Special - HiLink erlangPort Special - HiLink erlangNode Special - HiLink erlangReserved Statement - HiLink erlangExtra Statement - HiLink erlangSignal Statement - - delcommand HiLink -endif - - -let b:current_syntax = "erlang" - diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim index 3e5cb220b6..6fe42af6f1 100644 --- a/runtime/syntax/fortran.vim +++ b/runtime/syntax/fortran.vim @@ -1,7 +1,7 @@ " Vim syntax file -" Language: Fortran 2008 (and earlier versions including 2003, 95, 90, and 77) -" Version: 0.91 -" Last Change: 2012 Jan. 02 +" Language: Fortran 2008 (and earlier versions: 2003, 95, 90, and 77) +" Version: 0.93 +" Last Change: 2012 Jan. 18 " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Usage: For instructions, do :help fortran-syntax from Vim " Credits: @@ -11,66 +11,48 @@ " Walter Dieudonn, Alexander Wagner, Roman Bertle, Charles Rendleman, " Andrew Griffiths, Joe Krahn, and Hendrik Merx. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit if a syntax file is already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim -" let b:fortran_dialect = fortran_dialect if set correctly by user -if exists("fortran_dialect") - if fortran_dialect =~ '\<\(f\(9[05]\|77\)\|elf\|F\)\>' - let b:fortran_dialect = matchstr(fortran_dialect,'\<\(f\(9[05]\|77\)\|elf\|F\)\>') - else - echohl WarningMsg | echo "Unknown value of fortran_dialect" | echohl None - let b:fortran_dialect = "unknown" +" Choose fortran_dialect using the priority: +" source file directive > buffer-local value > global value > default +" try using directive in first three lines of file +let b:fortran_retype = getline(1)." ".getline(2)." ".getline(3) +if b:fortran_retype =~? '\' + let b:fortran_dialect = "F" +elseif b:fortran_retype =~? '\' + let b:fortran_dialect = "f08" +elseif !exists("b:fortran_dialect") + if exists("g:fortran_dialect") && g:fortran_dialect =~# '\' + " try global variable + let b:fortran_dialect = g:fortran_dialect + else " nothing found, so use default + let b:fortran_dialect = "f08" endif -else - let b:fortran_dialect = "unknown" endif - -" fortran_dialect not set or set incorrectly by user, -if b:fortran_dialect == "unknown" - " set b:fortran_dialect from directive in first three lines of file - let b:fortran_retype = getline(1)." ".getline(2)." ".getline(3) - if b:fortran_retype =~ '\' - let b:fortran_dialect = "F" - elseif b:fortran_retype =~ '\' - let b:fortran_dialect = "elf" - elseif b:fortran_retype =~ '\' - let b:fortran_dialect = "f90" - elseif b:fortran_retype =~ '\' - let b:fortran_dialect = "f95" - elseif b:fortran_retype =~ '\' - let b:fortran_dialect = "f77" - else - " no directive found, so assume f95 - let b:fortran_dialect = "f95" - endif - unlet b:fortran_retype +unlet! b:fortran_retype +" make sure buffer-local value is not invalid +if b:fortran_dialect !~# '\' + let b:fortran_dialect = "f08" endif " Choose between fixed and free source form if this hasn't been done yet if !exists("b:fortran_fixed_source") - if b:fortran_dialect == "elf" || b:fortran_dialect == "F" - " elf and F require free source form + if b:fortran_dialect == "F" + " F requires free source form let b:fortran_fixed_source = 0 - elseif b:fortran_dialect == "f77" - " f77 requires fixed source form - let b:fortran_fixed_source = 1 elseif exists("fortran_free_source") - " User guarantees free source form for all f90 and f95 files + " User guarantees free source form for all fortran files let b:fortran_fixed_source = 0 elseif exists("fortran_fixed_source") - " User guarantees fixed source form for all f90 and f95 files + " User guarantees fixed source form for all fortran files let b:fortran_fixed_source = 1 else - " f90 and f95 allow both fixed and free source form. + " Modern fortran still allows both free and fixed source form. " Assume fixed source form unless signs of free source form " are detected in the first five columns of the first s:lmax lines. " Detection becomes more accurate and time-consuming if more lines @@ -96,29 +78,18 @@ endif syn case ignore -if b:fortran_dialect !=? "f77" - if version >= 600 - if b:fortran_fixed_source == 1 - syn match fortranConstructName "^\s\{6,}\zs\a\w*\ze\s*:" - else - syn match fortranConstructName "^\s*\zs\a\w*\ze\s*:" - endif - if exists("fortran_more_precise") - syn match fortranConstructName "\(\" - +syn match fortranUnitHeader "\" syn match fortranType "\" syn match fortranType "\" syn match fortranType "\" @@ -145,7 +116,7 @@ syn match fortranParenError ")" syn match fortranOperator "\.\s*n\=eqv\s*\." syn match fortranOperator "\.\s*\(and\|or\|not\)\s*\." syn match fortranOperator "\(+\|-\|/\|\*\)" -syn match fortranTypeOb "\\@<=\s*\*" +syn match fortranTypeOb "\" -syn match fortran90Intrinsic "\" @@ -178,13 +149,13 @@ syn match fortranType "^\s*logical\>" " Integers syn match fortranNumber display "\<\d\+\(_\a\w*\)\=\>" " floating point number, without a decimal point -syn match fortranFloatNoDec display "\<\d\+[deq][-+]\=\d\+\(_\a\w*\)\=\>" +syn match fortranFloatIll display "\<\d\+[deq][-+]\=\d\+\(_\a\w*\)\=\>" " floating point number, starting with a decimal point -syn match fortranFloatIniDec display "\.\d\+\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +syn match fortranFloatIll display "\.\d\+\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" " floating point number, no digits after decimal -syn match fortranFloatEndDec display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +syn match fortranFloatIll display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" " floating point number, D or Q exponents -syn match fortranFloatDExp display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +syn match fortranFloatIll display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" " floating point number syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>" " Numbers in formats @@ -202,76 +173,73 @@ syn match fortranLabelNumber display "^ \d\{1,3}\s"ms=s+2,me=e-1 syn match fortranLabelNumber display "^ \d\d\=\s"ms=s+3,me=e-1 syn match fortranLabelNumber display "^ \d\s"ms=s+4,me=e-1 -if version >= 600 && exists("fortran_more_precise") +if exists("fortran_more_precise") " Numbers as targets syn match fortranTarget display "\(\" syn match fortranTarget display "\(\" syn match fortranTarget display "\(\" endif -syn keyword fortranTypeEx external -syn keyword fortranIOEx format -syn match fortranKeywordEx "\" +syn keyword fortranTypeR external +syn keyword fortranIOR format +syn match fortranKeywordR "\" syn match fortranKeyword "^\s*\d\+\s\+continue\>" syn match fortranKeyword "\" syn match fortranKeywordDel "\" +syn keyword fortranType none - syn match fortranType "\" - syn keyword fortranType none +syn keyword fortranStructure private public intent optional +syn keyword fortranStructure pointer target allocatable +syn keyword fortranStorageClass in out +syn match fortranStorageClass "\" +syn keyword fortranUnitHeader use only contains +syn keyword fortranUnitHeader result operator assignment +syn match fortranUnitHeader "\" +syn match fortranUnitHeader "\" +syn keyword fortranKeyword allocate deallocate nullify cycle exit +syn match fortranConditional "\" +syn keyword fortranConditional case default where elsewhere - syn match fortranUnitHeader "\" - syn keyword fortranUnitHeader use only contains - syn keyword fortranUnitHeader result operator assignment - syn match fortranUnitHeader "\" - syn match fortranUnitHeader "\" - syn keyword fortranKeyword allocate deallocate nullify cycle exit - syn match fortranConditional "\" - syn keyword fortranConditional case default where elsewhere +syn match fortranOperator "\(\(>\|<\)=\=\|==\|/=\|=\)" +syn match fortranOperator "=>" - syn match fortranOperator "\(\(>\|<\)=\=\|==\|/=\|=\)" - syn match fortranOperator "=>" +syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber +syn keyword fortranIO pad position action delim readwrite +syn keyword fortranIO eor advance nml - syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber - syn keyword fortranIO pad position action delim readwrite - syn keyword fortranIO eor advance nml +syn keyword fortranIntrinsic adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack precision present product radix random_number random_seed range repeat reshape rrspacing +syn keyword fortranIntrinsic scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify +syn match fortranIntrinsic "\\(\s*\.\)\@!"me=s+3 +syn match fortranIntrinsic "\\s*[(,]"me=s+4 - syn keyword fortran90Intrinsic adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack precision present product radix random_number random_seed range repeat reshape rrspacing - syn keyword fortran90Intrinsic scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify - syn match fortran90Intrinsic "\\(\s*\.\)\@!"me=s+3 - syn match fortran90Intrinsic "\\s*[(,]"me=s+4 +syn match fortranUnitHeader "\" - syn match fortranType "\" - if exists("fortran_more_precise") - syn match fortranConstructName "\(\" - endif +syn keyword fortranRepeat forall +syn match fortranRepeat "\" +syn match fortranType "\" +if exists("fortran_more_precise") + syn match fortranConstructName "\(\" endif -if b:fortran_dialect == "f95" +if b:fortran_dialect == "f08" " F2003 - syn keyword fortran03Intrinsic command_argument_count get_command get_command_argument get_environment_variable is_iostat_end is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of + syn keyword fortranIntrinsic command_argument_count get_command get_command_argument get_environment_variable is_iostat_end is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of " ISO_C_binding - syn keyword fortran03Constant c_null_char c_alert c_backspace c_form_feed c_new_line c_carriage_return c_horizontal_tab c_vertical_tab - syn keyword fortran03Constant c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr - syn keyword fortran03Intrinsic iso_c_binding c_loc c_funloc c_associated c_f_pointer c_f_procpointer - syn keyword fortran03Type c_ptr c_funptr + syn keyword fortranConstant c_null_char c_alert c_backspace c_form_feed c_new_line c_carriage_return c_horizontal_tab c_vertical_tab + syn keyword fortranConstant c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr + syn keyword fortranIntrinsic iso_c_binding c_loc c_funloc c_associated c_f_pointer c_f_procpointer + syn keyword fortranType c_ptr c_funptr " ISO_Fortran_env - syn keyword fortran03Constant iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit + syn keyword fortranConstant iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit " IEEE_arithmetic - syn keyword fortran03Intrinsic ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode + syn keyword fortranIntrinsic ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode - syn keyword fortran03ReadWrite flush wait - syn keyword fortran03IO decimal round iomsg - syn keyword fortran03Type asynchronous nopass non_overridable pass protected volatile abstract extends import - syn keyword fortran03Type non_intrinsic value bind deferred generic final enumerator - syn match fortran03Type "\" - syn match fortran03Type "\" - syn match fortran03Type "\" - syn match fortran03Conditional "\" - syn match fortran03UnitHeader "\" - syn match fortran03Operator "\([\|]\)" + syn keyword fortranReadWrite flush wait + syn keyword fortranIO decimal round iomsg + syn keyword fortranType asynchronous nopass non_overridable pass protected volatile abstract extends import + syn keyword fortranType non_intrinsic value bind deferred generic final enumerator + syn match fortranType "\" + syn match fortranType "\" + syn match fortranType "\" + syn match fortranConditional "\" + syn match fortranUnitHeader "\" + syn match fortranOperator "\([\|]\)" " F2008 - syn keyword fortran08Intrinsic acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 - syn keyword fortran08Intrinsic atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits - syn keyword fortran08Intrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image - syn keyword fortran08IO newunit - syn keyword fortran08Type contiguous + syn keyword fortranIntrinsic acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 + syn keyword fortranIntrinsic atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits + syn keyword fortranIntrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image + syn keyword fortranIO newunit + syn keyword fortranType contiguous endif syn cluster fortranCommentGroup contains=fortranTodo @@ -350,9 +316,7 @@ else syn match fortranContinueMark display "&" endif -if b:fortran_dialect != "f77" - syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell -endif +syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell "cpp is often used with Fortran syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*" @@ -372,7 +336,7 @@ else syn sync minlines=30 endif -if version >= 600 && exists("fortran_fold") +if exists("fortran_fold") if (b:fortran_fixed_source == 1) syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\\)\=\|$\)" contains=ALLBUT,fortranModule @@ -416,148 +380,93 @@ if version >= 600 && exists("fortran_fold") endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_fortran_syn_inits") - if version < 508 - let did_fortran_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif +" The default highlighting differs for each dialect. +" Transparent groups: +" fortranParen, fortranLeftMargin +" fortranProgram, fortranModule, fortranSubroutine, fortranFunction, +" fortranBlockData +" fortran77Loop, fortran90Loop, fortranIfBlock, fortranCase +" fortranMultiCommentLines +hi def link fortranKeyword Keyword +hi def link fortranConstructName Identifier +hi def link fortranConditional Conditional +hi def link fortranRepeat Repeat +hi def link fortranTodo Todo +hi def link fortranContinueMark Special +hi def link fortranString String +hi def link fortranNumber Number +hi def link fortranOperator Operator +hi def link fortranBoolean Boolean +hi def link fortranLabelError Error +hi def link fortranObsolete Todo +hi def link fortranType Type +hi def link fortranStructure Type +hi def link fortranStorageClass StorageClass +hi def link fortranCall Function +hi def link fortranUnitHeader fortranPreCondit +hi def link fortranReadWrite Keyword +hi def link fortranIO Keyword +hi def link fortranIntrinsic Function +hi def link fortranConstant Constant - " The default highlighting differs for each dialect. - " Transparent groups: - " fortranParen, fortranLeftMargin - " fortranProgram, fortranModule, fortranSubroutine, fortranFunction, - " fortranBlockData - " fortran77Loop, fortran90Loop, fortranIfBlock, fortranCase - " fortranMultiCommentLines - HiLink fortranKeyword Keyword - HiLink fortranConstructName Identifier - HiLink fortran03Conditional fortranConditional - HiLink fortranConditional Conditional - HiLink fortranRepeat Repeat - HiLink fortranTodo Todo - if (b:fortran_fixed_source == 1) - HiLink fortranContinueMark Todo - else - HiLink fortranContinueMark Keyword - endif - HiLink fortranString String - HiLink fortranNumber Number - HiLink fortran03Operator fortranOperator - HiLink fortranOperator Operator - HiLink fortranBoolean Boolean - HiLink fortranLabelError Error - HiLink fortranObsolete Todo - HiLink fortran03Type fortranType - HiLink fortran08Type fortranType - HiLink fortranType Type - HiLink fortranStructure Type - HiLink fortranStorageClass StorageClass - HiLink fortranCall Function - HiLink fortran03UnitHeader fortranUnitHeader - HiLink fortranUnitHeader fortranPreCondit - HiLink fortran03ReadWrite fortranReadWrite - HiLink fortranReadWrite Keyword - HiLink fortran03IO fortranIO - HiLink fortran08IO fortranIO - HiLink fortranIO Keyword - HiLink fortran95Intrinsic fortran90Intrinsic - HiLink fortran77Intrinsic fortran90Intrinsic - HiLink fortran90Intrinsic Function - HiLink fortran03Intrinsic Function - HiLink fortran08Intrinsic Function - HiLink fortran03Constant Function +" To stop deleted & obsolescent features being highlighted as Todo items, +" comment out the next 5 lines and uncomment the 5 lines after that +hi def link fortranUnitHeaderOb fortranObsolete +hi def link fortranKeywordOb fortranObsolete +hi def link fortranConditionalOb fortranObsolete +hi def link fortranTypeOb fortranObsolete +hi def link fortranKeywordDel fortranObsolete +"hi def link fortranUnitHeaderOb fortranUnitHeader +"hi def link fortranKeywordOb fortranKeyword +"hi def link fortranConditionalOb fortranConditional +"hi def link fortranTypeOb fortranType +"hi def link fortranKeywordDel fortranKeyword - if b:fortran_dialect != "f77" - HiLink fortranUnitHeaderOb Todo - HiLink fortranKeywordOb Todo - HiLink fortranConditionalOb Todo - HiLink fortranTypeOb Todo - HiLink fortranKeywordDel Todo - else - HiLink fortranUnitHeaderOb fortranUnitHeader - HiLink fortranKeywordOb fortranKeyword - HiLink fortranConditionalOb fortranConditional - HiLink fortranTypeOb fortranType - HiLink fortranKeywordDel fortranKeyword - endif - - if ( b:fortran_dialect == "elf" || b:fortran_dialect == "F" ) - HiLink fortranKeywordOb fortranObsolete - HiLink fortran66Intrinsic fortranObsolete - HiLink fortran77IntrinsicR fortranObsolete - HiLink fortranUnitHeaderR fortranObsolete - HiLink fortranTypeR fortranObsolete - HiLink fortranStorageClassR fortranObsolete - HiLink fortran90StorageClassR fortranObsolete - HiLink fortran77OperatorR fortranObsolete - HiLink fortranInclude fortranObsolete - else - HiLink fortranKeywordOb fortranKeyword - HiLink fortran66Intrinsic fortran90Intrinsic - HiLink fortran77IntrinsicR fortran90Intrinsic - HiLink fortranUnitHeaderR fortranPreCondit - HiLink fortranTypeR fortranType - HiLink fortranStorageClassR fortranStorageClass - HiLink fortran77OperatorR fortranOperator - HiLink fortranInclude Include - HiLink fortran90StorageClassR fortranStorageClass - endif - - if ( b:fortran_dialect == "F" ) - HiLink fortranLabelNumber fortranObsolete - HiLink fortranTarget fortranObsolete - HiLink fortranFormatSpec fortranObsolete - HiLink fortranFloatDExp fortranObsolete - HiLink fortranFloatNoDec fortranObsolete - HiLink fortranFloatIniDec fortranObsolete - HiLink fortranFloatEndDec fortranObsolete - HiLink fortranTypeEx fortranObsolete - HiLink fortranIOEx fortranObsolete - HiLink fortranKeywordEx fortranObsolete - HiLink fortranStringEx fortranObsolete - HiLink fortran77IntrinsicEx fortranObsolete - HiLink fortranUnitHeaderEx fortranObsolete - HiLink fortranConditionalEx fortranObsolete - HiLink fortran90IntrinsicEx fortranObsolete - else - HiLink fortranLabelNumber Special - HiLink fortranTarget Special - HiLink fortranFormatSpec Identifier - HiLink fortranFloatDExp fortranFloat - HiLink fortranFloatNoDec fortranFloat - HiLink fortranFloatIniDec fortranFloat - HiLink fortranFloatEndDec fortranFloat - HiLink fortranTypeEx fortranType - HiLink fortranIOEx fortranIO - HiLink fortranKeywordEx fortranKeyword - HiLink fortranStringEx fortranString - HiLink fortran77IntrinsicEx fortran90Intrinsic - HiLink fortranUnitHeaderEx fortranUnitHeader - HiLink fortranConditionalEx fortranConditional - HiLink fortran90IntrinsicEx fortran90Intrinsic - endif - - HiLink fortranFloat Float - HiLink fortranPreCondit PreCondit - HiLink fortranInclude Include - HiLink cIncluded fortranString - HiLink cInclude Include - HiLink cPreProc PreProc - HiLink cPreCondit PreCondit - HiLink fortranParenError Error - HiLink fortranComment Comment - HiLink fortranSerialNumber Todo - HiLink fortranTab Error - " Vendor extensions - HiLink fortranExtraIntrinsic Function - - delcommand HiLink +if b:fortran_dialect == "F" + hi! def link fortranIntrinsicR fortranObsolete + hi! def link fortranUnitHeaderR fortranObsolete + hi! def link fortranTypeR fortranObsolete + hi! def link fortranStorageClassR fortranObsolete + hi! def link fortranOperatorR fortranObsolete + hi! def link fortranInclude fortranObsolete + hi! def link fortranLabelNumber fortranObsolete + hi! def link fortranTarget fortranObsolete + hi! def link fortranFloatIll fortranObsolete + hi! def link fortranIOR fortranObsolete + hi! def link fortranKeywordR fortranObsolete + hi! def link fortranStringR fortranObsolete + hi! def link fortranConditionalR fortranObsolete +else + hi! def link fortranIntrinsicR fortranIntrinsic + hi! def link fortranUnitHeaderR fortranPreCondit + hi! def link fortranTypeR fortranType + hi! def link fortranStorageClassR fortranStorageClass + hi! def link fortranOperatorR fortranOperator + hi! def link fortranInclude Include + hi! def link fortranLabelNumber Special + hi! def link fortranTarget Special + hi! def link fortranFloatIll fortranFloat + hi! def link fortranIOR fortranIO + hi! def link fortranKeywordR fortranKeyword + hi! def link fortranStringR fortranString + hi! def link fortranConditionalR fortranConditional endif +hi def link fortranFormatSpec Identifier +hi def link fortranFloat Float +hi def link fortranPreCondit PreCondit +hi def link cIncluded fortranString +hi def link cInclude Include +hi def link cPreProc PreProc +hi def link cPreCondit PreCondit +hi def link fortranParenError Error +hi def link fortranComment Comment +hi def link fortranSerialNumber Todo +hi def link fortranTab Error + +" Uncomment the next line if you use extra intrinsics provided by vendors +"hi def link fortranExtraIntrinsic Function + let b:current_syntax = "fortran" let &cpo = s:cpo_save diff --git a/runtime/syntax/gp.vim b/runtime/syntax/gp.vim index 2793aa4ed8..f46a465215 100644 --- a/runtime/syntax/gp.vim +++ b/runtime/syntax/gp.vim @@ -1,7 +1,7 @@ " Vim syntax file -" Language: gp (version 2.4) +" Language: gp (version 2.5) " Maintainer: Karim Belabas -" Last change: 2007 Oct 1 +" Last change: 2012 Jan 08 " URL: http://pari.math.u-bordeaux.fr if version < 600 @@ -10,21 +10,30 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " control statements syntax keyword gpStatement break return next syntax keyword gpConditional if -syntax keyword gpRepeat until while for fordiv forprime forstep forvec +syntax keyword gpRepeat until while for fordiv forell forprime +syntax keyword gpRepeat forsubgroup forstep forvec " storage class syntax keyword gpScope my local global " defaults -syntax keyword gpInterfaceKey colors compatible datadir debug debugfiles -syntax keyword gpInterfaceKey debugmem echo factor_add_primes format help -syntax keyword gpInterfaceKey histsize lines log logfile new_galois_format +syntax keyword gpInterfaceKey breakloop colors compatible +syntax keyword gpInterfaceKey datadir debug debugfiles debugmem +syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format +syntax keyword gpInterfaceKey graphcolormap graphcolors +syntax keyword gpInterfaceKey help histfile histsize +syntax keyword gpInterfaceKey lines linewrap log logfile new_galois_format syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit -syntax keyword gpInterfaceKey prompt prompt_cont psfile realprecision secure -syntax keyword gpInterfaceKey seriesprecision simplify strictmatch TeXstyle timer +syntax keyword gpInterfaceKey prompt prompt_cont psfile +syntax keyword gpInterfaceKey readline realprecision recover +syntax keyword gpInterfaceKey secure seriesprecision simplify strictmatch +syntax keyword gpInterfaceKey TeXstyle timer -syntax match gpInterface "^\s*\\[a-z].*" +syntax match gpInterface "^\s*\\[a-z].*" syntax keyword gpInterface default syntax keyword gpInput read input @@ -79,4 +88,6 @@ if version >= 508 || !exists("did_gp_syn_inits") endif let b:current_syntax = "gp" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim index 721692267e..5b256f3989 100644 --- a/runtime/syntax/groovy.vim +++ b/runtime/syntax/groovy.vim @@ -2,15 +2,15 @@ " Language: Groovy " Original Author: Alessio Pace " Maintainer: Tobias Rapp -" Version: 0.1.10 -" URL: http://www.vim.org/scripts/script.php?script_id=945 -" Last Change: 2010 Nov 29 +" Version: 0.1.11 +" URL: http://www.vim.org/scripts/script.php?script_id=945 +" Last Change: 2012 Jan 08 " THE ORIGINAL AUTHOR'S NOTES: " " This is my very first vim script, I hope to have " done it the right way. -" +" " I must directly or indirectly thank the author of java.vim and ruby.vim: " I copied from them most of the stuff :-) " @@ -22,7 +22,7 @@ " HOWTO USE IT (INSTALL) when not part of the distribution: " " 1) copy the file in the (global or user's $HOME/.vim/syntax/) syntax folder -" +" " 2) add this line to recognize groovy files by filename extension: " " au BufNewFile,BufRead *.groovy setf groovy @@ -38,7 +38,7 @@ " endif " " in the global scripts.vim file or in $HOME/.vim/scripts.vim -" +" " 4) open/write a .groovy file or a groovy script :-) " " Let me know if you like it or send me patches, so that I can improve it @@ -55,6 +55,9 @@ if !exists("main_syntax") let main_syntax='groovy' endif +let s:cpo_save = &cpo +set cpo&vim + " don't use standard HiLink, it will not work with included syntax files if version < 508 command! -nargs=+ GroovyHiLink hi link @@ -101,11 +104,11 @@ syn keyword groovyScopeDecl public protected private abstract if exists("groovy_highlight_groovy_lang_ids") || exists("groovy_highlight_groovy_lang") || exists("groovy_highlight_all") " groovy.lang.* syn keyword groovyLangClass Closure MetaMethod GroovyObject - + syn match groovyJavaLangClass "\" syn keyword groovyJavaLangClass Cloneable Comparable Runnable Serializable Boolean Byte Class Object syn keyword groovyJavaLangClass Character CharSequence ClassLoader Compiler - " syn keyword groovyJavaLangClass Integer Double Float Long + " syn keyword groovyJavaLangClass Integer Double Float Long syn keyword groovyJavaLangClass InheritableThreadLocal Math Number Object Package Process syn keyword groovyJavaLangClass Runtime RuntimePermission InheritableThreadLocal syn keyword groovyJavaLangClass SecurityManager Short StrictMath StackTraceElement @@ -159,18 +162,18 @@ syn match groovyExceptions "\\|\<[A-Z]\{1,}[a-zA-Z0-9]*Except " Groovy JDK stuff syn keyword groovyJDKBuiltin as def in -syn keyword groovyJDKOperOverl div minus plus abs round power multiply -syn keyword groovyJDKMethods each call inject sort print println +syn keyword groovyJDKOperOverl div minus plus abs round power multiply +syn keyword groovyJDKMethods each call inject sort print println syn keyword groovyJDKMethods getAt putAt size push pop toList getText writeLine eachLine readLines -syn keyword groovyJDKMethods withReader withStream withWriter withPrintWriter write read leftShift +syn keyword groovyJDKMethods withReader withStream withWriter withPrintWriter write read leftShift syn keyword groovyJDKMethods withWriterAppend readBytes splitEachLine -syn keyword groovyJDKMethods newInputStream newOutputStream newPrintWriter newReader newWriter -syn keyword groovyJDKMethods compareTo next previous isCase +syn keyword groovyJDKMethods newInputStream newOutputStream newPrintWriter newReader newWriter +syn keyword groovyJDKMethods compareTo next previous isCase syn keyword groovyJDKMethods times step toInteger upto any collect dump every find findAll grep -syn keyword groovyJDKMethods inspect invokeMethods join +syn keyword groovyJDKMethods inspect invokeMethods join syn keyword groovyJDKMethods getErr getIn getOut waitForOrKill syn keyword groovyJDKMethods count tokenize asList flatten immutable intersect reverse reverseEach -syn keyword groovyJDKMethods subMap append asWritable eachByte eachLine eachFile +syn keyword groovyJDKMethods subMap append asWritable eachByte eachLine eachFile syn cluster groovyTop add=groovyJDKBuiltin,groovyJDKOperOverl,groovyJDKMethods " no useful I think, so I comment it.. @@ -331,7 +334,7 @@ if exists("groovy_highlight_debug") GroovyHiLink groovyDebugSpecialCharacter DebugSpecial GroovyHiLink groovyDebugCharacter DebugString GroovyHiLink groovyDebugParen Debug - + GroovyHiLink DebugString String GroovyHiLink DebugSpecial Special GroovyHiLink DebugBoolean Boolean @@ -339,7 +342,7 @@ if exists("groovy_highlight_debug") endif endif -" Match all Exception classes +" Match all Exception classes syn match groovyExceptions "\\|\<[A-Z]\{1,}[a-zA-Z0-9]*Exception\>" @@ -349,7 +352,7 @@ endif exec "syn sync ccomment groovyComment minlines=" . groovy_minlines -" ################### +" ################### " Groovy stuff " syn match groovyOperator "|[ ,a-zA-Z0-9_*]\+|" @@ -425,15 +428,15 @@ if version >= 508 || !exists("did_groovy_syn_inits") GroovyHiLink groovyConstant Constant GroovyHiLink groovyTypedef Typedef GroovyHiLink groovyTodo Todo - + GroovyHiLink groovyCommentTitle SpecialComment GroovyHiLink groovyDocTags Special GroovyHiLink groovyDocParam Function GroovyHiLink groovyCommentStar groovyComment - + GroovyHiLink groovyType Type GroovyHiLink groovyExternal Include - + GroovyHiLink htmlComment Special GroovyHiLink htmlCommentPart Special GroovyHiLink groovySpaceError Error @@ -452,4 +455,7 @@ endif let b:spell_options="contained" +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 diff --git a/runtime/syntax/idl.vim b/runtime/syntax/idl.vim index 39041fcac2..c51850b13a 100644 --- a/runtime/syntax/idl.vim +++ b/runtime/syntax/idl.vim @@ -2,7 +2,7 @@ " Language: IDL (Interface Description Language) " Created By: Jody Goldberg " Maintainer: Michael Geddes -" Last Change: Thu Apr 13 2006 +" Last Change: 2012 Jan 11 " This is an experiment. IDL's structure is simple enough to permit a full @@ -17,303 +17,310 @@ " History: " 2.0: Michael's new version " 2.1: Support for Vim 7 spell (Anduin Withers) -" +" if exists("b:current_syntax") finish endif -if exists("idlsyntax_showerror") - syn match idlError +\S+ skipwhite skipempty nextgroup=idlError -endif - -syn region idlCppQuote start='\]*>" -syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString -syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError -syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral,idlString - -" Constants -syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt - -" Attribute -syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr -syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType - -" Types -syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral -syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4 -syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl -syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl -syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt -syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral -syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl -syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl - -" Modules -syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule -syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlError,idlSemiColon -syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName - -" Interfaces -syn cluster idlCommentable contains=idlComment -syn cluster idlContentCluster contains=idlUnion,idlStruct,idlEnum,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlInterfaceSections - -syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable -syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom -syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent -syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom -syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlError,idlSemiColon -syn keyword idlInterface interface dispinterface skipempty skipwhite nextgroup=idlInterfaceName -syn keyword idlInterfaceSections contained properties methods skipempty skipwhite nextgroup=idlSectionColon,idlError -syn match idlSectionColon contained ":" - - -syn match idlLibraryName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlLibraryContent,idlError,idlSemiColon -syn keyword idlLibrary library skipempty skipwhite nextgroup=idlLibraryName -syn region idlLibraryContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlCommentable,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlImportlib,idlCoclass,idlTypedef,idlInterface - -syn keyword idlImportlib contained importlib skipempty skipwhite nextgroup=idlStringArg -syn region idlStringArg contained start="(" end=")" contains=idlString nextgroup=idlError,idlSemiColon,idlErrorBrace,idlErrorSquareBracket - -syn keyword idlCoclass coclass contained skipempty skipwhite nextgroup=idlCoclassName -syn match idlCoclassName "[a-zA-Z0-9_]\+" contained skipempty skipwhite nextgroup=idlCoclassDefinition,idlError,idlSemiColon - -syn region idlCoclassDefinition contained start="{" end="}" contains=idlCoclassAttributes,idlInterface,idlErrorBracket,idlErrorSquareBracket skipempty skipwhite nextgroup=idlError,idlSemiColon -syn region idlCoclassAttributes contained start=+\[+ end=+]+ skipempty skipwhite nextgroup=idlInterface contains=idlErrorBracket,idlErrorBrace,idlCoclassAttribute -syn keyword idlCoclassAttribute contained default source -"syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceStubName - -syn match idlImportString +"\f\+"+ skipempty skipwhite nextgroup=idlError,idlSemiColon -syn keyword idlImport import skipempty skipwhite nextgroup=idlImportString - -syn region idlAttributes start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace,idlComment -syn keyword idlAttribute contained propput propget propputref id helpstring object uuid pointer_default -if !exists('idl_no_ms_extensions') -syn keyword idlAttribute contained nonextensible dual version aggregatable restricted hidden noncreatable oleautomation -endif -syn region idlAttributeParam contained start="(" end=")" contains=idlString,idlUuid,idlLiteral,idlErrorBrace,idlErrorSquareBracket -" skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral -syn match idlErrorBrace contained "}" -syn match idlErrorBracket contained ")" -syn match idlErrorSquareBracket contained "\]" - -syn match idlUuid contained +[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}+ - -" Raises -syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon - -" Context -syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon - -" Operation -syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms -syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral -syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize -syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName -syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt -syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral -syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName -syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName -syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName -syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType - -if !exists('idl_no_ms_extensions') -syn keyword idlOpParms contained retval optional skipempty skipwhite nextgroup=idlParmType - syn match idlOpParms contained +\<\(iid_is\|defaultvalue\)\s*([^)]*)+ skipempty skipwhite nextgroup=idlParamType - - syn keyword idlVariantType contained BSTR VARIANT VARIANT_BOOL long short unsigned double CURRENCY DATE - syn region idlSafeArray contained matchgroup=idlVariantType start=+SAFEARRAY(\s*+ end=+)+ contains=idlVariantType -endif - -syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon contains=idlOpParms,idlSafeArray,idlVariantType,@idlCommentable -syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents -syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName -syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral -syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt -syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName -syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName -syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName -syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName -syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp - -" Enum -syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlId,idlAttributes,@idlCommentable -syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents -syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName,idlEnumContents - -" Typedef -syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlTypedefOtherTypeQualifier,idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError - -if !exists('idl_no_extensions') - syn keyword idlTypedefOtherTypeQualifier contained struct enum interface nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError skipwhite - - syn region idlDefAttributes contained start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace skipempty skipwhite nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlError - - syn keyword idlDefBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlTypedefDecl,idlError - syn keyword idlDefBaseTypeInt contained short long skipempty skipwhite nextgroup=idlTypedefDecl,idlError - syn match idlDefOtherType contained +\<\k\+\>+ skipempty nextgroup=idlTypedefDecl,idlError - " syn keyword idlDefSeqType contained sequence skipempty skipwhite nextgroup=idlD4 - - " Enum typedef - syn keyword idlDefEnum contained enum skipempty skipwhite nextgroup=idlDefEnumName,idlDefEnumContents - syn match idlDefEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlDefEnumContents,idlTypedefDecl - syn region idlDefEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlTypedefDecl contains=idlId,idlAttributes - - syn match idlTypedefDecl contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlError,idlSemiColon -endif - -" Struct -syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlBaseType,idlBaseTypeInt,idlSeqType,@idlCommentable,idlEnum,idlUnion -syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent -syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName - -" Exception -syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName - -" Union -syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt -syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString -syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel -syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon -syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlCase -syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent -syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType -syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch -syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName - -if !exists('idl_no_extensions') - syn sync match idlInterfaceSync grouphere idlInterfaceContent "\<\(disp\)\=interface\>\s\+\k\+\s*:\s*\k\+\_s*{" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable - syn sync maxlines=1000 minlines=100 -else - syn sync lines=200 -endif -" syn sync fromstart - -if !exists("did_idl_syntax_inits") - let did_idl_syntax_inits = 1 - " The default methods for highlighting. Can be overridden later - command -nargs=+ HiLink hi def link - - HiLink idlInclude Include - HiLink idlPreProc PreProc - HiLink idlPreCondit PreCondit - HiLink idlDefine Macro - HiLink idlIncluded String - HiLink idlString String - HiLink idlComment Comment - HiLink idlTodo Todo - HiLink idlLiteral Number - HiLink idlUuid Number - HiLink idlType Type - HiLink idlVariantType idlType - - HiLink idlModule Keyword - HiLink idlInterface Keyword - HiLink idlEnum Keyword - HiLink idlStruct Keyword - HiLink idlUnion Keyword - HiLink idlTypedef Keyword - HiLink idlException Keyword - HiLink idlTypedefOtherTypeQualifier keyword - - HiLink idlModuleName Typedef - HiLink idlInterfaceName Typedef - HiLink idlEnumName Typedef - HiLink idlStructName Typedef - HiLink idlUnionName Typedef - - HiLink idlBaseTypeInt idlType - HiLink idlBaseType idlType - HiLink idlSeqType idlType - HiLink idlD1 Paren - HiLink idlD2 Paren - HiLink idlD3 Paren - HiLink idlD4 Paren - "HiLink idlArraySize Paren - "HiLink idlArraySize1 Paren - HiLink idlModuleContent Paren - HiLink idlUnionContent Paren - HiLink idlStructContent Paren - HiLink idlEnumContents Paren - HiLink idlInterfaceContent Paren - - HiLink idlSimpDecl Identifier - HiLink idlROAttr StorageClass - HiLink idlAttr Keyword - HiLink idlConst StorageClass - - HiLink idlOneWayOp StorageClass - HiLink idlOp idlType - HiLink idlParmType idlType - HiLink idlOpName Function - HiLink idlOpParms SpecialComment - HiLink idlParmName Identifier - HiLink idlInheritFrom Identifier - HiLink idlAttribute SpecialComment - - HiLink idlId Constant - "HiLink idlCase Keyword - HiLink idlCaseLabel Constant - - HiLink idlErrorBracket Error - HiLink idlErrorBrace Error - HiLink idlErrorSquareBracket Error - - HiLink idlImport Keyword - HiLink idlImportString idlString - HiLink idlCoclassAttribute StorageClass - HiLink idlLibrary Keyword - HiLink idlImportlib Keyword - HiLink idlCoclass Keyword - HiLink idlLibraryName Typedef - HiLink idlCoclassName Typedef - " hi idlLibraryContent guifg=red - HiLink idlTypedefDecl Typedef - HiLink idlDefEnum Keyword - HiLink idlDefv1Enum Keyword - HiLink idlDefEnumName Typedef - HiLink idlDefEnumContents Paren - HiLink idlDefBaseTypeInt idlType - HiLink idlDefBaseType idlType - HiLink idlDefSeqType idlType - HiLink idlInterfaceSections Label +let s:cpo_save = &cpo +try + set cpo&vim if exists("idlsyntax_showerror") - if exists("idlsyntax_showerror_soft") - hi default idlError guibg=#d0ffd0 - else - HiLink idlError Error - endif + syn match idlError +\S+ skipwhite skipempty nextgroup=idlError endif - delcommand HiLink -endif -let b:current_syntax = "idl" + syn region idlCppQuote start='\]*>" + syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString + syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError + syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral,idlString + + " Constants + syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt + + " Attribute + syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr + syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType + + " Types + syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral + syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4 + syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl + syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl + syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt + syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral + syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl + syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl + + " Modules + syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule + syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlError,idlSemiColon + syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName + + " Interfaces + syn cluster idlCommentable contains=idlComment + syn cluster idlContentCluster contains=idlUnion,idlStruct,idlEnum,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlInterfaceSections + + syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable + syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom + syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent + syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom + syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlError,idlSemiColon + syn keyword idlInterface interface dispinterface skipempty skipwhite nextgroup=idlInterfaceName + syn keyword idlInterfaceSections contained properties methods skipempty skipwhite nextgroup=idlSectionColon,idlError + syn match idlSectionColon contained ":" + + + syn match idlLibraryName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlLibraryContent,idlError,idlSemiColon + syn keyword idlLibrary library skipempty skipwhite nextgroup=idlLibraryName + syn region idlLibraryContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlCommentable,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlImportlib,idlCoclass,idlTypedef,idlInterface + + syn keyword idlImportlib contained importlib skipempty skipwhite nextgroup=idlStringArg + syn region idlStringArg contained start="(" end=")" contains=idlString nextgroup=idlError,idlSemiColon,idlErrorBrace,idlErrorSquareBracket + + syn keyword idlCoclass coclass contained skipempty skipwhite nextgroup=idlCoclassName + syn match idlCoclassName "[a-zA-Z0-9_]\+" contained skipempty skipwhite nextgroup=idlCoclassDefinition,idlError,idlSemiColon + + syn region idlCoclassDefinition contained start="{" end="}" contains=idlCoclassAttributes,idlInterface,idlErrorBracket,idlErrorSquareBracket skipempty skipwhite nextgroup=idlError,idlSemiColon + syn region idlCoclassAttributes contained start=+\[+ end=+]+ skipempty skipwhite nextgroup=idlInterface contains=idlErrorBracket,idlErrorBrace,idlCoclassAttribute + syn keyword idlCoclassAttribute contained default source + "syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceStubName + + syn match idlImportString +"\f\+"+ skipempty skipwhite nextgroup=idlError,idlSemiColon + syn keyword idlImport import skipempty skipwhite nextgroup=idlImportString + + syn region idlAttributes start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace,idlComment + syn keyword idlAttribute contained propput propget propputref id helpstring object uuid pointer_default + if !exists('idl_no_ms_extensions') + syn keyword idlAttribute contained nonextensible dual version aggregatable restricted hidden noncreatable oleautomation + endif + syn region idlAttributeParam contained start="(" end=")" contains=idlString,idlUuid,idlLiteral,idlErrorBrace,idlErrorSquareBracket + " skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral + syn match idlErrorBrace contained "}" + syn match idlErrorBracket contained ")" + syn match idlErrorSquareBracket contained "\]" + + syn match idlUuid contained +[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}+ + + " Raises + syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon + + " Context + syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon + + " Operation + syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms + syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral + syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize + syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName + syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt + syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral + syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName + syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName + syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName + syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType + + if !exists('idl_no_ms_extensions') + syn keyword idlOpParms contained retval optional skipempty skipwhite nextgroup=idlParmType + syn match idlOpParms contained +\<\(iid_is\|defaultvalue\)\s*([^)]*)+ skipempty skipwhite nextgroup=idlParamType + + syn keyword idlVariantType contained BSTR VARIANT VARIANT_BOOL long short unsigned double CURRENCY DATE + syn region idlSafeArray contained matchgroup=idlVariantType start=+SAFEARRAY(\s*+ end=+)+ contains=idlVariantType + endif + + syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon contains=idlOpParms,idlSafeArray,idlVariantType,@idlCommentable + syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents + syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName + syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral + syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt + syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName + syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName + syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName + syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName + syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp + + " Enum + syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlId,idlAttributes,@idlCommentable + syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents + syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName,idlEnumContents + + " Typedef + syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlTypedefOtherTypeQualifier,idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError + + if !exists('idl_no_extensions') + syn keyword idlTypedefOtherTypeQualifier contained struct enum interface nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError skipwhite + + syn region idlDefAttributes contained start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace skipempty skipwhite nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlError + + syn keyword idlDefBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlTypedefDecl,idlError + syn keyword idlDefBaseTypeInt contained short long skipempty skipwhite nextgroup=idlTypedefDecl,idlError + syn match idlDefOtherType contained +\<\k\+\>+ skipempty nextgroup=idlTypedefDecl,idlError + " syn keyword idlDefSeqType contained sequence skipempty skipwhite nextgroup=idlD4 + + " Enum typedef + syn keyword idlDefEnum contained enum skipempty skipwhite nextgroup=idlDefEnumName,idlDefEnumContents + syn match idlDefEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlDefEnumContents,idlTypedefDecl + syn region idlDefEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlTypedefDecl contains=idlId,idlAttributes + + syn match idlTypedefDecl contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlError,idlSemiColon + endif + + " Struct + syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlBaseType,idlBaseTypeInt,idlSeqType,@idlCommentable,idlEnum,idlUnion + syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent + syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName + + " Exception + syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName + + " Union + syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt + syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString + syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel + syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon + syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlCase + syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent + syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType + syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch + syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName + + if !exists('idl_no_extensions') + syn sync match idlInterfaceSync grouphere idlInterfaceContent "\<\(disp\)\=interface\>\s\+\k\+\s*:\s*\k\+\_s*{" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable + syn sync maxlines=1000 minlines=100 + else + syn sync lines=200 + endif + " syn sync fromstart + + if !exists("did_idl_syntax_inits") + let did_idl_syntax_inits = 1 + " The default methods for highlighting. Can be overridden later + command -nargs=+ HiLink hi def link + + HiLink idlInclude Include + HiLink idlPreProc PreProc + HiLink idlPreCondit PreCondit + HiLink idlDefine Macro + HiLink idlIncluded String + HiLink idlString String + HiLink idlComment Comment + HiLink idlTodo Todo + HiLink idlLiteral Number + HiLink idlUuid Number + HiLink idlType Type + HiLink idlVariantType idlType + + HiLink idlModule Keyword + HiLink idlInterface Keyword + HiLink idlEnum Keyword + HiLink idlStruct Keyword + HiLink idlUnion Keyword + HiLink idlTypedef Keyword + HiLink idlException Keyword + HiLink idlTypedefOtherTypeQualifier keyword + + HiLink idlModuleName Typedef + HiLink idlInterfaceName Typedef + HiLink idlEnumName Typedef + HiLink idlStructName Typedef + HiLink idlUnionName Typedef + + HiLink idlBaseTypeInt idlType + HiLink idlBaseType idlType + HiLink idlSeqType idlType + HiLink idlD1 Paren + HiLink idlD2 Paren + HiLink idlD3 Paren + HiLink idlD4 Paren + "HiLink idlArraySize Paren + "HiLink idlArraySize1 Paren + HiLink idlModuleContent Paren + HiLink idlUnionContent Paren + HiLink idlStructContent Paren + HiLink idlEnumContents Paren + HiLink idlInterfaceContent Paren + + HiLink idlSimpDecl Identifier + HiLink idlROAttr StorageClass + HiLink idlAttr Keyword + HiLink idlConst StorageClass + + HiLink idlOneWayOp StorageClass + HiLink idlOp idlType + HiLink idlParmType idlType + HiLink idlOpName Function + HiLink idlOpParms SpecialComment + HiLink idlParmName Identifier + HiLink idlInheritFrom Identifier + HiLink idlAttribute SpecialComment + + HiLink idlId Constant + "HiLink idlCase Keyword + HiLink idlCaseLabel Constant + + HiLink idlErrorBracket Error + HiLink idlErrorBrace Error + HiLink idlErrorSquareBracket Error + + HiLink idlImport Keyword + HiLink idlImportString idlString + HiLink idlCoclassAttribute StorageClass + HiLink idlLibrary Keyword + HiLink idlImportlib Keyword + HiLink idlCoclass Keyword + HiLink idlLibraryName Typedef + HiLink idlCoclassName Typedef + " hi idlLibraryContent guifg=red + HiLink idlTypedefDecl Typedef + HiLink idlDefEnum Keyword + HiLink idlDefv1Enum Keyword + HiLink idlDefEnumName Typedef + HiLink idlDefEnumContents Paren + HiLink idlDefBaseTypeInt idlType + HiLink idlDefBaseType idlType + HiLink idlDefSeqType idlType + HiLink idlInterfaceSections Label + + if exists("idlsyntax_showerror") + if exists("idlsyntax_showerror_soft") + hi default idlError guibg=#d0ffd0 + else + HiLink idlError Error + endif + endif + delcommand HiLink + endif + + let b:current_syntax = "idl" +finally + let &cpo = s:cpo_save + unlet s:cpo_save +endtry " vim: sw=2 et diff --git a/runtime/syntax/mail.vim b/runtime/syntax/mail.vim index ed7ca216da..cf4a2c69d5 100644 --- a/runtime/syntax/mail.vim +++ b/runtime/syntax/mail.vim @@ -40,7 +40,7 @@ syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\ syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$" syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$" fold syn match mailHeaderKey contained contains=@NoSpell "\v(^(\> ?)*)@<=date:" -syn match mailSubject contained "\v^subject:.*$" fold +syn match mailSubject contained contains=@NoSpell "\v^subject:.*$" fold syn match mailSubject contained contains=@NoSpell "\v(^(\> ?)+)@<=subject:.*$" " Anything in the header between < and > is an email address diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 73eebc3888..1497499c59 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Dr. Charles E. Campbell, Jr. " Previous Maintainer: Lennart Schultz -" Last Change: Aug 16, 2011 -" Version: 118 +" Last Change: Dec 09, 2011 +" Version: 121 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr) @@ -101,7 +101,7 @@ syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shDeref,shDerefSim syn cluster shArithList contains=@shArithParenList,shParenError syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq -syn cluster shColonList contains=@shCaseList +"syn cluster shColonList contains=@shCaseList syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shPosnParm,shCtrlSeq,shSpecial @@ -119,10 +119,10 @@ syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial -syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet +syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo +syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq - " Echo: {{{1 " ==== " This one is needed INSIDE a CommandSub, so that `echo bla` be correct @@ -143,18 +143,20 @@ endif " Error Codes: {{{1 " ============ -syn match shDoError "\" -syn match shIfError "\" -syn match shInError "\" -syn match shCaseError ";;" -syn match shEsacError "\" -syn match shCurlyError "}" -syn match shParenError ")" -syn match shOK '\.\(done\|fi\|in\|esac\)' -if exists("b:is_kornshell") - syn match shDTestError "]]" +if !exists("g:sh_no_error") + syn match shDoError "\" + syn match shIfError "\" + syn match shInError "\" + syn match shCaseError ";;" + syn match shEsacError "\" + syn match shCurlyError "}" + syn match shParenError ")" + syn match shOK '\.\(done\|fi\|in\|esac\)' + if exists("b:is_kornshell") + syn match shDTestError "]]" + endif + syn match shTestError "]" endif -syn match shTestError "]" " Options: {{{1 " ==================== @@ -204,11 +206,11 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum " ====== if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor syn region shDo fold transparent matchgroup=shConditional start="\" matchgroup=shConditional end="\" contains=@shLoopList - syn region shIf fold transparent matchgroup=shConditional start="\+ end="\<;\_s*then\>" end="\" contains=@shIfList syn region shFor fold matchgroup=shLoop start="\+ end="\<;\_s*then\>" end="\" contains=@shIfList syn region shFor matchgroup=shLoop start="\ -" Last Change: Oct 12, 2011 -" Version: 69 +" Last Change: Jan 10, 2012 +" Version: 72 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Notes: {{{1 @@ -603,6 +603,7 @@ if has("conceal") && &enc == 'utf-8' let s:texMathList=[ \ ['|' , '‖'], \ ['aleph' , 'ℵ'], + \ ['amalg' , '∐'], \ ['angle' , '∠'], \ ['approx' , '≈'], \ ['ast' , '∗'], @@ -614,20 +615,24 @@ if has("conceal") && &enc == 'utf-8' \ ['because' , '∵'], \ ['between' , '≬'], \ ['bigcap' , '∩'], + \ ['bigcirc' , '○'], \ ['bigcup' , '∪'], \ ['bigodot' , '⊙'], \ ['bigoplus' , '⊕'], \ ['bigotimes' , '⊗'], \ ['bigsqcup' , '⊔'], \ ['bigtriangledown', '∇'], + \ ['bigtriangleup' , '∆'], \ ['bigvee' , '⋁'], \ ['bigwedge' , '⋀'], \ ['blacksquare' , '∎'], \ ['bot' , '⊥'], + \ ['bowtie' , '⋈'], \ ['boxdot' , '⊡'], \ ['boxminus' , '⊟'], \ ['boxplus' , '⊞'], \ ['boxtimes' , '⊠'], + \ ['bullet' , '•'], \ ['bumpeq' , '≏'], \ ['Bumpeq' , '≎'], \ ['cap' , '∩'], @@ -651,36 +656,41 @@ if has("conceal") && &enc == 'utf-8' \ ['curlyeqsucc' , '⋟'], \ ['curlyvee' , '⋎'], \ ['curlywedge' , '⋏'], + \ ['dagger' , '†'], \ ['dashv' , '⊣'], + \ ['ddagger' , '‡'], + \ ['ddots' , '⋱'], \ ['diamond' , '⋄'], \ ['diamondsuit' , '♢'], \ ['div' , '÷'], \ ['doteq' , '≐'], \ ['doteqdot' , '≑'], \ ['dotplus' , '∔'], + \ ['dots' , '…'], \ ['dotsb' , '⋯'], \ ['dotsc' , '…'], - \ ['dots' , '…'], \ ['dotsi' , '⋯'], \ ['dotso' , '…'], \ ['doublebarwedge' , '⩞'], \ ['downarrow' , '↓'], \ ['Downarrow' , '⇓'], + \ ['ell' , 'ℓ'], \ ['emptyset' , '∅'], \ ['eqcirc' , '≖'], \ ['eqsim' , '≂'], \ ['eqslantgtr' , '⪖'], \ ['eqslantless' , '⪕'], \ ['equiv' , '≡'], - \ ['ell' , 'ℓ'], \ ['exists' , '∃'], \ ['fallingdotseq' , '≒'], \ ['flat' , '♭'], \ ['forall' , '∀'], + \ ['frown' , '⁔'], \ ['ge' , '≥'], \ ['geq' , '≥'], \ ['geqq' , '≧'], \ ['gets' , '←'], + \ ['gg' , '⟫'], \ ['gneqq' , '≩'], \ ['gtrdot' , '⋗'], \ ['gtreqless' , '⋛'], @@ -700,33 +710,40 @@ if has("conceal") && &enc == 'utf-8' \ ['lceil' , '⌈'], \ ['ldots' , '…'], \ ['le' , '≤'], - \ ['leftarrow' , '⟵'], - \ ['Leftarrow' , '⟸'], - \ ['leftarrowtail' , '↢'], + \ ['leadsto' , '↝'], \ ['left(' , '('], \ ['left\[' , '['], \ ['left\\{' , '{'], + \ ['leftarrow' , '⟵'], + \ ['Leftarrow' , '⟸'], + \ ['leftarrowtail' , '↢'], + \ ['leftharpoondown', '↽'], + \ ['leftharpoonup' , '↼'], \ ['leftrightarrow' , '⇔'], + \ ['Leftrightarrow' , '⇔'], \ ['leftrightsquigarrow', '↭'], \ ['leftthreetimes' , '⋋'], \ ['leq' , '≤'], + \ ['leq' , '≤'], \ ['leqq' , '≦'], \ ['lessdot' , '⋖'], \ ['lesseqgtr' , '⋚'], \ ['lesssim' , '≲'], \ ['lfloor' , '⌊'], + \ ['ll' , '≪'], \ ['lmoustache' , '╭'], \ ['lneqq' , '≨'], \ ['ltimes' , '⋉'], \ ['mapsto' , '↦'], \ ['measuredangle' , '∡'], \ ['mid' , '∣'], + \ ['models' , '╞'], \ ['mp' , '∓'], \ ['nabla' , '∇'], \ ['natural' , '♮'], \ ['ncong' , '≇'], - \ ['nearrow' , '↗'], \ ['ne' , '≠'], + \ ['nearrow' , '↗'], \ ['neg' , '¬'], \ ['neq' , '≠'], \ ['nexists' , '∄'], @@ -763,12 +780,13 @@ if has("conceal") && &enc == 'utf-8' \ ['otimes' , '⊗'], \ ['owns' , '∋'], \ ['P' , '¶'], + \ ['parallel' , '║'], \ ['partial' , '∂'], \ ['perp' , '⊥'], \ ['pitchfork' , '⋔'], \ ['pm' , '±'], - \ ['precapprox' , '⪷'], \ ['prec' , '≺'], + \ ['precapprox' , '⪷'], \ ['preccurlyeq' , '≼'], \ ['preceq' , '⪯'], \ ['precnapprox' , '⪹'], @@ -780,12 +798,13 @@ if has("conceal") && &enc == 'utf-8' \ ['rceil' , '⌉'], \ ['Re' , 'ℜ'], \ ['rfloor' , '⌋'], - \ ['rightarrow' , '⟶'], - \ ['Rightarrow' , '⟹'], - \ ['rightarrowtail' , '↣'], \ ['right)' , ')'], \ ['right]' , ']'], \ ['right\\}' , '}'], + \ ['rightarrow' , '⟶'], + \ ['Rightarrow' , '⟹'], + \ ['rightarrowtail' , '↣'], + \ ['rightleftharpoons', '⇌'], \ ['rightsquigarrow', '↝'], \ ['rightthreetimes', '⋌'], \ ['risingdotseq' , '≓'], @@ -796,6 +815,8 @@ if has("conceal") && &enc == 'utf-8' \ ['setminus' , '∖'], \ ['sharp' , '♯'], \ ['sim' , '∼'], + \ ['simeq' , '⋍'], + \ ['smile' , '‿'], \ ['spadesuit' , '♠'], \ ['sphericalangle' , '∢'], \ ['sqcap' , '⊓'], @@ -804,20 +825,22 @@ if has("conceal") && &enc == 'utf-8' \ ['sqsubseteq' , '⊑'], \ ['sqsupset' , '⊐'], \ ['sqsupseteq' , '⊒'], + \ ['star' , '✫'], \ ['subset' , '⊂'], \ ['Subset' , '⋐'], \ ['subseteq' , '⊆'], \ ['subseteqq' , '⫅'], \ ['subsetneq' , '⊊'], \ ['subsetneqq' , '⫋'], - \ ['succapprox' , '⪸'], \ ['succ' , '≻'], + \ ['succapprox' , '⪸'], \ ['succcurlyeq' , '≽'], \ ['succeq' , '⪰'], \ ['succnapprox' , '⪺'], \ ['succneqq' , '⪶'], \ ['succsim' , '≿'], \ ['sum' , '∑'], + \ ['supset' , '⊃'], \ ['Supset' , '⋑'], \ ['supseteq' , '⊇'], \ ['supseteqq' , '⫆'], @@ -847,12 +870,15 @@ if has("conceal") && &enc == 'utf-8' \ ['vDash' , '⊨'], \ ['Vdash' , '⊩'], \ ['vdots' , '⋮'], - \ ['veebar' , '⊻'], \ ['vee' , '∨'], + \ ['veebar' , '⊻'], \ ['Vvdash' , '⊪'], \ ['wedge' , '∧'], \ ['wp' , '℘'], \ ['wr' , '≀']] +" \ ['jmath' , 'X'] +" \ ['uminus' , 'X'] +" \ ['uplus' , 'X'] for texmath in s:texMathList if texmath[0] =~ '\w$' exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] @@ -999,6 +1025,9 @@ if has("conceal") && &enc == 'utf-8' call s:SuperSub('texSuperscript','\^','T','ᵀ') call s:SuperSub('texSuperscript','\^','U','ᵁ') call s:SuperSub('texSuperscript','\^','W','ᵂ') + call s:SuperSub('texSuperscript','\^',',','︐') + call s:SuperSub('texSuperscript','\^',':','︓') + call s:SuperSub('texSuperscript','\^',';','︔') call s:SuperSub('texSuperscript','\^','+','⁺') call s:SuperSub('texSuperscript','\^','-','⁻') call s:SuperSub('texSuperscript','\^','<','˂') @@ -1023,6 +1052,7 @@ if has("conceal") && &enc == 'utf-8' call s:SuperSub('texSubscript','_','i','ᵢ') call s:SuperSub('texSubscript','_','o','ₒ') call s:SuperSub('texSubscript','_','u','ᵤ') + call s:SuperSub('texSubscript','_',',','︐') call s:SuperSub('texSubscript','_','+','₊') call s:SuperSub('texSubscript','_','-','₋') call s:SuperSub('texSubscript','_','/','ˏ') @@ -1175,6 +1205,8 @@ if did_tex_syntax_inits == 1 HiLink texGreek texStatement HiLink texSuperscript texStatement HiLink texSubscript texStatement + HiLink texSuperscripts texSuperscript + HiLink texSubscripts texSubscript HiLink texMathSymbol texStatement HiLink texMathZoneV texMath HiLink texMathZoneW texMath diff --git a/runtime/syntax/upstart.vim b/runtime/syntax/upstart.vim index 9db8bcbd41..b3f2b9e637 100644 --- a/runtime/syntax/upstart.vim +++ b/runtime/syntax/upstart.vim @@ -2,8 +2,8 @@ " Language: Upstart job files " Maintainer: Michael Biebl " James Hunt -" Last Change: 2011 Mar 22 -" License: GPL v2 +" Last Change: 2012 Jan 16 +" License: The Vim license " Version: 0.4 " Remark: Syntax highlighting for Upstart (init(8)) job files. " diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index a439fb0158..eafd18b8ba 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,14 +1,16 @@ " Vim syntax file " Language: Vim 7.3 script " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Jul 18, 2011 -" Version: 7.3-08 +" Last Change: Jan 11, 2012 +" Version: 7.3-13 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 if exists("b:current_syntax") finish endif +let s:keepcpo= &cpo +set cpo&vim " vimTodo: contains common special-notices for comments {{{2 " Use the vimCommentGroup cluster to add your own. @@ -118,14 +120,14 @@ syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i " ======= syn match vimBehave "\" skipwhite nextgroup=vimBehaveModel,vimBehaveError syn keyword vimBehaveModel contained mswin xterm -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror") syn match vimBehaveError contained "[^ ]\+" endif " Filetypes {{{2 " ========= syn match vimFiletype "\\s\+[eE][nN][dD]\>" endif syn keyword vimAugroupKey contained aug[roup] @@ -152,7 +154,7 @@ syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite ne syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen oneline matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup syn region vimOperParen oneline matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") syn match vimOperError ")" endif @@ -196,7 +198,7 @@ syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vi syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror") syn match vimUserCmdError contained "\S\+\>" endif syn case ignore @@ -269,7 +271,7 @@ syn match vimMark "\'lc=1 +syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' " Set command and associated set-options (vimOptions) with comment {{{2 syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod @@ -364,7 +366,7 @@ syn match vimNotFunc "\\|\\|\\|\" " Errors And Warnings: {{{2 " ==================== -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank " syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank syn match vimElseIfErr "\" @@ -381,7 +383,7 @@ syn match vimNormCmds contained ".*$" syn match vimGroupList contained "@\=[^ \t,]*" contains=vimGroupSpecial,vimPatSep syn match vimGroupList contained "@\=[^ \t,]*," nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror") syn match vimSynError contained "\i\+" syn match vimSynError contained "\i\+=" nextgroup=vimGroupList endif @@ -395,7 +397,7 @@ syn cluster vimFuncBodyList add=vimSyntax " Syntax: case {{{2 syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror") syn match vimSynCaseError contained "\i\+" endif syn keyword vimSynCase contained ignore match @@ -456,7 +458,7 @@ syn cluster vimFuncBodyList add=vimSynType " Syntax: sync {{{2 " ============ syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror") syn match vimSyncError contained "\i\+" endif syn keyword vimSyncC contained ccomment clear fromstart @@ -477,6 +479,9 @@ syn match vimIsCommand "\s*\a\+" transparent contains=vimCommand,vimNotatio " Highlighting {{{2 " ============ syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") + syn match vimHiCtermError contained "[^0-9]\i*" +endif syn match vimHighlight "\" skipwhite nextgroup=vimHiBang,@vimHighlightCluster syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster @@ -488,20 +493,18 @@ syn case match syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList syn case ignore -syn keyword vimHiCtermColor contained black blue brown cyan darkBlue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred magenta red white yellow +syn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred magenta red white yellow +syn match vimHiCtermColor contained "\" syn case match syn match vimHiFontname contained "[a-zA-Z\-*]\+" syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" syn match vimHiGuiRgb contained "#\x\{6}" -if !exists("g:vimsyn_noerror") - syn match vimHiCtermError contained "[^0-9]\i*" -endif " Highlighting: hi group key=arg ... {{{2 syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation syn region vimHiKeyList contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||" contains=@vimHiCluster -if !exists("g:vimsyn_noerror") +if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror") syn match vimHiKeyError contained "\i\+="he=e-1 endif syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList @@ -757,7 +760,9 @@ hi def link vimFTCmd vimCommand hi def link vimFTOption vimSynType hi def link vimFuncKey vimCommand hi def link vimGroupAdd vimSynOption +hi def link vimGroupName vimGroup hi def link vimGroupRem vimSynOption +hi def link vimHiClear vimHighlight hi def link vimHiCtermFgBg vimHiTerm hi def link vimHiCTerm vimHiTerm hi def link vimHighlight vimCommand @@ -872,8 +877,14 @@ hi def link vimTodo Todo hi def link vimUserAttrbCmpltFunc Special hi def link vimUserCmdError Error hi def link vimUserFunc Normal +hi def link vimVar Identifier hi def link vimWarn WarningMsg " Current Syntax Variable: {{{2 let b:current_syntax = "vim" + +" --------------------------------------------------------------------- +" Cleanup: {{{1 +let &cpo = s:keepcpo +unlet s:keepcpo " vim:ts=18 fdm=marker From 64ce3f5fd9225c6536bf9830ea9db248ba311387 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 21:13:59 +0100 Subject: [PATCH 016/115] updated for version 7.3.409 Problem: The license in pty.c is unclear. Solution: Add a comment about the license. --- src/pty.c | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/pty.c b/src/pty.c index 59e0069cc0..4dad54c1f2 100644 --- a/src/pty.c +++ b/src/pty.c @@ -14,6 +14,10 @@ * It has been modified to work better with Vim. * The parts that are not used in Vim have been deleted. * See the "screen" sources for the complete stuff. + * + * This specific version is distibuted under the Vim license (attribution by + * Juergen Weigert), the GPL applies to the original version, see the + * copyright notice below. */ /* Copyright (c) 1993 diff --git a/src/version.c b/src/version.c index bd91554215..110f14f01e 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 409, /**/ 408, /**/ From c27a882e7c9b258475a25baad40ff152a4bd36bf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 20 Jan 2012 21:14:00 +0100 Subject: [PATCH 017/115] Added tag v7-3-409 for changeset 7b59c2c032ca --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 34324ccf14..80af3dafda 100644 --- a/.hgtags +++ b/.hgtags @@ -1743,3 +1743,4 @@ c75a8d2404bd4f1297aafbb10ab1ae68ba678249 v7-3-405 fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 55cebc7e5de078ef323a94ad79319c0ab33b09ef v7-3-407 1fec3c62f6e8065c2f7ea7422213e78b50032de6 v7-3-408 +7b59c2c032ca8a15425afb1b519c809abfd572f0 v7-3-409 From d743f1596184f6447e70f97b26d2b0f3eda198e3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 23 Jan 2012 20:48:40 +0100 Subject: [PATCH 018/115] updated for version 7.3.410 Problem: Compiler error for // comment. (Joachim Schmitz) Solution: Turn into /* comment */. --- src/message.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/message.c b/src/message.c index 95f626c95d..872fadc661 100644 --- a/src/message.c +++ b/src/message.c @@ -333,7 +333,7 @@ trunc_string(s, buf, room, buflen) } else { - buf[e - 1] = NUL; // make sure it is truncated + buf[e - 1] = NUL; /* make sure it is truncated */ } } diff --git a/src/version.c b/src/version.c index 110f14f01e..9294728f77 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 410, /**/ 409, /**/ From 6b0742c68295a0282504d979bb57988e912543d9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 23 Jan 2012 20:48:40 +0100 Subject: [PATCH 019/115] Added tag v7-3-410 for changeset 5cf2a671d8eb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 80af3dafda..e7390475e3 100644 --- a/.hgtags +++ b/.hgtags @@ -1744,3 +1744,4 @@ fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 55cebc7e5de078ef323a94ad79319c0ab33b09ef v7-3-407 1fec3c62f6e8065c2f7ea7422213e78b50032de6 v7-3-408 7b59c2c032ca8a15425afb1b519c809abfd572f0 v7-3-409 +5cf2a671d8ebdf46590b8fe349ad2b6f84eed868 v7-3-410 From 3ba688db54c8a9e44f2214fa28e89102b264d6f2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 11:43:09 +0100 Subject: [PATCH 020/115] updated for version 7.3.411 Problem: Pasting in Visual mode using the "" register does not work. (John Beckett) Solution: Detect that the write is overwriting the pasted register. (Christian Brabandt) --- src/normal.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/normal.c b/src/normal.c index 6bf547016b..a6cd2d6b29 100644 --- a/src/normal.c +++ b/src/normal.c @@ -9329,7 +9329,7 @@ nv_put(cap) # ifdef FEAT_CLIPBOARD adjust_clip_reg(®name); # endif - if (regname == 0 || VIM_ISDIGIT(regname) + if (regname == 0 || regname == '"' || VIM_ISDIGIT(regname) # ifdef FEAT_CLIPBOARD || (clip_unnamed && (regname == '*' || regname == '+')) # endif diff --git a/src/version.c b/src/version.c index 9294728f77..da0edeb3d9 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 411, /**/ 410, /**/ From f602d4a28558c8be6ba6e4fbc0468ef35cd98041 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 11:43:09 +0100 Subject: [PATCH 021/115] Added tag v7-3-411 for changeset 8066fb7e3564 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e7390475e3..89150d94f7 100644 --- a/.hgtags +++ b/.hgtags @@ -1745,3 +1745,4 @@ fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 1fec3c62f6e8065c2f7ea7422213e78b50032de6 v7-3-408 7b59c2c032ca8a15425afb1b519c809abfd572f0 v7-3-409 5cf2a671d8ebdf46590b8fe349ad2b6f84eed868 v7-3-410 +8066fb7e356481b52019a52696072594d2590d4f v7-3-411 From 0cbeed8fb22ea5fd7612a1a1a7f87f88a9f5688f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 11:45:30 +0100 Subject: [PATCH 022/115] updated for version 7.3.412 Problem: Storing a float in a session file has an additional '&'. Solution: Remove the '&'. (Yasuhiro Matsumoto) --- src/eval.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index dd1685106f..4ba4121d7b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -22929,7 +22929,7 @@ store_session_globals(fd) f = -f; sign = '-'; } - if ((fprintf(fd, "let %s = %c&%f", + if ((fprintf(fd, "let %s = %c%f", this_var->di_key, sign, f) < 0) || put_eol(fd) == FAIL) return FAIL; diff --git a/src/version.c b/src/version.c index da0edeb3d9..d51cd71b0c 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 412, /**/ 411, /**/ From 088a20181f1dbced38c3060ebf3d1d0a88e49803 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 11:45:30 +0100 Subject: [PATCH 023/115] Added tag v7-3-412 for changeset aaee60933022 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 89150d94f7..78d7b2bee9 100644 --- a/.hgtags +++ b/.hgtags @@ -1746,3 +1746,4 @@ fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 7b59c2c032ca8a15425afb1b519c809abfd572f0 v7-3-409 5cf2a671d8ebdf46590b8fe349ad2b6f84eed868 v7-3-410 8066fb7e356481b52019a52696072594d2590d4f v7-3-411 +aaee6093302281b70798ae4dc599145b95891908 v7-3-412 From 7101ad97d100da8e4900472f82949a0f7d7f43b2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 13:01:59 +0100 Subject: [PATCH 024/115] updated for version 7.3.413 Problem: Build warnings on MS-Windows. Solution: Add type casts. (Mike Williams) --- src/ex_getln.c | 2 +- src/message.c | 2 +- src/term.c | 2 +- src/version.c | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index b63ebb6137..70acb0ee65 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5923,7 +5923,7 @@ ex_history(eap) hist[i].hisnum); if (vim_strsize(hist[i].hisstr) > (int)Columns - 10) trunc_string(hist[i].hisstr, IObuff + STRLEN(IObuff), - (int)Columns - 10, IOSIZE - STRLEN(IObuff)); + (int)Columns - 10, IOSIZE - (int)STRLEN(IObuff)); else STRCAT(IObuff, hist[i].hisstr); msg_outtrans(IObuff); diff --git a/src/message.c b/src/message.c index 872fadc661..c9b6a28463 100644 --- a/src/message.c +++ b/src/message.c @@ -325,7 +325,7 @@ trunc_string(s, buf, room, buflen) if (e + 3 < buflen) { mch_memmove(buf + e, "...", (size_t)3); - len = STRLEN(s + i) + 1; + len = (int)STRLEN(s + i) + 1; if (len >= buflen - e - 3) len = buflen - e - 3 - 1; mch_memmove(buf + e + 3, s + i, len); diff --git a/src/term.c b/src/term.c index 93d325e43e..47df299615 100644 --- a/src/term.c +++ b/src/term.c @@ -5252,7 +5252,7 @@ find_term_bykeys(src) char_u *src; { int i; - int slen = STRLEN(src); + int slen = (int)STRLEN(src); for (i = 0; i < tc_len; ++i) { diff --git a/src/version.c b/src/version.c index d51cd71b0c..36c3a84802 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 413, /**/ 412, /**/ From b4db73f08ac98a0219fdebf2637cd7d76da4a9f0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 13:01:59 +0100 Subject: [PATCH 025/115] Added tag v7-3-413 for changeset 821c8be2e9d6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 78d7b2bee9..ce5766901b 100644 --- a/.hgtags +++ b/.hgtags @@ -1747,3 +1747,4 @@ fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 5cf2a671d8ebdf46590b8fe349ad2b6f84eed868 v7-3-410 8066fb7e356481b52019a52696072594d2590d4f v7-3-411 aaee6093302281b70798ae4dc599145b95891908 v7-3-412 +821c8be2e9d604282481f50f7c5a1a210b9b1696 v7-3-413 From 9c638c298b4cd92b6cc4c98468ef52569dc24f57 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 13:40:08 +0100 Subject: [PATCH 026/115] updated for version 7.3.414 Problem: Using CTRL-A on "000" drops the leading zero, while on "001" it doesn't. Solution: Detect "000" as an octal number. (James McCoy) --- src/charset.c | 8 ++++---- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/charset.c b/src/charset.c index 90cf06cebb..98d4bff405 100644 --- a/src/charset.c +++ b/src/charset.c @@ -764,7 +764,7 @@ ptr2cells(p) } /* - * Return the number of characters string "s" will take on the screen, + * Return the number of character cells string "s" will take on the screen, * counting TABs as two characters: "^I". */ int @@ -775,8 +775,8 @@ vim_strsize(s) } /* - * Return the number of characters string "s[len]" will take on the screen, - * counting TABs as two characters: "^I". + * Return the number of character cells string "s[len]" will take on the + * screen, counting TABs as two characters: "^I". */ int vim_strnsize(s, len) @@ -1830,7 +1830,7 @@ vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr) hex = 0; /* can't be octal */ break; } - if (ptr[n] > '0') + if (ptr[n] >= '0') hex = '0'; /* assume octal */ } } diff --git a/src/version.c b/src/version.c index 36c3a84802..f7ddf644d3 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 414, /**/ 413, /**/ From 9a5bbfc16cebbd3b91000d86b163fef9573046a8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 13:40:08 +0100 Subject: [PATCH 027/115] Added tag v7-3-414 for changeset c7861dd3b593 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ce5766901b..08abd86d00 100644 --- a/.hgtags +++ b/.hgtags @@ -1748,3 +1748,4 @@ fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 8066fb7e356481b52019a52696072594d2590d4f v7-3-411 aaee6093302281b70798ae4dc599145b95891908 v7-3-412 821c8be2e9d604282481f50f7c5a1a210b9b1696 v7-3-413 +c7861dd3b593a2011ae46dbe43d78f44cdf2d99f v7-3-414 From 994188505124f9020c39d5a1b9c361f0249d8815 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 14:32:30 +0100 Subject: [PATCH 028/115] updated for version 7.3.415 Problem: Completion of functions stops once a dictionary is encountered. (James McCoy) Solution: Return an empty string instead of NULL. --- src/eval.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index 4ba4121d7b..c63a5e0e5e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -21802,7 +21802,7 @@ get_user_func_name(xp, idx) fp = HI2UF(hi); if (fp->uf_flags & FC_DICT) - return NULL; /* don't show dict functions */ + return ""; /* don't show dict functions */ if (STRLEN(fp->uf_name) + 4 >= IOSIZE) return fp->uf_name; /* prevents overflow */ diff --git a/src/version.c b/src/version.c index f7ddf644d3..cdd57ad1b3 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 415, /**/ 414, /**/ From 65a6ab19812a23a2be79dc481ce18a2b0cf6a248 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 14:32:30 +0100 Subject: [PATCH 029/115] Added tag v7-3-415 for changeset e7e4dbac7ded --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 08abd86d00..84afd8d424 100644 --- a/.hgtags +++ b/.hgtags @@ -1749,3 +1749,4 @@ fbb23bd517f8614f512cd81b253519cbf4548863 v7-3-406 aaee6093302281b70798ae4dc599145b95891908 v7-3-412 821c8be2e9d604282481f50f7c5a1a210b9b1696 v7-3-413 c7861dd3b593a2011ae46dbe43d78f44cdf2d99f v7-3-414 +e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 From 13f714f8fbde053ded9c16b6dd4c782bddee4c0a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:03:07 +0100 Subject: [PATCH 030/115] updated for version 7.3.416 Problem: Compiler warning for wrong pointer. Solution: Add type cast. --- src/testdir/test43.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/testdir/test43.in b/src/testdir/test43.in index 49a97d939d..7c545073da 100644 --- a/src/testdir/test43.in +++ b/src/testdir/test43.in @@ -1,6 +1,7 @@ Tests for regexp with various magic settings. STARTTEST +:so small.vim :set nocompatible viminfo+=nviminfo /^1 /a*b\{2}c\+/e From cdac7f377b7e5607b8050760fbdc2f6f908d1a6c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:03:07 +0100 Subject: [PATCH 031/115] Added tag v7-3-416 for changeset 5c5ca538693f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 84afd8d424..cb73ca6609 100644 --- a/.hgtags +++ b/.hgtags @@ -1750,3 +1750,4 @@ aaee6093302281b70798ae4dc599145b95891908 v7-3-412 821c8be2e9d604282481f50f7c5a1a210b9b1696 v7-3-413 c7861dd3b593a2011ae46dbe43d78f44cdf2d99f v7-3-414 e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 +5c5ca538693fbfd3a574998693094b48f19ec12e v7-3-416 From 1393d8a590f03226c6a700e839dc9223610ba084 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:52:06 +0100 Subject: [PATCH 032/115] updated for version 7.3.416 Problem: Compiler warning for wrong pointer. Solution: Add type cast. --- src/eval.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index c63a5e0e5e..7b4095eec7 100644 --- a/src/eval.c +++ b/src/eval.c @@ -21802,7 +21802,7 @@ get_user_func_name(xp, idx) fp = HI2UF(hi); if (fp->uf_flags & FC_DICT) - return ""; /* don't show dict functions */ + return (char_u *)""; /* don't show dict functions */ if (STRLEN(fp->uf_name) + 4 >= IOSIZE) return fp->uf_name; /* prevents overflow */ diff --git a/src/version.c b/src/version.c index cdd57ad1b3..4e78bd7131 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 416, /**/ 415, /**/ From 8ac199dc0a2c1971137555717bc0bc6a93ee8322 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:52:42 +0100 Subject: [PATCH 033/115] Added tag v7-3-416 for changeset 22a626604672 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index cb73ca6609..907b7a7b0f 100644 --- a/.hgtags +++ b/.hgtags @@ -1751,3 +1751,5 @@ aaee6093302281b70798ae4dc599145b95891908 v7-3-412 c7861dd3b593a2011ae46dbe43d78f44cdf2d99f v7-3-414 e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 5c5ca538693fbfd3a574998693094b48f19ec12e v7-3-416 +5c5ca538693fbfd3a574998693094b48f19ec12e v7-3-416 +22a626604672b37914ae929b0d5e11e3efb0d79f v7-3-416 From a9e7d9e51da779ce01d4163660da51cb23a3e01d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:56:47 +0100 Subject: [PATCH 034/115] updated for version 7.3.417 Problem: Test 43 fails with a tiny build. Solution: Only run test 43 with at least a small build. --- src/version.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/version.c b/src/version.c index 4e78bd7131..2d82cd80c7 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 417, /**/ 416, /**/ From 5a5ea6c869343ac577af7360072195da5112d84b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:56:48 +0100 Subject: [PATCH 035/115] Added tag v7-3-417 for changeset 63d3541d0733 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 907b7a7b0f..bded9a2005 100644 --- a/.hgtags +++ b/.hgtags @@ -1753,3 +1753,4 @@ e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 5c5ca538693fbfd3a574998693094b48f19ec12e v7-3-416 5c5ca538693fbfd3a574998693094b48f19ec12e v7-3-416 22a626604672b37914ae929b0d5e11e3efb0d79f v7-3-416 +63d3541d07339c65d602bac2bbc72d755b416ad8 v7-3-417 From 6fa99a85a2dc9faeb7023df98576627290468a4b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:58:38 +0100 Subject: [PATCH 036/115] updated for version 7.3.418 Problem: When a user complete function returns -1 an error message is given. Solution: When -2 is returned stop completion silently. (Yasuhiro Matsumoto) --- src/edit.c | 5 +++++ src/version.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/edit.c b/src/edit.c index 08b555ba2c..9a0abf94f4 100644 --- a/src/edit.c +++ b/src/edit.c @@ -5189,6 +5189,11 @@ ins_complete(c) return FAIL; } + /* Return value -2 means the user complete function wants to + * cancel the complete without an error. */ + if (col == -2) + return FAIL; + /* * Reset extended parameters of completion, when start new * completion. diff --git a/src/version.c b/src/version.c index 2d82cd80c7..8dadac4506 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 418, /**/ 417, /**/ From b7a547a66338bd9fa0a7e0c6a24109defc94c0ee Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 18:58:38 +0100 Subject: [PATCH 037/115] Added tag v7-3-418 for changeset 4500a0ad2e0a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bded9a2005..462fb5ac97 100644 --- a/.hgtags +++ b/.hgtags @@ -1754,3 +1754,4 @@ e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 5c5ca538693fbfd3a574998693094b48f19ec12e v7-3-416 22a626604672b37914ae929b0d5e11e3efb0d79f v7-3-416 63d3541d07339c65d602bac2bbc72d755b416ad8 v7-3-417 +4500a0ad2e0a24f54e5c4b4a3266456cd5ccb2eb v7-3-418 From 273247072d7c0685893504dd47db91aadf4007ed Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 20:41:26 +0100 Subject: [PATCH 038/115] updated for version 7.3.419 Problem: DBCS encoding in a user command does not always work. Solution: Skip over DBCS characters. (Yasuhiro Matsumoto) --- src/ex_docmd.c | 18 ++++++++++++++++-- src/version.c | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 270d00c273..83bf50c4b1 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -5967,7 +5967,14 @@ uc_check_code(code, len, buf, cmd, eap, split_buf, split_len) result = STRLEN(eap->arg) + 2; for (p = eap->arg; *p; ++p) { - if (*p == '\\' || *p == '"') +#ifdef FEAT_MBYTE + if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2) + /* DBCS can contain \ in a trail byte, skip the + * double-byte character. */ + ++p; + else +#endif + if (*p == '\\' || *p == '"') ++result; } @@ -5976,7 +5983,14 @@ uc_check_code(code, len, buf, cmd, eap, split_buf, split_len) *buf++ = '"'; for (p = eap->arg; *p; ++p) { - if (*p == '\\' || *p == '"') +#ifdef FEAT_MBYTE + if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2) + /* DBCS can contain \ in a trail byte, copy the + * double-byte character to avoid escaping. */ + *buf++ = *p++; + else +#endif + if (*p == '\\' || *p == '"') *buf++ = '\\'; *buf++ = *p; } diff --git a/src/version.c b/src/version.c index 8dadac4506..8f5052b5d9 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 419, /**/ 418, /**/ From b9362aea53a6f6657070b9ddacc9dd58c986b51d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 20:41:26 +0100 Subject: [PATCH 039/115] Added tag v7-3-419 for changeset f4574729f6df --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 462fb5ac97..8451fb5fec 100644 --- a/.hgtags +++ b/.hgtags @@ -1755,3 +1755,4 @@ e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 22a626604672b37914ae929b0d5e11e3efb0d79f v7-3-416 63d3541d07339c65d602bac2bbc72d755b416ad8 v7-3-417 4500a0ad2e0a24f54e5c4b4a3266456cd5ccb2eb v7-3-418 +f4574729f6df749668df181a9dc09030f37de2ad v7-3-419 From a2cb23113dd34ecb6be174c9c7a9a1d49a8baaa0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 20:58:26 +0100 Subject: [PATCH 040/115] updated for version 7.3.420 Problem: "it" and "at" don't work properly with a dash in the tag name. Solution: Require a space to match the tag name. (Christian Brabandt) --- src/search.c | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/search.c b/src/search.c index c9d4b5ea26..b29551dab6 100644 --- a/src/search.c +++ b/src/search.c @@ -3918,7 +3918,7 @@ again: curwin->w_cursor = old_pos; goto theend; } - spat = alloc(len + 29); + spat = alloc(len + 31); epat = alloc(len + 9); if (spat == NULL || epat == NULL) { @@ -3927,7 +3927,7 @@ again: curwin->w_cursor = old_pos; goto theend; } - sprintf((char *)spat, "<%.*s\\>\\%%(\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p); + sprintf((char *)spat, "<%.*s\\>\\%%(\\s\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p); sprintf((char *)epat, "\\c", len, p); r = do_searchpair(spat, (char_u *)"", epat, FORWARD, (char_u *)"", diff --git a/src/version.c b/src/version.c index 8f5052b5d9..9f319837af 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 420, /**/ 419, /**/ From 66e00f8541ab17ca4e3746ee8332ba7372cf941d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 26 Jan 2012 20:58:26 +0100 Subject: [PATCH 041/115] Added tag v7-3-420 for changeset ded8f5add04c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8451fb5fec..f5f6cb63ba 100644 --- a/.hgtags +++ b/.hgtags @@ -1756,3 +1756,4 @@ e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 63d3541d07339c65d602bac2bbc72d755b416ad8 v7-3-417 4500a0ad2e0a24f54e5c4b4a3266456cd5ccb2eb v7-3-418 f4574729f6df749668df181a9dc09030f37de2ad v7-3-419 +ded8f5add04c9477c47098a66991f971324787f2 v7-3-420 From aa0f2efec4acff67fe04f87f4fc14befac016c2e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 28 Jan 2012 18:03:35 +0100 Subject: [PATCH 042/115] updated for version 7.3.421 Problem: Get E832 when setting 'undofile' in vimrc and there is a file to be edited on the command line. (Toothpik) Solution: Do not try reading the undo file for a file that wasn't loaded. --- src/option.c | 5 +++-- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/option.c b/src/option.c index 60956d7854..033a6d2037 100644 --- a/src/option.c +++ b/src/option.c @@ -7527,10 +7527,11 @@ set_bool_option(opt_idx, varp, value, opt_flags) { /* When 'undofile' is set globally: for every buffer, otherwise * only for the current buffer: Try to read in the undofile, if - * one exists and the buffer wasn't changed. */ + * one exists and the buffer wasn't changed and the buffer was + * loaded. */ if ((curbuf == save_curbuf || (opt_flags & OPT_GLOBAL) || opt_flags == 0) - && !curbufIsChanged()) + && !curbufIsChanged() && curbuf->b_ml.ml_mfp != NULL) { u_compute_hash(hash); u_read_undo(NULL, hash, curbuf->b_fname); diff --git a/src/version.c b/src/version.c index 9f319837af..b7b6ae84d1 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 421, /**/ 420, /**/ From 04e3d08c1b8ed238d481078e2d3a3ccac51080f2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 28 Jan 2012 18:03:35 +0100 Subject: [PATCH 043/115] Added tag v7-3-421 for changeset 076003f52582 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f5f6cb63ba..142b92a8d9 100644 --- a/.hgtags +++ b/.hgtags @@ -1757,3 +1757,4 @@ e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 4500a0ad2e0a24f54e5c4b4a3266456cd5ccb2eb v7-3-418 f4574729f6df749668df181a9dc09030f37de2ad v7-3-419 ded8f5add04c9477c47098a66991f971324787f2 v7-3-420 +076003f52582c2ec0b4851df539edf512945778c v7-3-421 From f5d34ae81aa28c9ed81a5c6daf598b84ee90c3f5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 20:17:26 +0100 Subject: [PATCH 044/115] updated for version 7.3.422 Problem: Python 3 does not have __members__. Solution: Add "name" and "number" in another way. (lilydjwg) --- src/if_py_both.h | 3 +++ src/if_python3.c | 10 ++++++++-- src/version.c | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/if_py_both.h b/src/if_py_both.h index 53c2167e14..aa2591267d 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -1479,6 +1479,9 @@ static struct PyMethodDef BufferMethods[] = { {"append", BufferAppend, 1, "Append data to Vim buffer" }, {"mark", BufferMark, 1, "Return (row,col) representing position of named mark" }, {"range", BufferRange, 1, "Return a range object which represents the part of the given buffer between line numbers s and e" }, +#if PY_VERSION_HEX >= 0x03000000 + {"__dir__", BufferDir, 4, "List its attributes" }, +#endif { NULL, NULL, 0, NULL } }; diff --git a/src/if_python3.c b/src/if_python3.c index 18d5b77795..ac6f1666c5 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -468,6 +468,7 @@ get_py3_exceptions() static PyObject *BufferNew (buf_T *); static PyObject *WindowNew(win_T *); static PyObject *LineToString(const char *); +static PyObject *BufferDir(PyObject *, PyObject *); static PyTypeObject RangeType; @@ -961,12 +962,17 @@ BufferGetattro(PyObject *self, PyObject*nameobj) return Py_BuildValue("s", this->buf->b_ffname); else if (strcmp(name, "number") == 0) return Py_BuildValue("n", this->buf->b_fnum); - else if (strcmp(name,"__members__") == 0) - return Py_BuildValue("[ss]", "name", "number"); else return PyObject_GenericGetAttr(self, nameobj); } + static PyObject * +BufferDir(PyObject *self UNUSED, PyObject *args UNUSED) +{ + return Py_BuildValue("[sssss]", "name", "number", + "append", "mark", "range"); +} + static PyObject * BufferRepr(PyObject *self) { diff --git a/src/version.c b/src/version.c index b7b6ae84d1..545e42f189 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 422, /**/ 421, /**/ From 1aca19fb0697762119d48867262d90ccf4d297c7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 20:17:26 +0100 Subject: [PATCH 045/115] Added tag v7-3-422 for changeset 60f6df978a41 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 142b92a8d9..c390390f53 100644 --- a/.hgtags +++ b/.hgtags @@ -1758,3 +1758,4 @@ e7e4dbac7ded5e048e289c7fd92c40e29f775758 v7-3-415 f4574729f6df749668df181a9dc09030f37de2ad v7-3-419 ded8f5add04c9477c47098a66991f971324787f2 v7-3-420 076003f52582c2ec0b4851df539edf512945778c v7-3-421 +60f6df978a413952e37d03b85a50ca858456b53b v7-3-422 From 5a476515e008996c0e4c5554421dc4aaeaf2de9f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 21:59:01 +0100 Subject: [PATCH 046/115] updated for version 7.3.423 Problem: Small mistakes in comments, proto and indent. Solution: Fix the mistakes. Also update runtime files --- runtime/doc/eval.txt | 12 +- runtime/doc/if_pyth.txt | 7 +- runtime/doc/insert.txt | 5 +- runtime/doc/map.txt | 4 +- runtime/doc/netbeans.txt | 4 +- runtime/doc/pi_netrw.txt | 8 +- runtime/doc/todo.txt | 73 ++++-- runtime/doc/undo.txt | 9 +- runtime/filetype.vim | 4 +- runtime/ftplugin/debchangelog.vim | 4 +- runtime/ftplugin/ocaml.vim | 145 +++++++----- runtime/indent/ocaml.vim | 38 +++- runtime/syntax/awk.vim | 10 +- runtime/syntax/logtalk.vim | 64 +++++- runtime/syntax/mail.vim | 10 +- runtime/syntax/masm.vim | 16 +- runtime/syntax/mma.vim | 52 +++-- runtime/syntax/monk.vim | 8 +- runtime/syntax/mrxvtrc.vim | 12 +- runtime/syntax/muttrc.vim | 42 +++- runtime/syntax/nroff.vim | 11 +- runtime/syntax/opl.vim | 6 + runtime/syntax/rpl.vim | 7 +- runtime/syntax/sd.vim | 12 +- runtime/syntax/sendpr.vim | 8 +- runtime/syntax/smil.vim | 7 +- runtime/syntax/snnspat.vim | 6 +- runtime/syntax/spup.vim | 131 ++++++----- runtime/syntax/sqlanywhere.vim | 366 +++++++++++++++++++++++------- runtime/syntax/tasm.vim | 8 +- runtime/syntax/tsalt.vim | 7 +- runtime/syntax/vhdl.vim | 6 + runtime/syntax/viminfo.vim | 8 +- runtime/syntax/xpm2.vim | 7 +- runtime/tutor/tutor.eo | 14 +- runtime/tutor/tutor.eo.utf-8 | 14 +- runtime/tutor/tutor.fr | 6 +- runtime/tutor/tutor.fr.utf-8 | 6 +- src/ex_cmds2.c | 2 +- src/po/ca.po | 6 +- src/po/eo.po | 34 ++- src/po/fr.po | 35 ++- src/po/ru.cp1251.po | 8 +- src/po/ru.po | 8 +- src/proto/ex_docmd.pro | 2 +- src/structs.h | 2 +- src/ui.c | 4 +- src/version.c | 2 + 48 files changed, 883 insertions(+), 377 deletions(-) diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index abf9c908eb..0b7a3ed8f3 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2012 Jan 04 +*eval.txt* For Vim version 7.3. Last change: 2012 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4814,6 +4814,10 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* Search for regexp pattern {pattern}. The search starts at the cursor position (you can use |cursor()| to set it). + If there is no match a 0 is returned and the cursor doesn't + move. No error message is given. + When a match has been found its line number is returned. + {flags} is a String, which can contain these character flags: 'b' search backward instead of forward 'c' accept a match at the cursor position @@ -4847,9 +4851,6 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* giving the argument. {only available when compiled with the |+reltime| feature} - If there is no match a 0 is returned and the cursor doesn't - move. No error message is given. - When a match has been found its line number is returned. *search()-sub-match* With the 'p' flag the returned value is one more than the first sub-match in \(\). One if none of them matched but the @@ -5068,7 +5069,8 @@ setcmdpos({pos}) *setcmdpos()* line. setline({lnum}, {text}) *setline()* - Set line {lnum} of the current buffer to {text}. + Set line {lnum} of the current buffer to {text}. To insert + lines use |append()|. {lnum} is used like with |getline()|. When {lnum} is just below the last line the {text} will be added as a new line. diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 03d24a5b86..e542a04f51 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.3. Last change: 2011 Aug 19 +*if_pyth.txt* For Vim version 7.3. Last change: 2012 Feb 04 VIM REFERENCE MANUAL by Paul Moore @@ -222,8 +222,9 @@ Buffer objects represent vim buffers. You can obtain them in a number of ways: - from indexing vim.buffers (|python-buffers|) - from the "buffer" attribute of a window (|python-window|) -Buffer objects have one read-only attribute - name - the full file name for -the buffer. They also have three methods (append, mark, and range; see below). +Buffer objects have two read-only attributes - name - the full file name for +the buffer, and number - the buffer number. They also have three methods +(append, mark, and range; see below). You can also treat buffer objects as sequence objects. In this context, they act as if they were lists (yes, they are mutable) of strings, with each diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 24a17d5240..924e8a458e 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.3. Last change: 2011 Sep 14 +*insert.txt* For Vim version 7.3. Last change: 2012 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1010,7 +1010,8 @@ number between zero and the cursor column "col('.')". This involves looking at the characters just before the cursor and including those characters that could be part of the completed item. The text between this column and the cursor column will be replaced with the matches. Return -1 if no completion -can be done. +can be done, the completion will be cancelled with an error message. Return +-2 to cancel silently. On the second invocation the arguments are: a:findstart 0 diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 73b79f23dd..f117f6fb39 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.3. Last change: 2011 Oct 22 +*map.txt* For Vim version 7.3. Last change: 2012 Feb 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -527,7 +527,7 @@ mappings. is just like , except that it uses "maplocalleader" instead of "mapleader". is to be used for mappings which are local to a buffer. Example: > - :map q \DoItNow + :map A oanother line < In a global plugin should be used and in a filetype plugin . "mapleader" and "maplocalleader" can be equal. Although, if diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index b7614e7f0d..abb88683ee 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -1,4 +1,4 @@ -*netbeans.txt* For Vim version 7.3. Last change: 2011 Oct 20 +*netbeans.txt* For Vim version 7.3. Last change: 2012 Jan 26 VIM REFERENCE MANUAL by Gordon Prieur et al. @@ -266,7 +266,7 @@ mechanism. Netbeans messages are processed when Vim is idle, waiting for user input. When Vim is run in non-interactive mode, for example when running an automated test case that sources a Vim script, the idle loop may not be called often -enough. In that case, insert |sleep| commands in the Vim script. The |sleep| +enough. In that case, insert |:sleep| commands in the Vim script. The |:sleep| command does invoke Netbeans messages processing. 6.1 Kinds of messages |nb-messages| diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 4b74d1f563..1d4a09f3dc 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 7.3. Last change: 2011 Sep 26 +*pi_netrw.txt* For Vim version 7.3. Last change: 2012 Jan 26 ----------------------------------------------------- NETRW REFERENCE MANUAL by Charles E. Campbell, Jr. @@ -43,7 +43,7 @@ Copyright: Copyright (C) 1999-2011 Charles E Campbell, Jr *netrw-copyright* 5. Activation...........................................|netrw-activate| 6. Transparent Remote File Editing......................|netrw-transparent| 7. Ex Commands..........................................|netrw-ex| -8. Variables and Options................................|netrw-var| +8. Variables and Options................................|netrw-settings| 9. Browsing.............................................|netrw-browse| Introduction To Browsing...........................|netrw-intro-browse| Quick Reference: Maps..............................|netrw-browse-maps| @@ -309,7 +309,7 @@ CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2 :call NetUserPass("uid","password") -- sets global uid and password NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2 -(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|) +(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings|) Netrw provides a lot of variables which allow you to customize netrw to your preferences. One way to look at them is via the command :NetrwSettings (see @@ -2354,7 +2354,7 @@ settings. You may change any of their values; when you save the file, the settings therein will be used. One may also press "?" on any of the lines for help on what each of the variables do. -(also see: |netrw-browser-var| |netrw-protocol| |netrw-var| |netrw-variables|) +(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-variables|) ============================================================================== diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 4d343ccf35..c108ceef29 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2012 Jan 20 +*todo.txt* For Vim version 7.3. Last change: 2012 Feb 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41,18 +41,27 @@ Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) Once syntax and other runtime files have been fixed: add "set cp" to check.vim. Use a function to run both with 'cp' and 'nocp'. -Win32: When the taskbar is at the top of the screen creating the tabbar causes -the window to move unnecessarily. (William E. Skeith III, 2012 Jan 12) -Patch: 2012 Jan 13 - -Patch for using DBCS encoding in user command. (Yasuhiro Matsumoto, 2012 Jan -15) Update Jan 17. - Repeating search history entries. (Edwin Steiner, 2012 Jan 17) Jan 18: Caused by patch 7.3.265? +Patch for '$' not being displayed for a change when 'cpoptions' contains "$". +(Yasuhiro Matsumoto, 2012 Jan 28, patch by Hideki EIRAKU and Hirohito Higashi) + +Patch to speed up readfile(). (John Little, 2012 Feb 1) +Adjustment by Charles Peacech, Feb 3. +8 When editing a file with extremely long lines (e.g., an executable), the + "linerest" in readfile() is allocated twice to be able to copy what was + read so far. Use realloc() instead? Or split the line when allocating + memory fails and "linerest" is big (> 100000)? + +Patch to fix a crash when an xpm file is invalid. (Dave Bodenstab, 2012 Jan +27) + Hang in using VimEnter. (Alex Efros, 2012 Jan 14) +Patch for behavior of "." in compatible mode. (Yasuhiro Matsumoto, patch by +Hideki EIRAKU, 2012 Jan 28) + ":cd" doesn't work when current directory path contains wildcards. finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10) @@ -70,8 +79,9 @@ Another one from Taro Muraoka, 2012 Jan 12. ":doau" says it triggers modeline. Should this only happen for events used when loading a buffer? (Kana Natsuno, 2011 Nov 7) -Patch to fix "it" and "at" when there is a dash in the tag name. -(Christian Brabandt, 2011 Nov 20) +Patch for compiler warnings in if_perl. (James McCoy, 2011 Jan 30) + +Patch for X selection conversion. (Alex Efros, 2012 Jan 24) Patch to make 'shcf' default work better. (Benjamin Fritz, 2011 Nov 18) Win32: When 'shell' is cmd.exe this command fails: @@ -83,6 +93,15 @@ Patch to make 'shcf' default work better. (Benjamin Fritz, 2011 Nov 18) Other way to start Mzscheme. Tim Brown, 2011 Oct 5: change main call. Later patch by Sergey Khorev, 2011 Oct 9. +Patch to allow ! for :all and :sall, as documented. (Hirohito Higashi, 2012 +Jan 30) + +Patch for "tab drop hoge" moving current window. (Higashi, 2012 Jan 31) +":tab drop buffer.c" always opens a new tab, also if buffer.c is already in an +open window. (Herb Sitz, 2011 Nov 17) +":tab drop filename" doesn't work nicely when "filename" is open in a window +in another tab. (Tony Mechelynck, 2009 Feb 13) + Patch to make InsertCharPre work better. (Yasuhiro Matsumoto, 2011 Oct 21) Patch to fix closed folds with "loadview". (Xavier de Gaye, 2011 Nov 25) @@ -93,9 +112,24 @@ Or use expand('')? Patch for glob() returning a list. (Christian Brabandt, 2011 Aug 24, second one) +Win32: When the taskbar is at the top of the screen creating the tabbar causes +the window to move unnecessarily. (William E. Skeith III, 2012 Jan 12) +Patch: 2012 Jan 13 Needs more work (2012 Feb 2) + Patch to highlight cursor line number. (Howard Buchholz (lhb), 2011 Oct 18) -Patch for urxvt mouse support after shell command. (Issue 31) +URXVT: +- will get stuck if byte sequence does not containe expected semicolon. +- Patch for urxvt mouse support after shell command. (Issue 31) +- Use urxvt mouse support also in xterm. Explanations: + http://www.midnight-commander.org/ticket/2662 + +Patch for using QuickFixCmdPre for more commands. (Marcin Szamotulski, 2012 +Feb 1, update Feb 2) + +When running Vim in silent ex mode, an existing swapfile causes Vim to wait +for a user action without a prompt. (Maarten Billemont, 2012 Feb 3) +Do give the prompt? Quit with an error? When exiting with unsaved changes, selecting an existing file in the file dialog, there is no dialog to ask whether the existing file should be @@ -128,13 +162,15 @@ Patch for: (Christian Brabandt, 2011 Aug 24, updated patch) buffer={bufnr}". So one can remove all signs for one file/buffer. Patch to add "onselected" callback for completion. (Taro Muraoka, 2011 Sep 24) +Another for CompleteFuncOk. (Florian Klein, 2012 Jan 31) +Name it "CompleteFuncDone". + +Patch for Make_mvc.mak and Make_ming.mak for Ruby support. (Yasuhiro +Matsumoto, 2012 Jan 30) Use a count before "v" and "V" to select that many characters or lines? (Kikyous) -":tab drop buffer.c" always opens a new tab, also if buffer.c is already in an -open window. (Herb Sitz, 2011 Nov 17) - Problem with winfixheight and resizing. (Yukihiro Nakadaira, 2011 Sep 17) Patch Sep 18. @@ -289,6 +325,8 @@ Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011 May 24) Update May 26. +Patch for :tabrecently. (Hirokazu Yoshida, 2012 Jan 30) + When a script contains "redir => s:foo" but doesn't end redirection, a following "redir" command gives an error for not being able to access s:foo. (ZyX, 2011 Mar 27) @@ -949,9 +987,6 @@ try/catch not working when inside a for loop. (ZyX, 2011 Jan 25) ":tab help" always opens a new tab, while ":help" re-uses an existing window. Would be more consistent when an existing tab is re-used. (Tony Mechelynck) -":tab drop filename" doesn't work nicely when "filename" is open in a window -in another tab. (Tony Mechelynck, 2009 Feb 13) - Add ":nofold". Range will apply without expanding to closed fold. Including NFA regexp code: @@ -3228,10 +3263,6 @@ Performance: Add command to compile a vim script and add it to the file in-place. Split Ex command executing into a parsing and executing phase. Use compiled code for functions, while loops, etc. -8 When editing a file with extremely long lines (e.g., an executable), the - "linerest" in readfile() is allocated twice to be able to copy what was - read so far. Use realloc() instead? Or split the line when allocating - memory fails and "linerest" is big (> 100000)? 8 When defining autocommands (e.g., from $VIMRUNTIME/filetype.vim), need to compare each pattern with all existing patterns. Use a hash code to avoid using strcmp() too often? diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt index e9ed1b2cb5..b1652374cc 100644 --- a/runtime/doc/undo.txt +++ b/runtime/doc/undo.txt @@ -1,4 +1,4 @@ -*undo.txt* For Vim version 7.3. Last change: 2011 Aug 02 +*undo.txt* For Vim version 7.3. Last change: 2012 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -267,7 +267,12 @@ respectively: (the magic number at the start of the file is wrong), then this fails, unless the ! was added. If it exists and does look like an undo file it is - overwritten. + overwritten. If there is no undo-history, nothing will be + written. + Implementation detail: Overwriting happens by first deleting + the existing file and then creating a new file with the same + name. So it is not possible to overwrite an existing undofile + in a write-protected directory. {not in Vi} :rundo {file} Read undo history from {file}. diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 17cd03424f..26a435b480 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2012 Jan 04 +" Last Change: 2012 Feb 03 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1264,7 +1264,7 @@ au BufNewFile,BufRead *.nqc setf nqc au BufNewFile,BufRead *.nsi setf nsis " OCAML -au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly setf ocaml +au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml " Occam au BufNewFile,BufRead *.occ setf occam diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim index 80ff8efe42..c74284fd41 100644 --- a/runtime/ftplugin/debchangelog.vim +++ b/runtime/ftplugin/debchangelog.vim @@ -3,8 +3,8 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Michael Piefel " Stefano Zacchiroli -" Last Change: 2010-07-11 -" License: GNU GPL, version 2.0 or later +" Last Change: 2012-01-31 +" License: Vim License " URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/debchangelog.vim " Bug completion requires apt-listbugs installed for Debian packages or diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim index de3e41bcd7..c379f53405 100644 --- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -2,17 +2,18 @@ " Maintainer: David Baelde " Mike Leary " Markus Mottl +" Pierre Vittet " Stefano Zacchiroli " Vincent Aravantinos " URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim -" Last Change: 2010 Jul 10 - Bugfix, thanks to Pat Rondon +" Last Change: +" 2012 Jan 15 - Bugfix :reloading .annot file does not close +" splitted view (Pierre Vittet) +" 2011 Nov 28 - Bugfix + support of multiple ml annotation file +" (Pierre Vittet) +" 2010 Jul 10 - Bugfix, thanks to Pat Rondon " 2008 Jul 17 - Bugfix related to fnameescape (VA) -" 2007 Sep 09 - Added .annot support for ocamlbuild, python not -" needed anymore (VA) -" 2006 May 01 - Added .annot support for file.whateverext (SZ) -" 2006 Apr 11 - Fixed an initialization bug; fixed ASS abbrev (MM) -" 2005 Oct 13 - removed GPL; better matchit support (MM, SZ) -" + if exists("b:did_ftplugin") finish endif @@ -287,24 +288,27 @@ endfunction endfun " After call: - " - b:annot_file_path : + " + " Following information have been put in s:annot_file_list, using + " annot_file_name name as key: + " - annot_file_path : " path to the .annot file corresponding to the " source file (dealing with ocamlbuild stuff) - " - b:_build_path: + " - _build_path: " path to the build directory even if this one is " not named '_build' + " - date_of_last annot: + " Set to 0 until we load the file. It contains the + " date at which the file has been loaded. function! s:Locate_annotation() - if !b:annotation_file_located - + let annot_file_name = s:Fnameescape(expand('%:t:r')).'.annot' + if !exists ("s:annot_file_list[annot_file_name]") silent exe 'cd' s:Fnameescape(expand('%:p:h')) - - let annot_file_name = s:Fnameescape(expand('%:r')).'.annot' - " 1st case : the annot file is in the same directory as the buffer (no ocamlbuild) - let b:annot_file_path = findfile(annot_file_name,'.') - if b:annot_file_path != '' - let b:annot_file_path = getcwd().'/'.b:annot_file_path - let b:_build_path = '' + let annot_file_path = findfile(annot_file_name,'.') + if annot_file_path != '' + let annot_file_path = getcwd().'/'.annot_file_path + let _build_path = '' else " 2nd case : the buffer and the _build directory are in the same directory " .. @@ -312,12 +316,12 @@ endfunction " / \ " _build .ml " - let b:_build_path = finddir('_build','.') - if b:_build_path != '' - let b:_build_path = getcwd().'/'.b:_build_path - let b:annot_file_path = findfile(annot_file_name,'_build') - if b:annot_file_path != '' - let b:annot_file_path = getcwd().'/'.b:annot_file_path + let _build_path = finddir('_build','.') + if _build_path != '' + let _build_path = getcwd().'/'._build_path + let annot_file_path = findfile(annot_file_name,'_build') + if annot_file_path != '' + let annot_file_path = getcwd().'/'.annot_file_path endif else " 3rd case : the _build directory is in a directory higher in the file hierarchy @@ -330,46 +334,54 @@ endfunction " \ " .ml " - let b:_build_path = finddir('_build',';') - if b:_build_path != '' - let project_path = substitute(b:_build_path,'/_build$','','') + let _build_path = finddir('_build',';') + if _build_path != '' + let project_path = substitute(_build_path,'/_build$','','') let path_relative_to_project = s:Fnameescape(substitute(expand('%:p:h'),project_path.'/','','')) - let b:annot_file_path = findfile(annot_file_name,project_path.'/_build/'.path_relative_to_project) + let annot_file_path = findfile(annot_file_name,project_path.'/_build/'.path_relative_to_project) else - let b:annot_file_path = findfile(annot_file_name,'**') + let annot_file_path = findfile(annot_file_name,'**') "4th case : what if the user decided to change the name of the _build directory ? " -> we relax the constraints, it should work in most cases - if b:annot_file_path != '' + if annot_file_path != '' " 4a. we suppose the renamed _build directory is in the current directory - let b:_build_path = matchstr(b:annot_file_path,'^[^/]*') - if b:annot_file_path != '' - let b:annot_file_path = getcwd().'/'.b:annot_file_path - let b:_build_path = getcwd().'/'.b:_build_path + let _build_path = matchstr(annot_file_path,'^[^/]*') + if annot_file_path != '' + let annot_file_path = getcwd().'/'.annot_file_path + let _build_path = getcwd().'/'._build_path endif else + let annot_file_name = '' + "(Pierre Vittet: I have commented 4b because this was chrashing + "my vim (it produced infinite loop)) + " " 4b. anarchy : the renamed _build directory may be higher in the hierarchy " this will work if the file for which we are looking annotations has a unique name in the whole project " if this is not the case, it may still work, but no warranty here - let b:annot_file_path = findfile(annot_file_name,'**;') - let project_path = s:Find_common_path(b:annot_file_path,expand('%:p:h')) - let b:_build_path = matchstr(b:annot_file_path,project_path.'/[^/]*') + "let annot_file_path = findfile(annot_file_name,'**;') + "let project_path = s:Find_common_path(annot_file_path,expand('%:p:h')) + "let _build_path = matchstr(annot_file_path,project_path.'/[^/]*') endif endif endif endif - if b:annot_file_path == '' + if annot_file_path == '' throw 'E484: no annotation file found' endif silent exe 'cd' '-' - - let b:annotation_file_located = 1 + let s:annot_file_list[annot_file_name]= [annot_file_path, _build_path, 0] endif endfun - " This in order to locate the .annot file only once - let b:annotation_file_located = 0 + " This variable contain a dictionnary of list. Each element of the dictionnary + " represent an annotation system. An annotation system is a list with : + " - annotation file name as it's key + " - annotation file path as first element of the contained list + " - build path as second element of the contained list + " - annot_file_last_mod (contain the date of .annot file) as third element + let s:annot_file_list = {} " 2. Finding the type information in the annotation file @@ -379,16 +391,17 @@ endfunction " After call: " The current buffer is now the one containing the .annot file. " We manage to keep all this hidden to the user's eye. - function! s:Enter_annotation_buffer() + function! s:Enter_annotation_buffer(annot_file_path) let s:current_pos = getpos('.') let s:current_hidden = &l:hidden set hidden let s:current_buf = bufname('%') - if bufloaded(b:annot_file_path) - silent exe 'keepj keepalt' 'buffer' s:Fnameescape(b:annot_file_path) + if bufloaded(a:annot_file_path) + silent exe 'keepj keepalt' 'buffer' s:Fnameescape(a:annot_file_path) else - silent exe 'keepj keepalt' 'view' s:Fnameescape(b:annot_file_path) + silent exe 'keepj keepalt' 'view' s:Fnameescape(a:annot_file_path) endif + call setpos(".", [0, 0 , 0 , 0]) endfun " After call: @@ -402,21 +415,29 @@ endfunction " After call: " The annot file is loaded and assigned to a buffer. " This also handles the modification date of the .annot file, eg. after a - " compilation. - function! s:Load_annotation() - if bufloaded(b:annot_file_path) && b:annot_file_last_mod < getftime(b:annot_file_path) - call s:Enter_annotation_buffer() - silent exe "bunload" - call s:Exit_annotation_buffer() + " compilation (return an updated annot_file_list). + function! s:Load_annotation(annot_file_name) + let annot = s:annot_file_list[a:annot_file_name] + let annot_file_path = annot[0] + let annot_file_last_mod = 0 + if exists("annot[2]") + let annot_file_last_mod = annot[2] endif - if !bufloaded(b:annot_file_path) - call s:Enter_annotation_buffer() + if bufloaded(annot_file_path) && annot_file_last_mod < getftime(annot_file_path) + " if there is a more recent file + let nr = bufnr(annot_file_path) + silent exe 'keepj keepalt' 'bunload' nr + endif + if !bufloaded(annot_file_path) + call s:Enter_annotation_buffer(annot_file_path) setlocal nobuflisted setlocal bufhidden=hide setlocal noswapfile setlocal buftype=nowrite call s:Exit_annotation_buffer() - let b:annot_file_last_mod = getftime(b:annot_file_path) + let annot[2] = getftime(annot_file_path) + " List updated with the new date + let s:annot_file_list[a:annot_file_name] = annot endif endfun @@ -466,8 +487,9 @@ endfunction "In: the pattern to look for in order to match the block "Out: the type information (calls s:Match_data) " Should be called in the annotation buffer - function! s:Extract_type_data(block_pattern) - call s:Enter_annotation_buffer() + function! s:Extract_type_data(block_pattern, annot_file_name) + let annot_file_path = s:annot_file_list[a:annot_file_name][0] + call s:Enter_annotation_buffer(annot_file_path) try if search(a:block_pattern,'e') == 0 throw "no_annotation" @@ -527,9 +549,9 @@ endfunction "In: the current mode (eg. "visual", "normal", etc.) "Out: the type information (calls s:Extract_type_data) - function! s:Get_type(mode) + function! s:Get_type(mode, annot_file_name) let [lin1,lin2,col1,col2] = s:Match_borders(a:mode) - return s:Extract_type_data(s:Block_pattern(lin1,lin2,col1,col2)) + return s:Extract_type_data(s:Block_pattern(lin1,lin2,col1,col2), a:annot_file_name) endfun "d. main @@ -537,9 +559,10 @@ endfunction "After call: the type information is displayed if !exists("*Ocaml_get_type") function Ocaml_get_type(mode) + let annot_file_name = s:Fnameescape(expand('%:t:r')).'.annot' call s:Locate_annotation() - call s:Load_annotation() - return s:Get_type(a:mode) + call s:Load_annotation(annot_file_name) + return s:Get_type(a:mode, annot_file_name) endfun endif diff --git a/runtime/indent/ocaml.vim b/runtime/indent/ocaml.vim index 5c267af8b1..a84c992edd 100644 --- a/runtime/indent/ocaml.vim +++ b/runtime/indent/ocaml.vim @@ -1,12 +1,12 @@ " Vim indent file " Language: OCaml -" Maintainers: Jean-Francois Yuen -" Mike Leary -" Markus Mottl -" URL: http://www.ocaml.info/vim/indent/ocaml.vim -" Last Change: 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working -" 2005 May 09 - Added an option to not indent OCaml-indents specially (MM) -" 2005 Apr 11 - Fixed an indentation bug concerning "let" (MM) +" Maintainers: Jean-Francois Yuen +" Mike Leary +" Markus Mottl +" URL: http://www.ocaml.info/vim/indent/ocaml.vim +" Last Change: 2010 Sep 04 - Added an indentation improvement by Mark Weber +" 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working +" 2005 May 09 - Added an option to not indent OCaml-indents specially (MM) " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -44,7 +44,7 @@ let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object let s:type = '^\s*\%(class\|let\|type\)\>.*=' " Skipping pattern, for comments -function s:GetLineWithoutFullComment(lnum) +function! s:GetLineWithoutFullComment(lnum) let lnum = prevnonblank(a:lnum - 1) let lline = substitute(getline(lnum), '(\*.*\*)\s*$', '', '') while lline =~ '^\s*$' && lnum > 0 @@ -55,7 +55,7 @@ function s:GetLineWithoutFullComment(lnum) endfunction " Indent for ';;' to match multiple 'let' -function s:GetInd(lnum, pat, lim) +function! s:GetInd(lnum, pat, lim) let llet = search(a:pat, 'bW') let old = indent(a:lnum) while llet > 0 @@ -70,18 +70,18 @@ function s:GetInd(lnum, pat, lim) endfunction " Indent pairs -function s:FindPair(pstart, pmid, pend) +function! s:FindPair(pstart, pmid, pend) call search(a:pend, 'bW') return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) endfunction " Indent 'let' -function s:FindLet(pstart, pmid, pend) +function! s:FindLet(pstart, pmid, pend) call search(a:pend, 'bW') return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\ -" Last Change: 2005 Mar 16 +" Maintainer: Antonio Colombo +" Last Change: 2012 Jan 31 " AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger " The AWK Programming Language, Addison-Wesley, 1988 @@ -25,6 +25,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " A bunch of useful Awk keywords " AWK ref. p. 188 syn keyword awkStatement break continue delete exit @@ -213,4 +216,7 @@ endif let b:current_syntax = "awk" +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim index 7d90cd88ef..be34c7ed74 100644 --- a/runtime/syntax/logtalk.vim +++ b/runtime/syntax/logtalk.vim @@ -2,7 +2,7 @@ " " Language: Logtalk " Maintainer: Paulo Moura -" Last Change: Oct 31, 2008 +" Last Change: February 4, 2012 " Quit when a syntax file was already loaded: @@ -13,6 +13,8 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim " Logtalk is case sensitive: @@ -75,8 +77,13 @@ syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="complements(" " Logtalk directives +syn region logtalkDir matchgroup=logtalkDirTag start=":- if(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- else\." +syn match logtalkDirTag ":- endif\." syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- coinductive(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL @@ -89,17 +96,27 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- public(" matchgroup=l syn region logtalkDir matchgroup=logtalkDirTag start=":- protected(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- private(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_non_terminal(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- op(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- set_logtalk_flag(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- synchronized(" matchgroup=logtalkDirTag end=")\." contains=ALL syn match logtalkDirTag ":- synchronized\." syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL syn match logtalkDirTag ":- threaded\." +" Prolog directives + +syn region logtalkDir matchgroup=logtalkDirTag start=":- ensure_loaded(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- include(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- set_prolog_flag(" matchgroup=logtalkDirTag end=")\." contains=ALL + + " Module directives syn region logtalkDir matchgroup=logtalkDirTag start=":- module(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- export(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- reexport(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- use_module(" matchgroup=logtalkDirTag end=")\." contains=ALL @@ -109,7 +126,7 @@ syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\ syn match logtalkBuiltIn "\<\(object\|protocol\|category\)_property\ze(" -syn match logtalkBuiltIn "\" @@ -269,6 +290,11 @@ syn match logtalkKeyword "\" +" Sorting + +syn match logtalkKeyword "\<\(key\)\?sort\ze(" + + " Evaluable functors syn match logtalkOperator "+" @@ -277,6 +303,8 @@ syn match logtalkOperator "\*" syn match logtalkOperator "//" syn match logtalkOperator "/" syn match logtalkKeyword "\" +syn match logtalkKeyword "\" syn match logtalkKeyword "\" syn match logtalkKeyword "\" @@ -311,7 +339,12 @@ syn match logtalkOperator "\\" syn match logtalkOperator "|" -" Logtalk numbers +" Logtalk existential quantifier operator + +syn match logtalkOperator "\^" + + +" Logtalk numbers syn match logtalkNumber "\<\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+\>" @@ -333,6 +366,17 @@ syn match logtalkOperator "\." syn region logtalkBlockComment start="/\*" end="\*/" fold syn match logtalkLineComment "%.*" +syn cluster logtalkComment contains=logtalkBlockComment,logtalkLineComment + + +" Logtalk conditional compilation folding + +syn region logtalkIfContainer transparent keepend extend start=":- if(" end=":- endif\." containedin=ALLBUT,@logtalkComment contains=NONE +syn region logtalkIf transparent fold keepend start=":- if(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP +syn region logtalkElseIf transparent fold keepend start=":- elif(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP +syn region logtalkElse transparent fold keepend start=":- else\." end=":- endif\." contained containedin=logtalkIfContainer contains=TOP + + " Logtalk entity folding @@ -362,6 +406,11 @@ if version >= 508 || !exists("did_logtalk_syn_inits") HiLink logtalkOpenEntityDir Normal HiLink logtalkOpenEntityDirTag PreProc + HiLink logtalkIfContainer PreProc + HiLink logtalkIf PreProc + HiLink logtalkElseIf PreProc + HiLink logtalkElse PreProc + HiLink logtalkEntity Normal HiLink logtalkEntityRel Normal @@ -396,3 +445,6 @@ endif let b:current_syntax = "logtalk" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/mail.vim b/runtime/syntax/mail.vim index cf4a2c69d5..823c6b418d 100644 --- a/runtime/syntax/mail.vim +++ b/runtime/syntax/mail.vim @@ -2,13 +2,16 @@ " Language: Mail file " Previous Maintainer: Felix von Leitner " Maintainer: GI , where a='gi1242+vim', b='gmail', c='com' -" Last Change: Sat 03 Dec 2011 10:34:27 PM EST +" Last Change: Thu 02 Feb 2012 08:47:04 PM EST " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " The mail header is recognized starting with a "keyword:" line and ending " with an empty line or other line that can't be in the header. All lines of " the header are highlighted. Headers of quoted messages (quoted with >) are @@ -40,7 +43,7 @@ syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\ syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$" syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$" fold syn match mailHeaderKey contained contains=@NoSpell "\v(^(\> ?)*)@<=date:" -syn match mailSubject contained contains=@NoSpell "\v^subject:.*$" fold +syn match mailSubject contained "\v^subject:.*$" fold syn match mailSubject contained contains=@NoSpell "\v(^(\> ?)+)@<=subject:.*$" " Anything in the header between < and > is an email address @@ -104,3 +107,6 @@ hi def link mailQuoteExp5 mailQuoted5 hi def link mailQuoteExp6 mailQuoted6 let b:current_syntax = "mail" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim index 4ffd22b980..1711601f32 100644 --- a/runtime/syntax/masm.vim +++ b/runtime/syntax/masm.vim @@ -2,8 +2,8 @@ " Language: Microsoft Macro Assembler (80x86) " Orig Author: Rob Brady " Maintainer: Wu Yongwei -" Last Change: $Date: 2007/04/21 13:20:15 $ -" $Revision: 1.44 $ +" Last Change: $Date: 2012/02/04 12:45:39 $ +" $Revision: 1.46 $ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -13,6 +13,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case ignore @@ -184,6 +187,12 @@ syn keyword masmRegister DR0 DR1 DR2 DR3 DR6 DR7 syn keyword masmRegister TR3 TR4 TR5 TR6 TR7 syn match masmRegister "ST([0-7])" +" x86-64 registers +syn keyword masmRegister RAX RBX RCX RDX RSI RDI RBP RSP +syn keyword masmRegister R8 R9 R10 R11 R12 R13 R14 R15 +syn keyword masmRegister R8D R9D R10D R11D R12D R13D R14D R15D +syn keyword masmRegister R8W R9W R10W R11W R12W R13W R14W R15W +syn keyword masmRegister R8B R9B R10B R11B R12B R13B R14B R15B " Instruction prefixes syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ @@ -340,4 +349,7 @@ endif let b:current_syntax = "masm" +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 diff --git a/runtime/syntax/mma.vim b/runtime/syntax/mma.vim index f48dcceead..c63beb1195 100644 --- a/runtime/syntax/mma.vim +++ b/runtime/syntax/mma.vim @@ -1,12 +1,12 @@ " Vim syntax file " Language: Mathematica " Maintainer: steve layland -" Last Change: Thu May 19 21:36:04 CDT 2005 +" Last Change: 2012 Feb 03 by Thilo Six " Source: http://members.wri.com/layland/vim/syntax/mma.vim " http://vim.sourceforge.net/scripts/script.php?script_id=1273 " Id: $Id: mma.vim,v 1.4 2006/04/14 20:40:38 vimboss Exp $ " NOTE: -" +" " Empty .m files will automatically be presumed as Matlab files " unless you have the following in your .vimrc: " @@ -14,7 +14,7 @@ " " I also recommend setting the default 'Comment' hilighting to something " other than the color used for 'Function', since both are plentiful in -" most mathematica files, and they are often the same color (when using +" most mathematica files, and they are often the same color (when using " background=dark). " " Credits: @@ -24,11 +24,11 @@ " from the Java vim syntax file by Claudio Fleiner. Thanks! " o Everything else written by steve " -" Bugs: -" o Vim 6.1 didn't really have support for character classes +" Bugs: +" o Vim 6.1 didn't really have support for character classes " of other named character classes. For example, [\a\d] " didn't work. Therefore, a lot of this code uses explicit -" character classes instead: [0-9a-zA-Z] +" character classes instead: [0-9a-zA-Z] " " TODO: " folding @@ -41,6 +41,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Group Definitions: syntax cluster mmaNotes contains=mmaTodo,mmaFixme syntax cluster mmaComments contains=mmaComment,mmaFunctionComment,mmaItem,mmaFunctionTitle,mmaCommentStar @@ -58,7 +61,7 @@ syntax cluster mmaTop contains=mmaOperator,mmaGenericFunction,mmaPureFunction,mm syntax keyword mmaVariable True False None Automatic All Null C General " mathematical constants: -syntax keyword mmaVariable Pi I E Infinity ComplexInfinity Indeterminate GoldenRatio EulerGamma Degree Catalan Khinchin Glaisher +syntax keyword mmaVariable Pi I E Infinity ComplexInfinity Indeterminate GoldenRatio EulerGamma Degree Catalan Khinchin Glaisher " stream data / atomic heads: syntax keyword mmaVariable Byte Character Expression Number Real String Word EndOfFile Integer Symbol @@ -80,7 +83,7 @@ syntax keyword mmaVariable Above Below Left Right syntax keyword mmaVariable Black Blue Brown Cyan Gray Green Magenta Orange Pink Purple Red White Yellow " function attributes -syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constant NumericFunction Locked ReadProtected HoldFirst HoldRest HoldAll HoldAllComplete SequenceHold NHoldFirst NHoldRest NHoldAll Temporary Stub +syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constant NumericFunction Locked ReadProtected HoldFirst HoldRest HoldAll HoldAllComplete SequenceHold NHoldFirst NHoldRest NHoldAll Temporary Stub " Comment Sections: " this: @@ -135,25 +138,25 @@ syntax region mmaCommentString oneline start=+\\\@= <= < > " += -= *= " /= ++ -- Math -" ^* +" ^* " -> :> Rules " @@ @@@ Apply " /@ //@ Map @@ -200,7 +203,7 @@ syntax match mmaPureFunction "#\%(#\|\d\+\)\=" syntax match mmaPureFunction "&" " Named Functions: -" Since everything is pretty much a function, get this straight +" Since everything is pretty much a function, get this straight " from context syntax match mmaGenericFunction "[A-Za-z0-9`]\+\s*\%([@[]\|/:\|/\=/@\)\@=" contains=mmaOperator syntax match mmaGenericFunction "\~\s*[^~]\+\s*\~"hs=s+1,he=e-1 contains=mmaOperator,mmaBoring @@ -223,7 +226,7 @@ syntax match mmaError "\*)" containedin=ALLBUT,@mmaComments,@mmaStrings syntax match mmaError "\%([/]{3,}\|[&:|+*?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" containedin=ALLBUT,@mmaComments,@mmaStrings " Punctuation: -" things that shouldn't really be highlighted, or highlighted +" things that shouldn't really be highlighted, or highlighted " in they're own group if you _really_ want. :) " ( ) { } " TODO - use Delimiter group? @@ -251,9 +254,9 @@ set commentstring='(*%s*)' "function MmaFoldText() " let line = getline(v:foldstart) -" +" " let lines = v:foldend-v:foldstart+1 -" +" " let sub = substitute(line, '(\*\+|\*\+)|[-*_]\+', '', 'g') " " if match(line, '(\*') != -1 @@ -264,7 +267,7 @@ set commentstring='(*%s*)' " " return v:folddashes.' '.lines.' '.sub "endf - + "this is slow for computing folds, but it does so accurately syntax sync fromstart @@ -288,8 +291,8 @@ if version >= 508 || !exists("did_mma_syn_inits") command -nargs=+ HiLink hi def link endif - " NOTE - the following links are not guaranteed to - " look good under all colorschemes. You might need to + " NOTE - the following links are not guaranteed to + " look good under all colorschemes. You might need to " :so $VIMRUNTIME/syntax/hitest.vim and tweak these to " look good in yours @@ -323,3 +326,6 @@ if version >= 508 || !exists("did_mma_syn_inits") endif let b:current_syntax = "mma" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/monk.vim b/runtime/syntax/monk.vim index 560b79c67b..afe2b56190 100644 --- a/runtime/syntax/monk.vim +++ b/runtime/syntax/monk.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Monk (See-Beyond Technologies) " Maintainer: Mike Litherland -" Last Change: March 6, 2002 +" Last Change: 2012 Feb 03 by Thilo Six " This syntax file is good enough for my needs, but others " may desire more features. Suggestions and bug reports @@ -29,6 +29,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case ignore " Fascist highlighting: everything that doesn't fit the rules is an error... @@ -226,3 +229,6 @@ if version >= 508 || !exists("did_monk_syntax_inits") endif let b:current_syntax = "monk" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/mrxvtrc.vim b/runtime/syntax/mrxvtrc.vim index 878021e002..2ef434d2b2 100644 --- a/runtime/syntax/mrxvtrc.vim +++ b/runtime/syntax/mrxvtrc.vim @@ -1,13 +1,16 @@ -" Created : Wed 26 Apr 2006 01:20:53 AM CDT -" Modified : Mon 27 Aug 2007 12:10:37 PM PDT -" Author : Gautam Iyer " Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up) +" Created : Wed 26 Apr 2006 01:20:53 AM CDT +" Modified : Thu 02 Feb 2012 08:37:45 PM EST +" Maintainer : GI , where a='gi1242+vim', b='gmail', c='com' " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case match " Errors @@ -274,3 +277,6 @@ hi def link mrxvtrcCmd PreProc hi def link mrxvtrcSubwin mrxvtrcStrVal let b:current_syntax = "mrxvtrc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index 0037f8fb1b..abe9bfd76b 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -2,9 +2,9 @@ " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg " Maintainer: Kyle Wheeler -" Last Change: 9 Aug 2010 +" Last Change: 2 Feb 2012 -" This file covers mutt version 1.5.20 (and most of the mercurial tip) +" This file covers mutt version 1.5.21 (and most of the mercurial tip) " Included are also a few features from 1.4.2.1 " For version 5.x: Clear all syntax items @@ -15,6 +15,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Set the keyword characters if version < 600 set isk=@,48-57,_,- @@ -22,6 +25,11 @@ else setlocal isk=@,48-57,_,- endif +" handling optional variables +if !exists("use_mutt_sidebar") + let use_mutt_sidebar=0 +endif + syn match muttrcComment "^# .*$" contains=@Spell syn match muttrcComment "^#[^ ].*$" syn match muttrcComment "^#$" @@ -98,7 +106,7 @@ syn region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=mut syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName syn match muttrcKeyName contained "\" syn match muttrcKeyName contained "\\[trne]" -syn match muttrcKeyName contained "\c<\%(BackSpace\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" +syn match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" syn match muttrcKeyName contained "" syn keyword muttrcVarBool skipwhite contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split auto_tag autoedit beep beep_new nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr @@ -207,6 +215,9 @@ syn keyword muttrcVarBool skipwhite contained invstrict_threads invsuspend invte syn keyword muttrcVarBool skipwhite contained invthread_received invtilde invuncollapse_jump invuse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +if use_mutt_sidebar == 1 + syn keyword muttrcVarBool skipwhite contained sidebar_visible sidebar_sort nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +endif syn keyword muttrcVarQuad skipwhite contained abort_nosubject abort_unmodified bounce copy nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained crypt_verify_sig delete fcc_attach forward_edit honor_followup_to nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr @@ -232,6 +243,9 @@ syn keyword muttrcVarNum skipwhite contained pop_checkinterval read_inc save_his syn keyword muttrcVarNum skipwhite contained score_threshold_flag score_threshold_read search_context sendmail_wait sleep_time nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained smime_timeout ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained write_inc nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +if use_mutt_sidebar == 1 + syn keyword muttrcVarNum skipwhite contained sidebar_width nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +endif syn match muttrcFormatErrors contained /%./ @@ -372,6 +386,9 @@ syn keyword muttrcVarStr contained skipwhite smime_keys smime_sign_as nextgroup= syn keyword muttrcVarStr contained skipwhite smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite status_chars tmpdir to_chars tunnel visual nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +if use_mutt_sidebar == 1 + syn keyword muttrcVarStr skipwhite contained sidebar_delim nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +endif " Present in 1.4.2.1 (pgp_create_traditional was a bool then) syn keyword muttrcVarBool contained skipwhite imap_force_ssl noimap_force_ssl invimap_force_ssl nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr @@ -417,7 +434,10 @@ syn keyword muttrcSubscribeKeyword unsubscribe nextgroup=muttrcAsterisk,muttrcCo syn keyword muttrcAlternateKeyword contained alternates unalternates syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment -syn match muttrcVariable contained "\\\@]\+" contains=muttrcEmail @@ -450,6 +470,9 @@ syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" +if use_mutt_sidebar == 1 + syn match muttrcFunction contained "\]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName syn keyword muttrcCommand set skipwhite nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr @@ -523,7 +546,7 @@ syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[ syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s*\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\|\%(`[^`]\+`\)\|\%(\$[a-zA-Z0-9_-]\+\)\)" contains=muttrcShellString,muttrcVariable syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatRXContainer syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString -syn match muttrcSimplePat contained "!\?\^\?[=][bh]\s*" nextgroup=muttrcSimplePatString +syn match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString syn region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat "syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ @@ -557,9 +580,12 @@ syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline syn match muttrcColorField contained "\" +if use_mutt_sidebar == 1 + syn keyword muttrcColorField contained sidebar_new +endif syn keyword muttrcColor contained black blue cyan default green magenta red white yellow syn keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow -syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,2}\>" +syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,3}\>" " Now for the structure of the color line syn match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL syn match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL @@ -641,7 +667,7 @@ if version >= 508 || !exists("did_muttrc_syntax_inits") HiLink muttrcSetQuadAssignment Boolean HiLink muttrcSetStrAssignment String HiLink muttrcEmail Special - HiLink muttrcVariable Special + HiLink muttrcVariableInner Special HiLink muttrcEscapedVariable String HiLink muttrcHeader Type HiLink muttrcKeySpecial SpecialChar @@ -765,4 +791,6 @@ endif let b:current_syntax = "muttrc" +let &cpo = s:cpo_save +unlet s:cpo_save "EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim diff --git a/runtime/syntax/nroff.vim b/runtime/syntax/nroff.vim index 6f2a13134c..280ba9e7d9 100644 --- a/runtime/syntax/nroff.vim +++ b/runtime/syntax/nroff.vim @@ -1,8 +1,8 @@ " VIM syntax file " Language: nroff/groff -" Maintainer: Alejandro Lpez-Valencia -" URL: http://dradul.tripod.com/vim -" Last Change: 2006 Apr 14 +" Maintainer: Pedro Alejandro Lpez-Valencia +" URL: http://vorbote.wordpress.com/ +" Last Change: 2012 Feb 2 " " {{{1 Acknowledgements " @@ -31,6 +31,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " " {{{1 plugin settings... " @@ -256,4 +259,6 @@ endif let b:current_syntax = "nroff" +let &cpo = s:cpo_save +unlet s:cpo_save " vim600: set fdm=marker fdl=2: diff --git a/runtime/syntax/opl.vim b/runtime/syntax/opl.vim index aa3cb9e34d..1b07e3596c 100644 --- a/runtime/syntax/opl.vim +++ b/runtime/syntax/opl.vim @@ -1,6 +1,7 @@ " Vim syntax file " Language: OPL " Maintainer: Czo +" Last Change: 2012 Feb 03 by Thilo Six " $Id: opl.vim,v 1.1 2004/06/13 17:34:11 vimboss Exp $ " Open Psion Language... (EPOC16/EPOC32) @@ -13,6 +14,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " case is not significant syn case ignore @@ -93,4 +97,6 @@ endif let b:current_syntax = "opl" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/rpl.vim b/runtime/syntax/rpl.vim index bc50475e1e..6457803a06 100644 --- a/runtime/syntax/rpl.vim +++ b/runtime/syntax/rpl.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: RPL/2 " Version: 0.15.15 against RPL/2 version 4.00pre7i -" Last Change: 2003 august 24 +" Last Change: 2012 Feb 03 by Thilo Six " Maintainer: Jol BERTRAND " URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim " Credits: Nothing @@ -14,6 +14,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Keyword characters (not used) " set iskeyword=33-127 @@ -488,4 +491,6 @@ endif let b:current_syntax = "rpl" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 tw=132 diff --git a/runtime/syntax/sd.vim b/runtime/syntax/sd.vim index bb201ca007..7fa0e04492 100644 --- a/runtime/syntax/sd.vim +++ b/runtime/syntax/sd.vim @@ -3,7 +3,7 @@ " License: This file can be redistribued and/or modified under the same terms " as Vim itself. " URL: http://netstudent.polito.it/vim_syntax/ -" Last Change: 2006-09-27 +" Last Change: 2012 Feb 03 by Thilo Six if version < 600 syntax clear @@ -11,6 +11,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Always ignore case syn case ignore @@ -24,13 +27,13 @@ syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster " Statements -syn keyword sdStatement AGGREGATE AUDIO_CHANNELS +syn keyword sdStatement AGGREGATE AUDIO_CHANNELS syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE -syn keyword sdStatement LICENSE +syn keyword sdStatement LICENSE syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY @@ -73,3 +76,6 @@ if version >= 508 || !exists("did_config_syntax_inits") endif let b:current_syntax = "sd" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/sendpr.vim b/runtime/syntax/sendpr.vim index 28a26e6847..6cf9395fe9 100644 --- a/runtime/syntax/sendpr.vim +++ b/runtime/syntax/sendpr.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: FreeBSD send-pr file " Maintainer: Hendrik Scholz -" Last Change: 2002 Mar 21 +" Last Change: 2012 Feb 03 " " http://raisdorf.net/files/misc/send-pr.vim @@ -13,6 +13,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn match sendprComment /^SEND-PR:/ " email address syn match sendprType /<[a-zA-Z0-9\-\_\.]*@[a-zA-Z0-9\-\_\.]*>/ @@ -30,3 +33,6 @@ hi def link sendprComment Comment hi def link sendprType Type hi def link sendprString String hi def link sendprLabel Label + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/smil.vim b/runtime/syntax/smil.vim index 0b53d8ec34..6b5a002868 100644 --- a/runtime/syntax/smil.vim +++ b/runtime/syntax/smil.vim @@ -2,7 +2,7 @@ " Language: SMIL (Synchronized Multimedia Integration Language) " Maintainer: Herve Foucher " URL: http://www.helio.org/vim/syntax/smil.vim -" Last Change: 2003 May 11 +" Last Change: 2012 Feb 03 by Thilo Six " To learn more about SMIL, please refer to http://www.w3.org/AudioVideo/ " and to http://www.helio.org/products/smil/tutorial/ @@ -15,6 +15,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " SMIL is case sensitive syn case match @@ -151,4 +154,6 @@ if main_syntax == 'smil' unlet main_syntax endif +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/snnspat.vim b/runtime/syntax/snnspat.vim index 3c07fad169..5bfa48e624 100644 --- a/runtime/syntax/snnspat.vim +++ b/runtime/syntax/snnspat.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: SNNS pattern file " Maintainer: Davide Alberani -" Last Change: 28 Apr 2001 +" Last Change: 2012 Feb 03 by Thilo Six " Version: 0.2 " URL: http://digilander.iol.it/alberanid/vim/syntax/snnspat.vim " @@ -14,6 +14,8 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim " anything that isn't part of the header, a comment or a number " is wrong @@ -65,4 +67,6 @@ endif let b:current_syntax = "snnspat" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 sw=2 diff --git a/runtime/syntax/spup.vim b/runtime/syntax/spup.vim index af57737409..07e9708eaa 100644 --- a/runtime/syntax/spup.vim +++ b/runtime/syntax/spup.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Speedup, plant simulator from AspenTech " Maintainer: Stefan.Schwarzer -" URL: http://www.ndh.net/home/sschwarzer/download/spup.vim -" Last Change: 2003 May 11 +" URL: http://www.ndh.net/home/sschwarzer/download/spup.vim +" Last Change: 2012 Feb 03 by Thilo Six " Filename: spup.vim " Bugs @@ -25,6 +25,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " don't hightlight several keywords like subsections "let strict_subsections = 1 @@ -43,7 +46,7 @@ endif " Speedup SECTION regions syn case ignore -syn region spupCdi matchgroup=spupSection start="^CDI" end="^\*\*\*\*" contains=spupCdiSubs,@spupOrdinary +syn region spupCdi matchgroup=spupSection start="^CDI" end="^\*\*\*\*" contains=spupCdiSubs,@spupOrdinary syn region spupConditions matchgroup=spupSection start="^CONDITIONS" end="^\*\*\*\*" contains=spupConditionsSubs,@spupOrdinary,spupConditional,spupOperator,spupCode syn region spupDeclare matchgroup=spupSection start="^DECLARE" end="^\*\*\*\*" contains=spupDeclareSubs,@spupOrdinary,spupTypes,spupCode syn region spupEstimation matchgroup=spupSection start="^ESTIMATION" end="^\*\*\*\*" contains=spupEstimationSubs,@spupOrdinary @@ -63,7 +66,7 @@ syn region spupTitle matchgroup=spupSection start="^TITLE" end="^\*\*\ syn region spupUnit matchgroup=spupSection start="^UNIT" end="^\*\*\*\*" contains=spupUnitSubs,@spupOrdinary " Subsections -syn keyword spupCdiSubs INPUT FREE OUTPUT LINEARTIME MINNONZERO CALCULATE FILES SCALING contained +syn keyword spupCdiSubs INPUT FREE OUTPUT LINEARTIME MINNONZERO CALCULATE FILES SCALING contained syn keyword spupDeclareSubs TYPE STREAM contained syn keyword spupEstimationSubs ESTIMATE SSEXP DYNEXP RESULT contained syn keyword spupExternalSubs TRANSMIT RECEIVE contained @@ -183,7 +186,7 @@ syn sync minlines=100 syn sync maxlines=500 syn sync match spupSyncOperation grouphere spupOperation "^OPERATION" -syn sync match spupSyncCdi grouphere spupCdi "^CDI" +syn sync match spupSyncCdi grouphere spupCdi "^CDI" syn sync match spupSyncConditions grouphere spupConditions "^CONDITIONS" syn sync match spupSyncDeclare grouphere spupDeclare "^DECLARE" syn sync match spupSyncEstimation grouphere spupEstimation "^ESTIMATION" @@ -207,71 +210,73 @@ syn sync match spupSyncUnit grouphere spupUnit "^UNIT" " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_spup_syn_inits") if version < 508 - let did_spup_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link + let did_spup_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link endif - HiLink spupCdi spupSection - HiLink spupConditions spupSection - HiLink spupDeclare spupSection - HiLink spupEstimation spupSection - HiLink spupExternal spupSection - HiLink spupFlowsheet spupSection - HiLink spupFunction spupSection - HiLink spupGlobal spupSection - HiLink spupHomotopy spupSection - HiLink spupMacro spupSection - HiLink spupModel spupSection - HiLink spupOperation spupSection - HiLink spupOptions spupSection - HiLink spupProcedure spupSection - HiLink spupProfiles spupSection - HiLink spupReport spupSection - HiLink spupTitle spupConstant " this is correct, truly ;) - HiLink spupUnit spupSection + HiLink spupCdi spupSection + HiLink spupConditions spupSection + HiLink spupDeclare spupSection + HiLink spupEstimation spupSection + HiLink spupExternal spupSection + HiLink spupFlowsheet spupSection + HiLink spupFunction spupSection + HiLink spupGlobal spupSection + HiLink spupHomotopy spupSection + HiLink spupMacro spupSection + HiLink spupModel spupSection + HiLink spupOperation spupSection + HiLink spupOptions spupSection + HiLink spupProcedure spupSection + HiLink spupProfiles spupSection + HiLink spupReport spupSection + HiLink spupTitle spupConstant " this is correct, truly ;) + HiLink spupUnit spupSection - HiLink spupCdiSubs spupSubs - HiLink spupConditionsSubs spupSubs - HiLink spupDeclareSubs spupSubs - HiLink spupEstimationSubs spupSubs - HiLink spupExternalSubs spupSubs - HiLink spupFlowsheetSubs spupSubs - HiLink spupFunctionSubs spupSubs - HiLink spupHomotopySubs spupSubs - HiLink spupMacroSubs spupSubs - HiLink spupModelSubs spupSubs - HiLink spupOperationSubs spupSubs - HiLink spupOptionsSubs spupSubs - HiLink spupProcedureSubs spupSubs - HiLink spupReportSubs spupSubs - HiLink spupUnitSubs spupSubs + HiLink spupCdiSubs spupSubs + HiLink spupConditionsSubs spupSubs + HiLink spupDeclareSubs spupSubs + HiLink spupEstimationSubs spupSubs + HiLink spupExternalSubs spupSubs + HiLink spupFlowsheetSubs spupSubs + HiLink spupFunctionSubs spupSubs + HiLink spupHomotopySubs spupSubs + HiLink spupMacroSubs spupSubs + HiLink spupModelSubs spupSubs + HiLink spupOperationSubs spupSubs + HiLink spupOptionsSubs spupSubs + HiLink spupProcedureSubs spupSubs + HiLink spupReportSubs spupSubs + HiLink spupUnitSubs spupSubs - HiLink spupCode Normal - HiLink spupComment Comment - HiLink spupComment2 spupComment - HiLink spupConditional Statement - HiLink spupConstant Constant - HiLink spupError Error - HiLink spupHelp Normal - HiLink spupIdentifier Identifier - HiLink spupNumber Constant - HiLink spupOperator Special - HiLink spupOpenBrace spupError - HiLink spupSection Statement - HiLink spupSpecial spupTextprocGeneric - HiLink spupStreams Type - HiLink spupString Constant - HiLink spupSubs Statement - HiLink spupSymbol Special - HiLink spupTextprocError Normal - HiLink spupTextprocGeneric PreProc - HiLink spupTypes Type + HiLink spupCode Normal + HiLink spupComment Comment + HiLink spupComment2 spupComment + HiLink spupConditional Statement + HiLink spupConstant Constant + HiLink spupError Error + HiLink spupHelp Normal + HiLink spupIdentifier Identifier + HiLink spupNumber Constant + HiLink spupOperator Special + HiLink spupOpenBrace spupError + HiLink spupSection Statement + HiLink spupSpecial spupTextprocGeneric + HiLink spupStreams Type + HiLink spupString Constant + HiLink spupSubs Statement + HiLink spupSymbol Special + HiLink spupTextprocError Normal + HiLink spupTextprocGeneric PreProc + HiLink spupTypes Type delcommand HiLink endif let b:current_syntax = "spup" -" vim:ts=4 +let &cpo = s:cpo_save +unlet s:cpo_save +" vim:ts=8 diff --git a/runtime/syntax/sqlanywhere.vim b/runtime/syntax/sqlanywhere.vim index 57ed158f98..b0f93217a6 100644 --- a/runtime/syntax/sqlanywhere.vim +++ b/runtime/syntax/sqlanywhere.vim @@ -1,10 +1,12 @@ + " Vim syntax file " Language: SQL, Adaptive Server Anywhere -" Maintainer: David Fishburn -" Last Change: 2009 Mar 15 -" Version: 11.0.1 +" Maintainer: David Fishburn +" Last Change: 2012 Jan 23 +" Version: 12.0.1 -" Description: Updated to Adaptive Server Anywhere 11.0.1 +" Description: Updated to Adaptive Server Anywhere 12.0.1 (including spatial data) +" Updated to Adaptive Server Anywhere 11.0.1 " Updated to Adaptive Server Anywhere 10.0.1 " Updated to Adaptive Server Anywhere 9.0.2 " Updated to Adaptive Server Anywhere 9.0.1 @@ -67,6 +69,9 @@ syn keyword sqlFunction hash compress decompress encrypt decrypt syn keyword sqlFunction connection_extended_property text_handle_vector_match syn keyword sqlFunction read_client_file write_client_file +" 12.0.1 functions +syn keyword sqlFunction http_response_header + " string functions syn keyword sqlFunction ascii char left ltrim repeat syn keyword sqlFunction space right rtrim trim lcase ucase @@ -358,7 +363,7 @@ syn keyword sqlFunction xp_write_file " http functions syn keyword sqlFunction http_header http_variable -syn keyword sqlFunction next_http_header next_http_variable +syn keyword sqlFunction next_http_header next_http_response_header next_http_variable syn keyword sqlFunction sa_set_http_header sa_set_http_option syn keyword sqlFunction sa_http_variable_info sa_http_header_info @@ -366,114 +371,231 @@ syn keyword sqlFunction sa_http_variable_info sa_http_header_info syn keyword sqlFunction http_encode http_decode syn keyword sqlFunction html_encode html_decode +" XML function support +syn keyword sqlFunction openxml xmlelement xmlforest xmlgen xmlconcat xmlagg +syn keyword sqlFunction xmlattributes + +" Spatial Compatibility Functions +syn keyword sqlFunction ST_BdMPolyFromText +syn keyword sqlFunction ST_BdMPolyFromWKB +syn keyword sqlFunction ST_BdPolyFromText +syn keyword sqlFunction ST_BdPolyFromWKB +syn keyword sqlFunction ST_CPolyFromText +syn keyword sqlFunction ST_CPolyFromWKB +syn keyword sqlFunction ST_CircularFromTxt +syn keyword sqlFunction ST_CircularFromWKB +syn keyword sqlFunction ST_CompoundFromTxt +syn keyword sqlFunction ST_CompoundFromWKB +syn keyword sqlFunction ST_GeomCollFromTxt +syn keyword sqlFunction ST_GeomCollFromWKB +syn keyword sqlFunction ST_GeomFromText +syn keyword sqlFunction ST_GeomFromWKB +syn keyword sqlFunction ST_LineFromText +syn keyword sqlFunction ST_LineFromWKB +syn keyword sqlFunction ST_MCurveFromText +syn keyword sqlFunction ST_MCurveFromWKB +syn keyword sqlFunction ST_MLineFromText +syn keyword sqlFunction ST_MLineFromWKB +syn keyword sqlFunction ST_MPointFromText +syn keyword sqlFunction ST_MPointFromWKB +syn keyword sqlFunction ST_MPolyFromText +syn keyword sqlFunction ST_MPolyFromWKB +syn keyword sqlFunction ST_MSurfaceFromTxt +syn keyword sqlFunction ST_MSurfaceFromWKB +syn keyword sqlFunction ST_OrderingEquals +syn keyword sqlFunction ST_PointFromText +syn keyword sqlFunction ST_PointFromWKB +syn keyword sqlFunction ST_PolyFromText +syn keyword sqlFunction ST_PolyFromWKB +" Spatial Structural Methods +syn keyword sqlFunction ST_CoordDim +syn keyword sqlFunction ST_CurveN +syn keyword sqlFunction ST_Dimension +syn keyword sqlFunction ST_EndPoint +syn keyword sqlFunction ST_ExteriorRing +syn keyword sqlFunction ST_GeometryN +syn keyword sqlFunction ST_GeometryType +syn keyword sqlFunction ST_InteriorRingN +syn keyword sqlFunction ST_Is3D +syn keyword sqlFunction ST_IsClosed +syn keyword sqlFunction ST_IsEmpty +syn keyword sqlFunction ST_IsMeasured +syn keyword sqlFunction ST_IsRing +syn keyword sqlFunction ST_IsSimple +syn keyword sqlFunction ST_IsValid +syn keyword sqlFunction ST_NumCurves +syn keyword sqlFunction ST_NumGeometries +syn keyword sqlFunction ST_NumInteriorRing +syn keyword sqlFunction ST_NumPoints +syn keyword sqlFunction ST_PointN +syn keyword sqlFunction ST_StartPoint +"Spatial Computation +syn keyword sqlFunction ST_Length +syn keyword sqlFunction ST_Area +syn keyword sqlFunction ST_Centroid +syn keyword sqlFunction ST_Area +syn keyword sqlFunction ST_Centroid +syn keyword sqlFunction ST_IsWorld +syn keyword sqlFunction ST_Perimeter +syn keyword sqlFunction ST_PointOnSurface +syn keyword sqlFunction ST_Distance +" Spatial Input/Output +syn keyword sqlFunction ST_AsBinary +syn keyword sqlFunction ST_AsGML +syn keyword sqlFunction ST_AsGeoJSON +syn keyword sqlFunction ST_AsSVG +syn keyword sqlFunction ST_AsSVGAggr +syn keyword sqlFunction ST_AsText +syn keyword sqlFunction ST_AsWKB +syn keyword sqlFunction ST_AsWKT +syn keyword sqlFunction ST_AsXML +syn keyword sqlFunction ST_GeomFromBinary +syn keyword sqlFunction ST_GeomFromShape +syn keyword sqlFunction ST_GeomFromText +syn keyword sqlFunction ST_GeomFromWKB +syn keyword sqlFunction ST_GeomFromWKT +syn keyword sqlFunction ST_GeomFromXML +" Spatial Cast Methods +syn keyword sqlFunction ST_CurvePolyToPoly +syn keyword sqlFunction ST_CurveToLine +syn keyword sqlFunction ST_ToCircular +syn keyword sqlFunction ST_ToCompound +syn keyword sqlFunction ST_ToCurve +syn keyword sqlFunction ST_ToCurvePoly +syn keyword sqlFunction ST_ToGeomColl +syn keyword sqlFunction ST_ToLineString +syn keyword sqlFunction ST_ToMultiCurve +syn keyword sqlFunction ST_ToMultiLine +syn keyword sqlFunction ST_ToMultiPoint +syn keyword sqlFunction ST_ToMultiPolygon +syn keyword sqlFunction ST_ToMultiSurface +syn keyword sqlFunction ST_ToPoint +syn keyword sqlFunction ST_ToPolygon +syn keyword sqlFunction ST_ToSurface + + " keywords -syn keyword sqlKeyword absolute accent action active add address aes_decrypt -syn keyword sqlKeyword after aggregate algorithm allow_dup_row allowed -syn keyword sqlKeyword alter and ansi_substring any as append apply asc ascii ase -syn keyword sqlKeyword assign at atan2 atomic attach attended audit authorization +syn keyword sqlKeyword absolute accent action active add address admin aes_decrypt +syn keyword sqlKeyword after aggregate algorithm allow_dup_row allow allowed alter +syn keyword sqlKeyword and angular ansi_substring any as append apply +syn keyword sqlKeyword arbiter asc ascii ase +syn keyword sqlKeyword assign at atan2 atomic attended +syn keyword sqlKeyword audit auditing authorization axis syn keyword sqlKeyword autoincrement autostop batch bcp before syn keyword sqlKeyword between bit_and bit_length bit_or bit_substr bit_xor syn keyword sqlKeyword blank blanks block -syn keyword sqlKeyword both bottom unbounded break breaker bufferpool +syn keyword sqlKeyword both bottom unbounded breaker bufferpool syn keyword sqlKeyword build bulk by byte bytes cache calibrate calibration syn keyword sqlKeyword cancel capability cascade cast -syn keyword sqlKeyword catalog ceil changes char char_convert check checksum +syn keyword sqlKeyword catalog ceil change changes char char_convert check checksum syn keyword sqlKeyword class classes client cmp syn keyword sqlKeyword cluster clustered collation syn keyword sqlKeyword column columns -syn keyword sqlKeyword command comment committed comparisons +syn keyword sqlKeyword command comments committed comparisons syn keyword sqlKeyword compatible component compressed compute computes syn keyword sqlKeyword concat configuration confirm conflict connection syn keyword sqlKeyword console consolidate consolidated -syn keyword sqlKeyword constraint constraints content continue -syn keyword sqlKeyword convert coordinator copy count count_set_bits +syn keyword sqlKeyword constraint constraints content +syn keyword sqlKeyword convert coordinate coordinator copy count count_set_bits syn keyword sqlKeyword crc createtime cross cube cume_dist syn keyword sqlKeyword current cursor data data database -syn keyword sqlKeyword current_timestamp current_user +syn keyword sqlKeyword current_timestamp current_user cycle syn keyword sqlKeyword databases datatype dba dbfile syn keyword sqlKeyword dbspace dbspaces dbspacename debug decoupled syn keyword sqlKeyword decrypted default defaults default_dbspace deferred syn keyword sqlKeyword definer definition syn keyword sqlKeyword delay deleting delimited dependencies desc -syn keyword sqlKeyword description detach deterministic directory -syn keyword sqlKeyword disable disabled distinct do domain download duplicate -syn keyword sqlKeyword dsetpass dttm dynamic each editproc ejb +syn keyword sqlKeyword description deterministic directory +syn keyword sqlKeyword disable disabled disallow distinct do domain download duplicate +syn keyword sqlKeyword dsetpass dttm dynamic each earth editproc ejb +syn keyword sqlKeyword elimination ellipsoid syn keyword sqlKeyword else elseif empty enable encapsulated encrypted end syn keyword sqlKeyword encoding endif engine environment erase error escape escapes event -syn keyword sqlKeyword event_parameter every except exception exclude excluded exclusive exec +syn keyword sqlKeyword event_parameter every exception exclude excluded exclusive exec syn keyword sqlKeyword existing exists expanded expiry express exprtype extended_property syn keyword sqlKeyword external externlogin factor failover false -syn keyword sqlKeyword fastfirstrow fieldproc file files filler -syn keyword sqlKeyword fillfactor finish first first_keyword first_value +syn keyword sqlKeyword fastfirstrow feature fieldproc file files filler +syn keyword sqlKeyword fillfactor final finish first first_keyword first_value +syn keyword sqlKeyword flattening syn keyword sqlKeyword following force foreign format forxml forxml_sep fp frame -syn keyword sqlKeyword freepage french fresh full function gb get_bit go global +syn keyword sqlKeyword free freepage french fresh full function +syn keyword sqlKeyword gb generic get_bit go global grid syn keyword sqlKeyword group handler hash having header hexadecimal syn keyword sqlKeyword hidden high history hg hng hold holdlock host syn keyword sqlKeyword hours http_body http_session_timeout id identified identity ignore syn keyword sqlKeyword ignore_dup_key ignore_dup_row immediate -syn keyword sqlKeyword in inactiv inactive inactivity included incremental +syn keyword sqlKeyword in inactiv inactive inactivity included increment incremental syn keyword sqlKeyword index index_enabled index_lparen indexonly info syn keyword sqlKeyword inline inner inout insensitive inserting syn keyword sqlKeyword instead integrated -syn keyword sqlKeyword internal intersection into introduced invoker iq is isolation +syn keyword sqlKeyword internal intersection into introduced inverse invoker +syn keyword sqlKeyword iq is isolation syn keyword sqlKeyword jar java java_location java_main_userid java_vm_options syn keyword sqlKeyword jconnect jdk join kb key keep kerberos language last -syn keyword sqlKeyword last_keyword last_value lateral ld left len lf ln level like -syn keyword sqlKeyword limit local location log -syn keyword sqlKeyword logging login logscan long low lru main manual mark -syn keyword sqlKeyword match matched materialized max maximum mb membership -syn keyword sqlKeyword merge metadata methods minimum minutes mirror mode modify monitor move mru -syn keyword sqlKeyword multiplex name named national native natural new next no -syn keyword sqlKeyword noholdlock nolock nonclustered none not -syn keyword sqlKeyword notify null nullable_constant nulls object oem_string of off offline -syn keyword sqlKeyword old on online only openstring optimization optimizer option -syn keyword sqlKeyword or order others out outer over +syn keyword sqlKeyword last_keyword last_value lateral latitude +syn keyword sqlKeyword ld left len linear lf ln level like +syn keyword sqlKeyword limit local location log +syn keyword sqlKeyword logging logical login logscan long longitude low lru ls +syn keyword sqlKeyword main major manual mark +syn keyword sqlKeyword match matched materialized max maxvalue maximum mb measure membership +syn keyword sqlKeyword merge metadata methods minimum minor minutes minvalue mirror +syn keyword sqlKeyword mode modify monitor move mru multiplex +syn keyword sqlKeyword name named namespaces national native natural new next nextval +syn keyword sqlKeyword ngram no noholdlock nolock nonclustered none normal not +syn keyword sqlKeyword notify null nullable_constant nulls +syn keyword sqlKeyword object oem_string of off offline offset olap +syn keyword sqlKeyword old on online only openstring operator +syn keyword sqlKeyword optimization optimizer option +syn keyword sqlKeyword or order organization others out outer over syn keyword sqlKeyword package packetsize padding page pages -syn keyword sqlKeyword paglock parallel part partial partition partitions partner password path -syn keyword sqlKeyword pctfree plan policy populate port postfilter preceding precision -syn keyword sqlKeyword prefetch prefilter prefix preserve preview primary -syn keyword sqlKeyword prior priority priqty private privileges procedure profile +syn keyword sqlKeyword paglock parallel parameter parent part +syn keyword sqlKeyword partition partitions partner password path pctfree +syn keyword sqlKeyword perms plan planar policy polygon populate port postfilter preceding +syn keyword sqlKeyword precisionprefetch prefilter prefix preserve preview previous +syn keyword sqlKeyword primary prior priority priqty private privileges procedure profile syn keyword sqlKeyword property_is_cumulative property_is_numeric public publication publish publisher syn keyword sqlKeyword quiesce quote quotes range readclientfile readcommitted reader readfile readonly syn keyword sqlKeyword readpast readuncommitted readwrite rebuild syn keyword sqlKeyword received recompile recover recursive references -syn keyword sqlKeyword referencing refresh regex regexp regexp_substr relative relocate -syn keyword sqlKeyword rename repeatable repeatableread -syn keyword sqlKeyword replicate request_timeout required rereceive resend reserve reset -syn keyword sqlKeyword resizing resolve resource respect +syn keyword sqlKeyword referencing regex regexp regexp_substr relative relocate +syn keyword sqlKeyword rename repeatable repeatableread replicate +syn keyword sqlKeyword requests request_timeout required rereceive resend reserve reset +syn keyword sqlKeyword resizing resolve resource respect restart syn keyword sqlKeyword restrict result retain syn keyword sqlKeyword returns reverse right role -syn keyword sqlKeyword rollup root row row_number rowlock rows save +syn keyword sqlKeyword rollup root row row_number rowlock rows syn keyword sqlKeyword sa_index_hash sa_internal_fk_verify sa_internal_termbreak syn keyword sqlKeyword sa_order_preserving_hash sa_order_preserving_hash_big sa_order_preserving_hash_prefix -syn keyword sqlKeyword schedule schema scope scripted scroll seconds secqty security -syn keyword sqlKeyword send sensitive sent serializable +syn keyword sqlKeyword scale schedule schema scope scripted scroll seconds secqty security +syn keyword sqlKeyword semi send sensitive sent sequence serializable syn keyword sqlKeyword server server session set_bit set_bits sets -syn keyword sqlKeyword share simple since site size skip -syn keyword sqlKeyword snapshot soapheader soap_header split some sorted_data -syn keyword sqlKeyword sqlcode sqlid sqlflagger sqlstate sqrt square +syn keyword sqlKeyword shapefile share side simple since site size skip +syn keyword sqlKeyword snap snapshot soapheader soap_header +syn keyword sqlKeyword spatial split some sorted_data +syn keyword sqlKeyword sql sqlcode sqlid sqlflagger sqlstate sqrt square syn keyword sqlKeyword stacker stale statement statistics status stddev_pop stddev_samp -syn keyword sqlKeyword stemmer stogroup stoplist store +syn keyword sqlKeyword stemmer stogroup stoplist storage store syn keyword sqlKeyword strip stripesizekb striping subpages subscribe subscription syn keyword sqlKeyword subtransaction suser_id suser_name synchronization -syn keyword sqlKeyword syntax_error table tablock -syn keyword sqlKeyword tablockx tb temp template temporary term then -syn keyword sqlKeyword ties timezone to to_char to_nchar top traced_plan tracing -syn keyword sqlKeyword transfer transaction transactional tries true -syn keyword sqlKeyword tsequal type tune uncommitted unconditionally -syn keyword sqlKeyword unenforced unicode unique union unistr unknown unlimited unload +syn keyword sqlKeyword syntax_error table tables tablock +syn keyword sqlKeyword tablockx tb temp template temporary term then ties +syn keyword sqlKeyword timezone timeout to to_char to_nchar tolerance top +syn keyword sqlKeyword traced_plan tracing +syn keyword sqlKeyword transfer transform transaction transactional treat tries +syn keyword sqlKeyword true tsequal type tune uncommitted unconditionally +syn keyword sqlKeyword unenforced unicode unique unistr unit unknown unlimited unload syn keyword sqlKeyword unpartition unquiesce updatetime updating updlock upgrade upload -syn keyword sqlKeyword upper use user +syn keyword sqlKeyword upper usage use user syn keyword sqlKeyword using utc utilities validproc syn keyword sqlKeyword value values varchar variable -syn keyword sqlKeyword varying var_pop var_samp vcat verify versions view virtual wait -syn keyword sqlKeyword warning wd web when where window with with_auto +syn keyword sqlKeyword varying var_pop var_samp vcat verbosity +syn keyword sqlKeyword verify versions view virtual wait +syn keyword sqlKeyword warning wd web when where with with_auto syn keyword sqlKeyword with_auto with_cube with_rollup without syn keyword sqlKeyword with_lparen within word work workload write writefile -syn keyword sqlKeyword writeclientfile writer writers writeserver xlock zeros -" XML function support -syn keyword sqlFunction openxml xmlelement xmlforest xmlgen xmlconcat xmlagg -syn keyword sqlFunction xmlattributes +syn keyword sqlKeyword writeclientfile writer writers writeserver xlock +syn keyword sqlKeyword zeros zone +" XML syn keyword sqlKeyword raw auto elements explicit " HTTP support syn keyword sqlKeyword authorization secure url service next_soap_header @@ -488,37 +610,119 @@ syn keyword sqlKeyword regr_sxx regr_syy regr_sxy syn keyword sqlKeyword character dec options proc reference syn keyword sqlKeyword subtrans tran syn keyword +" Spatial Predicates +syn keyword sqlKeyword ST_Contains +syn keyword sqlKeyword ST_ContainsFilter +syn keyword sqlKeyword ST_CoveredBy +syn keyword sqlKeyword ST_CoveredByFilter +syn keyword sqlKeyword ST_Covers +syn keyword sqlKeyword ST_CoversFilter +syn keyword sqlKeyword ST_Crosses +syn keyword sqlKeyword ST_Disjoint +syn keyword sqlKeyword ST_Equals +syn keyword sqlKeyword ST_EqualsFilter +syn keyword sqlKeyword ST_Intersects +syn keyword sqlKeyword ST_IntersectsFilter +syn keyword sqlKeyword ST_IntersectsRect +syn keyword sqlKeyword ST_OrderingEquals +syn keyword sqlKeyword ST_Overlaps +syn keyword sqlKeyword ST_Relate +syn keyword sqlKeyword ST_Touches +syn keyword sqlKeyword ST_Within +syn keyword sqlKeyword ST_WithinFilter +" Spatial Set operations +syn keyword sqlKeyword ST_Affine +syn keyword sqlKeyword ST_Boundary +syn keyword sqlKeyword ST_Buffer +syn keyword sqlKeyword ST_ConvexHull +syn keyword sqlKeyword ST_ConvexHullAggr +syn keyword sqlKeyword ST_Difference +syn keyword sqlKeyword ST_Intersection +syn keyword sqlKeyword ST_IntersectionAggr +syn keyword sqlKeyword ST_SymDifference +syn keyword sqlKeyword ST_Union +syn keyword sqlKeyword ST_UnionAggr +" Spatial Bounds +syn keyword sqlKeyword ST_Envelope +syn keyword sqlKeyword ST_EnvelopeAggr +syn keyword sqlKeyword ST_Lat +syn keyword sqlKeyword ST_LatMax +syn keyword sqlKeyword ST_LatMin +syn keyword sqlKeyword ST_Long +syn keyword sqlKeyword ST_LongMax +syn keyword sqlKeyword ST_LongMin +syn keyword sqlKeyword ST_M +syn keyword sqlKeyword ST_MMax +syn keyword sqlKeyword ST_MMin +syn keyword sqlKeyword ST_Point +syn keyword sqlKeyword ST_X +syn keyword sqlKeyword ST_XMax +syn keyword sqlKeyword ST_XMin +syn keyword sqlKeyword ST_Y +syn keyword sqlKeyword ST_YMax +syn keyword sqlKeyword ST_YMin +syn keyword sqlKeyword ST_Z +syn keyword sqlKeyword ST_ZMax +syn keyword sqlKeyword ST_ZMin +" Spatial Collection Aggregates +syn keyword sqlKeyword ST_GeomCollectionAggr +syn keyword sqlKeyword ST_LineStringAggr +syn keyword sqlKeyword ST_MultiCurveAggr +syn keyword sqlKeyword ST_MultiLineStringAggr +syn keyword sqlKeyword ST_MultiPointAggr +syn keyword sqlKeyword ST_MultiPolygonAggr +syn keyword sqlKeyword ST_MultiSurfaceAggr +syn keyword sqlKeyword ST_Perimeter +syn keyword sqlKeyword ST_PointOnSurface +" Spatial SRS +syn keyword sqlKeyword ST_CompareWKT +syn keyword sqlKeyword ST_FormatWKT +syn keyword sqlKeyword ST_ParseWKT +syn keyword sqlKeyword ST_TransformGeom +syn keyword sqlKeyword ST_GeometryTypeFromBaseType +syn keyword sqlKeyword ST_SnapToGrid +syn keyword sqlKeyword ST_Transform +syn keyword sqlKeyword ST_SRID +syn keyword sqlKeyword ST_SRIDFromBaseType +syn keyword sqlKeyword ST_LoadConfigurationData +" Spatial Indexes +syn keyword sqlKeyword ST_LinearHash +syn keyword sqlKeyword ST_LinearUnHash syn keyword sqlOperator in any some all between exists syn keyword sqlOperator like escape not is and or -syn keyword sqlOperator intersect minus +syn keyword sqlOperator minus syn keyword sqlOperator prior distinct -syn keyword sqlStatement allocate alter backup begin call case -syn keyword sqlStatement checkpoint clear close commit configure connect -syn keyword sqlStatement create deallocate declare delete describe -syn keyword sqlStatement disconnect drop execute exit explain fetch +syn keyword sqlStatement allocate alter attach backup begin break call case +syn keyword sqlStatement checkpoint clear close comment commit configure connect +syn keyword sqlStatement continue create deallocate declare delete describe +syn keyword sqlStatement detach disconnect drop except execute exit explain fetch syn keyword sqlStatement for forward from get goto grant help if include -syn keyword sqlStatement input insert install leave load lock loop -syn keyword sqlStatement message open output parameter parameters passthrough -syn keyword sqlStatement prepare print put raiserror read readtext release +syn keyword sqlStatement input insert install intersect leave load lock loop +syn keyword sqlStatement message open output parameters passthrough +syn keyword sqlStatement prepare print put raiserror read readtext refresh release syn keyword sqlStatement remote remove reorganize resignal restore resume -syn keyword sqlStatement return revoke rollback savepoint select +syn keyword sqlStatement return revoke rollback save savepoint select syn keyword sqlStatement set setuser signal start stop synchronize -syn keyword sqlStatement system trigger truncate unload update -syn keyword sqlStatement validate waitfor whenever while writetext +syn keyword sqlStatement system trigger truncate union unload update +syn keyword sqlStatement validate waitfor whenever while window writetext -syn keyword sqlType char long varchar text -syn keyword sqlType bigint decimal double float int integer numeric +syn keyword sqlType char nchar long varchar nvarchar text ntext uniqueidentifierstr xml +syn keyword sqlType bigint bit decimal double varbit +syn keyword sqlType float int integer numeric syn keyword sqlType smallint tinyint real syn keyword sqlType money smallmoney -syn keyword sqlType bit -syn keyword sqlType date datetime smalldate time timestamp +syn keyword sqlType date datetime datetimeoffset smalldatetime time timestamp syn keyword sqlType binary image varbinary uniqueidentifier -syn keyword sqlType xml unsigned -" New types 10.0.0 -syn keyword sqlType varbit nchar nvarchar +syn keyword sqlType unsigned +" Spatial types +syn keyword sqlType st_geometry st_point st_curve st_surface st_geomcollection +syn keyword sqlType st_linestring st_circularstring st_compoundcurve +syn keyword sqlType st_curvepolygon st_polygon +syn keyword sqlType st_multipoint st_multicurve st_multisurface +syn keyword sqlType st_multilinestring st_multipolygon syn keyword sqlOption Allow_nulls_by_default syn keyword sqlOption Allow_read_client_file @@ -556,6 +760,7 @@ syn keyword sqlOption Default_dbspace syn keyword sqlOption Default_timestamp_increment syn keyword sqlOption Delayed_commit_timeout syn keyword sqlOption Delayed_commits +syn keyword sqlOption Divide_by_zero_error syn keyword sqlOption Escape_character syn keyword sqlOption Exclude_operators syn keyword sqlOption Extended_join_syntax @@ -633,6 +838,7 @@ syn keyword sqlOption Updatable_statement_isolation syn keyword sqlOption Update_statistics syn keyword sqlOption Upgrade_database_capability syn keyword sqlOption User_estimates +syn keyword sqlOption Uuid_has_hyphens syn keyword sqlOption Verify_password_function syn keyword sqlOption Wait_for_commit syn keyword sqlOption Webservice_namespace_host diff --git a/runtime/syntax/tasm.vim b/runtime/syntax/tasm.vim index 1cfc1218a3..2f8559610e 100644 --- a/runtime/syntax/tasm.vim +++ b/runtime/syntax/tasm.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: TASM: turbo assembler by Borland " Maintaner: FooLman of United Force -" Last change: 22 aug 2000 +" Last Change: 2012 Feb 03 by Thilo Six " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -11,6 +11,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case ignore syn match tasmLabel "^[\ \t]*[@a-z_$][a-z0-9_$@]*\ *:" syn keyword tasmDirective ALIAS ALIGN ARG ASSUME %BIN CATSRT CODESEG @@ -120,3 +123,6 @@ if version >= 508 || !exists("did_tasm_syntax_inits") endif let b:curret_syntax = "tasm" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/tsalt.vim b/runtime/syntax/tsalt.vim index 56f17558b7..887d6b75e7 100644 --- a/runtime/syntax/tsalt.vim +++ b/runtime/syntax/tsalt.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Telix (Modem Comm Program) SALT Script " Maintainer: Sean M. McKee -" Last Change: 2001 May 09 +" Last Change: 2012 Feb 03 by Thilo Six " Version Info: @(#)tsalt.vim 1.5 97/12/16 08:11:15 " For version 5.x: Clear all syntax items @@ -12,6 +12,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " turn case matching off syn case ignore @@ -211,4 +214,6 @@ endif let b:current_syntax = "tsalt" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim index 4ac3b6d8a4..6573af0cf9 100644 --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -2,6 +2,7 @@ " Language: VHDL " Maintainer: Czo " Credits: Stephan Hegel +" Last Changed: 2012 Feb 03 by Thilo Six " $Id: vhdl.vim,v 1.1 2004/06/13 15:34:56 vimboss Exp $ " VHSIC Hardware Description Language @@ -15,6 +16,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " This is not VHDL. I use the C-Preprocessor cpp to generate different binaries " from one VHDL source file. Unfortunately there is no preprocessor for VHDL " available. If you don't like this, please remove the following lines. @@ -181,4 +185,6 @@ endif let b:current_syntax = "vhdl" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/viminfo.vim b/runtime/syntax/viminfo.vim index d174edf6cc..7af3b89ae0 100644 --- a/runtime/syntax/viminfo.vim +++ b/runtime/syntax/viminfo.vim @@ -1,13 +1,16 @@ " Vim syntax file " Language: Vim .viminfo file " Maintainer: Bram Moolenaar -" Last Change: 2005 Jun 20 +" Last Change: 2012 Feb 03 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " The lines that are NOT recognized syn match viminfoError "^[^\t].*" @@ -35,4 +38,7 @@ hi def link viminfoStatement Statement let b:current_syntax = "viminfo" +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 sw=2 diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim index b057946c13..9b85d0b5c3 100644 --- a/runtime/syntax/xpm2.vim +++ b/runtime/syntax/xpm2.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: X Pixmap v2 " Maintainer: Steve Wall (hitched97@velnet.com) -" Last Change: 2008 May 28 +" Last Change: 2012 Feb 03 by Thilo Six " Version: 5.8 " " Made from xpm.vim by Ronald Schild @@ -14,6 +14,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn region xpm2PixelString start="^" end="$" contains=@xpm2Colors syn keyword xpm2Todo TODO FIXME XXX contained syn match xpm2Comment "\!.*$" contains=xpm2Todo @@ -159,4 +162,6 @@ delcommand Hi let b:current_syntax = "xpm2" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8:sw=2:noet: diff --git a/runtime/tutor/tutor.eo b/runtime/tutor/tutor.eo index 958d393d2e..cc9a8be106 100644 --- a/runtime/tutor/tutor.eo +++ b/runtime/tutor/tutor.eo @@ -1,5 +1,5 @@ ============================================================================== -= B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.3 = += B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7 = ============================================================================== Vim estas tre potenca redaktilo, kiu havas multajn komandojn, tro da ili @@ -108,7 +108,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. reimo. Ripetu la paojn 2 is 4 por korekti la frazon. ---> Mank en i linio. ----> Mankas tekston en i tiu linio. +---> Mankas teksto en i tiu linio. 5. Kiam vi sentas vin komforta pri enmeto de teksto, moviu al la leciono 1.5. @@ -160,7 +160,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. 4. Konservu la dosieron kun anoj kaj eliru el Vim per: :wq - 5. Se vi eliris la instruilon vimtutor en pao 1, restartu la intruilon + 5. Se vi eliris la instruilon vimtutor en pao 1, restartigu la intruilon vimtutor kaj moviu suben al la sekvanta resumo. 6. Post kiam vi legis la suprajn paojn, kaj komprenis ilin: faru ilin. @@ -640,7 +640,7 @@ RIMARKO: 1. Tajpu !dir a !ls por akiri liston de via dosierujo. Vi jam scias, ke vi devas tajpi post tio. - 2. Elektu dosieron, kiu ne jam ekzistas, kiel ekzemple TESTO. + 2. Elektu dosieron, kiu ankora ne ekzistas, kiel ekzemple TESTO. 3. Nun tajpu: :w TESTO (kie TESTO estas la elektita dosiernomo) @@ -669,7 +669,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi 3. Premu la : signon. e la fino de la ekrano :'<,'> aperos. - 4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ne jam ekzistas. + 4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ankora ne ekzistas. Kontrolu, ke vi vidas :'<,'>w TESTO anta premi . 5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir @@ -984,8 +984,8 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj Modifita por Vim de Bram Moolenaar. - Tradukita en Esperanto de Dominique Pell, 2008-04-01 + Esperantigita fare de Dominique Pell, 2008-04-01 Retpoto: dominique.pelle@gmail.com - Lasta ano: 2010-05-23 + Lasta ano: 2011-11-27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/runtime/tutor/tutor.eo.utf-8 b/runtime/tutor/tutor.eo.utf-8 index febf2f983e..41f40726d9 100644 --- a/runtime/tutor/tutor.eo.utf-8 +++ b/runtime/tutor/tutor.eo.utf-8 @@ -1,5 +1,5 @@ ============================================================================== -= B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.3 = += B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7 = ============================================================================== Vim estas tre potenca redaktilo, kiu havas multajn komandojn, tro da ili @@ -108,7 +108,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. reĝimo. Ripetu la paŝojn 2 ĝis 4 por korekti la frazon. ---> Mank en ĉi linio. ----> Mankas tekston en ĉi tiu linio. +---> Mankas teksto en ĉi tiu linio. 5. Kiam vi sentas vin komforta pri enmeto de teksto, moviĝu al la leciono 1.5. @@ -160,7 +160,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. 4. Konservu la dosieron kun ŝanĝoj kaj eliru el Vim per: :wq - 5. Se vi eliris la instruilon vimtutor en paŝo 1, restartu la intruilon + 5. Se vi eliris la instruilon vimtutor en paŝo 1, restartigu la intruilon vimtutor kaj moviĝu suben al la sekvanta resumo. 6. Post kiam vi legis la suprajn paŝojn, kaj komprenis ilin: faru ilin. @@ -640,7 +640,7 @@ RIMARKO: Ĉiuj : komandoj devas finiĝi per tajpo de 1. Tajpu !dir aŭ !ls por akiri liston de via dosierujo. Vi jam scias, ke vi devas tajpi post tio. - 2. Elektu dosieron, kiu ne jam ekzistas, kiel ekzemple TESTO. + 2. Elektu dosieron, kiu ankoraŭ ne ekzistas, kiel ekzemple TESTO. 3. Nun tajpu: :w TESTO (kie TESTO estas la elektita dosiernomo) @@ -669,7 +669,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi ĝin denove per vim TESTO, 3. Premu la : signon. Ĉe la fino de la ekrano :'<,'> aperos. - 4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ne jam ekzistas. + 4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ankoraŭ ne ekzistas. Kontrolu, ke vi vidas :'<,'>w TESTO antaŭ premi . 5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir @@ -984,8 +984,8 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj Modifita por Vim de Bram Moolenaar. - Tradukita en Esperanto de Dominique Pellé, 2008-04-01 + Esperantigita fare de Dominique Pellé, 2008-04-01 Retpoŝto: dominique.pelle@gmail.com - Lasta ŝanĝo: 2010-05-23 + Lasta ŝanĝo: 2011-11-27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/runtime/tutor/tutor.fr b/runtime/tutor/tutor.fr index e9dd1ed031..f51a62e532 100644 --- a/runtime/tutor/tutor.fr +++ b/runtime/tutor/tutor.fr @@ -451,7 +451,7 @@ NOTE : N'oubliez pas que vous devriez apprendre par la pratique, pas par 3. Tapez ce et corrigez le mot (dans notre cas, tapez 'igne'.) 4. Appuyez et placez-vous sur le prochain caractre qui doit - tre chang). + tre chang. 5. Rptez les tapes 3 et 4 jusqu' ce que la premire phrase soit identique la seconde. @@ -560,7 +560,7 @@ NOTE : Vous pouvez peut- ---> erreur ne s'crit pas "errreuur" ; errreuur est une erreur. NOTE : Quand la recherche atteint la fin du fichier, elle reprend au dbut - sauf si l'option 'wrapscan' est dactive. + sauf si l'option 'wrapscan' est dsactive. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1034,5 +1034,5 @@ NOTE : Le compl Dernires mises jour par Dominique Pell. E-mail : dominique.pelle@gmail.com - Last Change : 2011 Jun 25 + Last Change : 2011 Nov 27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/runtime/tutor/tutor.fr.utf-8 b/runtime/tutor/tutor.fr.utf-8 index 0ddab1dac7..6281538939 100644 --- a/runtime/tutor/tutor.fr.utf-8 +++ b/runtime/tutor/tutor.fr.utf-8 @@ -451,7 +451,7 @@ NOTE : N'oubliez pas que vous devriez apprendre par la pratique, pas par 3. Tapez ce et corrigez le mot (dans notre cas, tapez 'igne'.) 4. Appuyez <Échap> et placez-vous sur le prochain caractère qui doit - être changé). + être changé. 5. Répétez les étapes 3 et 4 jusqu'à ce que la première phrase soit identique à la seconde. @@ -560,7 +560,7 @@ NOTE : Vous pouvez peut-être voir le curseur en bas à droite de l'écran. ---> erreur ne s'écrit pas "errreuur" ; errreuur est une erreur. NOTE : Quand la recherche atteint la fin du fichier, elle reprend au début - sauf si l'option 'wrapscan' est déactivée. + sauf si l'option 'wrapscan' est désactivée. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez Dernières mises à jour par Dominique Pellé. E-mail : dominique.pelle@gmail.com - Last Change : 2011 Jun 25 + Last Change : 2011 Nov 27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 7d1e282e00..4b2564bbd4 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1939,7 +1939,7 @@ alist_check_arg_idx() } /* - * Return TRUE if window "win" is editing then file at the current argument + * Return TRUE if window "win" is editing the file at the current argument * index. */ static int diff --git a/src/po/ca.po b/src/po/ca.po index 20f3c4b20a..b397ae0a84 100644 --- a/src/po/ca.po +++ b/src/po/ca.po @@ -1,6 +1,6 @@ # Catalan messages for vim. -# Copyright (C) 2003-2008 Ernest Adrogu . -# This file is distributed under the GNU General Public License. +# Copyright (C) 2003-2012 Ernest Adrogu . +# This file is distributed under the Vim License. # msgid "" msgstr "" @@ -13,8 +13,6 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Catalan\n" -"X-Poedit-Country: SPAIN\n" msgid "E82: Cannot allocate any buffer, exiting..." msgstr "E82: No s'ha pogut assignar memria per cap buffer, sortint..." diff --git a/src/po/eo.po b/src/po/eo.po index bad6424767..20b396cf1a 100644 --- a/src/po/eo.po +++ b/src/po/eo.po @@ -23,10 +23,11 @@ msgid "" msgstr "" "Project-Id-Version: Vim(Esperanto)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-21 17:23+0200\n" -"PO-Revision-Date: 2011-06-21 17:26+0200\n" +"POT-Creation-Date: 2012-01-22 15:37+0100\n" +"PO-Revision-Date: 2012-01-22 15:38+0100\n" "Last-Translator: Dominique PELLÉ \n" "Language-Team: \n" +"Language: eo\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -562,7 +563,7 @@ msgstr "E117: Nekonata funkcio: %s" #, c-format msgid "E119: Not enough arguments for function: %s" -msgstr "E119: Ne sufiĉe da argumentoj de funkcio: %s" +msgstr "E119: Ne sufiĉe da argumentoj por funkcio: %s" #, c-format msgid "E120: Using not in a script context: %s" @@ -741,6 +742,10 @@ msgstr "E124: Mankas '(': %s" msgid "E125: Illegal argument: %s" msgstr "E125: Nevalida argumento: %s" +#, c-format +msgid "E853: Duplicate argument name: %s" +msgstr "E853: Ripetita nomo de argumento: %s" + msgid "E126: Missing :endfunction" msgstr "E126: Mankas \":endfunction\"" @@ -2035,6 +2040,12 @@ msgstr "Neniu mapo trovita" msgid "E228: makemap: Illegal mode" msgstr "E228: makemap: Nevalida reĝimo" +msgid "E851: Failed to create a new process for the GUI" +msgstr "E851: Ne sukcesis krei novan procezon por la grafika interfaco" + +msgid "E852: The child process failed to start the GUI" +msgstr "E852: La ida procezo ne sukcesis startigi la grafikan interfacon" + msgid "E229: Cannot start the GUI" msgstr "E229: Ne eblas lanĉi la grafikan interfacon" @@ -4057,6 +4068,9 @@ msgstr "Tajpu la ŝlosilon denove: " msgid "Keys don't match!" msgstr "Ŝlosiloj ne kongruas!" +msgid "E854: path too long for completion" +msgstr "E854: tro longa vojo por kompletigo" + #, c-format msgid "" "E343: Invalid path: '**[number]' must be at the end of the path or be " @@ -4238,8 +4252,8 @@ msgid "" "Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld " "Bytes" msgstr "" -"Apartigis %s%ld de %ld Linioj; %ld de %ld Vortoj; %ld de %ld Signoj; %ld de %" -"ld Bajtoj" +"Apartigis %s%ld de %ld Linioj; %ld de %ld Vortoj; %ld de %ld Signoj; %ld de " +"%ld Bajtoj" #, c-format msgid "Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld" @@ -4250,8 +4264,8 @@ msgid "" "Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of " "%ld" msgstr "" -"Kol %s de %s; Linio %ld de %ld; Vorto %ld de %ld; Signo %ld de %ld; Bajto %" -"ld de %ld" +"Kol %s de %s; Linio %ld de %ld; Vorto %ld de %ld; Signo %ld de %ld; Bajto " +"%ld de %ld" #, c-format msgid "(+%ld for BOM)" @@ -5576,6 +5590,9 @@ msgstr "Serĉado de dosiero de etikedoj %s" msgid "E430: Tag file path truncated for %s\n" msgstr "E430: Vojo de etikeda dosiero trunkita por %s\n" +msgid "Ignoring long line in tags file" +msgstr "Ignoro de longa linio en etikeda dosiero" + #, c-format msgid "E431: Format error in tags file \"%s\"" msgstr "E431: Eraro de formato en etikeda dosiero \"%s\"" @@ -5592,9 +5609,6 @@ msgstr "E432: Etikeda dosiero ne estas ordigita: %s" msgid "E433: No tags file" msgstr "E433: Neniu etikeda dosiero" -msgid "Ignoring long line in tags file" -msgstr "Ignoro de longa linio en etikeda dosiero" - msgid "E434: Can't find tag pattern" msgstr "E434: Ne eblas trovi ŝablonon de etikedo" diff --git a/src/po/fr.po b/src/po/fr.po index 886cd17d83..8b3f29fd99 100644 --- a/src/po/fr.po +++ b/src/po/fr.po @@ -15,10 +15,11 @@ msgid "" msgstr "" "Project-Id-Version: Vim(Franais)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-21 17:23+0200\n" -"PO-Revision-Date: 2011-06-21 17:26+0200\n" +"POT-Creation-Date: 2012-01-22 15:37+0100\n" +"PO-Revision-Date: 2012-01-22 15:40+0100\n" "Last-Translator: Dominique Pell \n" "Language-Team: \n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO_8859-15\n" "Content-Transfer-Encoding: 8bit\n" @@ -817,6 +818,10 @@ msgstr "E124: Il manque '(' apr msgid "E125: Illegal argument: %s" msgstr "E125: Argument invalide : %s" +#, c-format +msgid "E853: Duplicate argument name: %s" +msgstr "E853: Nom d'argument dupliqu : %s" + msgid "E126: Missing :endfunction" msgstr "E126: Il manque :endfunction" @@ -2242,6 +2247,15 @@ msgstr "Aucun mappage trouv msgid "E228: makemap: Illegal mode" msgstr "E228: makemap : mode invalide" +msgid "E851: Failed to create a new process for the GUI" +msgstr "" +"E851: chec lors de la cration d'un nouveau processus pour l'interface " +"graphique" + +msgid "E852: The child process failed to start the GUI" +msgstr "" +"E852: Le processus fils n'a pas russi dmarrer l'interface graphique" + msgid "E229: Cannot start the GUI" msgstr "E229: Impossible de dmarrer l'interface graphique" @@ -4293,6 +4307,9 @@ msgstr "Tapez la cl msgid "Keys don't match!" msgstr "Les cls ne correspondent pas !" +msgid "E854: path too long for completion" +msgstr "E854: chemin trop long pour compltement" + #, c-format msgid "" "E343: Invalid path: '**[number]' must be at the end of the path or be " @@ -4478,8 +4495,8 @@ msgid "" "Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld " "Bytes" msgstr "" -"%s%ld sur %ld Lignes ; %ld sur %ld Mots ; %ld sur %ld Caractres ; %ld sur %" -"ld octets slectionns" +"%s%ld sur %ld Lignes ; %ld sur %ld Mots ; %ld sur %ld Caractres ; %ld sur " +"%ld octets slectionns" #, c-format msgid "Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld" @@ -4491,8 +4508,8 @@ msgid "" "Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of " "%ld" msgstr "" -"Colonne %s sur %s ; Ligne %ld sur %ld ; Mot %ld sur %ld ; Caractre %ld sur %" -"ld ; Octet %ld sur %ld" +"Colonne %s sur %s ; Ligne %ld sur %ld ; Mot %ld sur %ld ; Caractre %ld sur " +"%ld ; Octet %ld sur %ld" #, c-format msgid "(+%ld for BOM)" @@ -5832,6 +5849,9 @@ msgstr "Examen du fichier de marqueurs %s" msgid "E430: Tag file path truncated for %s\n" msgstr "E430: Chemin de fichiers de marqueurs tronqu pour %s\n" +msgid "Ignoring long line in tags file" +msgstr "Ignore longue ligne dans le fichier de marqueurs" + #, c-format msgid "E431: Format error in tags file \"%s\"" msgstr "E431: Erreur de format dans le fichier de marqueurs \"%s\"" @@ -5848,9 +5868,6 @@ msgstr "E432: Le fichier de marqueurs %s n'est pas ordonn msgid "E433: No tags file" msgstr "E433: Aucun fichier de marqueurs" -msgid "Ignoring long line in tags file" -msgstr "Ignore longue ligne dans le fichier de marqueurs" - msgid "E434: Can't find tag pattern" msgstr "E434: Le motif de marqueur est introuvable" diff --git a/src/po/ru.cp1251.po b/src/po/ru.cp1251.po index 1ab0676e00..0e6f0a8895 100644 --- a/src/po/ru.cp1251.po +++ b/src/po/ru.cp1251.po @@ -4888,15 +4888,15 @@ msgstr " msgid "Edit with single &Vim" msgstr " & Vim" -msgid "&Diff with Vim" -msgstr "& Vim" +msgid "Diff with Vim" +msgstr " Vim" msgid "Edit with &Vim" msgstr "& Vim" #. Now concatenate -msgid "Edit with existing Vim - &" -msgstr " Vim - &" +msgid "Edit with existing Vim - " +msgstr " Vim - " msgid "Edits the selected file(s) with Vim" msgstr " Vim" diff --git a/src/po/ru.po b/src/po/ru.po index e5ad7074e6..4eb782bcfa 100644 --- a/src/po/ru.po +++ b/src/po/ru.po @@ -4888,15 +4888,15 @@ msgstr "Редактировать в &разных Vim-ах" msgid "Edit with single &Vim" msgstr "Редактировать в &одном Vim" -msgid "&Diff with Vim" -msgstr "&Сравнить с помощью Vim" +msgid "Diff with Vim" +msgstr "Сравнить с помощью Vim" msgid "Edit with &Vim" msgstr "Ре&дактировать с помощью Vim" #. Now concatenate -msgid "Edit with existing Vim - &" -msgstr "Редактировать в запущенном Vim - &" +msgid "Edit with existing Vim - " +msgstr "Редактировать в запущенном Vim - " msgid "Edits the selected file(s) with Vim" msgstr "Редактировать выделенные файлы с помощью Vim" diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro index 8b0bd7c7cd..f59c494a86 100644 --- a/src/proto/ex_docmd.pro +++ b/src/proto/ex_docmd.pro @@ -1,7 +1,7 @@ /* ex_docmd.c */ void do_exmode __ARGS((int improved)); int do_cmdline_cmd __ARGS((char_u *cmd)); -int do_cmdline __ARGS((char_u *cmdline, char_u *(*getline)(int, void *, int), void *cookie, int flags)); +int do_cmdline __ARGS((char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags)); int getline_equal __ARGS((char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int))); void *getline_cookie __ARGS((char_u *(*fgetline)(int, void *, int), void *cookie)); int checkforcmd __ARGS((char_u **pp, char *cmd, int len)); diff --git a/src/structs.h b/src/structs.h index 7b71a5f86f..921a04935e 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1846,7 +1846,7 @@ struct window_S often, keep it the first item!) */ #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL) - synblock_T *w_s; + synblock_T *w_s; /* for :ownsyntax */ #endif #ifdef FEAT_WINDOWS diff --git a/src/ui.c b/src/ui.c index 3b0ae72488..7322f15f0e 100644 --- a/src/ui.c +++ b/src/ui.c @@ -2363,14 +2363,14 @@ clip_x11_own_selection(myShell, cbd) XtLastTimestampProcessed(XtDisplay(myShell)), clip_x11_convert_selection_cb, clip_x11_lose_ownership_cb, NULL) == False) - return FAIL; + return FAIL; } else #endif { if (!XChangeProperty(XtDisplay(myShell), XtWindow(myShell), cbd->sel_atom, timestamp_atom, 32, PropModeAppend, NULL, 0)) - return FAIL; + return FAIL; } /* Flush is required in a terminal as nothing else is doing it. */ XFlush(XtDisplay(myShell)); diff --git a/src/version.c b/src/version.c index 545e42f189..be5ef96bd1 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 423, /**/ 422, /**/ From b755b9d1e8ac609eb99b650c1f60e1005b844b93 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 21:59:02 +0100 Subject: [PATCH 047/115] Added tag v7-3-423 for changeset b7811ab264bf --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c390390f53..518b6ae940 100644 --- a/.hgtags +++ b/.hgtags @@ -1759,3 +1759,4 @@ f4574729f6df749668df181a9dc09030f37de2ad v7-3-419 ded8f5add04c9477c47098a66991f971324787f2 v7-3-420 076003f52582c2ec0b4851df539edf512945778c v7-3-421 60f6df978a413952e37d03b85a50ca858456b53b v7-3-422 +b7811ab264bf31e0049e7a9b689a399ead6cbda6 v7-3-423 From 863a7e8dbc276f168f1c66247457460692c66ce4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 22:01:48 +0100 Subject: [PATCH 048/115] updated for version 7.3.424 Problem: Win16 version missing some functions. Solution: Add #defines for the functions. --- src/gui_w16.c | 6 ++++++ src/version.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/gui_w16.c b/src/gui_w16.c index 5ef8c10312..aa287d9d7c 100644 --- a/src/gui_w16.c +++ b/src/gui_w16.c @@ -21,6 +21,12 @@ * */ +/* Win16 doesn't use the "W" methods. */ +#define pDispatchMessage DispatchMessage +#define pGetMessage GetMessage +#define pIsDialogMessage IsDialogMessage +#define pPeekMessage PeekMessage + /* * Include the common stuff for MS-Windows GUI. */ diff --git a/src/version.c b/src/version.c index be5ef96bd1..89ac1d0cdf 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 424, /**/ 423, /**/ From ea02df71743c544d7c1edf25cb4a260dda401af2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 22:01:48 +0100 Subject: [PATCH 049/115] Added tag v7-3-424 for changeset 2e4539dc2de7 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 518b6ae940..8be5f9a7fd 100644 --- a/.hgtags +++ b/.hgtags @@ -1760,3 +1760,4 @@ ded8f5add04c9477c47098a66991f971324787f2 v7-3-420 076003f52582c2ec0b4851df539edf512945778c v7-3-421 60f6df978a413952e37d03b85a50ca858456b53b v7-3-422 b7811ab264bf31e0049e7a9b689a399ead6cbda6 v7-3-423 +2e4539dc2de7da0aed83286304d1afeb0a4cdb3d v7-3-424 From 244ea6476baa2b2ea9087e188df65c3e770080fb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 22:44:32 +0100 Subject: [PATCH 050/115] updated for version 7.3.425 Problem: Search history lines are duplicated. (Edwin Steiner) Solution: Convert separator character from space to NUL. --- src/ex_getln.c | 6 ++++-- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 70acb0ee65..80a39cc090 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -6027,8 +6027,10 @@ read_viminfo_history(virp) val = viminfo_readstring(virp, 1, TRUE); if (val != NULL && *val != NUL) { + int sep = (*val == ' ' ? NUL : *val); + if (!in_history(type, val + (type == HIST_SEARCH), - viminfo_add_at_front, *val)) + viminfo_add_at_front, sep)) { /* Need to re-allocate to append the separator byte. */ len = STRLEN(val); @@ -6040,7 +6042,7 @@ read_viminfo_history(virp) /* Search entry: Move the separator from the first * column to after the NUL. */ mch_memmove(p, val + 1, (size_t)len); - p[len] = (*val == ' ' ? NUL : *val); + p[len] = sep; } else { diff --git a/src/version.c b/src/version.c index 89ac1d0cdf..a63b67cd18 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 425, /**/ 424, /**/ From 0716f84452ba8e11118464f701a2828724d89bf2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 22:44:32 +0100 Subject: [PATCH 051/115] Added tag v7-3-425 for changeset 7b17a38eb223 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8be5f9a7fd..7eb5fcbf10 100644 --- a/.hgtags +++ b/.hgtags @@ -1761,3 +1761,4 @@ ded8f5add04c9477c47098a66991f971324787f2 v7-3-420 60f6df978a413952e37d03b85a50ca858456b53b v7-3-422 b7811ab264bf31e0049e7a9b689a399ead6cbda6 v7-3-423 2e4539dc2de7da0aed83286304d1afeb0a4cdb3d v7-3-424 +7b17a38eb223b4b56327f019267c1156121f5c0f v7-3-425 From 86958b1ef2ac9fc42a3704d91504df30779aa7c8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 23:35:00 +0100 Subject: [PATCH 052/115] updated for version 7.3.426 Problem: With '$' in 'cpoptions' the $ is not displayed in the first column. Solution: Use -1 instead of 0 as a special value. (Hideki Eiraku and Hirohito Higashi) --- src/edit.c | 8 ++++---- src/globals.h | 4 ++-- src/move.c | 4 ++-- src/screen.c | 14 +++++++------- src/search.c | 4 ++-- src/version.c | 2 ++ 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/edit.c b/src/edit.c index 9a0abf94f4..6ac6142c61 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1763,9 +1763,9 @@ display_dollar(col) static void undisplay_dollar() { - if (dollar_vcol) + if (dollar_vcol >= 0) { - dollar_vcol = 0; + dollar_vcol = -1; redrawWinline(curwin->w_cursor.lnum, FALSE); } } @@ -5441,7 +5441,7 @@ ins_complete(c) compl_curr_match->cp_number); edit_submode_extra = match_ref; edit_submode_highl = HLF_R; - if (dollar_vcol) + if (dollar_vcol >= 0) curs_columns(FALSE); } } @@ -8961,7 +8961,7 @@ ins_bs(c, mode, inserted_space_p) * We can emulate the vi behaviour by pretending there is a dollar * displayed even when there isn't. * --pkv Sun Jan 19 01:56:40 EST 2003 */ - if (vim_strchr(p_cpo, CPO_BACKSPACE) != NULL && dollar_vcol == 0) + if (vim_strchr(p_cpo, CPO_BACKSPACE) != NULL && dollar_vcol == -1) dollar_vcol = curwin->w_virtcol; #ifdef FEAT_FOLDING diff --git a/src/globals.h b/src/globals.h index 2c7f257a2f..13851923f1 100644 --- a/src/globals.h +++ b/src/globals.h @@ -113,9 +113,9 @@ EXTERN int use_crypt_method INIT(= 0); * When '$' is included in 'cpoptions' option set: * When a change command is given that deletes only part of a line, a dollar * is put at the end of the changed text. dollar_vcol is set to the virtual - * column of this '$'. + * column of this '$'. -1 is used to indicate no $ is being displayed. */ -EXTERN colnr_T dollar_vcol INIT(= 0); +EXTERN colnr_T dollar_vcol INIT(= -1); #ifdef FEAT_INS_EXPAND /* diff --git a/src/move.c b/src/move.c index f922da8e46..ccbb4addc4 100644 --- a/src/move.c +++ b/src/move.c @@ -362,7 +362,7 @@ update_topline() #endif ) { - dollar_vcol = 0; + dollar_vcol = -1; if (curwin->w_skipcol != 0) { curwin->w_skipcol = 0; @@ -966,7 +966,7 @@ curs_columns(may_scroll) /* remove '$' from change command when cursor moves onto it */ if (startcol > dollar_vcol) - dollar_vcol = 0; + dollar_vcol = -1; extra = curwin_col_off(); curwin->w_wcol = curwin->w_virtcol + extra; diff --git a/src/screen.c b/src/screen.c index ffbd1c34e5..9bac8bce30 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1637,11 +1637,11 @@ win_update(wp) * When at start of changed lines: May scroll following lines * up or down to minimize redrawing. * Don't do this when the change continues until the end. - * Don't scroll when dollar_vcol is non-zero, keep the "$". + * Don't scroll when dollar_vcol >= 0, keep the "$". */ if (lnum == mod_top && mod_bot != MAXLNUM - && !(dollar_vcol != 0 && mod_bot == mod_top + 1)) + && !(dollar_vcol >= 0 && mod_bot == mod_top + 1)) { int old_rows = 0; int new_rows = 0; @@ -1868,12 +1868,12 @@ win_update(wp) if (row > wp->w_height) /* past end of screen */ { /* we may need the size of that too long line later on */ - if (dollar_vcol == 0) + if (dollar_vcol == -1) wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE); ++idx; break; } - if (dollar_vcol == 0) + if (dollar_vcol == -1) wp->w_lines[idx].wl_size = row - srow; ++idx; #ifdef FEAT_FOLDING @@ -1990,7 +1990,7 @@ win_update(wp) } #endif } - else if (dollar_vcol == 0) + else if (dollar_vcol == -1) wp->w_botline = lnum; /* make sure the rest of the screen is blank */ @@ -2005,7 +2005,7 @@ win_update(wp) wp->w_old_botfill = wp->w_botfill; #endif - if (dollar_vcol == 0) + if (dollar_vcol == -1) { /* * There is a trick with w_botline. If we invalidate it on each @@ -3564,7 +3564,7 @@ win_line(wp, lnum, startrow, endrow, nochange) } /* When still displaying '$' of change command, stop at cursor */ - if (dollar_vcol != 0 && wp == curwin + if (dollar_vcol >= 0 && wp == curwin && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol #ifdef FEAT_DIFF && filler_todo <= 0 diff --git a/src/search.c b/src/search.c index b29551dab6..59de988a71 100644 --- a/src/search.c +++ b/src/search.c @@ -2501,8 +2501,8 @@ showmatch(c) save_siso = p_siso; /* Handle "$" in 'cpo': If the ')' is typed on top of the "$", * stop displaying the "$". */ - if (dollar_vcol > 0 && dollar_vcol == curwin->w_virtcol) - dollar_vcol = 0; + if (dollar_vcol >= 0 && dollar_vcol == curwin->w_virtcol) + dollar_vcol = -1; ++curwin->w_virtcol; /* do display ')' just before "$" */ update_screen(VALID); /* show the new char first */ diff --git a/src/version.c b/src/version.c index a63b67cd18..a55888f536 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 426, /**/ 425, /**/ From 9228df0d0e3bf60d0735e7f03ea9c2d89a3af14f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 4 Feb 2012 23:35:00 +0100 Subject: [PATCH 053/115] Added tag v7-3-426 for changeset c70c005f61fb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7eb5fcbf10..0711f9c459 100644 --- a/.hgtags +++ b/.hgtags @@ -1762,3 +1762,4 @@ ded8f5add04c9477c47098a66991f971324787f2 v7-3-420 b7811ab264bf31e0049e7a9b689a399ead6cbda6 v7-3-423 2e4539dc2de7da0aed83286304d1afeb0a4cdb3d v7-3-424 7b17a38eb223b4b56327f019267c1156121f5c0f v7-3-425 +c70c005f61fb08ca032b4eab533908cfc6e6f40a v7-3-426 From 2021b3897eeb8a35d75c14d12c07ab2de7d971cf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 00:39:18 +0100 Subject: [PATCH 054/115] updated for version 7.3.427 Problem: readfile() can be slow with long lines. Solution: Use realloc() instead of alloc(). (John Little) --- src/eval.c | 224 ++++++++++++++++++++++++++++++-------------------- src/version.c | 2 + 2 files changed, 136 insertions(+), 90 deletions(-) diff --git a/src/eval.c b/src/eval.c index 7b4095eec7..71c1f7872d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -14325,22 +14325,19 @@ f_readfile(argvars, rettv) typval_T *rettv; { int binary = FALSE; + int failed = FALSE; char_u *fname; FILE *fd; - listitem_T *li; -#define FREAD_SIZE 200 /* optimized for text lines */ - char_u buf[FREAD_SIZE]; - int readlen; /* size of last fread() */ - int buflen; /* nr of valid chars in buf[] */ - int filtd; /* how much in buf[] was NUL -> '\n' filtered */ - int tolist; /* first byte in buf[] still to be put in list */ - int chop; /* how many CR to chop off */ - char_u *prev = NULL; /* previously read bytes, if any */ - int prevlen = 0; /* length of "prev" if not NULL */ - char_u *s; - int len; - long maxline = MAXLNUM; - long cnt = 0; + char_u buf[(IOSIZE/256)*256]; /* rounded to avoid odd + 1 */ + int io_size = sizeof(buf); + int readlen; /* size of last fread() */ + char_u *prev = NULL; /* previously read bytes, if any */ + long prevlen = 0; /* length of data in prev */ + long prevsize = 0; /* size of prev buffer */ + long maxline = MAXLNUM; + long cnt = 0; + char_u *p; /* position in buf */ + char_u *start; /* start of current line */ if (argvars[1].v_type != VAR_UNKNOWN) { @@ -14362,49 +14359,61 @@ f_readfile(argvars, rettv) return; } - filtd = 0; while (cnt < maxline || maxline < 0) { - readlen = (int)fread(buf + filtd, 1, FREAD_SIZE - filtd, fd); - buflen = filtd + readlen; - tolist = 0; - for ( ; filtd < buflen || readlen <= 0; ++filtd) - { - if (readlen <= 0 || buf[filtd] == '\n') - { - /* In binary mode add an empty list item when the last - * non-empty line ends in a '\n'. */ - if (!binary && readlen == 0 && filtd == 0 && prev == NULL) - break; + readlen = (int)fread(buf, 1, io_size, fd); - /* Found end-of-line or end-of-file: add a text line to the - * list. */ - chop = 0; - if (!binary) - while (filtd - chop - 1 >= tolist - && buf[filtd - chop - 1] == '\r') - ++chop; - len = filtd - tolist - chop; - if (prev == NULL) - s = vim_strnsave(buf + tolist, len); + /* This for loop processes what was read, but is also entered at end + * of file so that either: + * - an incomplete line gets written + * - a "binary" file gets an empty line at the end if it ends in a + * newline. */ + for (p = buf, start = buf; + p < buf + readlen || (readlen <= 0 && (prevlen > 0 || binary)); + ++p) + { + if (*p == '\n' || readlen <= 0) + { + listitem_T *li; + char_u *s = NULL; + long_u len = p - start; + + /* Finished a line. Remove CRs before NL. */ + if (readlen > 0 && !binary) + { + while (len > 0 && start[len - 1] == '\r') + --len; + /* removal may cross back to the "prev" string */ + if (len == 0) + while (prevlen > 0 && prev[prevlen - 1] == '\r') + --prevlen; + } + if (prevlen == 0) + s = vim_strnsave(start, len); else { - s = alloc((unsigned)(prevlen + len + 1)); - if (s != NULL) + /* Change "prev" buffer to be the right size. This way + * the bytes are only copied once, and very long lines are + * allocated only once. */ + if ((s = vim_realloc(prev, prevlen + len + 1)) != NULL) { - mch_memmove(s, prev, prevlen); - vim_free(prev); - prev = NULL; - mch_memmove(s + prevlen, buf + tolist, len); + mch_memmove(s + prevlen, start, len); s[prevlen + len] = NUL; + prev = NULL; /* the list will own the string */ + prevlen = prevsize = 0; } } - tolist = filtd + 1; + if (s == NULL) + { + do_outofmem_msg((long_u) prevlen + len + 1); + failed = TRUE; + break; + } - li = listitem_alloc(); - if (li == NULL) + if ((li = listitem_alloc()) == NULL) { vim_free(s); + failed = TRUE; break; } li->li_tv.v_type = VAR_STRING; @@ -14412,74 +14421,109 @@ f_readfile(argvars, rettv) li->li_tv.vval.v_string = s; list_append(rettv->vval.v_list, li); - if (++cnt >= maxline && maxline >= 0) - break; - if (readlen <= 0) + start = p + 1; /* step over newline */ + if ((++cnt >= maxline && maxline >= 0) || readlen <= 0) break; } - else if (buf[filtd] == NUL) - buf[filtd] = '\n'; + else if (*p == NUL) + *p = '\n'; #ifdef FEAT_MBYTE - else if (buf[filtd] == 0xef - && enc_utf8 - && filtd + 2 < buflen - && !binary - && buf[filtd + 1] == 0xbb - && buf[filtd + 2] == 0xbf) + /* Check for utf8 "bom"; U+FEFF is encoded as EF BB BF. Do this + * when finding the BF and check the previous two bytes. */ + else if (*p == 0xbf && enc_utf8 && !binary) { - /* remove utf-8 byte order mark */ - mch_memmove(buf + filtd, buf + filtd + 3, buflen - filtd - 3); - --filtd; - buflen -= 3; - } -#endif - } - if (readlen <= 0) - break; + /* Find the two bytes before the 0xbf. If p is at buf, or buf + * + 1, these may be in the "prev" string. */ + char_u back1 = p >= buf + 1 ? p[-1] + : prevlen >= 1 ? prev[prevlen - 1] : NUL; + char_u back2 = p >= buf + 2 ? p[-2] + : p == buf + 1 && prevlen >= 1 ? prev[prevlen - 1] + : prevlen >= 2 ? prev[prevlen - 2] : NUL; - if (tolist == 0) - { - if (buflen >= FREAD_SIZE / 2) - { - /* "buf" is full, need to move text to an allocated buffer */ - if (prev == NULL) + if (back2 == 0xef && back1 == 0xbb) { - prev = vim_strnsave(buf, buflen); - prevlen = buflen; - } - else - { - s = alloc((unsigned)(prevlen + buflen)); - if (s != NULL) + char_u *dest = p - 2; + + /* Usually a BOM is at the beginning of a file, and so at + * the beginning of a line; then we can just step over it. + */ + if (start == dest) + start = p + 1; + else { - mch_memmove(s, prev, prevlen); - mch_memmove(s + prevlen, buf, buflen); - vim_free(prev); - prev = s; - prevlen += buflen; + /* have to shuffle buf to close gap */ + int adjust_prevlen = 0; + + if (dest < buf) + { + adjust_prevlen = buf - dest; /* must be 1 or 2 */ + dest = buf; + } + if (readlen > p - buf + 1) + mch_memmove(dest, p + 1, readlen - (p - buf) - 1); + readlen -= 3 - adjust_prevlen; + prevlen -= adjust_prevlen; + p = dest - 1; } } - filtd = 0; } - } - else +#endif + } /* for */ + + if (failed || (cnt >= maxline && maxline >= 0) || readlen <= 0) + break; + if (start < p) { - mch_memmove(buf, buf + tolist, buflen - tolist); - filtd -= tolist; + /* There's part of a line in buf, store it in "prev". */ + if (p - start + prevlen >= prevsize) + { + /* need bigger "prev" buffer */ + char_u *newprev; + + /* A common use case is ordinary text files and "prev" gets a + * fragment of a line, so the first allocation is made + * small, to avoid repeatedly 'allocing' large and + * 'reallocing' small. */ + if (prevsize == 0) + prevsize = p - start; + else + { + long grow50pc = (prevsize * 3) / 2; + long growmin = (p - start) * 2 + prevlen; + prevsize = grow50pc > growmin ? grow50pc : growmin; + } + if ((newprev = vim_realloc(prev, prevsize)) == NULL) + { + do_outofmem_msg((long_u)prevsize); + failed = TRUE; + break; + } + prev = newprev; + } + /* Add the line part to end of "prev". */ + mch_memmove(prev + prevlen, start, p - start); + prevlen += p - start; } - } + } /* while */ /* * For a negative line count use only the lines at the end of the file, * free the rest. */ - if (maxline < 0) + if (!failed && maxline < 0) while (cnt > -maxline) { listitem_remove(rettv->vval.v_list, rettv->vval.v_list->lv_first); --cnt; } + if (failed) + { + list_free(rettv->vval.v_list, TRUE); + /* readfile doc says an empty list is returned on error */ + rettv->vval.v_list = list_alloc(); + } + vim_free(prev); fclose(fd); } diff --git a/src/version.c b/src/version.c index a55888f536..6732c887c5 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 427, /**/ 426, /**/ From 23db10c2fb2093a49fab3ee3c3c38111cafabe70 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 00:39:19 +0100 Subject: [PATCH 055/115] Added tag v7-3-427 for changeset 45467d77047d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0711f9c459..3b1ca5945b 100644 --- a/.hgtags +++ b/.hgtags @@ -1763,3 +1763,4 @@ b7811ab264bf31e0049e7a9b689a399ead6cbda6 v7-3-423 2e4539dc2de7da0aed83286304d1afeb0a4cdb3d v7-3-424 7b17a38eb223b4b56327f019267c1156121f5c0f v7-3-425 c70c005f61fb08ca032b4eab533908cfc6e6f40a v7-3-426 +45467d77047df9134a7694367bf97344441b1b3c v7-3-427 From 8cd3ba6c35859004fb6604f0e161c4b5e7538c4b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 00:48:00 +0100 Subject: [PATCH 056/115] updated for version 7.3.428 Problem: Win32: an xpm file without a mask crashes Vim. Solution: Fail when the mask is missing. (Dave Bodenstab) --- src/version.c | 2 ++ src/xpm_w32.c | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/version.c b/src/version.c index 6732c887c5..6ba69ea03d 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 428, /**/ 427, /**/ diff --git a/src/xpm_w32.c b/src/xpm_w32.c index 45765e1f15..2ec32ed9f0 100644 --- a/src/xpm_w32.c +++ b/src/xpm_w32.c @@ -1,4 +1,5 @@ -/* +/* vi:set ts=8 sts=4 sw=4: + * * Load XPM image. * * This function is placed in separate file because Xpm headers conflict with @@ -30,9 +31,10 @@ #include "xpm.h" /* - * Tries to load Xpm image from file 'filename'. - * If fails return -1. - * success - 0 and image and mask BITMAPS + * Tries to load an Xpm image from the file "filename". + * Returns -1 on failure. + * Returns 0 on success and stores image and mask BITMAPS in "hImage" and + * "hShape". */ int LoadXpmImage(filename, hImage, hShape) @@ -40,7 +42,7 @@ LoadXpmImage(filename, hImage, hShape) HBITMAP *hImage; HBITMAP *hShape; { - XImage *img; /* loaded image */ + XImage *img; /* loaded image */ XImage *shp; /* shapeimage */ XpmAttributes attr; int res; @@ -51,10 +53,13 @@ LoadXpmImage(filename, hImage, hShape) DeleteDC(hdc); if (res < 0) return -1; - else + if (shp == NULL) { - *hImage = img->bitmap; - *hShape = shp->bitmap; - return 0; + if (img) + XDestroyImage(img); + return -1; } + *hImage = img->bitmap; + *hShape = shp->bitmap; + return 0; } From 33000f0cb0c14ec4f5094a494555adb5324cd468 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 00:48:00 +0100 Subject: [PATCH 057/115] Added tag v7-3-428 for changeset d473f39aeadf --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3b1ca5945b..304efe3e33 100644 --- a/.hgtags +++ b/.hgtags @@ -1764,3 +1764,4 @@ b7811ab264bf31e0049e7a9b689a399ead6cbda6 v7-3-423 7b17a38eb223b4b56327f019267c1156121f5c0f v7-3-425 c70c005f61fb08ca032b4eab533908cfc6e6f40a v7-3-426 45467d77047df9134a7694367bf97344441b1b3c v7-3-427 +d473f39aeadf6d022e520968db17257b42b52b61 v7-3-428 From 849973b5c0a33f393e935813b63818c13e9702f0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 01:18:48 +0100 Subject: [PATCH 058/115] updated for version 7.3.429 Problem: When 'cpoptions' includes "E" "c0" in the first column is an error. The redo register is then set to the errornous command. Solution: Do not set the redo register if the command fails because of an empty region. (Hideki Eiraku) --- src/getchar.c | 24 +++++++++++++++++++++--- src/normal.c | 18 ++++++++++++++++++ src/proto/getchar.pro | 3 ++- src/version.c | 2 ++ 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index 3d6b0b23a3..af18c6f249 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -470,6 +470,24 @@ ResetRedobuff() } } +/* + * Discard the contents of the redo buffer and restore the previous redo + * buffer. + */ + void +CancelRedo() +{ + if (!block_redo) + { + free_buff(&redobuff); + redobuff = old_redobuff; + old_redobuff.bh_first.b_next = NULL; + start_stuff(); + while (read_stuff(TRUE) != NUL) + ; + } +} + #if defined(FEAT_AUTOCMD) || defined(FEAT_EVAL) || defined(PROTO) /* * Save redobuff and old_redobuff to save_redobuff and save_old_redobuff. @@ -691,9 +709,9 @@ stuffnumReadbuff(n) * Read a character from the redo buffer. Translates K_SPECIAL, CSI and * multibyte characters. * The redo buffer is left as it is. - * if init is TRUE, prepare for redo, return FAIL if nothing to redo, OK - * otherwise - * if old is TRUE, use old_redobuff instead of redobuff + * If init is TRUE, prepare for redo, return FAIL if nothing to redo, OK + * otherwise. + * If old is TRUE, use old_redobuff instead of redobuff. */ static int read_redo(init, old_redo) diff --git a/src/normal.c b/src/normal.c index a6cd2d6b29..aa470e4f75 100644 --- a/src/normal.c +++ b/src/normal.c @@ -1978,7 +1978,10 @@ do_pending_operator(cap, old_col, gui_yank) VIsual_reselect = FALSE; /* don't reselect now */ #endif if (empty_region_error) + { vim_beep(); + CancelRedo(); + } else { (void)op_delete(oap); @@ -1992,7 +1995,10 @@ do_pending_operator(cap, old_col, gui_yank) if (empty_region_error) { if (!gui_yank) + { vim_beep(); + CancelRedo(); + } } else (void)op_yank(oap, FALSE, !gui_yank); @@ -2004,7 +2010,10 @@ do_pending_operator(cap, old_col, gui_yank) VIsual_reselect = FALSE; /* don't reselect now */ #endif if (empty_region_error) + { vim_beep(); + CancelRedo(); + } else { /* This is a new edit command, not a restart. Need to @@ -2066,7 +2075,10 @@ do_pending_operator(cap, old_col, gui_yank) case OP_LOWER: case OP_ROT13: if (empty_region_error) + { vim_beep(); + CancelRedo(); + } else op_tilde(oap); check_cursor_col(); @@ -2099,7 +2111,10 @@ do_pending_operator(cap, old_col, gui_yank) #endif #ifdef FEAT_VISUALEXTRA if (empty_region_error) + { vim_beep(); + CancelRedo(); + } else { /* This is a new edit command, not a restart. Need to @@ -2129,7 +2144,10 @@ do_pending_operator(cap, old_col, gui_yank) #ifdef FEAT_VISUALEXTRA if (empty_region_error) #endif + { vim_beep(); + CancelRedo(); + } #ifdef FEAT_VISUALEXTRA else op_replace(oap, cap->nchar); diff --git a/src/proto/getchar.pro b/src/proto/getchar.pro index a304bafa53..371f77002c 100644 --- a/src/proto/getchar.pro +++ b/src/proto/getchar.pro @@ -4,8 +4,9 @@ char_u *get_recorded __ARGS((void)); char_u *get_inserted __ARGS((void)); int stuff_empty __ARGS((void)); void typeahead_noflush __ARGS((int c)); -void flush_buffers __ARGS((int typeahead)); +void flush_buffers __ARGS((int flush_typeahead)); void ResetRedobuff __ARGS((void)); +void CancelRedo __ARGS((void)); void saveRedobuff __ARGS((void)); void restoreRedobuff __ARGS((void)); void AppendToRedobuff __ARGS((char_u *s)); diff --git a/src/version.c b/src/version.c index 6ba69ea03d..03bdab2627 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 429, /**/ 428, /**/ From 36804026ad66bf64638029e8c3416d78060a629e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 01:18:48 +0100 Subject: [PATCH 059/115] Added tag v7-3-429 for changeset c9366ca36f6f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 304efe3e33..0d9900ce49 100644 --- a/.hgtags +++ b/.hgtags @@ -1765,3 +1765,4 @@ b7811ab264bf31e0049e7a9b689a399ead6cbda6 v7-3-423 c70c005f61fb08ca032b4eab533908cfc6e6f40a v7-3-426 45467d77047df9134a7694367bf97344441b1b3c v7-3-427 d473f39aeadf6d022e520968db17257b42b52b61 v7-3-428 +c9366ca36f6feb95bd8e01dbed9973a404f5391e v7-3-429 From 5302c88d6da581fd967c6e1a8b732c02a6aa830f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 20:08:36 +0100 Subject: [PATCH 060/115] updated for version 7.3.430 Problem: When a custom filetype detection uses "augroup END" the conf fileytpe detection does not have the filetypedetect group. Solution: Always end the group and include filetypedetect in the conf autocommand. (Lech Lorens) --- runtime/filetype.vim | 8 +++++--- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 26a435b480..a3ae34a4dd 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2545,17 +2545,19 @@ au BufNewFile,BufRead *.txt,*.text setf text " detected filetypes. runtime! ftdetect/*.vim +" NOTE: The above command could have ended the filetypedetect autocmd group +" and started another one. Let's make sure it has ended to get to a consistant +" state. +augroup END " Generic configuration file (check this last, it's just guessing!) -au BufNewFile,BufRead,StdinReadPost * +au filetypedetect BufNewFile,BufRead,StdinReadPost * \ if !did_filetype() && expand("") !~ g:ft_ignore_pat \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#' \ || getline(4) =~ '^#' || getline(5) =~ '^#') | \ setf conf | \ endif -augroup END - " If the GUI is already running, may still need to install the Syntax menu. " Don't do it when the 'M' flag is included in 'guioptions'. diff --git a/src/version.c b/src/version.c index 03bdab2627..88bb6e0aee 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 430, /**/ 429, /**/ From 67e7203b21da9838b881c4553d4b0fcea3fcb482 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 20:08:36 +0100 Subject: [PATCH 061/115] Added tag v7-3-430 for changeset a9f8dd20a49f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0d9900ce49..115dc77872 100644 --- a/.hgtags +++ b/.hgtags @@ -1766,3 +1766,4 @@ c70c005f61fb08ca032b4eab533908cfc6e6f40a v7-3-426 45467d77047df9134a7694367bf97344441b1b3c v7-3-427 d473f39aeadf6d022e520968db17257b42b52b61 v7-3-428 c9366ca36f6feb95bd8e01dbed9973a404f5391e v7-3-429 +a9f8dd20a49f9b8296a6ef6d9e17e3446c0974eb v7-3-430 From b25b8705ad21cad131cc443db47db16666c3192e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 22:05:48 +0100 Subject: [PATCH 062/115] updated for version 7.3.431 Problem: Fetching a key at a prompt may be confused by escape sequences. Especially when getting a prompt at a VimEnter autocommand. (Alex Efros) Solution: Properly handle escape sequences deleted by check_termcode(). --- src/getchar.c | 3 ++- src/misc1.c | 37 ++++++++++++++++++++++++++++--------- src/proto/term.pro | 2 +- src/term.c | 26 +++++++++++++++++--------- src/version.c | 2 ++ 5 files changed, 50 insertions(+), 20 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index af18c6f249..dc7d768476 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2282,7 +2282,8 @@ vgetorpeek(advance) typebuf.tb_off] == RM_YES)) && !timedout) { - keylen = check_termcode(max_mlen + 1, NULL, 0); + keylen = check_termcode(max_mlen + 1, + NULL, 0, NULL); /* If no termcode matched but 'pastetoggle' * matched partially it's like an incomplete key diff --git a/src/misc1.c b/src/misc1.c index 1cd7cceee8..1945d0ac9b 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -3105,8 +3105,9 @@ ask_yesno(str, direct) int get_keystroke() { -#define CBUFLEN 151 - char_u buf[CBUFLEN]; + char_u *buf = NULL; + int buflen = 150; + int maxlen; int len = 0; int n; int save_mapped_ctrl_c = mapped_ctrl_c; @@ -3118,12 +3119,29 @@ get_keystroke() cursor_on(); out_flush(); + /* Leave some room for check_termcode() to insert a key code into (max + * 5 chars plus NUL). And fix_input_buffer() can triple the number of + * bytes. */ + maxlen = (buflen - 6 - len) / 3; + if (buf == NULL) + buf = alloc(buflen); + else if (maxlen < 10) + { + /* Need some more space. This migth happen when receiving a long + * escape sequence. */ + buflen += 100; + buf = vim_realloc(buf, buflen); + maxlen = (buflen - 6 - len) / 3; + } + if (buf == NULL) + { + do_outofmem_msg((long_u)buflen); + return ESC; /* panic! */ + } + /* First time: blocking wait. Second time: wait up to 100ms for a - * terminal code to complete. Leave some room for check_termcode() to - * insert a key code into (max 5 chars plus NUL). And - * fix_input_buffer() can triple the number of bytes. */ - n = ui_inchar(buf + len, (CBUFLEN - 6 - len) / 3, - len == 0 ? -1L : 100L, 0); + * terminal code to complete. */ + n = ui_inchar(buf + len, maxlen, len == 0 ? -1L : 100L, 0); if (n > 0) { /* Replace zero and CSI by a special key code. */ @@ -3135,7 +3153,7 @@ get_keystroke() ++waited; /* keep track of the waiting time */ /* Incomplete termcode and not timed out yet: get more characters */ - if ((n = check_termcode(1, buf, len)) < 0 + if ((n = check_termcode(1, buf, buflen, &len)) < 0 && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) continue; @@ -3203,7 +3221,7 @@ get_keystroke() { if (MB_BYTE2LEN(n) > len) continue; /* more bytes to get */ - buf[len >= CBUFLEN ? CBUFLEN - 1 : len] = NUL; + buf[len >= buflen ? buflen - 1 : len] = NUL; n = (*mb_ptr2char)(buf); } #endif @@ -3213,6 +3231,7 @@ get_keystroke() #endif break; } + vim_free(buf); mapped_ctrl_c = save_mapped_ctrl_c; return n; diff --git a/src/proto/term.pro b/src/proto/term.pro index 66c4c2ed50..9958763bfc 100644 --- a/src/proto/term.pro +++ b/src/proto/term.pro @@ -50,7 +50,7 @@ char_u *find_termcode __ARGS((char_u *name)); char_u *get_termcode __ARGS((int i)); void del_termcode __ARGS((char_u *name)); void set_mouse_topline __ARGS((win_T *wp)); -int check_termcode __ARGS((int max_offset, char_u *buf, int buflen)); +int check_termcode __ARGS((int max_offset, char_u *buf, int bufsize, int *buflen)); char_u *replace_termcodes __ARGS((char_u *from, char_u **bufp, int from_part, int do_lt, int special)); int find_term_bykeys __ARGS((char_u *src)); void show_termcodes __ARGS((void)); diff --git a/src/term.c b/src/term.c index 47df299615..74c5a336fe 100644 --- a/src/term.c +++ b/src/term.c @@ -3785,14 +3785,16 @@ set_mouse_topline(wp) * With a match, the match is removed, the replacement code is inserted in * typebuf.tb_buf[] and the number of characters in typebuf.tb_buf[] is * returned. - * When "buf" is not NULL, it is used instead of typebuf.tb_buf[]. "buflen" is - * then the length of the string in buf[]. + * When "buf" is not NULL, buf[bufsize] is used instead of typebuf.tb_buf[]. + * "buflen" is then the length of the string in buf[] and is updated for + * inserts and deletes. */ int -check_termcode(max_offset, buf, buflen) +check_termcode(max_offset, buf, bufsize, buflen) int max_offset; char_u *buf; - int buflen; + int bufsize; + int *buflen; { char_u *tp; char_u *p; @@ -3864,10 +3866,10 @@ check_termcode(max_offset, buf, buflen) } else { - if (offset >= buflen) + if (offset >= *buflen) break; tp = buf + offset; - len = buflen - offset; + len = *buflen - offset; } /* @@ -5002,12 +5004,18 @@ check_termcode(max_offset, buf, buflen) if (extra < 0) /* remove matched characters */ mch_memmove(buf + offset, buf + offset - extra, - (size_t)(buflen + offset + extra)); + (size_t)(*buflen + offset + extra)); else if (extra > 0) - /* insert the extra space we need */ + { + /* Insert the extra space we need. If there is insufficient + * space return -1. */ + if (*buflen + extra + new_slen >= bufsize) + return -1; mch_memmove(buf + offset + extra, buf + offset, - (size_t)(buflen - offset)); + (size_t)(*buflen - offset)); + } mch_memmove(buf + offset, string, (size_t)new_slen); + *buflen = *buflen + extra + new_slen; } return retval == 0 ? (len + extra + offset) : retval; } diff --git a/src/version.c b/src/version.c index 88bb6e0aee..89720f950a 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 431, /**/ 430, /**/ From db53e2d1261f211b93cce0853c28edb53e71037e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 22:05:48 +0100 Subject: [PATCH 063/115] Added tag v7-3-431 for changeset a27fac494e70 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 115dc77872..b1b3e115dc 100644 --- a/.hgtags +++ b/.hgtags @@ -1767,3 +1767,4 @@ c70c005f61fb08ca032b4eab533908cfc6e6f40a v7-3-426 d473f39aeadf6d022e520968db17257b42b52b61 v7-3-428 c9366ca36f6feb95bd8e01dbed9973a404f5391e v7-3-429 a9f8dd20a49f9b8296a6ef6d9e17e3446c0974eb v7-3-430 +a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 From 3bed2575b0d489616939e45cd5090fd44e6c21a9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 22:51:33 +0100 Subject: [PATCH 064/115] updated for version 7.3.432 Problem: ACLs are not supported for ZFS or NFSv4 on Solaris. Solution: Add configure check and code. (Danek Duvall) --- src/auto/configure | 44 +++++++++++++++++++++++++++++++++++++++++++- src/config.h.in | 1 + src/configure.in | 4 +++- src/os_unix.c | 16 ++++++++++++++++ src/version.c | 2 ++ 5 files changed, 65 insertions(+), 2 deletions(-) diff --git a/src/auto/configure b/src/auto/configure index a22706ddd7..3321f49134 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -11328,7 +11328,47 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5 +$as_echo_n "checking for acl_get in -lsec... " >&6; } +if test "${ac_cv_lib_sec_acl_get+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsec $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char acl_get (); +int +main () +{ +return acl_get (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sec_acl_get=yes +else + ac_cv_lib_sec_acl_get=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5 +$as_echo "$ac_cv_lib_sec_acl_get" >&6; } +if test "x$ac_cv_lib_sec_acl_get" = x""yes; then : + LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5 $as_echo_n "checking for Solaris ACL support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11355,6 +11395,8 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5 $as_echo_n "checking for AIX ACL support... " >&6; } diff --git a/src/config.h.in b/src/config.h.in index db07f863c8..d1adb3a3af 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -363,6 +363,7 @@ /* Define if you want to add support for ACL */ #undef HAVE_POSIX_ACL +#undef HAVE_SOLARIS_ZFS_ACL #undef HAVE_SOLARIS_ACL #undef HAVE_AIX_ACL diff --git a/src/configure.in b/src/configure.in index 55c897aa5b..2ede332ada 100644 --- a/src/configure.in +++ b/src/configure.in @@ -3106,6 +3106,7 @@ AC_TRY_LINK([ dnl Link with -lposix1e for ACL stuff; if not found, try -lacl for SGI dnl when -lacl works, also try to use -lattr (required for Debian). +dnl On Solaris, use the acl_get/set functions in libsec, if present. AC_MSG_CHECKING(--disable-acl argument) AC_ARG_ENABLE(acl, [ --disable-acl Don't check for ACL support.], @@ -3128,6 +3129,7 @@ acl_t acl;], [acl = acl_get_file("foo", ACL_TYPE_ACCESS); AC_MSG_RESULT(yes); AC_DEFINE(HAVE_POSIX_ACL), AC_MSG_RESULT(no)) +AC_CHECK_LIB(sec, acl_get, [LIBS="$LIBS -lsec"; AC_DEFINE(HAVE_SOLARIS_ZFS_ACL)], AC_MSG_CHECKING(for Solaris ACL support) AC_TRY_LINK([ #ifdef HAVE_SYS_ACL_H @@ -3135,7 +3137,7 @@ AC_TRY_LINK([ #endif], [acl("foo", GETACLCNT, 0, NULL); ], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOLARIS_ACL), - AC_MSG_RESULT(no)) + AC_MSG_RESULT(no))) AC_MSG_CHECKING(for AIX ACL support) AC_TRY_LINK([ diff --git a/src/os_unix.c b/src/os_unix.c index 30593ef47b..043d0a8002 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2746,6 +2746,13 @@ mch_get_acl(fname) #ifdef HAVE_POSIX_ACL ret = (vim_acl_T)acl_get_file((char *)fname, ACL_TYPE_ACCESS); #else +#ifdef HAVE_SOLARIS_ZFS_ACL + acl_t *aclent; + + if (acl_get((char *)fname, 0, &aclent) < 0) + return NULL; + ret = (vim_acl_T)aclent; +#else #ifdef HAVE_SOLARIS_ACL vim_acl_solaris_T *aclent; @@ -2791,6 +2798,7 @@ mch_get_acl(fname) ret = (vim_acl_T)aclent; #endif /* HAVE_AIX_ACL */ #endif /* HAVE_SOLARIS_ACL */ +#endif /* HAVE_SOLARIS_ZFS_ACL */ #endif /* HAVE_POSIX_ACL */ return ret; } @@ -2808,6 +2816,9 @@ mch_set_acl(fname, aclent) #ifdef HAVE_POSIX_ACL acl_set_file((char *)fname, ACL_TYPE_ACCESS, (acl_t)aclent); #else +#ifdef HAVE_SOLARIS_ZFS_ACL + acl_set((char *)fname, (acl_t *)aclent); +#else #ifdef HAVE_SOLARIS_ACL acl((char *)fname, SETACL, ((vim_acl_solaris_T *)aclent)->acl_cnt, ((vim_acl_solaris_T *)aclent)->acl_entry); @@ -2816,6 +2827,7 @@ mch_set_acl(fname, aclent) chacl((char *)fname, aclent, ((struct acl *)aclent)->acl_len); #endif /* HAVE_AIX_ACL */ #endif /* HAVE_SOLARIS_ACL */ +#endif /* HAVE_SOLARIS_ZFS_ACL */ #endif /* HAVE_POSIX_ACL */ } @@ -2828,6 +2840,9 @@ mch_free_acl(aclent) #ifdef HAVE_POSIX_ACL acl_free((acl_t)aclent); #else +#ifdef HAVE_SOLARIS_ZFS_ACL + acl_free((acl_t *)aclent); +#else #ifdef HAVE_SOLARIS_ACL free(((vim_acl_solaris_T *)aclent)->acl_entry); free(aclent); @@ -2836,6 +2851,7 @@ mch_free_acl(aclent) free(aclent); #endif /* HAVE_AIX_ACL */ #endif /* HAVE_SOLARIS_ACL */ +#endif /* HAVE_SOLARIS_ZFS_ACL */ #endif /* HAVE_POSIX_ACL */ } #endif diff --git a/src/version.c b/src/version.c index 89720f950a..c1c568d0af 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 432, /**/ 431, /**/ From d7da9af392a0c4f2dc16d5325f6882a60c78023d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 22:51:33 +0100 Subject: [PATCH 065/115] Added tag v7-3-432 for changeset 81201fb337a5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b1b3e115dc..eefa308aac 100644 --- a/.hgtags +++ b/.hgtags @@ -1768,3 +1768,4 @@ d473f39aeadf6d022e520968db17257b42b52b61 v7-3-428 c9366ca36f6feb95bd8e01dbed9973a404f5391e v7-3-429 a9f8dd20a49f9b8296a6ef6d9e17e3446c0974eb v7-3-430 a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 +81201fb337a58a58cbac43c2b89025c681361df7 v7-3-432 From ad1cd3750dc2bd1656c89200f0dfa75db4a7a3a0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 23:10:30 +0100 Subject: [PATCH 066/115] updated for version 7.3.433 Problem: Using continued lines in a Vim script can be slow. Solution: Instead of reallocating for every line use a growarray. (Yasuhiro Matsumoto) --- src/ex_cmds2.c | 38 ++++++++++++++++++++++++-------------- src/version.c | 2 ++ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 4b2564bbd4..ddfe103b65 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3439,22 +3439,32 @@ getsourceline(c, cookie, indent) { /* compensate for the one line read-ahead */ --sourcing_lnum; - for (;;) + + /* Get the next line and concatenate it when it starts with a + * backslash. We always need to read the next line, keep it in + * sp->nextline. */ + sp->nextline = get_one_sourceline(sp); + if (sp->nextline != NULL && *(p = skipwhite(sp->nextline)) == '\\') { - sp->nextline = get_one_sourceline(sp); - if (sp->nextline == NULL) - break; - p = skipwhite(sp->nextline); - if (*p != '\\') - break; - s = alloc((unsigned)(STRLEN(line) + STRLEN(p))); - if (s == NULL) /* out of memory */ - break; - STRCPY(s, line); - STRCAT(s, p + 1); + garray_T ga; + + ga_init2(&ga, (int)sizeof(char_u), 200); + ga_concat(&ga, line); + ga_concat(&ga, p + 1); + for (;;) + { + vim_free(sp->nextline); + sp->nextline = get_one_sourceline(sp); + if (sp->nextline == NULL) + break; + p = skipwhite(sp->nextline); + if (*p != '\\') + break; + ga_concat(&ga, p + 1); + } + ga_append(&ga, NUL); vim_free(line); - line = s; - vim_free(sp->nextline); + line = ga.ga_data; } } diff --git a/src/version.c b/src/version.c index c1c568d0af..7fd75fdef0 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 433, /**/ 432, /**/ From db31f6d78ae53c1730151368ca88d7f266c451df Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Feb 2012 23:10:30 +0100 Subject: [PATCH 067/115] Added tag v7-3-433 for changeset 8a731d7f0664 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index eefa308aac..c647b6c3aa 100644 --- a/.hgtags +++ b/.hgtags @@ -1769,3 +1769,4 @@ c9366ca36f6feb95bd8e01dbed9973a404f5391e v7-3-429 a9f8dd20a49f9b8296a6ef6d9e17e3446c0974eb v7-3-430 a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 81201fb337a58a58cbac43c2b89025c681361df7 v7-3-432 +8a731d7f0664b13176afb640ed0325949836962d v7-3-433 From 258befd30bd6617642095aa03fbdcf053a0eec05 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 6 Feb 2012 00:13:22 +0100 Subject: [PATCH 068/115] updated for version 7.3.434 Problem: Using join() can be slow. Solution: Compute the size of the result before allocation to avoid a lot of allocations and copies. (Taro Muraoka) --- src/eval.c | 119 ++++++++++++++++++++++++++++++++++++++++---------- src/version.c | 2 + 2 files changed, 98 insertions(+), 23 deletions(-) diff --git a/src/eval.c b/src/eval.c index 71c1f7872d..bd2d14280e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -442,6 +442,7 @@ static int list_concat __ARGS((list_T *l1, list_T *l2, typval_T *tv)); static list_T *list_copy __ARGS((list_T *orig, int deep, int copyID)); static void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2)); static char_u *list2string __ARGS((typval_T *tv, int copyID)); +static int list_join_inner __ARGS((garray_T *gap, list_T *l, char_u *sep, int echo_style, int copyID, garray_T *join_gap)); static int list_join __ARGS((garray_T *gap, list_T *l, char_u *sep, int echo, int copyID)); static int free_unref_items __ARGS((int copyID)); static void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID)); @@ -6571,6 +6572,82 @@ list2string(tv, copyID) return (char_u *)ga.ga_data; } +typedef struct join_S { + char_u *s; + char_u *tofree; +} join_T; + + static int +list_join_inner(gap, l, sep, echo_style, copyID, join_gap) + garray_T *gap; /* to store the result in */ + list_T *l; + char_u *sep; + int echo_style; + int copyID; + garray_T *join_gap; /* to keep each list item string */ +{ + int i; + join_T *p; + int len; + int sumlen = 0; + int first = TRUE; + char_u *tofree; + char_u numbuf[NUMBUFLEN]; + listitem_T *item; + char_u *s; + + /* Stringify each item in the list. */ + for (item = l->lv_first; item != NULL && !got_int; item = item->li_next) + { + if (echo_style) + s = echo_string(&item->li_tv, &tofree, numbuf, copyID); + else + s = tv2string(&item->li_tv, &tofree, numbuf, copyID); + if (s == NULL) + return FAIL; + + len = (int)STRLEN(s); + sumlen += len; + + ga_grow(join_gap, 1); + p = ((join_T *)join_gap->ga_data) + (join_gap->ga_len++); + if (tofree != NULL || s != numbuf) + { + p->s = s; + p->tofree = tofree; + } + else + { + p->s = vim_strnsave(s, len); + p->tofree = p->s; + } + + line_breakcheck(); + } + + /* Allocate result buffer with its total size, avoid re-allocation and + * multiple copy operations. Add 2 for a tailing ']' and NUL. */ + if (join_gap->ga_len >= 2) + sumlen += (int)STRLEN(sep) * (join_gap->ga_len - 1); + if (ga_grow(gap, sumlen + 2) == FAIL) + return FAIL; + + for (i = 0; i < join_gap->ga_len && !got_int; ++i) + { + if (first) + first = FALSE; + else + ga_concat(gap, sep); + p = ((join_T *)join_gap->ga_data) + i; + + if (p->s != NULL) + ga_concat(gap, p->s); + line_breakcheck(); + } + + return OK; +} + /* * Join list "l" into a string in "*gap", using separator "sep". * When "echo_style" is TRUE use String as echoed, otherwise as inside a List. @@ -6584,31 +6661,27 @@ list_join(gap, l, sep, echo_style, copyID) int echo_style; int copyID; { - int first = TRUE; - char_u *tofree; - char_u numbuf[NUMBUFLEN]; - listitem_T *item; - char_u *s; + garray_T join_ga; + int retval; + join_T *p; + int i; - for (item = l->lv_first; item != NULL && !got_int; item = item->li_next) + ga_init2(&join_ga, (int)sizeof(join_T), l->lv_len); + retval = list_join_inner(gap, l, sep, echo_style, copyID, &join_ga); + + /* Dispose each item in join_ga. */ + if (join_ga.ga_data != NULL) { - if (first) - first = FALSE; - else - ga_concat(gap, sep); - - if (echo_style) - s = echo_string(&item->li_tv, &tofree, numbuf, copyID); - else - s = tv2string(&item->li_tv, &tofree, numbuf, copyID); - if (s != NULL) - ga_concat(gap, s); - vim_free(tofree); - if (s == NULL) - return FAIL; - line_breakcheck(); + p = (join_T *)join_ga.ga_data; + for (i = 0; i < join_ga.ga_len; ++i) + { + vim_free(p->tofree); + ++p; + } + ga_clear(&join_ga); } - return OK; + + return retval; } /* @@ -13406,7 +13479,7 @@ get_maparg(argvars, rettv, exact) char_u *rhs; int mode; int abbr = FALSE; - int get_dict = FALSE; + int get_dict = FALSE; mapblock_T *mp; int buffer_local; diff --git a/src/version.c b/src/version.c index 7fd75fdef0..0977fb3637 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 434, /**/ 433, /**/ From 2ab594f0bca0e0311517ef444576783c103c6655 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 6 Feb 2012 00:13:22 +0100 Subject: [PATCH 069/115] Added tag v7-3-434 for changeset 636c2b1cdc8b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c647b6c3aa..7ad45289db 100644 --- a/.hgtags +++ b/.hgtags @@ -1770,3 +1770,4 @@ a9f8dd20a49f9b8296a6ef6d9e17e3446c0974eb v7-3-430 a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 81201fb337a58a58cbac43c2b89025c681361df7 v7-3-432 8a731d7f0664b13176afb640ed0325949836962d v7-3-433 +636c2b1cdc8b6cc5279ac7d5986da1085484b98a v7-3-434 From 9798cd2824a0c9c18beb9094886f4f9a0f3bdbd9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 Feb 2012 20:40:55 +0100 Subject: [PATCH 070/115] updated for version 7.3.435 Problem: Compiler warning for unused variable. Solution: Move the variable inside #ifdef. --- src/ex_cmds2.c | 4 +++- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index ddfe103b65..92cd73358e 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3400,7 +3400,7 @@ getsourceline(c, cookie, indent) { struct source_cookie *sp = (struct source_cookie *)cookie; char_u *line; - char_u *p, *s; + char_u *p; #ifdef FEAT_EVAL /* If breakpoints have been added/deleted need to check for it. */ @@ -3471,6 +3471,8 @@ getsourceline(c, cookie, indent) #ifdef FEAT_MBYTE if (line != NULL && sp->conv.vc_type != CONV_NONE) { + char_u *s; + /* Convert the encoding of the script line. */ s = string_convert(&sp->conv, line, NULL); if (s != NULL) diff --git a/src/version.c b/src/version.c index 0977fb3637..a181505eee 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 435, /**/ 434, /**/ From f394657694d9700ef67caaedf831db574521bf13 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 Feb 2012 20:40:55 +0100 Subject: [PATCH 071/115] Added tag v7-3-435 for changeset afbf45d85496 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7ad45289db..4135ee2181 100644 --- a/.hgtags +++ b/.hgtags @@ -1771,3 +1771,4 @@ a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 81201fb337a58a58cbac43c2b89025c681361df7 v7-3-432 8a731d7f0664b13176afb640ed0325949836962d v7-3-433 636c2b1cdc8b6cc5279ac7d5986da1085484b98a v7-3-434 +afbf45d854965f9e557497ab9d4d9aca87e220fd v7-3-435 From c15e85175a2060758f865467f1b8e206ac062bf3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 Feb 2012 20:44:10 +0100 Subject: [PATCH 072/115] updated for version 7.3.436 Problem: Compiler warnings for types on Windows. Solution: Add type casts. (Mike Williams) --- src/eval.c | 10 +++++----- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/eval.c b/src/eval.c index bd2d14280e..848c6670d6 100644 --- a/src/eval.c +++ b/src/eval.c @@ -14462,7 +14462,7 @@ f_readfile(argvars, rettv) --prevlen; } if (prevlen == 0) - s = vim_strnsave(start, len); + s = vim_strnsave(start, (int)len); else { /* Change "prev" buffer to be the right size. This way @@ -14529,7 +14529,7 @@ f_readfile(argvars, rettv) if (dest < buf) { - adjust_prevlen = buf - dest; /* must be 1 or 2 */ + adjust_prevlen = (int)(buf - dest); /* must be 1 or 2 */ dest = buf; } if (readlen > p - buf + 1) @@ -14558,11 +14558,11 @@ f_readfile(argvars, rettv) * small, to avoid repeatedly 'allocing' large and * 'reallocing' small. */ if (prevsize == 0) - prevsize = p - start; + prevsize = (long)(p - start); else { long grow50pc = (prevsize * 3) / 2; - long growmin = (p - start) * 2 + prevlen; + long growmin = (long)((p - start) * 2 + prevlen); prevsize = grow50pc > growmin ? grow50pc : growmin; } if ((newprev = vim_realloc(prev, prevsize)) == NULL) @@ -14575,7 +14575,7 @@ f_readfile(argvars, rettv) } /* Add the line part to end of "prev". */ mch_memmove(prev + prevlen, start, p - start); - prevlen += p - start; + prevlen += (long)(p - start); } } /* while */ diff --git a/src/version.c b/src/version.c index a181505eee..2c7ad8fb6b 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 436, /**/ 435, /**/ From d88f09180d3138448dd0ec4e40ff6aa132a0e044 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 Feb 2012 20:44:10 +0100 Subject: [PATCH 073/115] Added tag v7-3-436 for changeset 2a6eb75275d9 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4135ee2181..1037a2a6aa 100644 --- a/.hgtags +++ b/.hgtags @@ -1772,3 +1772,4 @@ a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 8a731d7f0664b13176afb640ed0325949836962d v7-3-433 636c2b1cdc8b6cc5279ac7d5986da1085484b98a v7-3-434 afbf45d854965f9e557497ab9d4d9aca87e220fd v7-3-435 +2a6eb75275d94b864eba6d6135de650a903a4a7e v7-3-436 From beb35fd2c1882b0e0901e919127937892b67d4a2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 Feb 2012 23:45:37 +0100 Subject: [PATCH 074/115] updated for version 7.3.437 Problem: Continue looping inside FOR_ALL_TAB_WINDOWS even when already done. Solution: Use goto instead of break. (Hirohito Higashi) --- src/fileio.c | 3 ++- src/globals.h | 4 ++++ src/version.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index b30d31102e..8ed878d73b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -8898,10 +8898,11 @@ aucmd_restbuf(aco) if (tp != curtab) goto_tabpage_tp(tp); win_goto(aucmd_win); - break; + goto win_found; } } } +win_found: /* Remove the window and frame from the tree of frames. */ (void)winframe_remove(curwin, &dummy, NULL); diff --git a/src/globals.h b/src/globals.h index 13851923f1..a9f1c2d970 100644 --- a/src/globals.h +++ b/src/globals.h @@ -535,6 +535,10 @@ EXTERN win_T *lastwin; /* last window */ EXTERN win_T *prevwin INIT(= NULL); /* previous window */ # define W_NEXT(wp) ((wp)->w_next) # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next) +/* + * When using this macro "break" only breaks out of the inner loop. Use "goto" + * to break out of the tabpage loop. + */ # define FOR_ALL_TAB_WINDOWS(tp, wp) \ for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \ for ((wp) = ((tp) == curtab) \ diff --git a/src/version.c b/src/version.c index 2c7ad8fb6b..59498a4caa 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 437, /**/ 436, /**/ From 5b3f773005da446756a790637d64bfd0e960d214 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 11 Feb 2012 23:45:37 +0100 Subject: [PATCH 075/115] Added tag v7-3-437 for changeset 539613ce999d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1037a2a6aa..68702d6cdc 100644 --- a/.hgtags +++ b/.hgtags @@ -1773,3 +1773,4 @@ a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 636c2b1cdc8b6cc5279ac7d5986da1085484b98a v7-3-434 afbf45d854965f9e557497ab9d4d9aca87e220fd v7-3-435 2a6eb75275d94b864eba6d6135de650a903a4a7e v7-3-436 +539613ce999d3a938c602a6b6eb230fd0d77a1d1 v7-3-437 From 8399b184df06f80ca030b505920dd3e97be72f20 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 00:18:58 +0100 Subject: [PATCH 076/115] updated for version 7.3.438 Problem: There is no way to avoid ":doautoall" reading modelines. Solution: Add the argument. Adjust documentation. --- runtime/doc/autocmd.txt | 13 +++++++------ src/fileio.c | 20 ++++++++++++++++---- src/version.c | 2 ++ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index ff0b403eef..1e2bc77376 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1073,13 +1073,8 @@ option will not cause any commands to be executed. autocommands for that group. Note: if you use an undefined group name, Vim gives you an error message. - After applying the autocommands the modelines are - processed, so that their settings overrule the - settings from autocommands, like what happens when - editing a file. - *:doautoa* *:doautoall* -:doautoa[ll] [group] {event} [fname] +:doautoa[ll] [] [group] {event} [fname] Like ":doautocmd", but apply the autocommands to each loaded buffer. Note that [fname] is used to select the autocommands, not the buffers to which they are @@ -1090,6 +1085,12 @@ option will not cause any commands to be executed. This command is intended for autocommands that set options, change highlighting, and things like that. + After applying the autocommands the modelines are + processed, so that their settings overrule the + settings from autocommands, like what happens when + editing a file. This is skipped when the + argument is present. + ============================================================================== 10. Using autocommands *autocmd-use* diff --git a/src/fileio.c b/src/fileio.c index 8ed878d73b..6d1bbbc174 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -8739,6 +8739,14 @@ ex_doautoall(eap) int retval; aco_save_T aco; buf_T *buf; + char_u *arg = eap->arg; + int call_do_modelines = TRUE; + + if (STRNCMP(arg, "", 12) == 0) + { + call_do_modelines = FALSE; + arg = skipwhite(arg + 12); + } /* * This is a bit tricky: For some commands curwin->w_buffer needs to be @@ -8755,11 +8763,15 @@ ex_doautoall(eap) aucmd_prepbuf(&aco, buf); /* execute the autocommands for this buffer */ - retval = do_doautocmd(eap->arg, FALSE); + retval = do_doautocmd(arg, FALSE); - /* Execute the modeline settings, but don't set window-local - * options if we are using the current window for another buffer. */ - do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0); + if (call_do_modelines) + { + /* Execute the modeline settings, but don't set window-local + * options if we are using the current window for another + * buffer. */ + do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0); + } /* restore the current window */ aucmd_restbuf(&aco); diff --git a/src/version.c b/src/version.c index 59498a4caa..bce741c093 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 438, /**/ 437, /**/ From fc91cb4c1afa8a14b4ddc1c3d4835f49ec9b99cf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 00:18:58 +0100 Subject: [PATCH 077/115] Added tag v7-3-438 for changeset bb67cd961fc3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 68702d6cdc..ee8c3465fc 100644 --- a/.hgtags +++ b/.hgtags @@ -1774,3 +1774,4 @@ a27fac494e709a3cb78399f5dbc5d807a1dc7a46 v7-3-431 afbf45d854965f9e557497ab9d4d9aca87e220fd v7-3-435 2a6eb75275d94b864eba6d6135de650a903a4a7e v7-3-436 539613ce999d3a938c602a6b6eb230fd0d77a1d1 v7-3-437 +bb67cd961fc3011d367357c215a0603dcc46ea40 v7-3-438 From b392293566877141103c1a805f9098ec6329dd19 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 00:31:52 +0100 Subject: [PATCH 078/115] updated for version 7.3.439 Problem: Compiler warnings to size casts in Perl interface. Solution: Use XS macros. (James McCoy) --- src/if_perl.xs | 4 ++-- src/typemap | 2 +- src/version.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/if_perl.xs b/src/if_perl.xs index e1e6ada220..9b8d2c2f69 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -611,7 +611,7 @@ newWINrv(rv, ptr) if (ptr->w_perl_private == NULL) { ptr->w_perl_private = newSV(0); - sv_setiv(ptr->w_perl_private, (IV)ptr); + sv_setiv(ptr->w_perl_private, PTR2IV(ptr)); } else SvREFCNT_inc(ptr->w_perl_private); @@ -629,7 +629,7 @@ newBUFrv(rv, ptr) if (ptr->b_perl_private == NULL) { ptr->b_perl_private = newSV(0); - sv_setiv(ptr->b_perl_private, (IV)ptr); + sv_setiv(ptr->b_perl_private, PTR2IV(ptr)); } else SvREFCNT_inc(ptr->b_perl_private); diff --git a/src/typemap b/src/typemap index 40049237be..ca1600ef2e 100644 --- a/src/typemap +++ b/src/typemap @@ -6,7 +6,7 @@ INPUT T_VIOBJNOMUNGE if (sv_isa($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); - $var = ($type) tmp; + $var = INT2PTR($type, tmp); if (!tmp) croak(\"$ntype no longer exists\"); } diff --git a/src/version.c b/src/version.c index bce741c093..22a7998263 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 439, /**/ 438, /**/ From 290ba5d450c773a5088a8389b69faedb37004aa0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 00:31:52 +0100 Subject: [PATCH 079/115] Added tag v7-3-439 for changeset dec4338a7da2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ee8c3465fc..5bf8b5c50a 100644 --- a/.hgtags +++ b/.hgtags @@ -1775,3 +1775,4 @@ afbf45d854965f9e557497ab9d4d9aca87e220fd v7-3-435 2a6eb75275d94b864eba6d6135de650a903a4a7e v7-3-436 539613ce999d3a938c602a6b6eb230fd0d77a1d1 v7-3-437 bb67cd961fc3011d367357c215a0603dcc46ea40 v7-3-438 +dec4338a7da22b02e7c7cc65668d35db264d3400 v7-3-439 From 18e40f3277e94eab5313d00d7a7b2a8e18158673 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 01:35:10 +0100 Subject: [PATCH 080/115] updated for version 7.3.440 Problem: Vim does not support UTF8_STRING for the X selection. Solution: Add UTF8_STRING atom support. (Alex Efros) Use it only when 'encoding' is set to Unicode. --- src/ui.c | 43 +++++++++++++++++++++++++++++++++---------- src/version.c | 2 ++ 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/ui.c b/src/ui.c index 7322f15f0e..4c4c2eefba 100644 --- a/src/ui.c +++ b/src/ui.c @@ -1917,6 +1917,7 @@ open_app_context() static Atom vim_atom; /* Vim's own special selection format */ #ifdef FEAT_MBYTE static Atom vimenc_atom; /* Vim's extended selection format */ +static Atom utf8_atom; #endif static Atom compound_text_atom; static Atom text_atom; @@ -1930,6 +1931,7 @@ x11_setup_atoms(dpy) vim_atom = XInternAtom(dpy, VIM_ATOM_NAME, False); #ifdef FEAT_MBYTE vimenc_atom = XInternAtom(dpy, VIMENC_ATOM_NAME,False); + utf8_atom = XInternAtom(dpy, "UTF8_STRING", False); #endif compound_text_atom = XInternAtom(dpy, "COMPOUND_TEXT", False); text_atom = XInternAtom(dpy, "TEXT", False); @@ -2074,7 +2076,11 @@ clip_x11_request_selection_cb(w, success, sel_atom, type, value, length, } #endif - else if (*type == compound_text_atom || ( + else if (*type == compound_text_atom +#ifdef FEAT_MBYTE + || *type == utf8_atom +#endif + || ( #ifdef FEAT_MBYTE enc_dbcs != 0 && #endif @@ -2128,7 +2134,7 @@ clip_x11_request_selection(myShell, dpy, cbd) #else 1 #endif - ; i < 5; i++) + ; i < 6; i++) { switch (i) { @@ -2136,10 +2142,18 @@ clip_x11_request_selection(myShell, dpy, cbd) case 0: type = vimenc_atom; break; #endif case 1: type = vim_atom; break; - case 2: type = compound_text_atom; break; - case 3: type = text_atom; break; +#ifdef FEAT_MBYTE + case 2: type = utf8_atom; break; +#endif + case 3: type = compound_text_atom; break; + case 4: type = text_atom; break; default: type = XA_STRING; } +#ifdef FEAT_MBYTE + if (type == utf8_atom && !enc_utf8) + /* Only request utf-8 when 'encoding' is utf8. */ + continue; +#endif success = MAYBE; XtGetSelectionValue(myShell, cbd->sel_atom, type, clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime); @@ -2230,18 +2244,23 @@ clip_x11_convert_selection_cb(w, sel_atom, target, type, value, length, format) { Atom *array; - if ((array = (Atom *)XtMalloc((unsigned)(sizeof(Atom) * 6))) == NULL) + if ((array = (Atom *)XtMalloc((unsigned)(sizeof(Atom) * 7))) == NULL) return False; *value = (XtPointer)array; i = 0; - array[i++] = XA_STRING; array[i++] = targets_atom; #ifdef FEAT_MBYTE array[i++] = vimenc_atom; #endif array[i++] = vim_atom; +#ifdef FEAT_MBYTE + if (enc_utf8) + array[i++] = utf8_atom; +#endif + array[i++] = XA_STRING; array[i++] = text_atom; array[i++] = compound_text_atom; + *type = XA_ATOM; /* This used to be: *format = sizeof(Atom) * 8; but that caused * crashes on 64 bit machines. (Peter Derr) */ @@ -2253,6 +2272,7 @@ clip_x11_convert_selection_cb(w, sel_atom, target, type, value, length, format) if ( *target != XA_STRING #ifdef FEAT_MBYTE && *target != vimenc_atom + && *target != utf8_atom #endif && *target != vim_atom && *target != text_atom @@ -2282,13 +2302,16 @@ clip_x11_convert_selection_cb(w, sel_atom, target, type, value, length, format) return False; } - if (*target == XA_STRING) + if (*target == XA_STRING +#ifdef FEAT_MBYTE + || (*target == utf8_atom && enc_utf8) +#endif + ) { mch_memmove(result, string, (size_t)(*length)); - *type = XA_STRING; + *type = *target; } - else if (*target == compound_text_atom - || *target == text_atom) + else if (*target == compound_text_atom || *target == text_atom) { XTextProperty text_prop; char *string_nt = (char *)alloc((unsigned)*length + 1); diff --git a/src/version.c b/src/version.c index 22a7998263..2519664468 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 440, /**/ 439, /**/ From d1d4e472c0b73046228c27ffc5bb39a725313677 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 01:35:10 +0100 Subject: [PATCH 081/115] Added tag v7-3-440 for changeset e3cbb11f3555 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5bf8b5c50a..6e396c6c9c 100644 --- a/.hgtags +++ b/.hgtags @@ -1776,3 +1776,4 @@ afbf45d854965f9e557497ab9d4d9aca87e220fd v7-3-435 539613ce999d3a938c602a6b6eb230fd0d77a1d1 v7-3-437 bb67cd961fc3011d367357c215a0603dcc46ea40 v7-3-438 dec4338a7da22b02e7c7cc65668d35db264d3400 v7-3-439 +e3cbb11f3555d5dbb1cbd3daac4a958a9e1f01ea v7-3-440 From 7e92e155079ce1d83ea11bcfdea8840b75377b1c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 01:55:55 +0100 Subject: [PATCH 082/115] updated for version 7.3.441 Problem: Newer versions of MzScheme (Racket) require earlier (trampolined) initialisation. Solution: Call mzscheme_main() early in main(). (Sergey Khorev) --- src/Make_mvc.mak | 2 + src/if_mzsch.c | 84 +++++++++++++++++++++--------------------- src/main.c | 33 +++++++++++++---- src/proto/if_mzsch.pro | 3 +- src/version.c | 2 + 5 files changed, 74 insertions(+), 50 deletions(-) diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index b103bdd8c4..c6a8e3158b 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -740,6 +740,8 @@ MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \ !endif !endif MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj +# increase stack size +MZSCHEME_LIB = $(MZSCHEME_LIB) /STACK:8388608 !endif # Perl interface diff --git a/src/if_mzsch.c b/src/if_mzsch.c index 65873c9139..86e96bd335 100644 --- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -31,8 +31,6 @@ * depend". */ #if defined(FEAT_MZSCHEME) || defined(PROTO) -#include - /* Base data structures */ #define SCHEME_VIMBUFFERP(obj) SAME_TYPE(SCHEME_TYPE(obj), mz_buffer_type) #define SCHEME_VIMWINDOWP(obj) SAME_TYPE(SCHEME_TYPE(obj), mz_window_type) @@ -559,13 +557,6 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose) hMzSch = vimLoadLib(sch_dll); hMzGC = vimLoadLib(gc_dll); - if (!hMzSch) - { - if (verbose) - EMSG2(_(e_loadlib), sch_dll); - return FAIL; - } - if (!hMzGC) { if (verbose) @@ -573,6 +564,13 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose) return FAIL; } + if (!hMzSch) + { + if (verbose) + EMSG2(_(e_loadlib), sch_dll); + return FAIL; + } + for (thunk = mzsch_imports; thunk->name; thunk++) { if ((*thunk->ptr = @@ -798,65 +796,68 @@ mzscheme_end(void) static __declspec(thread) void *tls_space; #endif - void -mzscheme_main(void) +/* + * Since version 4.x precise GC requires trampolined startup. + * Futures and places in version 5.x need it too. + */ +#if defined(MZ_PRECISE_GC) && MZSCHEME_VERSION_MAJOR >= 400 \ + || MZSCHEME_VERSION_MAJOR >= 500 && (defined(MZ_USE_FUTURES) || defined(MZ_USE_PLACES)) +# ifdef DYNAMIC_MZSCHEME +# error Precise GC v.4+ or Racket with futures/places do not support dynamic MzScheme +# endif +# define TRAMPOLINED_MZVIM_STARTUP +#endif + + int +mzscheme_main(int argc, char** argv) { #if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) && defined(USE_THREAD_LOCAL) scheme_register_tls_space(&tls_space, 0); #endif -#if defined(MZ_PRECISE_GC) && MZSCHEME_VERSION_MAJOR >= 400 - /* use trampoline for precise GC in MzScheme >= 4.x */ - scheme_main_setup(TRUE, mzscheme_env_main, 0, NULL); +#ifdef TRAMPOLINED_MZVIM_STARTUP + return scheme_main_setup(TRUE, mzscheme_env_main, argc, argv); #else - mzscheme_env_main(NULL, 0, NULL); + return mzscheme_env_main(NULL, argc, argv); #endif } static int -mzscheme_env_main(Scheme_Env *env, int argc UNUSED, char **argv UNUSED) +mzscheme_env_main(Scheme_Env *env, int argc, char **argv) { - /* neither argument nor return values are used */ -#ifdef MZ_PRECISE_GC -# if MZSCHEME_VERSION_MAJOR < 400 - /* - * Starting from version 4.x, embedding applications must use - * scheme_main_setup/scheme_main_stack_setup trampolines - * rather than setting stack base directly with scheme_set_stack_base - */ + int vim_main_result; +#ifdef TRAMPOLINED_MZVIM_STARTUP + /* Scheme has created the environment for us */ + environment = env; +#else +# ifdef MZ_PRECISE_GC Scheme_Object *dummy = NULL; MZ_GC_DECL_REG(1); MZ_GC_VAR_IN_REG(0, dummy); stack_base = &__gc_var_stack__; # else - /* environment has been created by us by Scheme */ - environment = env; -# endif - /* - * In 4.x, all activities must be performed inside trampoline - * so we are forced to initialise GC immediately - * This can be postponed in 3.x but I see no point in implementing - * a feature which will work in older versions only. - * One would better use conservative GC if he needs dynamic MzScheme - */ - mzscheme_init(); -#else int dummy = 0; stack_base = (void *)&dummy; +# endif #endif - main_loop(FALSE, FALSE); -#if defined(MZ_PRECISE_GC) && MZSCHEME_VERSION_MAJOR < 400 + + /* mzscheme_main is called as a trampoline from main. + * We trampoline into vim_main2 + * Passing argc, argv through from mzscheme_main + */ + vim_main_result = vim_main2(argc, argv); +#if !defined(TRAMPOLINED_MZVIM_STARTUP) && defined(MZ_PRECISE_GC) /* releasing dummy */ MZ_GC_REG(); MZ_GC_UNREG(); #endif - return 0; + return vim_main_result; } static void startup_mzscheme(void) { -#if !defined(MZ_PRECISE_GC) || MZSCHEME_VERSION_MAJOR < 400 +#ifndef TRAMPOLINED_MZVIM_STARTUP scheme_set_stack_base(stack_base, 1); #endif @@ -868,7 +869,7 @@ startup_mzscheme(void) MZ_REGISTER_STATIC(exn_message); MZ_REGISTER_STATIC(vim_exn); -#if !defined(MZ_PRECISE_GC) || MZSCHEME_VERSION_MAJOR < 400 +#ifndef TRAMPOLINED_MZVIM_STARTUP /* in newer versions of precise GC the initial env has been created */ environment = scheme_basic_env(); #endif @@ -3013,7 +3014,6 @@ register_vim_exn(void) MZ_GC_REG(); tmp = scheme_make_struct_names(exn_name, scheme_null, 0, &nc); - assert(nc <= 5); mch_memmove(exn_names, tmp, nc * sizeof(Scheme_Object *)); MZ_GC_CHECK(); diff --git a/src/main.c b/src/main.c index d1702fe570..d9f8df4b45 100644 --- a/src/main.c +++ b/src/main.c @@ -554,6 +554,31 @@ main debug_break_level = params.use_debug_break_level; #endif +#ifdef FEAT_MZSCHEME + /* + * Newer version of MzScheme (Racket) require earlier (trampolined) + * initialisation via scheme_main_setup. + * Implement this by initialising it as early as possible + * and splitting off remaining Vim main into vim_main2 + */ + { + /* Pack up preprocessed command line arguments. + * It is safe because Scheme does not access argc/argv. */ + char *args[2]; + args[0] = (char *)fname; + args[1] = (char *)¶ms; + return mzscheme_main(2, args); + } +} + +int vim_main2(int argc, char **argv) +{ + char_u *fname = (char_u *)argv[0]; + mparm_T params; + + memcpy(¶ms, argv[1], sizeof(params)); +#endif + /* Execute --cmd arguments. */ exe_pre_commands(¶ms); @@ -957,14 +982,8 @@ main /* * Call the main command loop. This never returns. - * For embedded MzScheme the main_loop will be called by Scheme - * for proper stack tracking - */ -#ifndef FEAT_MZSCHEME + */ main_loop(FALSE, FALSE); -#else - mzscheme_main(); -#endif return 0; } diff --git a/src/proto/if_mzsch.pro b/src/proto/if_mzsch.pro index 60e99bdff4..d1180bfa1e 100644 --- a/src/proto/if_mzsch.pro +++ b/src/proto/if_mzsch.pro @@ -14,6 +14,7 @@ void mzvim_check_threads __ARGS((void)); void mzvim_reset_timer __ARGS((void)); void *mzvim_eval_string __ARGS((char_u *str)); int mzthreads_allowed __ARGS((void)); -void mzscheme_main __ARGS((void)); +int mzscheme_main __ARGS((int argc, char **argv)); void do_mzeval __ARGS((char_u *str, typval_T *rettv)); +int vim_main2 __ARGS((int argc, char **argv)); /* vim: set ft=c : */ diff --git a/src/version.c b/src/version.c index 2519664468..9285e438ae 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 441, /**/ 440, /**/ From 6080b88575176fb1997ca1eea7d2de122238ee1f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 01:55:55 +0100 Subject: [PATCH 083/115] Added tag v7-3-441 for changeset af4ed13ca541 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6e396c6c9c..85a94a3c5e 100644 --- a/.hgtags +++ b/.hgtags @@ -1777,3 +1777,4 @@ afbf45d854965f9e557497ab9d4d9aca87e220fd v7-3-435 bb67cd961fc3011d367357c215a0603dcc46ea40 v7-3-438 dec4338a7da22b02e7c7cc65668d35db264d3400 v7-3-439 e3cbb11f3555d5dbb1cbd3daac4a958a9e1f01ea v7-3-440 +af4ed13ca541f034e3241f2eda1abdb3b45d1770 v7-3-441 From 787d0775ec81f93578a52b17f258dd7bd8f6fe84 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 20:14:01 +0100 Subject: [PATCH 084/115] updated for version 7.3.442 Problem: Still read modelines for ":doautocmd". Solution: Move check for to separate function. --- runtime/doc/autocmd.txt | 14 ++++++++------ src/ex_docmd.c | 10 +++++++--- src/fileio.c | 25 ++++++++++++++++++------- src/proto/fileio.pro | 1 + src/version.c | 2 ++ 5 files changed, 36 insertions(+), 16 deletions(-) diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 1e2bc77376..8e1e94ba23 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1072,6 +1072,14 @@ option will not cause any commands to be executed. argument is included, Vim executes only the matching autocommands for that group. Note: if you use an undefined group name, Vim gives you an error message. + ** + After applying the autocommands the modelines are + processed, so that their settings overrule the + settings from autocommands, like what happens when + editing a file. This is skipped when the + argument is present. You probably want to use + for events that are not used when loading + a buffer, such as |User|. *:doautoa* *:doautoall* :doautoa[ll] [] [group] {event} [fname] @@ -1085,12 +1093,6 @@ option will not cause any commands to be executed. This command is intended for autocommands that set options, change highlighting, and things like that. - After applying the autocommands the modelines are - processed, so that their settings overrule the - settings from autocommands, like what happens when - editing a file. This is skipped when the - argument is present. - ============================================================================== 10. Using autocommands *autocmd-use* diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 83bf50c4b1..133fa7d688 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4955,7 +4955,7 @@ ex_abclear(eap) map_clear(eap->cmd, eap->arg, TRUE, TRUE); } -#ifdef FEAT_AUTOCMD +#if defined(FEAT_AUTOCMD) || defined(PROTO) static void ex_autocmd(eap) exarg_T *eap; @@ -4982,8 +4982,12 @@ ex_autocmd(eap) ex_doautocmd(eap) exarg_T *eap; { - (void)do_doautocmd(eap->arg, TRUE); - do_modelines(0); + char_u *arg = eap->arg; + int call_do_modelines = check_nomodeline(&arg); + + (void)do_doautocmd(arg, TRUE); + if (call_do_modelines) /* Only when there is no . */ + do_modelines(0); } #endif diff --git a/src/fileio.c b/src/fileio.c index 6d1bbbc174..a06452fdb5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -8740,13 +8740,7 @@ ex_doautoall(eap) aco_save_T aco; buf_T *buf; char_u *arg = eap->arg; - int call_do_modelines = TRUE; - - if (STRNCMP(arg, "", 12) == 0) - { - call_do_modelines = FALSE; - arg = skipwhite(arg + 12); - } + int call_do_modelines = check_nomodeline(&arg); /* * This is a bit tricky: For some commands curwin->w_buffer needs to be @@ -8785,6 +8779,23 @@ ex_doautoall(eap) check_cursor(); /* just in case lines got deleted */ } +/* + * Check *argp for . When it is present return FALSE, otherwise + * return TRUE and advance *argp to after it. + * Thus return TRUE when do_modelines() should be called. + */ + int +check_nomodeline(argp) + char_u **argp; +{ + if (STRNCMP(*argp, "", 12) == 0) + { + *argp = skipwhite(*argp + 12); + return FALSE; + } + return TRUE; +} + /* * Prepare for executing autocommands for (hidden) buffer "buf". * Search for a visible window containing the current buffer. If there isn't diff --git a/src/proto/fileio.pro b/src/proto/fileio.pro index cb4012f8eb..d65ec7cfe7 100644 --- a/src/proto/fileio.pro +++ b/src/proto/fileio.pro @@ -35,6 +35,7 @@ void au_event_restore __ARGS((char_u *old_ei)); void do_autocmd __ARGS((char_u *arg, int forceit)); int do_doautocmd __ARGS((char_u *arg, int do_msg)); void ex_doautoall __ARGS((exarg_T *eap)); +int check_nomodeline __ARGS((char_u **argp)); void aucmd_prepbuf __ARGS((aco_save_T *aco, buf_T *buf)); void aucmd_restbuf __ARGS((aco_save_T *aco)); int apply_autocmds __ARGS((event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf)); diff --git a/src/version.c b/src/version.c index 9285e438ae..35aa34c855 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 442, /**/ 441, /**/ From c7cc1647a27dfcbbea473b09a003393bbf788ce0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 20:14:01 +0100 Subject: [PATCH 085/115] Added tag v7-3-442 for changeset 198ec1fff71a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 85a94a3c5e..0e89cb628b 100644 --- a/.hgtags +++ b/.hgtags @@ -1778,3 +1778,4 @@ bb67cd961fc3011d367357c215a0603dcc46ea40 v7-3-438 dec4338a7da22b02e7c7cc65668d35db264d3400 v7-3-439 e3cbb11f3555d5dbb1cbd3daac4a958a9e1f01ea v7-3-440 af4ed13ca541f034e3241f2eda1abdb3b45d1770 v7-3-441 +198ec1fff71a44a35aa7a59b4952583a82a296fa v7-3-442 From 1da2153f145a866fdf08bdc3dcb0cac9d55aad67 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 23:23:31 +0100 Subject: [PATCH 086/115] updated for version 7.3.443 Problem: MS-Windows: 'shcf' and 'shellxquote' defaults are not very good. Solution: Make a better guess when 'shell' is set to "cmd.exe". (Ben Fritz) --- runtime/doc/options.txt | 15 ++++++++------- src/option.c | 39 ++++++++++++++++++++++++++++++++++++++- src/version.c | 2 ++ 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e7d6f01846..ff233acb83 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6041,8 +6041,8 @@ A jump table for the options with a short description can be found at |Q_op|. *'shellxquote'* *'sxq'* 'shellxquote' 'sxq' string (default: ""; - for Win32, when 'shell' contains "sh" - somewhere: "\"" + for Win32, when 'shell' is cmd.exe or + contains "sh" somewhere: "\"" for Unix, when using system(): "\"") global {not in Vi} @@ -6050,11 +6050,12 @@ A jump table for the options with a short description can be found at |Q_op|. the "!" and ":!" commands. Includes the redirection. See 'shellquote' to exclude the redirection. It's probably not useful to set both options. - This is an empty string by default. Known to be useful for - third-party shells when using the Win32 version, such as the MKS Korn - Shell or bash, where it should be "\"". The default is adjusted - according the value of 'shell', to reduce the need to set this option - by the user. See |dos-shell|. + This is an empty string by default on most systems, but is known to be + useful for on Win32 version, either for cmd.exe which automatically + strips off the first and last quote on a command, or 3rd-party shells + such as the MKS Korn Shell or bash, where it should be "\"". The + default is adjusted according the value of 'shell', to reduce the need + to set this option by the user. See |dos-shell|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. diff --git a/src/option.c b/src/option.c index 033a6d2037..04db07b9f2 100644 --- a/src/option.c +++ b/src/option.c @@ -3883,7 +3883,8 @@ set_init_3() #if defined(MSDOS) || defined(WIN3264) || defined(OS2) /* - * Set 'shellcmdflag and 'shellquote' depending on the 'shell' option. + * Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the + * 'shell' option. * This is done after other initializations, where 'shell' might have been * set, but only if they have not been set before. Default for p_shcf is * "/c", for p_shq is "". For "sh" like shells it is changed here to @@ -3920,6 +3921,42 @@ set_init_3() # endif # endif } + else if (strstr((char *)gettail(p_sh), "cmd.exe") != NULL) + { + int idx3; + + /* + * cmd.exe on Windows will strip the first and last double quote given + * on the command line, e.g. most of the time things like: + * cmd /c "my path/to/echo" "my args to echo" + * become: + * my path/to/echo" "my args to echo + * when executed. + * + * To avoid this, use the /s argument in addition to /c to force the + * stripping behavior, and also set shellxquote to automatically + * surround the entire command in quotes (which get stripped as + * noted). + */ + + /* Set shellxquote default to add the quotes to be stripped. */ + idx3 = findoption((char_u *)"sxq"); + if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET)) + { + p_sxq = (char_u *)"\""; + options[idx3].def_val[VI_DEFAULT] = p_sxq; + } + + /* Set shellcmdflag default to always strip the quotes, note the order + * between /s and /c is important or cmd.exe will treat the /s as part + * of the command to be executed. */ + idx3 = findoption((char_u *)"shcf"); + if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET)) + { + p_shcf = (char_u *)"/s /c"; + options[idx3].def_val[VI_DEFAULT] = p_shcf; + } + } #endif #ifdef FEAT_TITLE diff --git a/src/version.c b/src/version.c index 35aa34c855..2461456916 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 443, /**/ 442, /**/ From 026bf686345d378da2061104c42ada8020501fbd Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Feb 2012 23:23:31 +0100 Subject: [PATCH 087/115] Added tag v7-3-443 for changeset de050fcc24cf --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0e89cb628b..781da23ed9 100644 --- a/.hgtags +++ b/.hgtags @@ -1779,3 +1779,4 @@ dec4338a7da22b02e7c7cc65668d35db264d3400 v7-3-439 e3cbb11f3555d5dbb1cbd3daac4a958a9e1f01ea v7-3-440 af4ed13ca541f034e3241f2eda1abdb3b45d1770 v7-3-441 198ec1fff71a44a35aa7a59b4952583a82a296fa v7-3-442 +de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 From 077b75cd933a279d6b7707590583aea3d6bdcfd6 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 13 Feb 2012 00:01:43 +0100 Subject: [PATCH 088/115] updated for version 7.3.444 Problem: ":all!" and ":sall!" give error E477, even though the documentation says these are valid commands. Solution: Support the exclamation mark. (Hirohito Higashi) --- src/ex_cmds.h | 4 ++-- src/testdir/test31.in | 6 ++++++ src/testdir/test31.ok | 1 + src/version.c | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ex_cmds.h b/src/ex_cmds.h index adbbd5a0f8..16540bda09 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -102,7 +102,7 @@ EX(CMD_abclear, "abclear", ex_abclear, EX(CMD_aboveleft, "aboveleft", ex_wrongmodifier, NEEDARG|EXTRA|NOTRLCOM), EX(CMD_all, "all", ex_all, - RANGE|NOTADR|COUNT|TRLBAR), + BANG|RANGE|NOTADR|COUNT|TRLBAR), EX(CMD_amenu, "amenu", ex_menu, RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), EX(CMD_anoremenu, "anoremenu", ex_menu, @@ -798,7 +798,7 @@ EX(CMD_sNext, "sNext", ex_previous, EX(CMD_sargument, "sargument", ex_argument, BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR), EX(CMD_sall, "sall", ex_all, - RANGE|NOTADR|COUNT|TRLBAR), + BANG|RANGE|NOTADR|COUNT|TRLBAR), EX(CMD_sandbox, "sandbox", ex_wrongmodifier, NEEDARG|EXTRA|NOTRLCOM), EX(CMD_saveas, "saveas", ex_write, diff --git a/src/testdir/test31.in b/src/testdir/test31.in index b00c7602ef..7dc2334781 100644 --- a/src/testdir/test31.in +++ b/src/testdir/test31.in @@ -63,6 +63,12 @@ A 3:close :" write "testtext 1" A 3:close! :w >>test.out +:set nohidden +:" test ":all!" hides changed buffer; write "testtext 2 2 2" +:sp Xtest4 +GA 4:all! +:1wincmd w +:w >>test.out :qa! ENDTEST diff --git a/src/testdir/test31.ok b/src/testdir/test31.ok index 3311ad5dfb..185bdc768e 100644 --- a/src/testdir/test31.ok +++ b/src/testdir/test31.ok @@ -9,3 +9,4 @@ testtext 3 3 testtext 1 testtext 3 3 3 testtext 1 +testtext 2 2 2 diff --git a/src/version.c b/src/version.c index 2461456916..bf32d28d72 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 444, /**/ 443, /**/ From badf2c9fdab91e3b51a33a70da20fe7ee6076873 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 13 Feb 2012 00:01:43 +0100 Subject: [PATCH 089/115] Added tag v7-3-444 for changeset 72146e7f47fa --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 781da23ed9..f479d18316 100644 --- a/.hgtags +++ b/.hgtags @@ -1780,3 +1780,4 @@ e3cbb11f3555d5dbb1cbd3daac4a958a9e1f01ea v7-3-440 af4ed13ca541f034e3241f2eda1abdb3b45d1770 v7-3-441 198ec1fff71a44a35aa7a59b4952583a82a296fa v7-3-442 de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 +72146e7f47fa647f19fe419f4c8602897880eed5 v7-3-444 From 80aac8dabad5c95035492abcdff9ead149aba0ef Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 13 Feb 2012 00:05:22 +0100 Subject: [PATCH 090/115] Update runtime files. --- runtime/doc/autocmd.txt | 4 +- runtime/doc/cmdline.txt | 4 +- runtime/doc/debug.txt | 4 +- runtime/doc/options.txt | 8 +- runtime/doc/syntax.txt | 21 ++-- runtime/doc/tags | 2 + runtime/doc/todo.txt | 64 +++--------- runtime/filetype.vim | 4 +- runtime/ftplugin/erlang.vim | 132 ++++++------------------ runtime/syntax/bzr.vim | 8 +- runtime/syntax/lua.vim | 7 +- runtime/syntax/msidl.vim | 7 +- runtime/syntax/nasm.vim | 15 ++- runtime/syntax/natural.vim | 12 ++- runtime/syntax/rcs.vim | 8 +- runtime/syntax/scheme.vim | 20 ++-- runtime/syntax/sisu.vim | 198 +++++++++++++++++++++++------------- runtime/syntax/st.vim | 8 +- runtime/syntax/svn.vim | 8 +- runtime/syntax/synload.vim | 4 +- 20 files changed, 257 insertions(+), 281 deletions(-) diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 8e1e94ba23..8f50eb82a2 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.3. Last change: 2012 Jan 20 +*autocmd.txt* For Vim version 7.3. Last change: 2012 Feb 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1053,7 +1053,7 @@ Note that the 'eventignore' option applies here too. Events listed in this option will not cause any commands to be executed. *:do* *:doau* *:doautocmd* *E217* -:do[autocmd] [group] {event} [fname] +:do[autocmd] [] [group] {event} [fname] Apply the autocommands matching [fname] (default: current file name) for {event} to the current buffer. You can use this when the current file name does not diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 12cebb2d91..6aec69ec93 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.3. Last change: 2011 Mar 27 +*cmdline.txt* For Vim version 7.3. Last change: 2012 Feb 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -426,6 +426,8 @@ a previous version was used). In the pattern standard wildcards '*' and '?' are accepted when matching file names. '*' matches any string, '?' matches exactly one character. +The 'wildignorecase' option can be set to ignore case in filenames. + If you like tcsh's autolist completion, you can use this mapping: :cnoremap X (Where X is the command key to use, is CTRL-L and is CTRL-D) diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 12b0bb1828..0b55c34c43 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -1,4 +1,4 @@ -*debug.txt* For Vim version 7.3. Last change: 2010 Dec 22 +*debug.txt* For Vim version 7.3. Last change: 2012 Feb 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -15,7 +15,7 @@ For debugging Vim scripts, functions, etc. see |debug-scripts| ============================================================================== -1. Location of a crash, using gcc and gdb *debug-gcc* +1. Location of a crash, using gcc and gdb *debug-gcc* *gdb* When Vim crashes in one of the test files, and you are using gcc for compilation, here is what you can do to find out exactly where Vim crashes. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index ff233acb83..0616857bed 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2012 Jan 13 +*options.txt* For Vim version 7.3. Last change: 2012 Feb 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5899,8 +5899,10 @@ A jump table for the options with a short description can be found at |Q_op|. security reasons. *'shellcmdflag'* *'shcf'* -'shellcmdflag' 'shcf' string (default: "-c", MS-DOS and Win32, when 'shell' - does not contain "sh" somewhere: "/c") +'shellcmdflag' 'shcf' string (default: "-c"; + Win32, when 'shell' is cmd.exe: "/s /c"; + MS-DOS and Win32, when 'shell' neither is + cmd.exe nor contains "sh" somewhere: "/c") global {not in Vi} Flag passed to the shell to execute "!" and ":!" commands; e.g., diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index fa032fc09f..e480968f90 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.3. Last change: 2012 Jan 20 +*syntax.txt* For Vim version 7.3. Last change: 2012 Feb 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -986,9 +986,9 @@ Example: > or > // vim:syntax=c.doxygen -It can also be done automatically for C, C++, C# and IDL files by setting the -global or buffer-local variable load_doxygen_syntax. This is done by adding -the following to your .vimrc. > +It can also be done automatically for C, C++, C#, IDL and PHP files by setting +the global or buffer-local variable load_doxygen_syntax. This is done by +adding the following to your .vimrc. > :let g:load_doxygen_syntax=1 There are a couple of variables that have an effect on syntax highlighting, and @@ -1742,19 +1742,10 @@ instead, and the name of your source file should be *.pike LUA *lua.vim* *ft-lua-syntax* -This syntax file may be used for Lua 4.0, Lua 5.0 or Lua 5.1 (the latter is +The Lua syntax file can be used for versions 4.0, 5.0, 5.1 and 5.2 (5.2 is the default). You can select one of these versions using the global variables lua_version and lua_subversion. For example, to activate Lua -4.0 syntax highlighting, use this command: > - - :let lua_version = 4 - -If you are using Lua 5.0, use these commands: > - - :let lua_version = 5 - :let lua_subversion = 0 - -To restore highlighting for Lua 5.1: > +5.1 syntax highlighting, set the variables like this: :let lua_version = 5 :let lua_subversion = 1 diff --git a/runtime/doc/tags b/runtime/doc/tags index 53f4caa8d1..ab2bf3ebfb 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -3206,6 +3206,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* map.txt /** map.txt /** intro.txt /** + autocmd.txt /** map.txt /** map.txt /** map.txt /** @@ -5948,6 +5949,7 @@ g`a motion.txt /*g`a* ga various.txt /*ga* garbagecollect() eval.txt /*garbagecollect()* gd pattern.txt /*gd* +gdb debug.txt /*gdb* ge motion.txt /*ge* get() eval.txt /*get()* get-ms-debuggers debug.txt /*get-ms-debuggers* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index c108ceef29..925efb6358 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2012 Feb 04 +*todo.txt* For Vim version 7.3. Last change: 2012 Feb 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41,61 +41,13 @@ Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) Once syntax and other runtime files have been fixed: add "set cp" to check.vim. Use a function to run both with 'cp' and 'nocp'. -Repeating search history entries. (Edwin Steiner, 2012 Jan 17) -Jan 18: Caused by patch 7.3.265? - -Patch for '$' not being displayed for a change when 'cpoptions' contains "$". -(Yasuhiro Matsumoto, 2012 Jan 28, patch by Hideki EIRAKU and Hirohito Higashi) - -Patch to speed up readfile(). (John Little, 2012 Feb 1) -Adjustment by Charles Peacech, Feb 3. -8 When editing a file with extremely long lines (e.g., an executable), the - "linerest" in readfile() is allocated twice to be able to copy what was - read so far. Use realloc() instead? Or split the line when allocating - memory fails and "linerest" is big (> 100000)? - -Patch to fix a crash when an xpm file is invalid. (Dave Bodenstab, 2012 Jan -27) - -Hang in using VimEnter. (Alex Efros, 2012 Jan 14) - -Patch for behavior of "." in compatible mode. (Yasuhiro Matsumoto, patch by -Hideki EIRAKU, 2012 Jan 28) - -":cd" doesn't work when current directory path contains wildcards. -finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10) +GTK: problem with 'L' in 'guioptions' changing the window width. +(Aaron Cornelius, 2012 Feb 6) Win32: When a directory name contains an exclamation mark, completion doesn't complete the contents of the directory. No escaping for the "!"? (Jan Stocker, 2012 Jan 5) -Patch to add support for Solaris ZFS ACLs. (Danek Duvall, 2012 Jan 13) - -Patch to make continued lines work faster. (Yasuhiro Matsumoto, 2012 Jan 11) - -Also an idea to make join() faster. (Yasuhiro Matsumoto, 2012 Jan 11) -Another one from Taro Muraoka, 2012 Jan 12. - -":doau" says it triggers modeline. Should this only happen for events used -when loading a buffer? (Kana Natsuno, 2011 Nov 7) - -Patch for compiler warnings in if_perl. (James McCoy, 2011 Jan 30) - -Patch for X selection conversion. (Alex Efros, 2012 Jan 24) - -Patch to make 'shcf' default work better. (Benjamin Fritz, 2011 Nov 18) - Win32: When 'shell' is cmd.exe this command fails: - echo system('"c:/path/echo.exe" "foo bar"') - Should we set the default for 'shellxquote' to a double quote, when 'shell' - contains "cmd" in the tail? (Benjamin Fritz, 2008 Oct 13) - Also set 'shellcmdflag' to include /s. - -Other way to start Mzscheme. Tim Brown, 2011 Oct 5: change main call. -Later patch by Sergey Khorev, 2011 Oct 9. - -Patch to allow ! for :all and :sall, as documented. (Hirohito Higashi, 2012 -Jan 30) - Patch for "tab drop hoge" moving current window. (Higashi, 2012 Jan 31) ":tab drop buffer.c" always opens a new tab, also if buffer.c is already in an open window. (Herb Sitz, 2011 Nov 17) @@ -153,6 +105,8 @@ Patch for using objcpp file type for headers files. Issue 44. Docs fix for v:register. (Ingo Karkat, 2011 Sep 26, 27) v:register doesn't work exactly as expected. (David Fishburn, 2011 Sep 20) +Patch for: vimgrep fails when 'autochdir' is set. (Ben Fritz, 2012 Feb 4) + Patch for: (Christian Brabandt, 2011 Aug 22) - Make it possible to enter "r" and "r" (get character from line below/above). @@ -177,6 +131,10 @@ Patch Sep 18. Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27) And one for gui_x11.txt. +":cd" doesn't work when current directory path contains "**". +finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10) +Requires a rewrite of the file_file_in_path code. + Problem with l: dictionary being locked in a function. (ZyX, 2011 Jul 21) Issue 48: foldopen error can't be caught by try/catch @@ -184,6 +142,8 @@ Issue 48: foldopen error can't be caught by try/catch Patch to sort functions starting with '<' after others. Omit dict functions, they can't be called. (Yasuhiro Matsumoto, 2011 Oct 11) +Patch to pass list to or(), and() and xor(). (Yasuhiro Matsumoto, 2012 Feb 8) + Patch to improve "it" and "at" text object matching. (Christian Brabandt, 2011 Nov 20) @@ -628,6 +588,8 @@ Win32: Expanding 'path' runs into a maximum size limit. (bgold12, 2009 Nov 15) Win32: Patch for enabling quick edit mode in console. (Craig Barkhouse, 2010 Sep 1) +Win32: Patch for using .png files for icons. (Charles Peacech, 2012 Feb 5) + Putting a Visual block while 'visualedit' is "all" does not leave the cursor on the first character. (John Beckett, 2010 Aug 7) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index a3ae34a4dd..6f8e2c69d6 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2012 Feb 03 +" Last Change: 2012 Feb 05 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -2546,7 +2546,7 @@ au BufNewFile,BufRead *.txt,*.text setf text runtime! ftdetect/*.vim " NOTE: The above command could have ended the filetypedetect autocmd group -" and started another one. Let's make sure it has ended to get to a consistant +" and started another one. Let's make sure it has ended to get to a consistent " state. augroup END diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim index 4899020f85..af4e910b25 100644 --- a/runtime/ftplugin/erlang.vim +++ b/runtime/ftplugin/erlang.vim @@ -1,10 +1,10 @@ " Vim ftplugin file " Language: Erlang -" Author: Oscar Hellström -" Contributors: Ricardo Catalinas Jiménez +" Author: Oscar Hellstrm +" Contributors: Ricardo Catalinas Jimnez " Eduardo Lopez (http://github.com/tapichu) " License: Vim license -" Version: 2011/11/21 +" Version: 2012/01/25 if exists('b:did_ftplugin') finish @@ -27,13 +27,10 @@ if !exists('g:erlang_folding') let g:erlang_folding = 0 endif -" Local settings -function s:SetErlangOptions() - compiler erlang - if version >= 700 - setlocal omnifunc=erlang_complete#Complete - endif +let s:erlang_fun_begin = '^\a\w*(.*$' +let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$' +function s:SetErlangOptions() if g:erlang_folding setlocal foldmethod=expr setlocal foldexpr=GetErlangFold(v:lnum) @@ -47,104 +44,35 @@ function s:SetErlangOptions() let &l:keywordprg = g:erlang_keywordprg endfunction -" Define folding functions -if !exists('*GetErlangFold') - " Folding params - let s:erlang_fun_begin = '^\a\w*(.*$' - let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$' - let s:erlang_blank_line = '^\s*\(%.*\)\?$' +function GetErlangFold(lnum) + let lnum = a:lnum + let line = getline(lnum) - " Auxiliary fold functions - function s:GetNextNonBlank(lnum) - let lnum = nextnonblank(a:lnum + 1) - let line = getline(lnum) - while line =~ s:erlang_blank_line && 0 != lnum - let lnum = nextnonblank(lnum + 1) - let line = getline(lnum) - endwhile - return lnum - endfunction + if line =~ s:erlang_fun_end + return '<1' + endif - function s:GetFunName(str) - return matchstr(a:str, '^\a\w*(\@=') - endfunction + if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1 + return '1' + endif - function s:GetFunArgs(str, lnum) - let str = a:str - let lnum = a:lnum - while str !~ '->\s*\(%.*\)\?$' - let lnum = s:GetNextNonBlank(lnum) - if 0 == lnum " EOF - return '' - endif - let str .= getline(lnum) - endwhile - return matchstr(str, - \ '\(^(\s*\)\@<=.*\(\s*)\(\s\+when\s\+.*\)\?\s\+->\s*\(%.*\)\?$\)\@=') - endfunction + if line =~ s:erlang_fun_begin + return '>1' + endif - function s:CountFunArgs(arguments) - let pos = 0 - let ac = 0 " arg count - let arguments = a:arguments - - " Change list / tuples into just one A(rgument) - let erlang_tuple = '{\([A-Za-z_,|=\-\[\]]\|\s\)*}' - let erlang_list = '\[\([A-Za-z_,|=\-{}]\|\s\)*\]' + return '=' +endfunction - " FIXME: Use searchpair? - while arguments =~ erlang_tuple - let arguments = substitute(arguments, erlang_tuple, 'A', 'g') - endwhile - " FIXME: Use searchpair? - while arguments =~ erlang_list - let arguments = substitute(arguments, erlang_list, 'A', 'g') - endwhile - - let len = strlen(arguments) - while pos < len && pos > -1 - let ac += 1 - let pos = matchend(arguments, ',\s*', pos) - endwhile - return ac - endfunction +function ErlangFoldText() + let line = getline(v:foldstart) + let foldlen = v:foldend - v:foldstart + 1 + let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '') + if foldlen < 10 + let lines = ' ' . lines + endif + let retval = '+' . v:folddashes . lines - " Main fold function - function GetErlangFold(lnum) - let lnum = a:lnum - let line = getline(lnum) - - if line =~ s:erlang_fun_end - return '<1' - endif - - if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1 - return '1' - endif - - if line =~ s:erlang_fun_begin - return '>1' - endif - - return '=' - endfunction - - " Erlang fold description (foldtext function) - function ErlangFoldText() - let foldlen = v:foldend - v:foldstart - if 1 < foldlen - let lines = 'lines' - else - let lines = 'line' - endif - let line = getline(v:foldstart) - let name = s:GetFunName(line) - let arguments = s:GetFunArgs(strpart(line, strlen(name)), v:foldstart) - let argcount = s:CountFunArgs(arguments) - let retval = '+' . v:folddashes . ' ' . name . '/' . argcount - let retval .= ' (' . foldlen . ' ' . lines . ')' - return retval - endfunction -endif + return retval +endfunction call s:SetErlangOptions() diff --git a/runtime/syntax/bzr.vim b/runtime/syntax/bzr.vim index 82ab1d8749..ef5445bf45 100644 --- a/runtime/syntax/bzr.vim +++ b/runtime/syntax/bzr.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: Bazaar (bzr) commit file -" Maintainer: Dmitry Vasiliev -" URL: http://www.hlabs.spb.ru/vim/bzr.vim -" Last Change: 2009-01-27 +" Maintainer: Dmitry Vasiliev +" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/bzr.vim +" Last Change: 2012-02-11 " Filenames: bzr_log.* -" Version: 1.2.1 +" Version: 1.2.2 " " Thanks: " diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim index 18e97ff534..2952ad962a 100644 --- a/runtime/syntax/lua.vim +++ b/runtime/syntax/lua.vim @@ -2,7 +2,7 @@ " Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2 " Maintainer: Marcus Aurelius Farias " First Author: Carlos Augusto Teixeira Mendes -" Last Change: 2011 Dec 20 +" Last Change: 2012 Feb 07 " Options: lua_version = 4 or 5 " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) " default 5.2 @@ -15,6 +15,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + if !exists("lua_version") " Default is lua 5.2 let lua_version = 5 @@ -358,4 +361,6 @@ endif let b:current_syntax = "lua" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: et ts=8 sw=2 diff --git a/runtime/syntax/msidl.vim b/runtime/syntax/msidl.vim index cf270eebd7..79585bebc6 100644 --- a/runtime/syntax/msidl.vim +++ b/runtime/syntax/msidl.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: MS IDL (Microsoft dialect of Interface Description Language) " Maintainer: Vadim Zeitlin -" Last Change: 2003 May 11 +" Last Change: 2012 Feb 12 by Thilo Six " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -11,6 +11,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Misc basic syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*" syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?" @@ -89,4 +92,6 @@ endif let b:current_syntax = "msidl" +let &cpo = s:cpo_save +unlet s:cpo_save " vi: set ts=8 sw=4: diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim index 50cbe1ca03..a6ed056650 100644 --- a/runtime/syntax/nasm.vim +++ b/runtime/syntax/nasm.vim @@ -3,7 +3,7 @@ " Maintainer: Andriy Sokolov " Original Author: Manuel M.H. Stol " Former Maintainer: Manuel M.H. Stol -" Last Change: 2010 Sep 24 +" Last Change: 2012 Feb 7 " NASM Home: http://www.nasm.us/ @@ -48,14 +48,14 @@ syn cluster nasmGrpComments contains=@nasmGrpInComments,nasmComment,nasmSpecialC " in NASM: 'Everything is a Label' " Definition Label = label defined by %[i]define or %[i]assign " Identifier Label = label defined as first non-keyword on a line or %[i]macro -syn match nasmLabelError "$\=\(\d\+\K\|[#\.@]\|\$\$\k\)\k*\>" +syn match nasmLabelError "$\=\(\d\+\K\|[#.@]\|\$\$\k\)\k*\>" syn match nasmLabel "\<\(\h\|[?@]\)\k*\>" syn match nasmLabel "[\$\~]\(\h\|[?@]\)\k*\>"lc=1 " Labels starting with one or two '.' are special syn match nasmLocalLabel "\<\.\(\w\|[#$?@~]\)\k*\>" syn match nasmLocalLabel "\<\$\.\(\w\|[#$?@~]\)\k*\>"ms=s+1 if !exists("nasm_no_warn") - syn match nasmLabelWarn "\<\~\=\$\=[_\.][_\.\~]*\>" + syn match nasmLabelWarn "\<\~\=\$\=[_.][_.\~]*\>" endif if exists("nasm_loose_syntax") syn match nasmSpecialLabel "\<\.\.@\k\+\>" @@ -92,7 +92,6 @@ syn keyword nasmFltNumber Inf Infinity Indefinite NaN SNaN QNaN syn match nasmNumberError "\<\~\s*\d\+\.\d*\(e[+-]\=\d\+\)\=\>" - " Netwide Assembler Storage Directives: " Storage types syn keyword nasmTypeError DF EXTRN FWORD RESF TBYTE @@ -181,7 +180,7 @@ if exists("nasm_ctx_outside_macro") syn region nasmPreConditDef transparent matchgroup=nasmCtxPreCondit start="^\s*%ifnctx\>"hs=e-6 start="^\s*%ifctx\>"hs=e-5 end="%endif\>" contains=@nasmGrpCntnPreCon syn match nasmCtxPreProc "^\s*%pop\>"hs=e-3 if exists("nasm_loose_syntax") - syn match nasmCtxLocLabel "%$\+\(\w\|[#\.?@~]\)\k*\>" + syn match nasmCtxLocLabel "%$\+\(\w\|[#.?@~]\)\k*\>" else syn match nasmCtxLocLabel "%$\+\(\h\|[?@]\)\k*\>" endif @@ -249,10 +248,10 @@ syn match nasmRegisterError "\" syn match nasmRegisterError "\\)" syn match nasmRegisterError "\" " Memory reference operand (address): -syn match nasmMemRefError "[\[\]]" +syn match nasmMemRefError "[[\]]" syn cluster nasmGrpCntnMemRef contains=ALLBUT,@nasmGrpComments,@nasmGrpPreProcs,@nasmGrpInStrucs,nasmMemReference,nasmMemRefError -syn match nasmInMacMemRef contained "\[[^;\[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmInMacLabel,nasmInMacLblWarn,nasmInMacParam -syn match nasmMemReference "\[[^;\[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmCtxLocLabel +syn match nasmInMacMemRef contained "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmInMacLabel,nasmInMacLblWarn,nasmInMacParam +syn match nasmMemReference "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmCtxLocLabel diff --git a/runtime/syntax/natural.vim b/runtime/syntax/natural.vim index 2628151378..4fbc916be2 100644 --- a/runtime/syntax/natural.vim +++ b/runtime/syntax/natural.vim @@ -1,9 +1,9 @@ " Vim syntax file " " Language: NATURAL -" Version: 2.1.0.3 +" Version: 2.1.0.5 " Maintainer: Marko von Oppen -" Last Changed: 2008-07-29 01:40:52 +" Last Changed: 2012-02-05 18:50:43 " Support: http://www.von-oppen.com/ " For version 5.x: Clear all syntax items @@ -17,6 +17,9 @@ else setlocal iskeyword+=-,*,#,+,_,/ endif +let s:cpo_save = &cpo +set cpo&vim + " NATURAL is case insensitive syntax case ignore @@ -206,4 +209,7 @@ endif let b:current_syntax = "natural" -" vim:set ts=8 sw=8 noet ft=vim: +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set ts=8 sw=8 noet ft=vim list: diff --git a/runtime/syntax/rcs.vim b/runtime/syntax/rcs.vim index 04a2cce9b6..e45d5fdbb6 100644 --- a/runtime/syntax/rcs.vim +++ b/runtime/syntax/rcs.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: RCS file -" Maintainer: Dmitry Vasiliev -" URL: http://www.hlabs.spb.ru/vim/rcs.vim -" Revision: $Id: rcs.vim,v 1.2 2006/03/27 16:41:00 vimboss Exp $ +" Maintainer: Dmitry Vasiliev +" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/rcs.vim +" Last Change: 2012-02-11 " Filenames: *,v -" Version: 1.11 +" Version: 1.12 " Options: " rcs_folding = 1 For folding strings diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim index f98703446e..0adaaa50e8 100644 --- a/runtime/syntax/scheme.vim +++ b/runtime/syntax/scheme.vim @@ -1,13 +1,13 @@ " Vim syntax file " Language: Scheme (R5RS + some R6RS extras) -" Last Change: 2009 Nov 27 +" Last Change: 2012 Feb 04 " Maintainer: Sergey Khorev " Original author: Dirk van Deun " This script incorrectly recognizes some junk input as numerals: " parsing the complete system of Scheme numerals using the pattern " language is practically impossible: I did a lax approximation. - + " MzScheme extensions can be activated with setting is_mzscheme variable " Suggestions and bug reports are solicited by the author. @@ -22,6 +22,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case ignore " Fascist highlighting: everything that doesn't fit the rules is an error... @@ -117,7 +120,7 @@ syn keyword schemeFunc hashtable? hashtable-size hashtable-ref hashtable-set! syn keyword schemeFunc hashtable-delete! hashtable-contains? hashtable-update! syn keyword schemeFunc hashtable-copy hashtable-clear! hashtable-keys syn keyword schemeFunc hashtable-entries hashtable-equivalence-function hashtable-hash-function -syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash +syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash syn keyword schemeFunc find for-all exists filter partition fold-left fold-right syn keyword schemeFunc remp remove remv remq memp assp cons* @@ -207,7 +210,7 @@ if exists("b:is_mzscheme") || exists("is_mzscheme") syn keyword schemeExtSyntax free-identifier=? bound-identifier=? module-identifier=? syntax-object->datum syn keyword schemeExtSyntax datum->syntax-object syn keyword schemeExtSyntax let-values let*-values letrec-values set!-values fluid-let parameterize begin0 - syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature + syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax @@ -231,7 +234,7 @@ if exists("b:is_mzscheme") || exists("is_mzscheme") syn keyword schemeExtFunc exn:i/o:tcp? exn:i/o:udp? exn:misc? exn:misc:application? exn:misc:unsupported? exn:module? exn:read? exn:read:non-char? syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch? " Command-line parsing - syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each + syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each " syntax quoting, unquoting and quasiquotation syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL @@ -263,7 +266,7 @@ if exists("b:is_chicken") || exists("is_chicken") " here-string syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ - + if filereadable(expand(":p:h")."/cpp.vim") unlet! b:current_syntax syn include @ChickenC :p:h/cpp.vim @@ -282,7 +285,7 @@ if exists("b:is_chicken") || exists("is_chicken") " suggested by Alex Queiroz syn match schemeExtSyntax "#![-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ + syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ endif " Synchronization and the wrapping up... @@ -322,3 +325,6 @@ if version >= 508 || !exists("did_scheme_syntax_inits") endif let b:current_syntax = "scheme" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/sisu.vim b/runtime/syntax/sisu.vim index 6944782f01..4545ee8fa4 100644 --- a/runtime/syntax/sisu.vim +++ b/runtime/syntax/sisu.vim @@ -1,6 +1,8 @@ -"SiSU Vim syntax file -"SiSU Maintainer: Ralph Amissah -"SiSU Markup: SiSU (sisu-2.0.1, 2010-03-17) +" SiSU Vim syntax file +" SiSU Maintainer: Ralph Amissah +" SiSU Markup: SiSU (sisu-3.1.0) +" Last Change: 2011-10-03 +" URL: "(originally looked at Ruby Vim by Mirko Nasato) if version < 600 @@ -9,15 +11,23 @@ elseif exists("b:current_syntax") finish else endif +let s:cpo_save = &cpo +set cpo&vim -" Errors: +"% "Errors: syn match sisu_error contains=sisu_link,sisu_error_wspace "" -" Markers Identifiers: +"% "Markers Identifiers: if !exists("sisu_no_identifiers") syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)" syn match sisu_break contains=@NoSpell "
\|
" - syn match sisu_control contains=@NoSpell "<:p[bn]>" + syn match sisu_control contains=@NoSpell "^<:p[bn]>\s*$" + "syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pg\|pgn\|pn\)>\s*$" + "syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pg\|pgn\|pn\)\]\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + "syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pr\|o\)>\s*$" + "syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pr\|o\)\]\s*$" syn match sisu_marktail "[~-]#" syn match sisu_control "\"" syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" @@ -28,14 +38,18 @@ if !exists("sisu_no_identifiers") syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^._-]\+\.ss[it]$" syn match sisu_require contains=@NoSpell "^<<{[a-zA-Z0-9^._-]\+\.ss[it]}$" syn match sisu_structure "^:A\~$" - syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|note\):\s" "group=sisu_header_content - syn match sisu_sub_header_creator "^\s\+:\(author\|translator\|illustrator\|photographer\|audio\|digitized_by\|prepared_by\):\s" - syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|audio\|digitization\|license\|all\):\s" "access_rights license - syn match sisu_sub_header_classify "^\s\+:\(type\|subject\|topic_register\|keywords\|coverage\|relation\|format\|identifier\|isbn\|dewey\|loc\|pg\):\s" - syn match sisu_sub_header_dates "^\s\+:\(published\|available\|created\|issued\|valid\|modified\|added_to_site\|translated\|original_publication\):\s" - syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|institution\|nationality\|source\):\s" - syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|italics\|bold\|skin\|stamp\|promo\|ad\|manpage\):\s" - syn match sisu_sub_header_notes "^\s\+:\(comment\|abstract\|description\|history\|prefix\|prefix_[ab]\):\s" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|coverage\|format\|identifier\|keywords\|relation\|subject\|type\|dewey\|loc\|oclc\|pg\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" + syn match sisu_sub_header_notes "^\s\+:\(abstract\|comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" + +"% "semantic markers: (ignore) syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" @@ -46,80 +60,126 @@ if !exists("sisu_no_identifiers") syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" endif -"URLs Numbers And ASCII Codes: +"% "URLs Numbers And ASCII Codes: syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" -"Tuned Error: (is error if not already matched) +"% "Tuned Error: (is error if not already matched) syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" syn match sisu_error contains=sisu_error "]" -"Simple Paired Enclosed Markup: +"% "Simple Paired Enclosed Markup: "url/link syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" -"header + +"% "Document Header: +" title syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_dates matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_source matchgroup=sisu_header start="^[@]source:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -"headings -syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" -"grouped text -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" -syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" -syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(block\|group\|poem\|alt\){" end="^}\(block\|group\|poem\|alt\)" +" code syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" -"endnotes -syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" -syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" -syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" -"links and images -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|\.\./\)\S\+" oneline -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline -syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline -"some line operations -syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" -syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" -"font face curly brackets + +"% "Font Face Curly Brackets: "syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: syn region sisu_index matchgroup=sisu_index_block start="^={" end="}" -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" -syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" -syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" -syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" -syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" -syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="" end="" oneline -"single words bold italicise etc. "workon -syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline "misc syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline -"Expensive Mode: +"% "Expensive Mode: if !exists("sisu_no_expensive") else " not Expensive syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline endif " Expensive? -"Headers And Headings: (Document Instructions) +"% "Headers And Headings: (Document Instructions) syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" -"Errors: +"% "Errors: syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" -syn match sisu_error_wspace contains=sisu_error_wspace " \s*$" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" syn match sisu_error contains=sisu_error_wspace "\t\+" syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" @@ -140,37 +200,37 @@ syn match sisu_error contains=sisu_error "" syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" syn match sisu_error "/\?<\([biu]\)>[^()]\{-}\n$" -"Error Exceptions: +"% "Error Exceptions: syn match sisu_control "\n$" "contains=ALL -syn match sisu_control " //" +"syn match sisu_control " //" syn match sisu_error "%{" syn match sisu_error "
_\?https\?:\S\+\|_\?https\?:\S\+
" syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" syn match sisu_comment "^%\{1,2\}.\+" -"Definitions Default Highlighting: +"% "Definitions Default Highlighting: hi def link sisu_normal Normal +hi def link sisu_bold Statement hi def link sisu_header PreProc hi def link sisu_header_content Normal hi def link sisu_sub_header_title Statement hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement hi def link sisu_sub_header_rights Statement hi def link sisu_sub_header_classify Statement -hi def link sisu_sub_header_dates Statement -hi def link sisu_sub_header_make Statement -hi def link sisu_sub_header_links Statement -hi def link sisu_sub_header_publisher Statement -hi def link sisu_sub_header_notes Statement hi def link sisu_sub_header_original Statement -hi def link sisu_sub_header_source Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement hi def link sisu_heading Title hi def link sisu_structure Operator hi def link sisu_contain Include -hi def link sisu_mark_endnote Include +hi def link sisu_mark_endnote Delimiter hi def link sisu_require NonText hi def link sisu_link NonText hi def link sisu_linked String -hi def link sisu_fontface Include +hi def link sisu_fontface Delimiter hi def link sisu_strikeout DiffDelete hi def link sisu_content_alt Special hi def link sisu_sem_content SpecialKey @@ -186,7 +246,7 @@ hi def link sisu_sem_ex_block Comment hi def link sisu_index SpecialKey hi def link sisu_index_block Visual hi def link sisu_content_endnote Special -hi def link sisu_control Define +hi def link sisu_control Delimiter hi def link sisu_ocn Include hi def link sisu_number Number hi def link sisu_identifier Function @@ -202,3 +262,5 @@ hi def link sisu_error_sem_marker Error hi def link sisu_error_wspace Error hi def link sisu_error Error let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/st.vim b/runtime/syntax/st.vim index d629eb4ed8..47aa07de5d 100644 --- a/runtime/syntax/st.vim +++ b/runtime/syntax/st.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Smalltalk " Maintainer: Arndt Hesse -" Last Change: 2001 May 09 +" Last Change: 2012 Feb 12 by Thilo Six " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -11,6 +11,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " some Smalltalk keywords and standard methods syn keyword stKeyword super self class true false new not syn keyword stKeyword notNil isNil inspect out nil @@ -100,3 +103,6 @@ if version >= 508 || !exists("did_st_syntax_inits") endif let b:current_syntax = "st" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/svn.vim b/runtime/syntax/svn.vim index 0cd770a276..c649430ed6 100644 --- a/runtime/syntax/svn.vim +++ b/runtime/syntax/svn.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: Subversion (svn) commit file -" Maintainer: Dmitry Vasiliev -" URL: http://www.hlabs.spb.ru/vim/svn.vim -" Revision: $Id: svn.vim 683 2008-07-30 11:52:38Z hdima $ +" Maintainer: Dmitry Vasiliev +" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/svn.vim +" Last Change: 2012-02-11 " Filenames: svn-commit*.tmp -" Version: 1.6 +" Version: 1.7 " Contributors: " Stefano Zacchiroli diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim index 178595cbce..9b28fd8f41 100644 --- a/runtime/syntax/synload.vim +++ b/runtime/syntax/synload.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Bram Moolenaar -" Last Change: 2010 Aug 08 +" Last Change: 2012 Feb 11 " This file sets up for syntax highlighting. " It is loaded from "syntax.vim" and "manual.vim". @@ -59,7 +59,7 @@ endfun " Handle adding doxygen to other languages (C, C++, C#, IDL) -au Syntax c,cpp,cs,idl +au Syntax c,cpp,cs,idl,php \ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax) \ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax) \ | runtime! syntax/doxygen.vim From 58d131d9b927a12bc080ee1db75b9b08896165fb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 19 Feb 2012 18:19:30 +0100 Subject: [PATCH 091/115] updated for version 7.3.445 Problem: Can't properly escape commands for cmd.exe. Solution: Default 'shellxquote' to '('. Append ')' to make '(command)'. No need to use "/s" for 'shellcmdflag'. --- src/misc2.c | 6 +++++- src/option.c | 17 ++++++----------- src/os_win32.c | 37 ++++++++++++++++++++++++++----------- src/version.c | 2 ++ 4 files changed, 39 insertions(+), 23 deletions(-) diff --git a/src/misc2.c b/src/misc2.c index 00d1ff4a0f..fc38cd0294 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -3230,7 +3230,11 @@ call_shell(cmd, opt) { STRCPY(ncmd, p_sxq); STRCAT(ncmd, cmd); - STRCAT(ncmd, p_sxq); + /* When 'shellxquote' is ( append ). + * When 'shellxquote' is "( append )". */ + STRCAT(ncmd, STRCMP(p_sxq, "(") == 0 ? (char_u *)")" + : STRCMP(p_sxq, "\"(") == 0 ? (char_u *)")\"" + : p_sxq); retval = mch_call_shell(ncmd, opt); vim_free(ncmd); } diff --git a/src/option.c b/src/option.c index 04db07b9f2..cac031e184 100644 --- a/src/option.c +++ b/src/option.c @@ -3933,27 +3933,22 @@ set_init_3() * my path/to/echo" "my args to echo * when executed. * - * To avoid this, use the /s argument in addition to /c to force the - * stripping behavior, and also set shellxquote to automatically - * surround the entire command in quotes (which get stripped as - * noted). + * To avoid this, set shellxquote to surround the command in + * parenthesis. This appears to make most commands work, without + * breaking commands that worked previously, such as + * '"path with spaces/cmd" "a&b"'. */ - - /* Set shellxquote default to add the quotes to be stripped. */ idx3 = findoption((char_u *)"sxq"); if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET)) { - p_sxq = (char_u *)"\""; + p_sxq = (char_u *)"("; options[idx3].def_val[VI_DEFAULT] = p_sxq; } - /* Set shellcmdflag default to always strip the quotes, note the order - * between /s and /c is important or cmd.exe will treat the /s as part - * of the command to be executed. */ idx3 = findoption((char_u *)"shcf"); if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET)) { - p_shcf = (char_u *)"/s /c"; + p_shcf = (char_u *)"/c"; options[idx3].def_val[VI_DEFAULT] = p_shcf; } } diff --git a/src/os_win32.c b/src/os_win32.c index fbf077f6f7..520a09544d 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -3908,8 +3908,13 @@ mch_call_shell( newcmd = lalloc(cmdlen, TRUE); if (newcmd != NULL) { - char_u *cmdbase = (*cmd == '"' ? cmd + 1 : cmd); + char_u *cmdbase = cmd; + /* Skip a leading ", ( and "(. */ + if (*cmdbase == '"' ) + ++cmdbase; + if (*cmdbase == '(') + ++cmdbase; if ((STRNICMP(cmdbase, "start", 5) == 0) && vim_iswhite(cmdbase[5])) { STARTUPINFO si; @@ -3953,16 +3958,26 @@ mch_call_shell( * empty, keep the double quotes around the command. * Otherwise remove the double quotes, they aren't needed * here, because we don't use a shell to run the command. */ - if (*cmd == '"' && *p_sxq == NUL) + if (cmdbase > cmd) { - newcmd[0] = '"'; - STRCPY(newcmd + 1, cmdbase); - } - else - { - STRCPY(newcmd, cmdbase); - if (*cmd == '"' && *newcmd != NUL) - newcmd[STRLEN(newcmd) - 1] = NUL; + if (STRNCMP(cmd, p_sxq, cmd - cmdbase) != 0) + { + STRCPY(newcmd, cmd); + } + else + { + char_u *p; + + STRCPY(newcmd, cmdbase); + /* Remove a trailing ", ) and )" if they have a match + * at the start of the command. */ + p = newcmd + STRLEN(newcmd); + if (p > newcmd && p[-1] == '"' && *cmd == '"') + *--p = NUL; + if (p > newcmd && p[-1] == ')' + && (*cmd =='(' || cmd[1] == '(')) + *--p = NUL; + } } /* @@ -3970,7 +3985,7 @@ mch_call_shell( * inherit our handles which causes unpleasant dangling swap * files if we exit before the spawned process */ - if (CreateProcess (NULL, // Executable name + if (CreateProcess(NULL, // Executable name newcmd, // Command to execute NULL, // Process security attributes NULL, // Thread security attributes diff --git a/src/version.c b/src/version.c index bf32d28d72..7b78a45a0d 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 445, /**/ 444, /**/ From c1eb76d21b3dc31d4e7607b4657207ef29f929e3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 19 Feb 2012 18:19:30 +0100 Subject: [PATCH 092/115] Added tag v7-3-445 for changeset 397e7e49bb0b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f479d18316..e6459c912e 100644 --- a/.hgtags +++ b/.hgtags @@ -1781,3 +1781,4 @@ af4ed13ca541f034e3241f2eda1abdb3b45d1770 v7-3-441 198ec1fff71a44a35aa7a59b4952583a82a296fa v7-3-442 de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 72146e7f47fa647f19fe419f4c8602897880eed5 v7-3-444 +397e7e49bb0b831f7260d3ad70f6b07175c44a0c v7-3-445 From 92dca273ce3b9ec128add7db92f501577661ab59 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 20 Feb 2012 22:18:30 +0100 Subject: [PATCH 093/115] updated for version 7.3.446 Problem: Win32: External commands with special characters don't work. Solution: Add the 'shellxescape' option. --- runtime/doc/options.txt | 18 ++++++++++++++++-- src/misc2.c | 14 ++++++++++++-- src/option.c | 9 +++++++++ src/option.h | 1 + src/version.c | 2 ++ 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 0616857bed..2836be5d55 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6043,8 +6043,9 @@ A jump table for the options with a short description can be found at |Q_op|. *'shellxquote'* *'sxq'* 'shellxquote' 'sxq' string (default: ""; - for Win32, when 'shell' is cmd.exe or - contains "sh" somewhere: "\"" + for Win32, when 'shell' is cmd.exe: "(" + for Win32, when 'shell' contains "sh" + somewhere: "\"" for Unix, when using system(): "\"") global {not in Vi} @@ -6052,6 +6053,9 @@ A jump table for the options with a short description can be found at |Q_op|. the "!" and ":!" commands. Includes the redirection. See 'shellquote' to exclude the redirection. It's probably not useful to set both options. + When the value is '(' then ')' is appended. When the value is '"(' + then ')"' is appended. + When the value is '(' then also see 'shellxescape'. This is an empty string by default on most systems, but is known to be useful for on Win32 version, either for cmd.exe which automatically strips off the first and last quote on a command, or 3rd-party shells @@ -6061,6 +6065,16 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + *'shellxescape'* *'sxe'* +'shellxescape' 'sxe' string (default: ""; + for MS-DOS and MS-Windows: "\"&|<>()@^") + global + {not in Vi} + When 'shellxquote' is set to "(" then the characters listed in this + option will be escaped with a '^' character. This makes it possible + to execute most external commands with cmd.exe. + + *'shiftround'* *'sr'* *'noshiftround'* *'nosr'* 'shiftround' 'sr' boolean (default off) global diff --git a/src/misc2.c b/src/misc2.c index fc38cd0294..045117fe02 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -3225,11 +3225,19 @@ call_shell(cmd, opt) retval = mch_call_shell(cmd, opt); else { - ncmd = alloc((unsigned)(STRLEN(cmd) + STRLEN(p_sxq) * 2 + 1)); + char_u *ecmd = cmd; + + if (*p_sxe != NUL && STRCMP(p_sxq, "(") == 0) + { + ecmd = vim_strsave_escaped_ext(cmd, p_sxe, '^', FALSE); + if (ecmd == NULL) + ecmd = cmd; + } + ncmd = alloc((unsigned)(STRLEN(ecmd) + STRLEN(p_sxq) * 2 + 1)); if (ncmd != NULL) { STRCPY(ncmd, p_sxq); - STRCAT(ncmd, cmd); + STRCAT(ncmd, ecmd); /* When 'shellxquote' is ( append ). * When 'shellxquote' is "( append )". */ STRCAT(ncmd, STRCMP(p_sxq, "(") == 0 ? (char_u *)")" @@ -3240,6 +3248,8 @@ call_shell(cmd, opt) } else retval = -1; + if (ecmd != cmd) + vim_free(ecmd); } #ifdef FEAT_GUI --hold_gui_events; diff --git a/src/option.c b/src/option.c index cac031e184..0cea5586a8 100644 --- a/src/option.c +++ b/src/option.c @@ -2271,6 +2271,15 @@ static struct vimoption (char_u *)"\"", #else (char_u *)"", +#endif + (char_u *)0L} SCRIPTID_INIT}, + {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_sxe, PV_NONE, + { +#if defined(MSDOS) || defined(WIN16) || defined(WIN3264) + (char_u *)"\"&|<>()@^", +#else + (char_u *)"", #endif (char_u *)0L} SCRIPTID_INIT}, {"shiftround", "sr", P_BOOL|P_VI_DEF|P_VIM, diff --git a/src/option.h b/src/option.h index 21c2753422..9dd9387238 100644 --- a/src/option.h +++ b/src/option.h @@ -712,6 +712,7 @@ EXTERN char_u *p_sp; /* 'shellpipe' */ #endif EXTERN char_u *p_shq; /* 'shellquote' */ EXTERN char_u *p_sxq; /* 'shellxquote' */ +EXTERN char_u *p_sxe; /* 'shellxescape' */ EXTERN char_u *p_srr; /* 'shellredir' */ #ifdef AMIGA EXTERN long p_st; /* 'shelltype' */ diff --git a/src/version.c b/src/version.c index 7b78a45a0d..159fe8681c 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 446, /**/ 445, /**/ From 81ac0a249c8640118600d2d2339a047b8da04f1c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 20 Feb 2012 22:18:30 +0100 Subject: [PATCH 094/115] Added tag v7-3-446 for changeset 20ca2e05ae20 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e6459c912e..83357d3da6 100644 --- a/.hgtags +++ b/.hgtags @@ -1782,3 +1782,4 @@ af4ed13ca541f034e3241f2eda1abdb3b45d1770 v7-3-441 de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 72146e7f47fa647f19fe419f4c8602897880eed5 v7-3-444 397e7e49bb0b831f7260d3ad70f6b07175c44a0c v7-3-445 +20ca2e05ae20ece942490182691ed45746f64cb6 v7-3-446 From 3fdc470d1a432974864e3b87d3d4c7a140233fcc Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 21 Feb 2012 21:22:44 +0100 Subject: [PATCH 095/115] updated for version 7.3.447 Problem: Win32: External commands with "start" do not work. Solution: Unescape part of the command. (Yasuhiro Matsumoto) --- src/os_win32.c | 254 +++++++++++++++++++++++++++---------------------- src/version.c | 2 + 2 files changed, 144 insertions(+), 112 deletions(-) diff --git a/src/os_win32.c b/src/os_win32.c index 520a09544d..bab7d1e70a 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -258,6 +258,29 @@ get_exe_name(void) } } +/* + * Unescape characters in "p" that appear in "escaped". + */ + static void +unescape_shellxquote(char_u *p, char_u *escaped) +{ + int l = STRLEN(p); + int n; + + while (*p != NUL) + { + if (*p == '^' && vim_strchr(escaped, p[1]) != NULL) + mch_memmove(p, p + 1, l--); +#ifdef FEAT_MBYTE + n = (*mb_ptr2len)(p); +#else + n = 1; +#endif + p += n; + l -= n; + } +} + /* * Load library "name". */ @@ -3559,6 +3582,7 @@ mch_system_piped(char *cmd, int options) garray_T ga; int delay = 1; DWORD buffer_off = 0; /* valid bytes in buffer[] */ + char *p = NULL; SECURITY_ATTRIBUTES saAttr; @@ -3599,9 +3623,18 @@ mch_system_piped(char *cmd, int options) if (options & SHELL_READ) ga_init2(&ga, 1, BUFLEN); + if (cmd != NULL) + { + p = (char *)vim_strsave((char_u *)cmd); + if (p != NULL) + unescape_shellxquote((char_u *)p, p_sxe); + else + p = cmd; + } + /* Now, run the command */ CreateProcess(NULL, /* Executable name */ - cmd, /* Command to execute */ + p, /* Command to execute */ NULL, /* Process security attributes */ NULL, /* Thread security attributes */ @@ -3616,6 +3649,8 @@ mch_system_piped(char *cmd, int options) &si, /* Startup information */ &pi); /* Process information */ + if (p != cmd) + vim_free(p); /* Close our unused side of the pipes */ CloseHandle(g_hChildStd_IN_Rd); @@ -3898,121 +3933,116 @@ mch_call_shell( else { /* we use "command" or "cmd" to start the shell; slow but easy */ - char_u *newcmd; - long_u cmdlen = ( + char_u *cmdbase = cmd; + + /* Skip a leading ", ( and "(. */ + if (*cmdbase == '"' ) + ++cmdbase; + if (*cmdbase == '(') + ++cmdbase; + + if ((STRNICMP(cmdbase, "start", 5) == 0) && vim_iswhite(cmdbase[5])) + { + STARTUPINFO si; + PROCESS_INFORMATION pi; + DWORD flags = CREATE_NEW_CONSOLE; + char_u *p; + + si.cb = sizeof(si); + si.lpReserved = NULL; + si.lpDesktop = NULL; + si.lpTitle = NULL; + si.dwFlags = 0; + si.cbReserved2 = 0; + si.lpReserved2 = NULL; + + cmdbase = skipwhite(cmdbase + 5); + if ((STRNICMP(cmdbase, "/min", 4) == 0) + && vim_iswhite(cmdbase[4])) + { + cmdbase = skipwhite(cmdbase + 4); + si.dwFlags = STARTF_USESHOWWINDOW; + si.wShowWindow = SW_SHOWMINNOACTIVE; + } + else if ((STRNICMP(cmdbase, "/b", 2) == 0) + && vim_iswhite(cmdbase[2])) + { + cmdbase = skipwhite(cmdbase + 2); + flags = CREATE_NO_WINDOW; + si.dwFlags = STARTF_USESTDHANDLES; + si.hStdInput = CreateFile("\\\\.\\NUL", // File name + GENERIC_READ, // Access flags + 0, // Share flags + NULL, // Security att. + OPEN_EXISTING, // Open flags + FILE_ATTRIBUTE_NORMAL, // File att. + NULL); // Temp file + si.hStdOutput = si.hStdInput; + si.hStdError = si.hStdInput; + } + + /* Remove a trailing ", ) and )" if they have a match + * at the start of the command. */ + if (cmdbase > cmd) + { + p = cmdbase + STRLEN(cmdbase); + if (p > cmdbase && p[-1] == '"' && *cmd == '"') + *--p = NUL; + if (p > cmdbase && p[-1] == ')' + && (*cmd =='(' || cmd[1] == '(')) + *--p = NUL; + } + + /* + * Unescape characters in shellxescape. This is workaround for + * /b option. Only redirect character should be unescaped. + */ + unescape_shellxquote(cmdbase, + (flags & CREATE_NEW_CONSOLE) ? p_sxe : "<>"); + + /* + * Now, start the command as a process, so that it doesn't + * inherit our handles which causes unpleasant dangling swap + * files if we exit before the spawned process + */ + if (CreateProcess(NULL, // Executable name + cmdbase, // Command to execute + NULL, // Process security attributes + NULL, // Thread security attributes + FALSE, // Inherit handles + flags, // Creation flags + NULL, // Environment + NULL, // Current directory + &si, // Startup information + &pi)) // Process information + x = 0; + else + { + x = -1; +#ifdef FEAT_GUI_W32 + EMSG(_("E371: Command not found")); +#endif + } + if (si.hStdInput != NULL) + { + /* Close the handle to \\.\NUL */ + CloseHandle(si.hStdInput); + } + /* Close the handles to the subprocess, so that it goes away */ + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); + } + else + { + char_u *newcmd; + long_u cmdlen = ( #ifdef FEAT_GUI_W32 (allowPiping && !p_stmp ? 0 : STRLEN(vimrun_path)) + #endif STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10); - newcmd = lalloc(cmdlen, TRUE); - if (newcmd != NULL) - { - char_u *cmdbase = cmd; - - /* Skip a leading ", ( and "(. */ - if (*cmdbase == '"' ) - ++cmdbase; - if (*cmdbase == '(') - ++cmdbase; - if ((STRNICMP(cmdbase, "start", 5) == 0) && vim_iswhite(cmdbase[5])) - { - STARTUPINFO si; - PROCESS_INFORMATION pi; - DWORD flags = CREATE_NEW_CONSOLE; - - si.cb = sizeof(si); - si.lpReserved = NULL; - si.lpDesktop = NULL; - si.lpTitle = NULL; - si.dwFlags = 0; - si.cbReserved2 = 0; - si.lpReserved2 = NULL; - - cmdbase = skipwhite(cmdbase + 5); - if ((STRNICMP(cmdbase, "/min", 4) == 0) - && vim_iswhite(cmdbase[4])) - { - cmdbase = skipwhite(cmdbase + 4); - si.dwFlags = STARTF_USESHOWWINDOW; - si.wShowWindow = SW_SHOWMINNOACTIVE; - } - else if ((STRNICMP(cmdbase, "/b", 2) == 0) - && vim_iswhite(cmdbase[2])) - { - cmdbase = skipwhite(cmdbase + 2); - flags = CREATE_NO_WINDOW; - si.dwFlags = STARTF_USESTDHANDLES; - si.hStdInput = CreateFile("\\\\.\\NUL", // File name - GENERIC_READ, // Access flags - 0, // Share flags - NULL, // Security att. - OPEN_EXISTING, // Open flags - FILE_ATTRIBUTE_NORMAL, // File att. - NULL); // Temp file - si.hStdOutput = si.hStdInput; - si.hStdError = si.hStdInput; - } - - /* When the command is in double quotes, but 'shellxquote' is - * empty, keep the double quotes around the command. - * Otherwise remove the double quotes, they aren't needed - * here, because we don't use a shell to run the command. */ - if (cmdbase > cmd) - { - if (STRNCMP(cmd, p_sxq, cmd - cmdbase) != 0) - { - STRCPY(newcmd, cmd); - } - else - { - char_u *p; - - STRCPY(newcmd, cmdbase); - /* Remove a trailing ", ) and )" if they have a match - * at the start of the command. */ - p = newcmd + STRLEN(newcmd); - if (p > newcmd && p[-1] == '"' && *cmd == '"') - *--p = NUL; - if (p > newcmd && p[-1] == ')' - && (*cmd =='(' || cmd[1] == '(')) - *--p = NUL; - } - } - - /* - * Now, start the command as a process, so that it doesn't - * inherit our handles which causes unpleasant dangling swap - * files if we exit before the spawned process - */ - if (CreateProcess(NULL, // Executable name - newcmd, // Command to execute - NULL, // Process security attributes - NULL, // Thread security attributes - FALSE, // Inherit handles - flags, // Creation flags - NULL, // Environment - NULL, // Current directory - &si, // Startup information - &pi)) // Process information - x = 0; - else - { - x = -1; -#ifdef FEAT_GUI_W32 - EMSG(_("E371: Command not found")); -#endif - } - if (si.hStdInput != NULL) - { - /* Close the handle to \\.\NUL */ - CloseHandle(si.hStdInput); - } - /* Close the handles to the subprocess, so that it goes away */ - CloseHandle(pi.hThread); - CloseHandle(pi.hProcess); - } - else + newcmd = lalloc(cmdlen, TRUE); + if (newcmd != NULL) { #if defined(FEAT_GUI_W32) if (need_vimrun_warning) @@ -4038,8 +4068,8 @@ mch_call_shell( vim_snprintf((char *)newcmd, cmdlen, "%s %s %s", p_sh, p_shcf, cmd); x = mch_system((char *)newcmd, options); + vim_free(newcmd); } - vim_free(newcmd); } } diff --git a/src/version.c b/src/version.c index 159fe8681c..71231c62d1 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 447, /**/ 446, /**/ From 64af78bce94138694beca8c22619ea88f47026b0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 21 Feb 2012 21:22:45 +0100 Subject: [PATCH 096/115] Added tag v7-3-447 for changeset 6a03b0ea2e12 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 83357d3da6..5fd638ce75 100644 --- a/.hgtags +++ b/.hgtags @@ -1783,3 +1783,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 72146e7f47fa647f19fe419f4c8602897880eed5 v7-3-444 397e7e49bb0b831f7260d3ad70f6b07175c44a0c v7-3-445 20ca2e05ae20ece942490182691ed45746f64cb6 v7-3-446 +6a03b0ea2e12d748c1e4199e3f428ee080760939 v7-3-447 From 7dd7b10acf258bf06a5c8d6faceef71ed2bb3bc9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 13:07:05 +0100 Subject: [PATCH 097/115] updated for version 7.3.448 Problem: Win32: Still a problem with "!start /b". Solution: Escape only '|'. (Yasuhiro Matsumoto) --- src/os_win32.c | 55 ++++++++++++++++++++++++++++++++++++++------------ src/version.c | 2 ++ 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/src/os_win32.c b/src/os_win32.c index bab7d1e70a..2f764d3dc9 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -3933,7 +3933,9 @@ mch_call_shell( else { /* we use "command" or "cmd" to start the shell; slow but easy */ - char_u *cmdbase = cmd; + char_u *newcmd = NULL; + char_u *cmdbase = cmd; + long_u cmdlen; /* Skip a leading ", ( and "(. */ if (*cmdbase == '"' ) @@ -3971,12 +3973,12 @@ mch_call_shell( flags = CREATE_NO_WINDOW; si.dwFlags = STARTF_USESTDHANDLES; si.hStdInput = CreateFile("\\\\.\\NUL", // File name - GENERIC_READ, // Access flags + GENERIC_READ, // Access flags 0, // Share flags - NULL, // Security att. - OPEN_EXISTING, // Open flags - FILE_ATTRIBUTE_NORMAL, // File att. - NULL); // Temp file + NULL, // Security att. + OPEN_EXISTING, // Open flags + FILE_ATTRIBUTE_NORMAL, // File att. + NULL); // Temp file si.hStdOutput = si.hStdInput; si.hStdError = si.hStdInput; } @@ -3993,12 +3995,36 @@ mch_call_shell( *--p = NUL; } + newcmd = cmdbase; + unescape_shellxquote(cmdbase, p_sxe); + /* - * Unescape characters in shellxescape. This is workaround for - * /b option. Only redirect character should be unescaped. + * If creating new console, arguments are passed to the + * 'cmd.exe' as-is. If it's not, arguments are not treated + * correctly for current 'cmd.exe'. So unescape characters in + * shellxescape except '|' for avoiding to be treated as + * argument to them. Pass the arguments to sub-shell. */ - unescape_shellxquote(cmdbase, - (flags & CREATE_NEW_CONSOLE) ? p_sxe : "<>"); + if (flags != CREATE_NEW_CONSOLE) + { + char_u *subcmd; + char_u *cmd_shell = default_shell(); + + subcmd = vim_strsave_escaped_ext(cmdbase, "|", '^', FALSE); + if (subcmd != NULL) + { + /* make "cmd.exe /c arguments" */ + cmdlen = STRLEN(cmd_shell) + STRLEN(subcmd) + 5; + vim_free(subcmd); + + newcmd = lalloc(cmdlen, TRUE); + if (newcmd != NULL) + vim_snprintf((char *)newcmd, cmdlen, "%s /c %s", + default_shell, subcmd); + else + newcmd = cmdbase; + } + } /* * Now, start the command as a process, so that it doesn't @@ -4006,7 +4032,7 @@ mch_call_shell( * files if we exit before the spawned process */ if (CreateProcess(NULL, // Executable name - cmdbase, // Command to execute + newcmd, // Command to execute NULL, // Process security attributes NULL, // Thread security attributes FALSE, // Inherit handles @@ -4023,6 +4049,10 @@ mch_call_shell( EMSG(_("E371: Command not found")); #endif } + + if (newcmd != cmdbase) + vim_free(newcmd); + if (si.hStdInput != NULL) { /* Close the handle to \\.\NUL */ @@ -4034,8 +4064,7 @@ mch_call_shell( } else { - char_u *newcmd; - long_u cmdlen = ( + cmdlen = ( #ifdef FEAT_GUI_W32 (allowPiping && !p_stmp ? 0 : STRLEN(vimrun_path)) + #endif diff --git a/src/version.c b/src/version.c index 71231c62d1..adb2a86d42 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 448, /**/ 447, /**/ From e6cc430466940c59ff4b4873782a8936d7158251 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 13:07:06 +0100 Subject: [PATCH 098/115] Added tag v7-3-448 for changeset 756d712b3118 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5fd638ce75..a157b04d84 100644 --- a/.hgtags +++ b/.hgtags @@ -1784,3 +1784,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 397e7e49bb0b831f7260d3ad70f6b07175c44a0c v7-3-445 20ca2e05ae20ece942490182691ed45746f64cb6 v7-3-446 6a03b0ea2e12d748c1e4199e3f428ee080760939 v7-3-447 +756d712b3118b896b57ddb4f4c071135bc031607 v7-3-448 From 74513052f8804a01d4bd540dc539865a2023a92d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 14:58:37 +0100 Subject: [PATCH 099/115] updated for version 7.3.449 Problem: Crash when a BufWinLeave autocommand closes the only other window. (Daniel Hunt) Solution: Abort closing a buffer when it becomes the only one. --- src/buffer.c | 38 ++++++++++++++++++++++++++++---------- src/ex_cmds.c | 2 +- src/ex_getln.c | 2 +- src/misc2.c | 2 +- src/proto/buffer.pro | 2 +- src/proto/window.pro | 3 ++- src/quickfix.c | 2 +- src/version.c | 2 ++ src/window.c | 9 ++++----- 9 files changed, 41 insertions(+), 21 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 8cf5f8ac00..75116a91b2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -64,6 +64,9 @@ static void buf_delete_signs __ARGS((buf_T *buf)); static char *msg_loclist = N_("[Location List]"); static char *msg_qflist = N_("[Quickfix List]"); #endif +#ifdef FEAT_AUTOCMD +static char *e_auabort = N_("E855: Autocommands caused command to abort"); +#endif /* * Open current buffer, that is: open the memfile and read the file into @@ -96,7 +99,7 @@ open_buffer(read_stdin, eap, flags) * There MUST be a memfile, otherwise we can't do anything * If we can't create one for the current buffer, take another buffer */ - close_buffer(NULL, curbuf, 0); + close_buffer(NULL, curbuf, 0, FALSE); for (curbuf = firstbuf; curbuf != NULL; curbuf = curbuf->b_next) if (curbuf->b_ml.ml_mfp != NULL) break; @@ -316,12 +319,17 @@ buf_valid(buf) * get a new buffer very soon! * * The 'bufhidden' option can force freeing and deleting. + * + * When "abort_if_last" is TRUE then do not close the buffer if autocommands + * cause there to be only one window with this buffer. e.g. when ":quit" is + * supposed to close the window but autocommands close all other windows. */ void -close_buffer(win, buf, action) +close_buffer(win, buf, action, abort_if_last) win_T *win; /* if not NULL, set b_last_cursor */ buf_T *buf; int action; + int abort_if_last; { #ifdef FEAT_AUTOCMD int is_curbuf; @@ -371,8 +379,12 @@ close_buffer(win, buf, action) { apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname, FALSE, buf); - if (!buf_valid(buf)) /* autocommands may delete the buffer */ + /* Return if autocommands deleted the buffer or made it the only one. */ + if (!buf_valid(buf) || (abort_if_last && one_window())) + { + EMSG(_(e_auabort)); return; + } /* When the buffer becomes hidden, but is not unloaded, trigger * BufHidden */ @@ -380,8 +392,13 @@ close_buffer(win, buf, action) { apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname, FALSE, buf); - if (!buf_valid(buf)) /* autocmds may delete the buffer */ + /* Return if autocommands deleted the buffer or made it the only + * one. */ + if (!buf_valid(buf) || (abort_if_last && one_window())) + { + EMSG(_(e_auabort)); return; + } } # ifdef FEAT_EVAL if (aborting()) /* autocmds may abort script processing */ @@ -775,7 +792,7 @@ handle_swap_exists(old_curbuf) * open a new, empty buffer. */ swap_exists_action = SEA_NONE; /* don't want it again */ swap_exists_did_quit = TRUE; - close_buffer(curwin, curbuf, DOBUF_UNLOAD); + close_buffer(curwin, curbuf, DOBUF_UNLOAD, FALSE); if (!buf_valid(old_curbuf) || old_curbuf == curbuf) old_curbuf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED); if (old_curbuf != NULL) @@ -1122,7 +1139,7 @@ do_buffer(action, start, dir, count, forceit) * if the buffer still exists. */ if (buf != curbuf && buf_valid(buf) && buf->b_nwindows == 0) - close_buffer(NULL, buf, action); + close_buffer(NULL, buf, action, FALSE); return retval; } @@ -1146,7 +1163,7 @@ do_buffer(action, start, dir, count, forceit) close_windows(buf, FALSE); #endif if (buf != curbuf && buf_valid(buf) && buf->b_nwindows <= 0) - close_buffer(NULL, buf, action); + close_buffer(NULL, buf, action, FALSE); return OK; } @@ -1378,7 +1395,7 @@ set_curbuf(buf, action) close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf, unload ? action : (action == DOBUF_GOTO && !P_HID(prevbuf) - && !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0); + && !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0, FALSE); } } #ifdef FEAT_AUTOCMD @@ -2708,7 +2725,8 @@ setfname(buf, ffname, sfname, message) vim_free(ffname); return FAIL; } - close_buffer(NULL, obuf, DOBUF_WIPE); /* delete from the list */ + /* delete from the list */ + close_buffer(NULL, obuf, DOBUF_WIPE, FALSE); } sfname = vim_strsave(sfname); if (ffname == NULL || sfname == NULL) @@ -5638,7 +5656,7 @@ wipe_buffer(buf, aucmd) if (!aucmd) /* Don't trigger BufDelete autocommands here. */ block_autocmds(); #endif - close_buffer(NULL, buf, DOBUF_WIPE); + close_buffer(NULL, buf, DOBUF_WIPE, FALSE); #ifdef FEAT_AUTOCMD if (!aucmd) unblock_autocmds(); diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 519655bebc..644c32ba26 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3387,7 +3387,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin) /* close the link to the current buffer */ u_sync(FALSE); close_buffer(oldwin, curbuf, - (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD); + (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD, FALSE); #ifdef FEAT_AUTOCMD /* Autocommands may open a new window and leave oldwin open diff --git a/src/ex_getln.c b/src/ex_getln.c index 80a39cc090..1f5c873dac 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -6443,7 +6443,7 @@ ex_window() /* win_close() may have already wiped the buffer when 'bh' is * set to 'wipe' */ if (buf_valid(bp)) - close_buffer(NULL, bp, DOBUF_WIPE); + close_buffer(NULL, bp, DOBUF_WIPE, FALSE); /* Restore window sizes. */ win_size_restore(&winsizes); diff --git a/src/misc2.c b/src/misc2.c index 045117fe02..a070a20a5d 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1173,7 +1173,7 @@ free_all_mem() for (buf = firstbuf; buf != NULL; ) { nextbuf = buf->b_next; - close_buffer(NULL, buf, DOBUF_WIPE); + close_buffer(NULL, buf, DOBUF_WIPE, FALSE); if (buf_valid(buf)) buf = nextbuf; /* didn't work, try next one */ else diff --git a/src/proto/buffer.pro b/src/proto/buffer.pro index df9c0b478a..23957124d0 100644 --- a/src/proto/buffer.pro +++ b/src/proto/buffer.pro @@ -1,7 +1,7 @@ /* buffer.c */ int open_buffer __ARGS((int read_stdin, exarg_T *eap, int flags)); int buf_valid __ARGS((buf_T *buf)); -void close_buffer __ARGS((win_T *win, buf_T *buf, int action)); +void close_buffer __ARGS((win_T *win, buf_T *buf, int action, int abort_if_last)); void buf_clear_file __ARGS((buf_T *buf)); void buf_freeall __ARGS((buf_T *buf, int flags)); void goto_buffer __ARGS((exarg_T *eap, int start, int dir, int count)); diff --git a/src/proto/window.pro b/src/proto/window.pro index 7b019a780e..d56ae1b33e 100644 --- a/src/proto/window.pro +++ b/src/proto/window.pro @@ -1,13 +1,14 @@ /* window.c */ void do_window __ARGS((int nchar, long Prenum, int xchar)); int win_split __ARGS((int size, int flags)); -int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir)); +int win_split_ins __ARGS((int size, int flags, win_T *new_wp, int dir)); int win_valid __ARGS((win_T *win)); int win_count __ARGS((void)); int make_windows __ARGS((int count, int vertical)); void win_move_after __ARGS((win_T *win1, win_T *win2)); void win_equal __ARGS((win_T *next_curwin, int current, int dir)); void close_windows __ARGS((buf_T *buf, int keep_curwin)); +int one_window __ARGS((void)); void win_close __ARGS((win_T *win, int free_buf)); void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp)); void win_free_all __ARGS((void)); diff --git a/src/quickfix.c b/src/quickfix.c index d23b03e2e0..19eb0587a4 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3565,7 +3565,7 @@ unload_dummy_buffer(buf) buf_T *buf; { if (curbuf != buf) /* safety check */ - close_buffer(NULL, buf, DOBUF_UNLOAD); + close_buffer(NULL, buf, DOBUF_UNLOAD, FALSE); } #if defined(FEAT_EVAL) || defined(PROTO) diff --git a/src/version.c b/src/version.c index adb2a86d42..f4c76372db 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 449, /**/ 448, /**/ diff --git a/src/window.c b/src/window.c index 9c433747aa..6c02570ff3 100644 --- a/src/window.c +++ b/src/window.c @@ -23,7 +23,6 @@ static void win_rotate __ARGS((int, int)); static void win_totop __ARGS((int size, int flags)); static void win_equal_rec __ARGS((win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height)); static int last_window __ARGS((void)); -static int one_window __ARGS((void)); static win_T *win_free_mem __ARGS((win_T *win, int *dirp, tabpage_T *tp)); static frame_T *win_altframe __ARGS((win_T *win, tabpage_T *tp)); static tabpage_T *alt_tabpage __ARGS((void)); @@ -2083,7 +2082,7 @@ last_window() * Return TRUE if there is only one window other than "aucmd_win" in the * current tab page. */ - static int + int one_window() { #ifdef FEAT_AUTOCMD @@ -2109,7 +2108,7 @@ one_window() * Close window "win". Only works for the current tab page. * If "free_buf" is TRUE related buffer may be unloaded. * - * called by :quit, :close, :xit, :wq and findtag() + * Called by :quit, :close, :xit, :wq and findtag(). */ void win_close(win, free_buf) @@ -2222,7 +2221,7 @@ win_close(win, free_buf) * Close the link to the buffer. */ if (win->w_buffer != NULL) - close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0); + close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, TRUE); /* Autocommands may have closed the window already, or closed the only * other window or moved to another tab page. */ @@ -2328,7 +2327,7 @@ win_close_othertab(win, free_buf, tp) int free_tp = FALSE; /* Close the link to the buffer. */ - close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0); + close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, FALSE); /* Careful: Autocommands may have closed the tab page or made it the * current tab page. */ From 2a6df3afa9f14aab8b14fd31b19b325949736bbc Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 14:58:37 +0100 Subject: [PATCH 100/115] Added tag v7-3-449 for changeset 9ccdc4a69d8f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a157b04d84..420b6938b8 100644 --- a/.hgtags +++ b/.hgtags @@ -1785,3 +1785,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 20ca2e05ae20ece942490182691ed45746f64cb6 v7-3-446 6a03b0ea2e12d748c1e4199e3f428ee080760939 v7-3-447 756d712b3118b896b57ddb4f4c071135bc031607 v7-3-448 +9ccdc4a69d8ff7aab8abf89f9a3cc9dad12249dd v7-3-449 From 00a5d4bdb11f7940b513d7e7e05b1f70baea10d6 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 15:34:08 +0100 Subject: [PATCH 101/115] updated for version 7.3.450 Problem: Win32: Still a problem with "!start /b". Solution: Fix pointer use. (Yasuhiro Matsumoto) --- src/os_win32.c | 10 ++++++---- src/version.c | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/os_win32.c b/src/os_win32.c index 2f764d3dc9..57f004ec24 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -4008,21 +4008,23 @@ mch_call_shell( if (flags != CREATE_NEW_CONSOLE) { char_u *subcmd; - char_u *cmd_shell = default_shell(); + char_u *cmd_shell = mch_getenv("COMSPEC"); + + if (cmd_shell == NULL || *cmd_shell == NUL) + cmd_shell = default_shell(); subcmd = vim_strsave_escaped_ext(cmdbase, "|", '^', FALSE); if (subcmd != NULL) { /* make "cmd.exe /c arguments" */ cmdlen = STRLEN(cmd_shell) + STRLEN(subcmd) + 5; - vim_free(subcmd); - newcmd = lalloc(cmdlen, TRUE); if (newcmd != NULL) vim_snprintf((char *)newcmd, cmdlen, "%s /c %s", - default_shell, subcmd); + cmd_shell, subcmd); else newcmd = cmdbase; + vim_free(subcmd); } } diff --git a/src/version.c b/src/version.c index f4c76372db..119ad48764 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 450, /**/ 449, /**/ From f3cf847400a7409fa5b4889b0e5fc0409a5ac5b5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 15:34:08 +0100 Subject: [PATCH 102/115] Added tag v7-3-450 for changeset 3479ac596f6c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 420b6938b8..a128ccbfc9 100644 --- a/.hgtags +++ b/.hgtags @@ -1786,3 +1786,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 6a03b0ea2e12d748c1e4199e3f428ee080760939 v7-3-447 756d712b3118b896b57ddb4f4c071135bc031607 v7-3-448 9ccdc4a69d8ff7aab8abf89f9a3cc9dad12249dd v7-3-449 +3479ac596f6c4b38849d2e5235ad590378605eb8 v7-3-450 From c7478d1cfffc07b066b0c0e1a766401384ac7758 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 16:01:56 +0100 Subject: [PATCH 103/115] updated for version 7.3.451 Problem: Tcl doesn't work on 64 MS-Windows. Solution: Make it work. (Dave Bodenstab) --- src/Make_mvc.mak | 2 +- src/if_tcl.c | 123 +++++++++++++++++++---------------------------- src/version.c | 2 + 3 files changed, 53 insertions(+), 74 deletions(-) diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index c6a8e3158b..092e2b5711 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -616,7 +616,7 @@ CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \ -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\" TCL_OBJ = $(OUTDIR)\if_tcl.obj TCL_INC = /I "$(TCL)\Include" /I "$(TCL)" -TCL_LIB = $(TCL)\lib\tclstub$(TCL_VER).lib +TCL_LIB = "$(TCL)\lib\tclstub$(TCL_VER).lib" !else CFLAGS = $(CFLAGS) -DFEAT_TCL TCL_OBJ = $(OUTDIR)\if_tcl.obj diff --git a/src/if_tcl.c b/src/if_tcl.c index 5537b6356e..36ff32063f 100644 --- a/src/if_tcl.c +++ b/src/if_tcl.c @@ -79,12 +79,13 @@ TODO: typedef struct { Tcl_Interp *interp; + int exitvalue; int range_start, range_end; int lbase; char *curbuf, *curwin; } tcl_info; -static tcl_info tclinfo = { NULL, 0, 0, 0, NULL, NULL }; +static tcl_info tclinfo = { NULL, 0, 0, 0, 0, NULL, NULL }; #define VAR_RANGE1 "::vim::range(start)" #define VAR_RANGE2 "::vim::range(begin)" @@ -279,16 +280,19 @@ tcl_end() ****************************************************************************/ /* - * Replace standard "exit" and "catch" commands. + * Replace standard "exit" command. * - * This is a design flaw in Tcl - the standard "exit" command just calls - * exit() and kills the application. It should return TCL_EXIT to the - * app, which then decides if it wants to terminate or not. In our case, - * we just delete the Tcl interpreter (and create a new one with the next - * :tcl command). + * Delete the Tcl interpreter; a new one will be created with the next + * :tcl command). The exit code is saved (and retrieved in tclexit()). + * Since Tcl's exit is never expected to return and this replacement + * does, then (except for a trivial case) additional Tcl commands will + * be run. Since the interpreter is now marked as deleted, an error + * will be returned -- typically "attempt to call eval in deleted + * interpreter". Hopefully, at this point, checks for TCL_ERROR take + * place and control percolates back up to Vim -- but with this new error + * string in the interpreter's result value. Therefore it would be + * useless for this routine to return the exit code via Tcl_SetResult(). */ -#define TCL_EXIT 5 - static int exitcmd(dummy, interp, objc, objv) ClientData dummy UNUSED; @@ -305,51 +309,16 @@ exitcmd(dummy, interp, objc, objv) break; /* FALLTHROUGH */ case 1: - Tcl_SetObjResult(interp, Tcl_NewIntObj(value)); - return TCL_EXIT; + tclinfo.exitvalue = value; + + Tcl_DeleteInterp(interp); + break; default: Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?"); } return TCL_ERROR; } - static int -catchcmd(dummy, interp, objc, objv) - ClientData dummy UNUSED; - Tcl_Interp *interp; - int objc; - Tcl_Obj *CONST objv[]; -{ - char *varname = NULL; - int result; - - switch (objc) - { - case 3: - varname = Tcl_GetStringFromObj(objv[2], NULL); - /* fallthrough */ - case 2: - Tcl_ResetResult(interp); - Tcl_AllowExceptions(interp); - result = Tcl_EvalObj(interp, objv[1]); - if (result == TCL_EXIT) - return result; - if (varname) - { - if (Tcl_SetVar(interp, varname, Tcl_GetStringResult(interp), 0) == NULL) - { - Tcl_SetResult(interp, "couldn't save command result in variable", TCL_STATIC); - return TCL_ERROR; - } - } - Tcl_SetObjResult(interp, Tcl_NewIntObj(result)); - return TCL_OK; - default: - Tcl_WrongNumArgs(interp, 1, objv, "command ?varName?"); - } - return TCL_ERROR; -} - /* * "::vim::beep" - what Vi[m] does best :-) */ @@ -372,6 +341,7 @@ beepcmd(dummy, interp, objc, objv) /* * "::vim::buffer list" - create a list of buffer commands. * "::vim::buffer {N}" - create buffer command for buffer N. + * "::vim::buffer exists {N}" - test if buffer N exists. * "::vim::buffer new" - create a new buffer (not implemented) */ static int @@ -1663,7 +1633,7 @@ channel_gethandle(instance, direction, handleptr) static Tcl_ChannelType channel_type = { "vimmessage", /* typeName */ - NULL, /* version */ + TCL_CHANNEL_VERSION_2, /* version */ channel_close, /* closeProc */ channel_input, /* inputProc */ channel_output, /* outputProc */ @@ -1678,6 +1648,8 @@ static Tcl_ChannelType channel_type = NULL, /* flushProc */ NULL, /* handlerProc */ #endif +/* The following should not be necessary since TCL_CHANNEL_VERSION_2 was + * set above */ #ifdef TCL_CHANNEL_VERSION_3 NULL, /* wideSeekProc */ #endif @@ -1741,7 +1713,9 @@ tclinit(eap) Tcl_Interp *interp; static Tcl_Channel ch1, ch2; - /* replace stdout and stderr */ + /* Create replacement channels for stdout and stderr; this has to be + * done each time an interpreter is created since the channels are closed + * when the interpreter is deleted */ ch1 = Tcl_CreateChannel(&channel_type, "vimout", VIMOUT, TCL_WRITABLE); ch2 = Tcl_CreateChannel(&channel_type, "vimerr", VIMERR, TCL_WRITABLE); Tcl_SetStdChannel(ch1, TCL_STDOUT); @@ -1761,15 +1735,18 @@ tclinit(eap) #endif Tcl_SetChannelOption(interp, ch1, "-buffering", "line"); +#ifdef WIN3264 + Tcl_SetChannelOption(interp, ch1, "-translation", "lf"); +#endif Tcl_SetChannelOption(interp, ch2, "-buffering", "line"); +#ifdef WIN3264 + Tcl_SetChannelOption(interp, ch2, "-translation", "lf"); +#endif - /* replace some standard Tcl commands */ + /* replace standard Tcl exit command */ Tcl_DeleteCommand(interp, "exit"); Tcl_CreateObjCommand(interp, "exit", exitcmd, (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); - Tcl_DeleteCommand(interp, "catch"); - Tcl_CreateObjCommand(interp, "catch", catchcmd, - (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); /* new commands, in ::vim namespace */ Tcl_CreateObjCommand(interp, "::vim::buffer", buffercmd, @@ -1821,6 +1798,8 @@ tclinit(eap) tclinfo.range_end = row2tcl(eap->line2); tclupdatevars(); } + + tclinfo.exitvalue = 0; return OK; } @@ -1884,30 +1863,23 @@ tclexit(error) { int newerr = OK; - if (error == TCL_EXIT) + if (Tcl_InterpDeleted(tclinfo.interp) /* True if we intercepted Tcl's exit command */ +#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 5) || TCL_MAJOR_VERSION > 8 + || Tcl_LimitExceeded(tclinfo.interp) /* True if the interpreter cannot continue */ +#endif + ) { - int retval; char buf[50]; - Tcl_Obj *robj; - robj = Tcl_GetObjResult(tclinfo.interp); - if (Tcl_GetIntFromObj(tclinfo.interp, robj, &retval) != TCL_OK) + sprintf(buf, _("E572: exit code %d"), tclinfo.exitvalue); + tclerrmsg(buf); + if (tclinfo.exitvalue == 0) { - EMSG(_("E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim.org")); - newerr = FAIL; + did_emsg = 0; + newerr = OK; } else - { - sprintf(buf, _("E572: exit code %d"), retval); - tclerrmsg(buf); - if (retval == 0) - { - did_emsg = 0; - newerr = OK; - } - else - newerr = FAIL; - } + newerr = FAIL; tcldelthisinterp(); } @@ -2021,7 +1993,12 @@ ex_tcldo(eap) Tcl_SetVar(tclinfo.interp, var_line, line, 0); Tcl_AllowExceptions(tclinfo.interp); err = Tcl_Eval(tclinfo.interp, script); - if (err != TCL_OK) + if (err != TCL_OK + || Tcl_InterpDeleted(tclinfo.interp) +#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 5) || TCL_MAJOR_VERSION > 8 + || Tcl_LimitExceeded(tclinfo.interp) +#endif + ) break; line = (char *)Tcl_GetVar(tclinfo.interp, var_line, 0); if (line) diff --git a/src/version.c b/src/version.c index 119ad48764..f9da5db7ac 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 451, /**/ 450, /**/ From 69000ce22ba875b01e663aa0309419ab38c580fa Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 16:01:56 +0100 Subject: [PATCH 104/115] Added tag v7-3-451 for changeset 045fdc5b6056 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a128ccbfc9..fd6c96ad88 100644 --- a/.hgtags +++ b/.hgtags @@ -1787,3 +1787,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 756d712b3118b896b57ddb4f4c071135bc031607 v7-3-448 9ccdc4a69d8ff7aab8abf89f9a3cc9dad12249dd v7-3-449 3479ac596f6c4b38849d2e5235ad590378605eb8 v7-3-450 +045fdc5b6056a18579f28b40a4914f4a7cb8d4a3 v7-3-451 From 7fc906b7c034a57a15aa9ce8582c2477c7802b8d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 17:30:19 +0100 Subject: [PATCH 105/115] Updated runtime files. --- runtime/autoload/sqlcomplete.vim | 189 ++++++++++++++++++++----------- runtime/compiler/erlang.vim | 10 +- runtime/doc/autocmd.txt | 4 +- runtime/doc/options.txt | 26 ++--- runtime/doc/quickref.txt | 3 +- runtime/doc/tags | 3 + runtime/doc/todo.txt | 23 +++- runtime/optwin.vim | 4 +- runtime/syntax/fasm.vim | 13 ++- runtime/syntax/resolv.vim | 11 +- runtime/syntax/reva.vim | 45 ++++---- runtime/syntax/sshconfig.vim | 7 +- 12 files changed, 218 insertions(+), 120 deletions(-) diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim index 5599c0d03e..360f7e6cec 100644 --- a/runtime/autoload/sqlcomplete.vim +++ b/runtime/autoload/sqlcomplete.vim @@ -1,16 +1,31 @@ " Vim OMNI completion script for SQL " Language: SQL " Maintainer: David Fishburn -" Version: 10.0 -" Last Change: 2010 Jun 11 +" Version: 12.0 +" Last Change: 2012 Feb 08 " Usage: For detailed help -" ":help sql.txt" -" or ":help ft-sql-omni" +" ":help sql.txt" +" or ":help ft-sql-omni" " or read $VIMRUNTIME/doc/sql.txt " History +" Version 12.0 +" - Partial column name completion did not work when a table +" name or table alias was provided (Jonas Enberg). +" - Improved the handling of column completion. First we match any +" columns from a previous completion. If not matches are found, we +" consider the partial name to be a table or table alias for the +" query and attempt to match on it. +" +" Version 11.0 +" Added g:omni_sql_default_compl_type variable +" - You can specify which type of completion to default to +" when pressing . The entire list of available +" choices can be found in the calls to sqlcomplete#Map in: +" ftplugin/sql.vim +" " Version 10.0 -" Updated PreCacheSyntax() +" Updated PreCacheSyntax() " - Now returns a List of the syntax items it finds. " This allows other plugins / scripts to use this list for their own " purposes. In this case XPTemplate can use them for a Choose list. @@ -18,22 +33,22 @@ " warning if not. " - Verifies the parameters are the correct type and displays a " warning if not. -" Updated SQLCWarningMsg() +" Updated SQLCWarningMsg() " - Prepends warning message with SQLComplete so you know who issued " the warning. -" Updated SQLCErrorMsg() +" Updated SQLCErrorMsg() " - Prepends error message with SQLComplete so you know who issued " the error. -" +" " Version 9.0 " This change removes some of the support for tables with spaces in their -" names in order to simplify the regexes used to pull out query table +" names in order to simplify the regexes used to pull out query table " aliases for more robust table name and column name code completion. " Full support for "table names with spaces" can be added in again " after 7.3. " " Version 8.0 -" Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left +" Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left " when drilling in and out of a column list for a table. " " Version 7.0 @@ -44,7 +59,7 @@ " " Set completion with CTRL-X CTRL-O to autoloaded function. " This check is in place in case this script is -" sourced directly instead of using the autoload feature. +" sourced directly instead of using the autoload feature. if exists('&omnifunc') " Do not set the option if already set since this " results in an E117 warning. @@ -54,9 +69,9 @@ if exists('&omnifunc') endif if exists('g:loaded_sql_completion') - finish + finish endif -let g:loaded_sql_completion = 100 +let g:loaded_sql_completion = 120 " Maintains filename of dictionary let s:sql_file_table = "" @@ -69,7 +84,7 @@ let s:tbl_alias = [] let s:tbl_cols = [] let s:syn_list = [] let s:syn_value = [] - + " Used in conjunction with the syntaxcomplete plugin let s:save_inc = "" let s:save_exc = "" @@ -79,7 +94,7 @@ endif if exists('g:omni_syntax_group_exclude_sql') let s:save_exc = g:omni_syntax_group_exclude_sql endif - + " Used with the column list let s:save_prev_table = "" @@ -110,12 +125,16 @@ if !exists('g:omni_sql_include_owner') if g:loaded_dbext >= 300 " New to dbext 3.00, by default the table lists include the owner " name of the table. This is used when determining how much of - " whatever has been typed should be replaced as part of the + " whatever has been typed should be replaced as part of the " code replacement. let g:omni_sql_include_owner = 1 endif endif endif +" Default type of completion used when is pressed +if !exists('g:omni_sql_default_compl_type') + let g:omni_sql_default_compl_type = 'table' +endif " This function is used for the 'omnifunc' option. function! sqlcomplete#Complete(findstart, base) @@ -140,7 +159,7 @@ function! sqlcomplete#Complete(findstart, base) let begindot = 1 endif while start > 0 - " Additional code was required to handle objects which + " Additional code was required to handle objects which " can contain spaces like "my table name". if line[start - 1] !~ '\(\w\|\.\)' " If the previous character is not a period or word character @@ -150,7 +169,7 @@ function! sqlcomplete#Complete(findstart, base) elseif line[start - 1] =~ '\w' " If the previous character is word character continue back let start -= 1 - elseif line[start - 1] =~ '\.' && + elseif line[start - 1] =~ '\.' && \ compl_type =~ 'column\|table\|view\|procedure' " If the previous character is a period and we are completing " an object which can be specified with a period like this: @@ -160,7 +179,7 @@ function! sqlcomplete#Complete(findstart, base) " If lastword has already been set for column completion " break from the loop, since we do not also want to pickup " a table name if it was also supplied. - if lastword != -1 && compl_type == 'column' + if lastword != -1 && compl_type == 'column' break endif " If column completion was specified stop at the "." if @@ -171,8 +190,8 @@ function! sqlcomplete#Complete(findstart, base) endif " If omni_sql_include_owner = 0, do not include the table " name as part of the substitution, so break here - if lastword == -1 && - \ compl_type =~ 'table\|view\|procedure\column_csv' && + if lastword == -1 && + \ compl_type =~ 'table\|view\|procedure\column_csv' && \ g:omni_sql_include_owner == 0 let lastword = start break @@ -202,7 +221,7 @@ function! sqlcomplete#Complete(findstart, base) let compl_list = [] " Default to table name completion - let compl_type = 'table' + let compl_type = g:omni_sql_default_compl_type " Allow maps to specify what type of object completion they want if exists('b:sql_compl_type') let compl_type = b:sql_compl_type @@ -216,7 +235,7 @@ function! sqlcomplete#Complete(findstart, base) if compl_type == 'table' || \ compl_type == 'procedure' || - \ compl_type == 'view' + \ compl_type == 'view' " This type of completion relies upon the dbext.vim plugin if s:SQLCCheck4dbext() == -1 @@ -254,7 +273,7 @@ function! sqlcomplete#Complete(findstart, base) if base == "" " The last time we displayed a column list we stored - " the table name. If the user selects a column list + " the table name. If the user selects a column list " without a table name of alias present, assume they want " the previous column list displayed. let base = s:save_prev_table @@ -273,16 +292,16 @@ function! sqlcomplete#Complete(findstart, base) " has entered: " owner.table " table.column_prefix - " So there are a couple of things we can do to mitigate + " So there are a couple of things we can do to mitigate " this issue. " 1. Check if the dbext plugin has the option turned " on to even allow owners " 2. Based on 1, if the user is showing a table list - " and the DrillIntoTable (using ) then + " and the DrillIntoTable (using ) then " this will be owner.table. In this case, we can - " check to see the table.column exists in the + " check to see the table.column exists in the " cached table list. If it does, then we have - " determined the user has actually chosen + " determined the user has actually chosen " owner.table, not table.column_prefix. let found = -1 if g:omni_sql_include_owner == 1 && owner == '' @@ -297,17 +316,46 @@ function! sqlcomplete#Complete(findstart, base) " If the user has indicated not to use table owners at all and " the base ends in a '.' we know they are not providing a column " name, so we can shift the items appropriately. - if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$') - let owner = table - let table = column - let column = '' - endif + " if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$') + " let owner = table + " let table = column + " let column = '' + " endif else + " If no "." was provided and the user asked for + " column level completion, first attempt the match + " on any previous column lists. If the user asked + " for a list of columns comma separated, continue as usual. + if compl_type == 'column' && s:save_prev_table != '' + " The last time we displayed a column list we stored + " the table name. If the user selects a column list + " without a table name of alias present, assume they want + " the previous column list displayed. + let table = s:save_prev_table + let list_type = '' + + let compl_list = s:SQLCGetColumns(table, list_type) + if ! empty(compl_list) + " If no column prefix has been provided and the table + " name was provided, append it to each of the items + " returned. + let compl_list = filter(deepcopy(compl_list), 'v:val=~"^'.base.'"' ) + + " If not empty, we have a match on columns + " return the list + if ! empty(compl_list) + return compl_list + endif + endif + endif + " Since no columns were found to match the base supplied + " assume the user is trying to complete the column list + " for a table (and or an alias to a table). let table = base endif " Get anything after the . and consider this the table name - " If an owner has been specified, then we must consider the + " If an owner has been specified, then we must consider the " base to be a partial column name " let base = matchstr( base, '^\(.*\.\)\?\zs.*' ) @@ -327,11 +375,11 @@ function! sqlcomplete#Complete(findstart, base) " If no column prefix has been provided and the table " name was provided, append it to each of the items " returned. - let compl_list = map(compl_list, "table.'.'.v:val") + let compl_list = map(compl_list, 'table.".".v:val') if owner != '' " If an owner has been provided append it to each of the " items returned. - let compl_list = map(compl_list, "owner.'.'.v:val") + let compl_list = map(compl_list, 'owner.".".v:val') endif else let base = '' @@ -361,11 +409,15 @@ function! sqlcomplete#Complete(findstart, base) if base != '' " Filter the list based on the first few characters the user entered. - " Check if the text matches at the beginning - " or + " Check if the text matches at the beginning + " \\(^.base.'\\) + " or " Match to a owner.table or alias.column type match + " ^\\(\\w\\+\\.\\)\\?'.base.'\\) " or " Handle names with spaces "my table name" + " "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"' + " let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"' " let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\)"' " let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\(\\.\\)\\?'.base.'\\)"' @@ -384,7 +436,7 @@ function! sqlcomplete#PreCacheSyntax(...) let syn_group_arr = [] let syn_items = [] - if a:0 > 0 + if a:0 > 0 if type(a:1) != 3 call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']") return '' @@ -407,7 +459,7 @@ endfunction function! sqlcomplete#ResetCacheSyntax(...) let syn_group_arr = [] - if a:0 > 0 + if a:0 > 0 if type(a:1) != 3 call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']") return '' @@ -458,7 +510,7 @@ function! sqlcomplete#DrillIntoTable() " If the popup is not visible, simple perform the normal " key behaviour. " Must use exec since they key must be preceeded by "\" - " or feedkeys will simply push each character of the string + " or feedkeys will simply push each character of the string " rather than the "key press". exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")' endif @@ -475,7 +527,7 @@ function! sqlcomplete#DrillOutOfColumns() " If the popup is not visible, simple perform the normal " key behaviour. " Must use exec since they key must be preceeded by "\" - " or feedkeys will simply push each character of the string + " or feedkeys will simply push each character of the string " rather than the "key press". exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")' endif @@ -484,16 +536,16 @@ endfunction function! s:SQLCWarningMsg(msg) echohl WarningMsg - echomsg 'SQLComplete:'.a:msg + echomsg 'SQLComplete:'.a:msg echohl None endfunction - + function! s:SQLCErrorMsg(msg) echohl ErrorMsg - echomsg 'SQLComplete:'.a:msg + echomsg 'SQLComplete:'.a:msg echohl None endfunction - + function! s:SQLCGetSyntaxList(syn_group) let syn_group = a:syn_group let compl_list = [] @@ -504,7 +556,7 @@ function! s:SQLCGetSyntaxList(syn_group) " Return previously cached value let compl_list = s:syn_value[list_idx] else - " Request the syntax list items from the + " Request the syntax list items from the " syntax completion plugin if syn_group == 'syntax' " Handle this special case. This allows the user @@ -552,7 +604,7 @@ function! s:SQLCAddAlias(table_name, table_alias, cols) let table_alias = a:table_alias let cols = a:cols - if g:omni_sql_use_tbl_alias != 'n' + if g:omni_sql_use_tbl_alias != 'n' if table_alias == '' if 'da' =~? g:omni_sql_use_tbl_alias if table_name =~ '_' @@ -562,13 +614,13 @@ function! s:SQLCAddAlias(table_name, table_alias, cols) setlocal iskeyword-=_ " Get the first letter of each word - " [[:alpha:]] is used instead of \w + " [[:alpha:]] is used instead of \w " to catch extended accented characters " - let table_alias = substitute( - \ table_name, - \ '\<[[:alpha:]]\+\>_\?', - \ '\=strpart(submatch(0), 0, 1)', + let table_alias = substitute( + \ table_name, + \ '\<[[:alpha:]]\+\>_\?', + \ '\=strpart(submatch(0), 0, 1)', \ 'g' \ ) " Restore original value @@ -596,7 +648,7 @@ function! s:SQLCAddAlias(table_name, table_alias, cols) return cols endfunction -function! s:SQLCGetObjectOwner(object) +function! s:SQLCGetObjectOwner(object) " The owner regex matches a word at the start of the string which is " followed by a dot, but doesn't include the dot in the result. " ^ - from beginning of line @@ -609,7 +661,7 @@ function! s:SQLCGetObjectOwner(object) " let owner = matchstr( a:object, '^\s*\zs.*\ze\.' ) let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' ) return owner -endfunction +endfunction function! s:SQLCGetColumns(table_name, list_type) " Check if the table name was provided as part of the column name @@ -636,7 +688,7 @@ function! s:SQLCGetColumns(table_name, list_type) if list_idx > -1 let table_cols = split(s:tbl_cols[list_idx], '\n') else - " Check if we have already cached the column list for this table + " Check if we have already cached the column list for this table " by its alias, assuming the table_name provided was actually " the alias for the table instead " select * @@ -654,7 +706,7 @@ function! s:SQLCGetColumns(table_name, list_type) " And the table ends in a "." or we are looking for a column list " if list_idx == -1 && (a:table_name =~ '\.' || b:sql_compl_type =~ 'column') " if list_idx == -1 && (a:table_name =~ '\.' || a:list_type =~ 'csv') - if list_idx == -1 + if list_idx == -1 let saveY = @y let saveSearch = @/ let saveWScan = &wrapscan @@ -665,7 +717,7 @@ function! s:SQLCGetColumns(table_name, list_type) setlocal nowrapscan " If . was entered, look at the word just before the . " We are looking for something like this: - " select * + " select * " from customer c " where c. " So when . is pressed, we need to find 'c' @@ -692,15 +744,15 @@ function! s:SQLCGetColumns(table_name, list_type) " if query =~? '^\c\(select\)' if query =~? '^\(select\|update\|delete\)' let found = 1 - " \(\(\<\w\+\>\)\.\)\? - + " \(\(\<\w\+\>\)\.\)\? - " '\c\(from\|join\|,\).\{-}' - Starting at the from clause (case insensitive) " '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional) - " '\<\w\+\>\ze' - Get the table name + " '\<\w\+\>\ze' - Get the table name " '\s\+\<'.table_name.'\>' - Followed by the alias " '\s*\.\@!.*' - Cannot be followed by a . " '\(\\|$\)' - Must be followed by a WHERE clause " '.*' - Exclude the rest of the line in the match - " let table_name_new = matchstr(@y, + " let table_name_new = matchstr(@y, " \ '\c\(from\|join\|,\).\{-}'. " \ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'. " \ '\("\|\[\)\?.\{-}\("\|\]\)\?\ze'. @@ -711,7 +763,16 @@ function! s:SQLCGetColumns(table_name, list_type) " \ '\(\\|$\)'. " \ '.*' " \ ) - let table_name_new = matchstr(@y, + " + " + " ''\c\(\\|\\|,\)\s*' - Starting at the from clause (case insensitive) + " '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?' - Get the owner name (optional) + " '\("\|\[\)\?\w\+\("\|\]\)\?\ze' - Get the table name + " '\s\+\%(as\s\+\)\?\<'.matchstr(table_name, '.\{-}\ze\.\?$').'\>' - Followed by the alias + " '\s*\.\@!.*' - Cannot be followed by a . + " '\(\\|$\)' - Must be followed by a WHERE clause + " '.*' - Exclude the rest of the line in the match + let table_name_new = matchstr(@y, \ '\c\(\\|\\|,\)\s*'. \ '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?'. \ '\("\|\[\)\?\w\+\("\|\]\)\?\ze'. @@ -753,7 +814,7 @@ function! s:SQLCGetColumns(table_name, list_type) " Return to previous location call cursor(curline, curcol) - + if found == 0 if g:loaded_dbext > 300 exec 'DBSetOption use_tbl_alias='.saveSettingAlias @@ -762,7 +823,7 @@ function! s:SQLCGetColumns(table_name, list_type) " Not a SQL statement, do not display a list return [] endif - endif + endif if empty(table_cols) " Specify silent mode, no messages to the user (tbl, 1) diff --git a/runtime/compiler/erlang.vim b/runtime/compiler/erlang.vim index 867ba6b508..e177a279c5 100644 --- a/runtime/compiler/erlang.vim +++ b/runtime/compiler/erlang.vim @@ -1,11 +1,13 @@ " Vim compiler file -" Compiler: Erlang -" Maintainer: none, please volunteer! -" Last Change: 2012 Jan 20 +" Compiler: Erlang +" Maintainer: Dmitry Vasiliev +" Last Change: 2012-02-13 if exists("current_compiler") finish endif let current_compiler = "erlang" -" TODO +CompilerSet makeprg=erlc\ -Wall\ % + +CompilerSet errorformat=%f:%l:\ %m diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 8f50eb82a2..d6338ee675 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.3. Last change: 2012 Feb 12 +*autocmd.txt* For Vim version 7.3. Last change: 2012 Feb 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -33,7 +33,7 @@ files matching *.c. You can also use autocommands to implement advanced features, such as editing compressed files (see |gzip-example|). The usual place to put autocommands is in your .vimrc or .exrc file. - *E203* *E204* *E143* + *E203* *E204* *E143* *E855* WARNING: Using autocommands is very powerful, and may lead to unexpected side effects. Be careful not to destroy your text. - It's a good idea to do some testing on an expendable copy of a file first. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2836be5d55..23ac10a61f 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2012 Feb 12 +*options.txt* For Vim version 7.3. Last change: 2012 Feb 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5900,9 +5900,8 @@ A jump table for the options with a short description can be found at |Q_op|. *'shellcmdflag'* *'shcf'* 'shellcmdflag' 'shcf' string (default: "-c"; - Win32, when 'shell' is cmd.exe: "/s /c"; - MS-DOS and Win32, when 'shell' neither is - cmd.exe nor contains "sh" somewhere: "/c") + MS-DOS and Win32, when 'shell' does not + contain "sh" somewhere: "/c") global {not in Vi} Flag passed to the shell to execute "!" and ":!" commands; e.g., @@ -6041,6 +6040,15 @@ A jump table for the options with a short description can be found at |Q_op|. 0 and 2: use "shell 'shellcmdflag' cmd" to start external commands 1 and 3: use "shell cmd" to start external commands + *'shellxescape'* *'sxe'* +'shellxescape' 'sxe' string (default: ""; + for MS-DOS and MS-Windows: "\"&|<>()@^") + global + {not in Vi} + When 'shellxquote' is set to "(" then the characters listed in this + option will be escaped with a '^' character. This makes it possible + to execute most external commands with cmd.exe. + *'shellxquote'* *'sxq'* 'shellxquote' 'sxq' string (default: ""; for Win32, when 'shell' is cmd.exe: "(" @@ -6065,16 +6073,6 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. - *'shellxescape'* *'sxe'* -'shellxescape' 'sxe' string (default: ""; - for MS-DOS and MS-Windows: "\"&|<>()@^") - global - {not in Vi} - When 'shellxquote' is set to "(" then the characters listed in this - option will be escaped with a '^' character. This makes it possible - to execute most external commands with cmd.exe. - - *'shiftround'* *'sr'* *'noshiftround'* *'nosr'* 'shiftround' 'sr' boolean (default off) global diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index c14818ac54..1fef2177d2 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.3. Last change: 2011 Jun 12 +*quickref.txt* For Vim version 7.3. Last change: 2012 Feb 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -851,6 +851,7 @@ Short explanation of each option: *option-list* 'shellslash' 'ssl' use forward slash for shell file names 'shelltemp' 'stmp' whether to use a temp file for shell commands 'shelltype' 'st' Amiga: influences how to use a shell +'shellxescape' 'sxe' characters to escape when 'shellxquote' is ( 'shellxquote' 'sxq' like 'shellquote', but include redirection 'shiftround' 'sr' round indent to multiple of shiftwidth 'shiftwidth' 'sw' number of spaces to use for (auto)indent step diff --git a/runtime/doc/tags b/runtime/doc/tags index ab2bf3ebfb..8d7e1d6e7b 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -783,6 +783,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* 'shellslash' options.txt /*'shellslash'* 'shelltemp' options.txt /*'shelltemp'* 'shelltype' options.txt /*'shelltype'* +'shellxescape' options.txt /*'shellxescape'* 'shellxquote' options.txt /*'shellxquote'* 'shiftround' options.txt /*'shiftround'* 'shiftwidth' options.txt /*'shiftwidth'* @@ -852,6 +853,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* 'swf' options.txt /*'swf'* 'switchbuf' options.txt /*'switchbuf'* 'sws' options.txt /*'sws'* +'sxe' options.txt /*'sxe'* 'sxq' options.txt /*'sxq'* 'syn' options.txt /*'syn'* 'synmaxcol' options.txt /*'synmaxcol'* @@ -4241,6 +4243,7 @@ E851 gui_x11.txt /*E851* E852 gui_x11.txt /*E852* E853 eval.txt /*E853* E854 options.txt /*E854* +E855 autocmd.txt /*E855* E86 windows.txt /*E86* E87 windows.txt /*E87* E88 windows.txt /*E88* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 925efb6358..74585d7c32 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2012 Feb 12 +*todo.txt* For Vim version 7.3. Last change: 2012 Feb 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,9 +38,15 @@ Go through more coverity reports. Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) +Stack trace of crash: http://vpaste.net/GBt9S +(Alexandre Provencio) + Once syntax and other runtime files have been fixed: add "set cp" to check.vim. Use a function to run both with 'cp' and 'nocp'. +Undo broken when pasting close to the last line. (Andrey Radev, 2012 Feb 14) +Patch by Christian Brabandt, 2012 Feb 14. + GTK: problem with 'L' in 'guioptions' changing the window width. (Aaron Cornelius, 2012 Feb 6) @@ -48,6 +54,8 @@ Win32: When a directory name contains an exclamation mark, completion doesn't complete the contents of the directory. No escaping for the "!"? (Jan Stocker, 2012 Jan 5) +Patch to speed up ga_grow(). (Dominique Pelle, 2012 Feb 13) + Patch for "tab drop hoge" moving current window. (Higashi, 2012 Jan 31) ":tab drop buffer.c" always opens a new tab, also if buffer.c is already in an open window. (Herb Sitz, 2011 Nov 17) @@ -79,6 +87,9 @@ URXVT: Patch for using QuickFixCmdPre for more commands. (Marcin Szamotulski, 2012 Feb 1, update Feb 2) +Patch for pasting in the Ex command line is slow. (Dominique Pelle, 2012 Feb +19) + When running Vim in silent ex mode, an existing swapfile causes Vim to wait for a user action without a prompt. (Maarten Billemont, 2012 Feb 3) Do give the prompt? Quit with an error? @@ -87,6 +98,10 @@ When exiting with unsaved changes, selecting an existing file in the file dialog, there is no dialog to ask whether the existing file should be overwritten. (Felipe G. Nievinski, 2011 Dec 22) +Patch for improved ":qa" behavior. (Hirohito Higashi, 2012 Feb 18) + +Recognize objcpp. (Austin Ziegler, 2012 Feb 15) + 7 Setting an option always sets "w_set_curswant", while this is only required for a few options. Only do it for those options to avoid the side effect. @@ -98,7 +113,7 @@ Carvalho merged the patch: New version 2012 Jan 19. Patch for option in 'cino' to specify more indent for continued conditions. (Lech Lorens, 2011 Nov 27) -Isn't this already possible? +Isn't this already possible? Update 2012 Feb 15. Patch for using objcpp file type for headers files. Issue 44. @@ -155,6 +170,9 @@ Plugin for Modeleasy. (Massimiliano Tripoli, 2011 Nov 29) Updated syntax file for ssh_config, maintainer doesn't respond. (Leonard Ehrenfried, 2011 Sep 26) +BufWinLeave triggers too late when quitting last window in a tab page. (Lech +Lorens, 2012 Feb 21) + "fC" doesn't position the cursor correctly when there are concealed characters. Patch by Christian Brabandt, 2011 Oct 11) @@ -959,6 +977,7 @@ Performance tests: - ~/vim/test/slowsearch - ~/vim/test/rgb.vim - ~/vim/text/FeiqCfg.xml (file from Netjune) +- ~/vim/text/edl.svg (also XML) - search for a.*e*exn in the vim executable. Go to last line to use 'hlsearch'. diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 4ff90bb226..dd36112d65 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar -" Last Change: 2011 Jun 13 +" Last Change: 2012 Feb 22 " If there already is an option window, jump to that one. if bufwinnr("option-window") > 0 @@ -1064,6 +1064,8 @@ call append("$", "shellquote\tcharacter(s) to enclose a shell command in") call OptionG("shq", &shq) call append("$", "shellxquote\tlike 'shellquote' but include the redirection") call OptionG("sxq", &sxq) +call append("$", "shellxescape\tcharacters to escape when 'shellxquote' is (") +call OptionG("sxe", &sxe) call append("$", "shellcmdflag\targument for 'shell' to execute a command") call OptionG("shcf", &shcf) call append("$", "shellredir\tused to redirect command output to a file") diff --git a/runtime/syntax/fasm.vim b/runtime/syntax/fasm.vim index 01bdc83118..696e05b4ca 100644 --- a/runtime/syntax/fasm.vim +++ b/runtime/syntax/fasm.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: Flat Assembler (FASM) " Maintainer: Ron Aaron -" Last Change: 2004 May 16 +" Last Change: 2012/02/13 " Vim URL: http://www.vim.org/lang.html " FASM Home: http://flatassembler.net/ -" FASM Version: 1.52 +" FASM Version: 1.56 if version < 600 syntax clear @@ -12,6 +12,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + setlocal iskeyword=a-z,A-Z,48-57,.,_ setlocal isident=a-z,A-Z,48-57,.,_ syn case ignore @@ -97,7 +100,7 @@ syn keyword fasmDirective align binary code coff console discardable display dl syn keyword fasmDirective elf entry executable export extern far fixups format gui syn keyword fasmDirective import label ms mz native near notpageable pe public readable syn keyword fasmDirective repeat resource section segment shareable stack times -syn keyword fasmDirective use16 use32 virtual wdm writeable +syn keyword fasmDirective use16 use32 virtual wdm writable writeable syn keyword fasmOperator as at defined eq eqtype from mod on ptr rva used syn match fasmNumericOperator "[+-/*]" @@ -142,4 +145,8 @@ hi def link fasmInstr keyword hi def link fasmLabel label hi def link fasmPrefix preproc let b:current_syntax = "fasm" + +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 sw=8 : diff --git a/runtime/syntax/resolv.vim b/runtime/syntax/resolv.vim index 6ec42d27d9..1c0f8467d1 100644 --- a/runtime/syntax/resolv.vim +++ b/runtime/syntax/resolv.vim @@ -1,11 +1,10 @@ " Vim syntax file " Language: resolver configuration file -" Maintainer: David Ne\v{c}as (Yeti) +" Maintainer: David Necas (Yeti) " Original Maintaner: Radu Dineiu " License: This file can be redistribued and/or modified under the same terms " as Vim itself. -" URL: http://trific.ath.cx/Ftp/vim/syntax/resolv.vim -" Last Change: 2006-04-16 +" Last Change: 2012-02-21 if version < 600 syntax clear @@ -26,7 +25,8 @@ syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained " General syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster -syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/ +syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_.]*/ +syn match resolvDomainname contained /[-0-9A-Za-z_.]\+/ " Particular syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster @@ -36,7 +36,7 @@ syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/ " Identifiers syn match resolvNameserver /^\s*nameserver\>/ nextgroup=resolvIPNameserver skipwhite syn match resolvLwserver /^\s*lwserver\>/ nextgroup=resolvIPNameserver skipwhite -syn match resolvDomain /^\s*domain\>/ nextgroup=resolvHostname skipwhite +syn match resolvDomain /^\s*domain\>/ nextgroup=resolvDomainname skipwhite syn match resolvSearch /^\s*search\>/ nextgroup=resolvHostnameSearch skipwhite syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skipwhite syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite @@ -61,6 +61,7 @@ if version >= 508 || !exists("did_config_syntax_inits") HiLink resolvIP Number HiLink resolvIPNetmask Number HiLink resolvHostname String + HiLink resolvDomainname String HiLink resolvOption String HiLink resolvIPNameserver Number diff --git a/runtime/syntax/reva.vim b/runtime/syntax/reva.vim index 7e11ffe2d8..03dfc9d4c3 100644 --- a/runtime/syntax/reva.vim +++ b/runtime/syntax/reva.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: Reva Forth -" Version: 7.1 -" Last Change: 2008/01/11 +" Version: 2011.2 +" Last Change: 2012/02/13 " Maintainer: Ron Aaron " URL: http://ronware.org/reva/ -" Filetypes: *.rf *.frt +" Filetypes: *.rf *.frt " NOTE: You should also have the ftplugin/reva.vim file to set 'isk' " For version 5.x: Clear all syntax items and don't load @@ -17,10 +17,13 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn clear " Synchronization method -syn sync ccomment +syn sync ccomment syn sync maxlines=100 @@ -39,7 +42,7 @@ syn region revaEOF start='\<|||\>' end='{$}' contains=revaHelpStuff syn case match " basic mathematical and logical operators syn keyword revaoperators + - * / mod /mod negate abs min max umin umax -syn keyword revaoperators and or xor not invert 1+ 1- +syn keyword revaoperators and or xor not invert 1+ 1- syn keyword revaoperators m+ */ */mod m* um* m*/ um/mod fm/mod sm/rem syn keyword revaoperators d+ d- dnegate dabs dmin dmax > < = >> << u< <> @@ -53,10 +56,10 @@ syn keyword revastack >r r> r@ rdrop " address operations syn keyword revamemory @ ! +! c@ c! 2@ 2! align aligned allot allocate here free resize syn keyword revaadrarith chars char+ cells cell+ cell cell- 2cell+ 2cell- 3cell+ 4cell+ -syn keyword revamemblks move fill +syn keyword revamemblks move fill " conditionals -syn keyword revacond if else then =if >if if if0 ;; catch throw +syn keyword revacond if else then =if >if if if0 ;; catch throw " iterations syn keyword revaloop while repeat until again @@ -66,18 +69,18 @@ syn keyword revaloop do loop i j leave unloop skip more syn match revaColonDef '\ immediate +syn keyword revadefine user value to +to defer! defer@ defer is does> immediate syn keyword revadefine compile literal ' ['] " Built in words com! -nargs=+ Builtin syn keyword revaBuiltin Builtin execute ahead interp bye >body here pad words make Builtin accept close cr creat delete ekey emit fsize ioerr key? -Builtin mtime open/r open/rw read rename seek space spaces stat +Builtin mtime open/r open/rw read rename seek space spaces stat Builtin tell type type_ write (seek) (argv) (save) 0; 0drop; Builtin >class >lz >name >xt alias alias: appname argc asciiz, asciizl, Builtin body> clamp depth disassemble findprev fnvhash getenv here, -Builtin iterate last! last@ later link lz> lzmax os parse/ peek +Builtin iterate last! last@ later link lz> lzmax os parse/ peek Builtin peek-n pop prior push put rp@ rpick save setenv slurp Builtin stack-empty? stack-iterate stack-size stack: THROW_BADFUNC Builtin THROW_BADLIB THROW_GENERIC used xt>size z, @@ -88,21 +91,21 @@ Builtin chdir g32 k32 u32 getcwd getpid hinst osname stdin stdout Builtin (-lib) (bye) (call) (else) (find) (func) (here) (if (lib) (s0) (s^) Builtin (to~) (while) >in >rel ?literal appstart cold compiling? context? d0 default_class Builtin defer? dict dolstr dostr find-word h0 if) interp isa onexit -Builtin onstartup pdoes pop>ebx prompt rel> rp0 s0 src srcstr state str0 then,> then> tib +Builtin onstartup pdoes pop>ebx prompt rel> rp0 s0 src srcstr state str0 then,> then> tib Builtin tp vector vector! word? xt? .ver revaver revaver# && '' 'constant 'context Builtin 'create 'defer 'does 'forth 'inline 'macro 'macront 'notail 'value 'variable Builtin (.r) (context) (create) (header) (hide) (inline) (p.r) (words~) (xfind) Builtin ++ -- , -2drop -2nip -link -swap . .2x .classes .contexts .funcs .libs .needs .r Builtin .rs .x 00; 0do 0if 1, 2, 3, 2* 2/ 2constant 2variable 3dup 4dup ;then >base >defer Builtin >rr ? ?do @execute @rem appdir argv as back base base! between chain cleanup-libs -Builtin cmove> context?? ctrl-c ctx>name data: defer: defer@def dictgone do_cr eleave -Builtin endcase endof eval exception exec false find func: header heapgone help help/ +Builtin cmove> context?? ctrl-c ctx>name data: defer: defer@def dictgone do_cr eleave +Builtin endcase endof eval exception exec false find func: header heapgone help help/ Builtin hex# hide inline{ last lastxt lib libdir literal, makeexename mnotail ms ms@ -Builtin newclass noop nosavedict notail nul of off on p: padchar parse parseln -Builtin parsews rangeof rdepth remains reset reva revaused rol8 rr> scratch setclass sp +Builtin newclass noop nosavedict notail nul of off on p: padchar parse parseln +Builtin parsews rangeof rdepth remains reset reva revaused rol8 rr> scratch setclass sp Builtin strof super> temp time&date true turnkey? undo vfunc: w! w@ Builtin xchg xchg2 xfind xt>name xwords { {{ }} } _+ _1+ _1- pathsep case \|| -" p[ [''] [ ['] +" p[ [''] [ ['] " debugging @@ -116,11 +119,11 @@ syn keyword revadebug .s dump see " syn region revaCharOps start=+."\s+ skip=+\\"+ end=+"+ " char-number conversion -syn keyword revaconversion s>d >digit digit> >single >double >number >float +syn keyword revaconversion s>d >digit digit> >single >double >number >float " contexts -syn keyword revavocs forth macro inline -syn keyword revavocs context: +syn keyword revavocs forth macro inline +syn keyword revavocs context: syn match revavocs /\<\~[^~ ]*/ syn match revavocs /[^~ ]*\~\>/ @@ -135,7 +138,7 @@ syn match revainteger "\<'.\>" " Strings " syn region revaString start=+\.\?\"+ end=+"+ end=+$+ -syn region revaString start=/"/ skip=/\\"/ end=/"/ +syn region revaString start=/"/ skip=/\\"/ end=/"/ " Comments syn region revaComment start='\\S\s' end='.*' contains=revaTodo @@ -187,5 +190,7 @@ if !exists("did_reva_syntax_inits") endif let b:current_syntax = "reva" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim index c2d97dd717..15e3b01700 100644 --- a/runtime/syntax/sshconfig.vim +++ b/runtime/syntax/sshconfig.vim @@ -2,9 +2,7 @@ " Language: OpenSSH client configuration file (ssh_config) " Author: David Necas (Yeti) " Maintainer: Leonard Ehrenfried -" Modified By: Thilo Six -" Originally: 2009-07-09 -" Last Change: 2011 Oct 31 +" Last Change: 2012 Feb 19 " SSH Version: 5.9p1 " @@ -92,7 +90,8 @@ syn match sshconfigNumber "\d\+" syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" - +syn match sshconfigHostPort "\(Host \)\@<=.\+" +syn match sshconfigHostPort "\(HostName \)\@<=.\+" " case off syn case ignore From 707a1bc595aff14c9300152239734b95c9c03cab Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 17:38:00 +0100 Subject: [PATCH 106/115] updated for version 7.3.452 Problem: Undo broken when pasting close to the last line. (Andrey Radev) Solution: Use a flag to remember if the deleted included the last line. (Christian Brabandt) --- src/ops.c | 4 +++- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ops.c b/src/ops.c index 971e3244dd..e8362cd5f5 100644 --- a/src/ops.c +++ b/src/ops.c @@ -1943,12 +1943,14 @@ op_delete(oap) else /* delete characters between lines */ { pos_T curpos; + int delete_last_line; /* save deleted and changed lines for undo */ if (u_save((linenr_T)(curwin->w_cursor.lnum - 1), (linenr_T)(curwin->w_cursor.lnum + oap->line_count)) == FAIL) return FAIL; + delete_last_line = (oap->end.lnum == curbuf->b_ml.ml_line_count); truncate_line(TRUE); /* delete from cursor to end of line */ curpos = curwin->w_cursor; /* remember curwin->w_cursor */ @@ -1956,7 +1958,7 @@ op_delete(oap) del_lines((long)(oap->line_count - 2), FALSE); n = (oap->end.col + 1 - !oap->inclusive); - if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count + if (oap->inclusive && delete_last_line && n > (int)STRLEN(ml_get(oap->end.lnum))) { /* Special case: gH deletes the last line. */ diff --git a/src/version.c b/src/version.c index f9da5db7ac..0b6c063b38 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 452, /**/ 451, /**/ From 4b0ca0a1d40293ceeff86d9a6b64d142d69c35b7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 17:38:00 +0100 Subject: [PATCH 107/115] Added tag v7-3-452 for changeset f1cde9cf023e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index fd6c96ad88..16616965d5 100644 --- a/.hgtags +++ b/.hgtags @@ -1788,3 +1788,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 9ccdc4a69d8ff7aab8abf89f9a3cc9dad12249dd v7-3-449 3479ac596f6c4b38849d2e5235ad590378605eb8 v7-3-450 045fdc5b6056a18579f28b40a4914f4a7cb8d4a3 v7-3-451 +f1cde9cf023e15cd1bc26ae720d6380fa5ceac7d v7-3-452 From de2f4c3db54b1a8ed956868bdfca6024cdd304e9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 17:58:04 +0100 Subject: [PATCH 108/115] updated for version 7.3.453 Problem: Pasting in the command line is slow. Solution: Don't redraw if there is another character to read. (Dominique Pelle) --- src/ex_getln.c | 7 +++++-- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 1f5c873dac..f811889d31 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -1852,8 +1852,11 @@ cmdline_changed: # endif ) /* Always redraw the whole command line to fix shaping and - * right-left typing. Not efficient, but it works. */ - redrawcmd(); + * right-left typing. Not efficient, but it works. + * Do it only when there are no characters left to read + * to avoid useless intermediate redraws. */ + if (vpeekc() == NUL) + redrawcmd(); #endif } diff --git a/src/version.c b/src/version.c index 0b6c063b38..c3d3555ab3 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 453, /**/ 452, /**/ From 1e8827117998c92728a1f1525be328c7fe16b942 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 17:58:04 +0100 Subject: [PATCH 109/115] Added tag v7-3-453 for changeset 791baa7b35e1 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 16616965d5..3e142f4ed4 100644 --- a/.hgtags +++ b/.hgtags @@ -1789,3 +1789,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 3479ac596f6c4b38849d2e5235ad590378605eb8 v7-3-450 045fdc5b6056a18579f28b40a4914f4a7cb8d4a3 v7-3-451 f1cde9cf023e15cd1bc26ae720d6380fa5ceac7d v7-3-452 +791baa7b35e1b6244cdecd4a2feed933f78fd84f v7-3-453 From 4e9d49b9290ece6409c205da9179b221b82827ad Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 18:12:32 +0100 Subject: [PATCH 110/115] updated for version 7.3.454 Problem: Re-allocating memory slows Vim down. Solution: Use realloc() in ga_grow(). (Dominique Pelle) --- src/misc2.c | 16 +++++++--------- src/version.c | 2 ++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/misc2.c b/src/misc2.c index a070a20a5d..8183876505 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -2064,24 +2064,22 @@ ga_grow(gap, n) garray_T *gap; int n; { - size_t len; + size_t old_len; + size_t new_len; char_u *pp; if (gap->ga_maxlen - gap->ga_len < n) { if (n < gap->ga_growsize) n = gap->ga_growsize; - len = gap->ga_itemsize * (gap->ga_len + n); - pp = alloc_clear((unsigned)len); + new_len = gap->ga_itemsize * (gap->ga_len + n); + pp = (gap->ga_data == NULL) + ? alloc(new_len) : vim_realloc(gap->ga_data, new_len); if (pp == NULL) return FAIL; + old_len = gap->ga_itemsize * gap->ga_maxlen; + vim_memset(pp + old_len, 0, new_len - old_len); gap->ga_maxlen = gap->ga_len + n; - if (gap->ga_data != NULL) - { - mch_memmove(pp, gap->ga_data, - (size_t)(gap->ga_itemsize * gap->ga_len)); - vim_free(gap->ga_data); - } gap->ga_data = pp; } return OK; diff --git a/src/version.c b/src/version.c index c3d3555ab3..169b9efe6c 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 454, /**/ 453, /**/ From 1f56fe9b7e76af3001c47dced1a71cab1680f14b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 18:12:32 +0100 Subject: [PATCH 111/115] Added tag v7-3-454 for changeset 1632640a24b4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3e142f4ed4..80b39e5841 100644 --- a/.hgtags +++ b/.hgtags @@ -1790,3 +1790,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 045fdc5b6056a18579f28b40a4914f4a7cb8d4a3 v7-3-451 f1cde9cf023e15cd1bc26ae720d6380fa5ceac7d v7-3-452 791baa7b35e1b6244cdecd4a2feed933f78fd84f v7-3-453 +1632640a24b42a9193eeb8f6e8150afaeee5ee35 v7-3-454 From ba355d185555ef36288fe8c94d3f5e0a87861714 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 18:29:33 +0100 Subject: [PATCH 112/115] updated for version 7.3.455 Problem: Using many continuation lines can be slow. Solution: Adjust the reallocation size to the current length. --- src/ex_cmds2.c | 11 ++++++++++- src/version.c | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 92cd73358e..4e480ecafa 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3448,7 +3448,7 @@ getsourceline(c, cookie, indent) { garray_T ga; - ga_init2(&ga, (int)sizeof(char_u), 200); + ga_init2(&ga, (int)sizeof(char_u), 400); ga_concat(&ga, line); ga_concat(&ga, p + 1); for (;;) @@ -3460,6 +3460,15 @@ getsourceline(c, cookie, indent) p = skipwhite(sp->nextline); if (*p != '\\') break; + /* Adjust the growsize to the current length to speed up + * concatenating many lines. */ + if (ga.ga_len > 400) + { + if (ga.ga_len > 8000) + ga.ga_growsize = 8000; + else + ga.ga_growsize = ga.ga_len; + } ga_concat(&ga, p + 1); } ga_append(&ga, NUL); diff --git a/src/version.c b/src/version.c index 169b9efe6c..7945ffee02 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 455, /**/ 454, /**/ From 916891e2dab11abc1fcde4ebafbaacde0b8e1910 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 18:29:33 +0100 Subject: [PATCH 113/115] Added tag v7-3-455 for changeset e6392f2aed4c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 80b39e5841..968afbcb16 100644 --- a/.hgtags +++ b/.hgtags @@ -1791,3 +1791,4 @@ de050fcc24cfb56a7dc07dd283cc1132d774e7b7 v7-3-443 f1cde9cf023e15cd1bc26ae720d6380fa5ceac7d v7-3-452 791baa7b35e1b6244cdecd4a2feed933f78fd84f v7-3-453 1632640a24b42a9193eeb8f6e8150afaeee5ee35 v7-3-454 +e6392f2aed4c13170664b4ec13dd2d8b3ce968aa v7-3-455 From d40039803345020a956192b7e39107c444bfa010 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 19:13:08 +0100 Subject: [PATCH 114/115] updated for version 7.3.456 Problem: ":tab drop file" has several problems, including moving the current window and opening a new tab for a file that already has a window. Solution: Refactor ":tab drop" handling. (Hirohito Higashi) --- src/buffer.c | 90 +++++++++++++++++++++++++++++++------------ src/testdir/test62.in | 37 ++++++++++++++++++ src/testdir/test62.ok | 3 ++ src/version.c | 2 + 4 files changed, 108 insertions(+), 24 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 75116a91b2..1b5ae9f9a2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4405,7 +4405,12 @@ do_arg_all(count, forceit, keep_tabs) { int i; win_T *wp, *wpnext; - char_u *opened; /* array of flags for which args are open */ + char_u *opened; /* Array of weight for which args are open: + * 0: not opened + * 1: opened in other tab + * 2: opened in curtab + * 3: opened in curtab and curwin + */ int opened_len; /* length of opened[] */ int use_firstwin = FALSE; /* use first window for arglist */ int split_ret = OK; @@ -4414,6 +4419,8 @@ do_arg_all(count, forceit, keep_tabs) buf_T *buf; tabpage_T *tpnext; int had_tab = cmdmod.tab; + win_T *old_curwin, *last_curwin; + tabpage_T *old_curtab, *last_curtab; win_T *new_curwin = NULL; tabpage_T *new_curtab = NULL; @@ -4430,6 +4437,15 @@ do_arg_all(count, forceit, keep_tabs) if (opened == NULL) return; + /* Autocommands may do anything to the argument list. Make sure it's not + * freed while we are working here by "locking" it. We still have to + * watch out for its size to be changed. */ + alist = curwin->w_alist; + ++alist->al_refcount; + + old_curwin = curwin; + old_curtab = curtab; + #ifdef FEAT_GUI need_mouse_correct = TRUE; #endif @@ -4451,36 +4467,51 @@ do_arg_all(count, forceit, keep_tabs) wpnext = wp->w_next; buf = wp->w_buffer; if (buf->b_ffname == NULL - || buf->b_nwindows > 1 + || (!keep_tabs && buf->b_nwindows > 1) #ifdef FEAT_VERTSPLIT || wp->w_width != Columns #endif ) - i = ARGCOUNT; + i = opened_len; else { /* check if the buffer in this window is in the arglist */ - for (i = 0; i < ARGCOUNT; ++i) + for (i = 0; i < opened_len; ++i) { - if (ARGLIST[i].ae_fnum == buf->b_fnum - || fullpathcmp(alist_name(&ARGLIST[i]), - buf->b_ffname, TRUE) & FPC_SAME) + if (i < alist->al_ga.ga_len + && (AARGLIST(alist)[i].ae_fnum == buf->b_fnum + || fullpathcmp(alist_name(&AARGLIST(alist)[i]), + buf->b_ffname, TRUE) & FPC_SAME)) { - if (i < opened_len) + int weight = 1; + + if (old_curtab == curtab) { - opened[i] = TRUE; + ++weight; + if (old_curwin == wp) + ++weight; + } + + if (weight > (int)opened[i]) + { + opened[i] = (char_u)weight; if (i == 0) { + if (new_curwin != NULL) + new_curwin->w_arg_idx = opened_len; new_curwin = wp; new_curtab = curtab; } } - if (wp->w_alist != curwin->w_alist) + else if (keep_tabs) + i = opened_len; + + if (wp->w_alist != alist) { /* Use the current argument list for all windows * containing a file from it. */ alist_unlink(wp->w_alist); - wp->w_alist = curwin->w_alist; + wp->w_alist = alist; ++wp->w_alist->al_refcount; } break; @@ -4489,7 +4520,7 @@ do_arg_all(count, forceit, keep_tabs) } wp->w_arg_idx = i; - if (i == ARGCOUNT && !keep_tabs) /* close this window */ + if (i == opened_len && !keep_tabs)/* close this window */ { if (P_HID(buf) || forceit || buf->b_nwindows > 1 || !bufIsChanged(buf)) @@ -4511,7 +4542,8 @@ do_arg_all(count, forceit, keep_tabs) } #ifdef FEAT_WINDOWS /* don't close last window */ - if (firstwin == lastwin && first_tabpage->tp_next == NULL) + if (firstwin == lastwin + && (first_tabpage->tp_next == NULL || !had_tab)) #endif use_firstwin = TRUE; #ifdef FEAT_WINDOWS @@ -4545,20 +4577,16 @@ do_arg_all(count, forceit, keep_tabs) * Open a window for files in the argument list that don't have one. * ARGCOUNT may change while doing this, because of autocommands. */ - if (count > ARGCOUNT || count <= 0) - count = ARGCOUNT; - - /* Autocommands may do anything to the argument list. Make sure it's not - * freed while we are working here by "locking" it. We still have to - * watch out for its size to be changed. */ - alist = curwin->w_alist; - ++alist->al_refcount; + if (count > opened_len || count <= 0) + count = opened_len; #ifdef FEAT_AUTOCMD /* Don't execute Win/Buf Enter/Leave autocommands here. */ ++autocmd_no_enter; ++autocmd_no_leave; #endif + last_curwin = curwin; + last_curtab = curtab; win_enter(lastwin, FALSE); #ifdef FEAT_WINDOWS /* ":drop all" should re-use an empty window to avoid "--remote-tab" @@ -4568,11 +4596,11 @@ do_arg_all(count, forceit, keep_tabs) use_firstwin = TRUE; #endif - for (i = 0; i < count && i < alist->al_ga.ga_len && !got_int; ++i) + for (i = 0; i < count && i < opened_len && !got_int; ++i) { if (alist == &global_alist && i == global_alist.al_ga.ga_len - 1) arg_had_last = TRUE; - if (i < opened_len && opened[i]) + if (opened[i] > 0) { /* Move the already present window to below the current window */ if (curwin->w_arg_idx != i) @@ -4581,7 +4609,13 @@ do_arg_all(count, forceit, keep_tabs) { if (wpnext->w_arg_idx == i) { - win_move_after(wpnext, curwin); + if (keep_tabs) + { + new_curwin = wpnext; + new_curtab = curtab; + } + else + win_move_after(wpnext, curwin); break; } } @@ -4636,6 +4670,14 @@ do_arg_all(count, forceit, keep_tabs) #ifdef FEAT_AUTOCMD --autocmd_no_enter; #endif + /* restore last referenced tabpage's curwin */ + if (last_curtab != new_curtab) + { + if (valid_tabpage(last_curtab)) + goto_tabpage_tp(last_curtab); + if (win_valid(last_curwin)) + win_enter(last_curwin, FALSE); + } /* to window with first arg */ if (valid_tabpage(new_curtab)) goto_tabpage_tp(new_curtab); diff --git a/src/testdir/test62.in b/src/testdir/test62.in index b813830980..c549c8b438 100644 --- a/src/testdir/test62.in +++ b/src/testdir/test62.in @@ -50,6 +50,43 @@ STARTTEST :call append(line('$'), test_status) :" :" +:" Test for ":tab drop exist-file" to keep current window. +:sp test1 +:tab drop test1 +:let test_status = 'tab drop 1: fail' +:if tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1 +: let test_status = 'tab drop 1: pass' +:endif +:close +:call append(line('$'), test_status) +:" +:" +:" Test for ":tab drop new-file" to keep current window of tabpage 1. +:split +:tab drop newfile +:let test_status = 'tab drop 2: fail' +:if tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1 +: let test_status = 'tab drop 2: pass' +:endif +:tabclose +:q +:call append(line('$'), test_status) +:" +:" +:" Test for ":tab drop multi-opend-file" to keep current tabpage and window. +:new test1 +:tabnew +:new test1 +:tab drop test1 +:let test_status = 'tab drop 3: fail' +:if tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1 +: let test_status = 'tab drop 3: pass' +:endif +:tabclose +:q +:call append(line('$'), test_status) +:" +:" :/^Results/,$w! test.out :qa! ENDTEST diff --git a/src/testdir/test62.ok b/src/testdir/test62.ok index 9a51e44248..7625cd2e2c 100644 --- a/src/testdir/test62.ok +++ b/src/testdir/test62.ok @@ -5,3 +5,6 @@ this is tab page 1 this is tab page 4 gettabvar: pass settabvar: pass +tab drop 1: pass +tab drop 2: pass +tab drop 3: pass diff --git a/src/version.c b/src/version.c index 7945ffee02..f47e7bd16a 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 456, /**/ 455, /**/ From bcba1ace66e3d6fa601a306682e6936d477f36d0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2012 19:13:08 +0100 Subject: [PATCH 115/115] Added tag v7-3-456 for changeset 07fd030f89be --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 968afbcb16..801731bc2c 100644 --- a/.hgtags +++ b/.hgtags @@ -1792,3 +1792,4 @@ f1cde9cf023e15cd1bc26ae720d6380fa5ceac7d v7-3-452 791baa7b35e1b6244cdecd4a2feed933f78fd84f v7-3-453 1632640a24b42a9193eeb8f6e8150afaeee5ee35 v7-3-454 e6392f2aed4c13170664b4ec13dd2d8b3ce968aa v7-3-455 +07fd030f89be62aa11c4ea1a188ee2d8f4348677 v7-3-456