Mirror of the Vim source from https://github.com/vim/vim
Revision | 18f024844150562a9e56522edcad3fc1d5c257e4 (tree) |
---|---|
Zeit | 2005-06-17 06:59:56 |
Autor | vimboss |
Commiter | vimboss |
updated for version 7.0086
@@ -1,4 +1,4 @@ | ||
1 | -*repeat.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 | |
1 | +*repeat.txt* For Vim version 7.0aa. Last change: 2005 Jun 16 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -290,7 +290,7 @@ | ||
290 | 290 | the first line ends in a <CR>, but following ones don't, you will get an error |
291 | 291 | message, because the <CR> from the first lines will be lost. |
292 | 292 | |
293 | -Macintosh: Files that are read with ":source" normally have <CR> <EOL>s. | |
293 | +Mac Classic: Files that are read with ":source" normally have <CR> <EOL>s. | |
294 | 294 | These always work. If you are using a file with <NL> <EOL>s (for example, a |
295 | 295 | file made on Unix), this will be recognized if 'fileformats' is not empty and |
296 | 296 | the first line does not end in a <CR>. Be careful not to use a file with <NL> |
@@ -1,4 +1,4 @@ | ||
1 | -*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 14 | |
1 | +*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 16 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -25,9 +25,9 @@ | ||
25 | 25 | This switches on the 'spell' option and specifies to check for US English. |
26 | 26 | |
27 | 27 | The words that are not recognized are highlighted with one of these: |
28 | - SpellBad word not recognized | |
29 | - SpellRare rare word | |
30 | - SpellLocal wrong spelling for selected region | |
28 | + SpellBad word not recognized |hl-SpellBad| | |
29 | + SpellRare rare word |hl-SpellRare| | |
30 | + SpellLocal wrong spelling for selected region |hl-SpellLocal| | |
31 | 31 | |
32 | 32 | Vim only checks words for spelling, there is no grammar check. |
33 | 33 |
@@ -63,9 +63,10 @@ | ||
63 | 63 | 'spellfile'. In Visual mode the selected characters |
64 | 64 | are added as a word (including white space!). |
65 | 65 | |
66 | - *:spellg* *:spellgood* | |
67 | -:spellg[ood] {word} Add [word} as a good word to 'spellfile'. | |
66 | + *:spe* *:spellgood* | |
67 | +:spe[llgood] {word} Add [word} as a good word to 'spellfile'. | |
68 | 68 | |
69 | + *:spellw* *:spellwrong* | |
69 | 70 | :spellw[rong] {word} Add [word} as a wrong (bad) word to 'spellfile'. |
70 | 71 | |
71 | 72 | After adding a word to 'spellfile' its associated ".spl" file will |
@@ -117,7 +118,7 @@ | ||
117 | 118 | en_us USA |
118 | 119 | |
119 | 120 | Words that are not used in one region but are used in another region are |
120 | -highlighted with |SpellLocal|. | |
121 | +highlighted with SpellLocal |hl-SpellLocal|. | |
121 | 122 | |
122 | 123 | Always use lowercase letters for the language and region names. |
123 | 124 |
@@ -223,7 +224,7 @@ | ||
223 | 224 | http://lingucomponent.openoffice.org/spell_dic.html |
224 | 225 | You can also use a plain word list. |
225 | 226 | |
226 | -:mksp[ell] [-ascii] {outname} {inname} ... *:mksp* *:mkspell* | |
227 | +:mksp[ell][!] [-ascii] {outname} {inname} ... *:mksp* *:mkspell* | |
227 | 228 | Generate a Vim spell file word lists. Example: > |
228 | 229 | :mkspell nl nl_NL.words |
229 | 230 | < |
@@ -233,6 +234,9 @@ | ||
233 | 234 | {outname}.{encoding}.spl. {encoding} is the value of |
234 | 235 | the 'encoding' option. |
235 | 236 | |
237 | + When the output file already exists [!] must be added | |
238 | + to overwrite it. | |
239 | + | |
236 | 240 | When the [-ascii] argument is present, words with |
237 | 241 | non-ascii characters are skipped. The resulting file |
238 | 242 | ends in "ascii.spl". |
@@ -1,4 +1,4 @@ | ||
1 | -*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 14 | |
1 | +*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 16 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -30,6 +30,8 @@ | ||
30 | 30 | *known-bugs* |
31 | 31 | -------------------- Known bugs and current work ----------------------- |
32 | 32 | |
33 | +synID() no longer works. | |
34 | + | |
33 | 35 | Range(0) should return an empty list (Servatius Brandt). |
34 | 36 | |
35 | 37 | :let @= 'asdf' gives confusing error message. Make @= writable? |
@@ -77,6 +79,9 @@ | ||
77 | 79 | Include new PHP indent script from John Wellesz? |
78 | 80 | http://www.vim.org/scripts/download_script.php?src_id=4330 |
79 | 81 | |
82 | +In Vim indenting use synID() to avoid recognizing "|en" in a string as | |
83 | +"|endif". | |
84 | + | |
80 | 85 | autoload: |
81 | 86 | - Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of |
82 | 87 | script names and a help file and produces a script that can be sourced to |
@@ -88,6 +93,9 @@ | ||
88 | 93 | helpfile doc/myscript.txt |
89 | 94 | For the "helpfile" item ":helptags" is run. |
90 | 95 | |
96 | +For List comparing, consider [4] and ['4'] different? (Servatius Brandt) | |
97 | +Also allows strict comparing for ordinary variables. | |
98 | + | |
91 | 99 | Patch to alternate fold highlighting. (Anthony Iano-Fletcher, 2005 May 12) |
92 | 100 | More levels? |
93 | 101 |
@@ -105,9 +113,18 @@ | ||
105 | 113 | - Code for making suggestions: |
106 | 114 | - Aspell has the "special" character, useful? |
107 | 115 | - The score is a bit wrong for substituting multi-byte characters. |
116 | + At the head byte remember how may bytes are still to follow, do | |
117 | + the scoring at the tail byte. But don't even try when the score | |
118 | + plus the minimal penalty (similar char) goes over maximum. | |
108 | 119 | - similar_chars() is too slow. |
109 | - - Swapping works with bytes instead of characters. | |
110 | - - The sound-folding doesn't work for multi-byte characters. | |
120 | + use a lookuptable for single-byte | |
121 | + use a hashtable for multi-byte | |
122 | + support letter appearing in several lists? | |
123 | + - When putting map string in .spl file check for duplicate chars. | |
124 | + - GUI: Selecting text doesn't work at the prompt. | |
125 | + - Should "z?" replacement be redo-able with "."? | |
126 | + - The sound-folding doesn't work for multi-byte characters. It's | |
127 | + very slow too. Prepare the table (remove alternatives)? | |
111 | 128 | - Also put list of word characters in word list file. Otherwise the |
112 | 129 | one for Italian may differ from the one used for English. |
113 | 130 | - Make "en-rare" spell file. |
@@ -182,6 +199,7 @@ | ||
182 | 199 | - Put the list of choices right under the place where they would be |
183 | 200 | inserted. |
184 | 201 | - Pre-expand abbreviations, show which abbrevs would match? |
202 | + - Completion in .NET framework SharpDevelop: http://www.icsharpcode.net | |
185 | 203 | - UNDO TREE: keep all states of the text, don't delete undo info. |
186 | 204 | When making a change, instead of clearing any future undo (thus redo) |
187 | 205 | info, make a new branch. |
@@ -288,7 +306,7 @@ | ||
288 | 306 | |
289 | 307 | Win32: Patch for Korean IME. (Yusung, 2005 March 21) |
290 | 308 | |
291 | -When "= evaluation results in a list, use it as a sequence of lines. | |
309 | +When "= evaluation results in a List, use it as a sequence of lines. | |
292 | 310 | |
293 | 311 | Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug |
294 | 312 | 2004). Should also work for 'filetype'. |
@@ -1,4 +1,4 @@ | ||
1 | -*version7.txt* For Vim version 7.0aa. Last change: 2005 Jun 13 | |
1 | +*version7.txt* For Vim version 7.0aa. Last change: 2005 Jun 15 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -657,6 +657,10 @@ | ||
657 | 657 | Added ":scriptnames" to bugreport.vim, so that we can see what plugins were |
658 | 658 | used. |
659 | 659 | |
660 | +Win32: If the user changes the setting for the number of lines a scroll wheel | |
661 | +click scrolls it is now used immediately. Previously Vim would need to be | |
662 | +restarted. | |
663 | + | |
660 | 664 | ============================================================================== |
661 | 665 | COMPILE TIME CHANGES *compile-changes-7* |
662 | 666 |
@@ -1,7 +1,7 @@ | ||
1 | 1 | " Vim support file to detect file types |
2 | 2 | " |
3 | 3 | " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 | -" Last Change: 2005 May 20 | |
4 | +" Last Change: 2005 Jun 16 | |
5 | 5 | |
6 | 6 | " Listen very carefully, I will say this only once |
7 | 7 | if exists("did_load_filetypes") |
@@ -543,6 +543,9 @@ | ||
543 | 543 | " Exports |
544 | 544 | au BufNewFile,BufRead exports setf exports |
545 | 545 | |
546 | +" Factor | |
547 | +au BufNewFile,BufRead *.factor setf factor | |
548 | + | |
546 | 549 | " Fetchmail RC file |
547 | 550 | au BufNewFile,BufRead .fetchmailrc setf fetchmail |
548 | 551 |
@@ -1,173 +1,173 @@ | ||
1 | -" Vim indent file | |
2 | -" Language: Pascal | |
3 | -" Maintainer: Neil Carter <n.carter@swansea.ac.uk> | |
4 | -" Created: 2004 Jul 13 | |
5 | -" Last Change: 2005 Jun 07 | |
6 | -" TODO: Reduce indentation on line after a statement that flowed across | |
7 | -" two lines (e.g. parameter list closed on second line). Also, increase | |
8 | -" indent of a becomes-statement that flows onto second line. | |
9 | - | |
10 | -" Only load this indent file when no other was loaded. | |
11 | -if exists("b:did_indent") | |
12 | - finish | |
13 | -endif | |
14 | -let b:did_indent = 1 | |
15 | - | |
16 | -setlocal indentexpr=GetPascalIndent(v:lnum) | |
17 | -" Appending an & to an option sets it to its default value. | |
18 | -setlocal indentkeys& | |
19 | -setlocal indentkeys+=~end;,=~const,=~type,=~var,=~begin,=~repeat,=~until,=~for | |
20 | -setlocal indentkeys+=~program,=~function,=~procedure,=~object,=~private | |
21 | -setlocal indentkeys+=~record,=~if,=~else,=~case | |
22 | - | |
23 | -if exists("*GetPascalIndent") | |
24 | - finish | |
25 | -endif | |
26 | - | |
27 | - | |
28 | -function s:GetPrevLineNum( line_num ) | |
29 | - | |
30 | - " Skip over comments and conditional directives | |
31 | - let SKIP_LINES = '^\s*\((\*\)\|\(\*\ \)\|\(\*)\)\|\({\$\)' | |
32 | - | |
33 | - let nline = a:line_num | |
34 | - while nline > 0 | |
35 | - let nline = prevnonblank(nline-1) | |
36 | - if getline(nline) !~? SKIP_LINES | |
37 | - break | |
38 | - endif | |
39 | - endwhile | |
40 | - | |
41 | -" call input( "nline = ".nline ) | |
42 | - | |
43 | - return nline | |
44 | - | |
45 | -endfunction | |
46 | - | |
47 | - | |
48 | -function! GetPascalIndent( line_num ) | |
49 | - if a:line_num == 0 | |
50 | - return 0 | |
51 | - endif | |
52 | - | |
53 | - " If in the middle of a three-part comment | |
54 | - if getline( a:line_num ) =~ '^\s*\*\ ' | |
55 | - return indent( a:line_num ) | |
56 | - endif | |
57 | - | |
58 | - " We have to subtract one to start on the line before the current | |
59 | - " one. Otherwise, prevnonblank() returns the current line! | |
60 | - let prev_line_num = s:GetPrevLineNum( a:line_num ) | |
61 | - let prev_line = getline( prev_line_num ) | |
62 | - let indnt = indent( prev_line_num ) | |
63 | - | |
64 | - let this_line = getline( a:line_num ) | |
65 | - | |
66 | - " At the start of a block, we have to indent the newly-created line | |
67 | - " based on the previous line. | |
68 | - " =~ means matches a regular expression | |
69 | - " a question mark after =~ means ignore case (# means match case) | |
70 | - " const, type, var should always appear at the start of a line, but | |
71 | - " begin can appear anywhere in the line. | |
72 | - " if one of the following keywords appear in the previous line with | |
73 | - " nothing before it but optional whitespace, and nothing after it. | |
74 | - " Has to be end of line at end to show this is not a routine | |
75 | - " parameter list. Otherwise, you'd end up with cascading vars. | |
76 | - | |
77 | - " These words appear alone on a line (apart from whitespace). | |
78 | - if prev_line =~ '^\s*\(const\|var\|begin\|repeat\|private\)$' | |
79 | - " Place an & before an option to obtain its value. | |
80 | - let indnt = indnt + &shiftwidth | |
81 | - endif | |
82 | - | |
83 | - " Words preceded by optional whitespace and followed by anything. | |
84 | - if prev_line =~ '^\s*\(for\|if\|else\|case\)' | |
85 | - " Place an & before an option to obtain its value. | |
86 | - let indnt = indnt + &shiftwidth | |
87 | - " if this is a multistatement block then we need to align the | |
88 | - " begin with the previous line. | |
89 | - if this_line =~ '^\s*begin' | |
90 | - let indnt = indnt - &shiftwidth | |
91 | - endif | |
92 | - endif | |
93 | - " These words may have text before them on the line (hence the .*). | |
94 | - if prev_line =~ '^.*\s*\<\(object\|record\)\>$' | |
95 | - let indnt = indnt + &shiftwidth | |
96 | - endif | |
97 | - " If we have opened a bracket and the contents spills over one line, | |
98 | - " then indent one level beyond the bracket's first line. RE = an | |
99 | - " opening bracket followed by any amount of anything other than a | |
100 | - " closing bracket and then the end-of-line. If we didn't include the | |
101 | - " end of line, this RE would match even closed brackets, since it | |
102 | - " would match everything up to the closing bracket. | |
103 | - " This test isn't clever enough to handle brackets inside strings or | |
104 | - " comments. | |
105 | - if prev_line =~ '([^*][^)]*$' | |
106 | - let indnt = indnt + &shiftwidth | |
107 | - endif | |
108 | - | |
109 | - " If we just closed a bracket that started on a previous line, then | |
110 | - " unindent. | |
111 | - if prev_line =~ '^[^(]*[^*])' | |
112 | - let indnt = indnt - &shiftwidth | |
113 | - endif | |
114 | - | |
115 | - " At the end of a block, we have to unindent both the current line | |
116 | - " (the 'end;' for instance) and the newly-created line. | |
117 | - if this_line =~ '^\s*\(end;\|until\|else\)' | |
118 | - let indnt = indnt - &shiftwidth | |
119 | - endif | |
120 | - | |
121 | - " Keywords that always appear at the start of a line. | |
122 | - " Problem is that function and procedure keywords should be indented | |
123 | - " if within a class declaration. | |
124 | - if this_line =~ '^\s*\<type\|uses\|$IFDEF\|$ENDIF\|procedure\|function\>' | |
125 | - let indnt = 0 | |
126 | - endif | |
127 | - if prev_line =~ '^\s*\<type\|uses\>' | |
128 | - let indnt = &shiftwidth | |
129 | - endif | |
130 | - | |
131 | - " Put conditional compile directives on first column. | |
132 | - if this_line =~ '^\s*{\$' | |
133 | - let indnt = 0 | |
134 | - endif | |
135 | - | |
136 | - return indnt | |
137 | -endfunction | |
138 | - | |
139 | -" TODO: end; should align with the previous (begin/record/object/else). | |
140 | -" "else begin" is the only case where begin does not appear at the start | |
141 | -" of the line. | |
142 | - | |
143 | -" TODO: Don't align with {$IFDEF} | |
144 | - | |
145 | -"Example from vb.vim | |
146 | -" regular expression match, case insensitive | |
147 | -"if previous_line =~? | |
148 | -" start of line, zero or more whitespace | |
149 | -"'^\s* | |
150 | -" start of word | |
151 | -"\< | |
152 | -" | |
153 | -"\( | |
154 | -" begin\| | |
155 | -" \%( | |
156 | -" \%( | |
157 | -" private\|public\|friend | |
158 | -" \) | |
159 | -" \s\+ | |
160 | -" \) | |
161 | -" zero or more of the previous atom | |
162 | -" \= | |
163 | -" \%( | |
164 | -" function\|sub\|property | |
165 | -" \) | |
166 | -" \|select\|case\|default\|if | |
167 | -"\> | |
168 | -" .\{-}\<then\>\s*$\|else\|elseif\|do\|for\|while\|enum\|with | |
169 | -"\) | |
170 | -" end of word | |
171 | -"\>' | |
172 | -" let ind = ind + &sw | |
173 | -"endif | |
1 | +" Vim indent file | |
2 | +" Language: Pascal | |
3 | +" Maintainer: Neil Carter <n.carter@swansea.ac.uk> | |
4 | +" Created: 2004 Jul 13 | |
5 | +" Last Change: 2005 Jun 15 | |
6 | + | |
7 | + | |
8 | +if exists("b:did_indent") | |
9 | + finish | |
10 | +endif | |
11 | +let b:did_indent = 1 | |
12 | + | |
13 | +setlocal indentexpr=GetPascalIndent(v:lnum) | |
14 | +setlocal indentkeys& | |
15 | +setlocal indentkeys+==end;,==const,==type,==var,==begin,==repeat,==until,==for | |
16 | +setlocal indentkeys+==program,==function,==procedure,==object,==private | |
17 | +setlocal indentkeys+==record,==if,==else,==case | |
18 | + | |
19 | +if exists("*GetPascalIndent") | |
20 | + finish | |
21 | +endif | |
22 | + | |
23 | + | |
24 | +function! s:GetPrevNonCommentLineNum( line_num ) | |
25 | + | |
26 | + " Skip lines starting with a comment | |
27 | + let SKIP_LINES = '^\s*\(\((\*\)\|\(\*\ \)\|\(\*)\)\|{\|}\)' | |
28 | + | |
29 | + let nline = a:line_num | |
30 | + while nline > 0 | |
31 | + let nline = prevnonblank(nline-1) | |
32 | + if getline(nline) !~? SKIP_LINES | |
33 | + break | |
34 | + endif | |
35 | + endwhile | |
36 | + | |
37 | + return nline | |
38 | +endfunction | |
39 | + | |
40 | + | |
41 | +function! GetPascalIndent( line_num ) | |
42 | + " Line 0 always goes at column 0 | |
43 | + if a:line_num == 0 | |
44 | + return 0 | |
45 | + endif | |
46 | + | |
47 | + let this_codeline = getline( a:line_num ) | |
48 | + | |
49 | + " If in the middle of a three-part comment | |
50 | + if this_codeline =~ '^\s*\*' | |
51 | + return indent( a:line_num ) | |
52 | + endif | |
53 | + | |
54 | + let prev_codeline_num = s:GetPrevNonCommentLineNum( a:line_num ) | |
55 | + let prev_codeline = getline( prev_codeline_num ) | |
56 | + let indnt = indent( prev_codeline_num ) | |
57 | + | |
58 | + " Compiler directives should always go in column zero. | |
59 | + if this_codeline =~ '^\s*{\(\$IFDEF\|\$ELSE\|\$ENDIF\)' | |
60 | + return 0 | |
61 | + endif | |
62 | + | |
63 | + " These items have nothing before or after (not even a comment), and | |
64 | + " go on column 0. Make sure that the ^\s* is followed by \( to make | |
65 | + " ORs work properly, and not include the start of line (this must | |
66 | + " always appear). | |
67 | + " The bracketed expression with the underline is a routine | |
68 | + " separator. This is one case where we do indent comment lines. | |
69 | + if this_codeline =~ '^\s*\((\*\ _\+\ \*)\|\<\(const\|var\)\>\)$' | |
70 | + return 0 | |
71 | + endif | |
72 | + | |
73 | + " These items may have text after them, and go on column 0 (in most | |
74 | + " cases). The problem is that "function" and "procedure" keywords | |
75 | + " should be indented if within a class declaration. | |
76 | + if this_codeline =~ '^\s*\<\(program\|type\|uses\|procedure\|function\)\>' | |
77 | + return 0 | |
78 | + endif | |
79 | + | |
80 | + " BEGIN | |
81 | + " If the begin does not come after "if", "for", or "else", then it | |
82 | + " goes in column 0 | |
83 | + if this_codeline =~ '^\s*begin\>' && prev_codeline !~ '^\s*\<\(if\|for\|else\)\>' | |
84 | + return 0 | |
85 | + endif | |
86 | + | |
87 | + " These keywords are indented once only. | |
88 | + if this_codeline =~ '^\s*\<\(private\)\>' | |
89 | + return &shiftwidth | |
90 | + endif | |
91 | + | |
92 | + " If the PREVIOUS LINE contained these items, the current line is | |
93 | + " always indented once. | |
94 | + if prev_codeline =~ '^\s*\<\(type\|uses\)\>' | |
95 | + return &shiftwidth | |
96 | + endif | |
97 | + | |
98 | + " These keywords are indented once only. Possibly surrounded by | |
99 | + " other chars. | |
100 | + if this_codeline =~ '^.\+\<\(object\|record\)\>' | |
101 | + return &shiftwidth | |
102 | + endif | |
103 | + | |
104 | + " If the previous line was indenting... | |
105 | + if prev_codeline =~ '^\s*\<\(for\|if\|case\|else\|end\ else\)\>' | |
106 | + " then indent. | |
107 | + let indnt = indnt + &shiftwidth | |
108 | + " BUT... if this is the start of a multistatement block then we | |
109 | + " need to align the begin with the previous line. | |
110 | + if this_codeline =~ '^\s*begin\>' | |
111 | + return indnt - &shiftwidth | |
112 | + endif | |
113 | + | |
114 | + " We also need to keep the indentation level constant if the | |
115 | + " whole if-then statement was on one line. | |
116 | + if prev_codeline =~ '\<then\>.\+' | |
117 | + let indnt = indnt - &shiftwidth | |
118 | + endif | |
119 | + endif | |
120 | + | |
121 | + " PREVIOUS-LINE BEGIN | |
122 | + " If the previous line was an indenting keyword then indent once... | |
123 | + if prev_codeline =~ '^\s*\<\(const\|var\|begin\|repeat\|private\)\>' | |
124 | + " But only if this is another var in a list. | |
125 | + if this_codeline !~ '^\s*var\>' | |
126 | + return indnt + &shiftwidth | |
127 | + endif | |
128 | + endif | |
129 | + | |
130 | + " PREVIOUS-LINE BEGIN | |
131 | + " Indent code after a case statement begin | |
132 | + if prev_codeline =~ '\:\ begin\>' | |
133 | + return indnt + &shiftwidth | |
134 | + endif | |
135 | + | |
136 | + " These words may have text before them on the line (hence the .*) | |
137 | + " but are followed by nothing. Always indent once only. | |
138 | + if prev_codeline =~ '^\(.*\|\s*\)\<\(object\|record\)\>$' | |
139 | + return indnt + &shiftwidth | |
140 | + endif | |
141 | + | |
142 | + " If we just closed a bracket that started on a previous line, then | |
143 | + " unindent. But don't return yet -- we need to check for further | |
144 | + " unindentation (for end/until/else) | |
145 | + if prev_codeline =~ '^[^(]*[^*])' | |
146 | + let indnt = indnt - &shiftwidth | |
147 | + endif | |
148 | + | |
149 | + " At the end of a block, we have to unindent both the current line | |
150 | + " (the "end" for instance) and the newly-created line. | |
151 | + if this_codeline =~ '^\s*\<\(end\|until\|else\)\>' | |
152 | + return indnt - &shiftwidth | |
153 | + endif | |
154 | + | |
155 | + " If we have opened a bracket and it continues over one line, | |
156 | + " then indent once. | |
157 | + " | |
158 | + " RE = an opening bracket followed by any amount of anything other | |
159 | + " than a closing bracket and then the end-of-line. | |
160 | + " | |
161 | + " If we didn't include the end of line, this RE would match even | |
162 | + " closed brackets, since it would match everything up to the closing | |
163 | + " bracket. | |
164 | + " | |
165 | + " This test isn't clever enough to handle brackets inside strings or | |
166 | + " comments. | |
167 | + if prev_codeline =~ '([^*]\=[^)]*$' | |
168 | + return indnt + &shiftwidth | |
169 | + endif | |
170 | + | |
171 | + return indnt | |
172 | +endfunction | |
173 | + |
@@ -1,7 +1,7 @@ | ||
1 | 1 | " Vim indent file |
2 | 2 | " Language: Vim script |
3 | 3 | " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 | -" Last Change: 2005 Feb 25 | |
4 | +" Last Change: 2005 Jun 16 | |
5 | 5 | |
6 | 6 | " Only load this indent file when no other was loaded. |
7 | 7 | if exists("b:did_indent") |
@@ -51,8 +51,8 @@ | ||
51 | 51 | endif |
52 | 52 | |
53 | 53 | " If the previous line contains an "end" after a pipe, but not in an ":au" |
54 | - " command. | |
55 | - if getline(lnum) =~ '|\s*\(ene\@!\)' && getline(lnum) !~ '^\s*au\%[tocmd]' | |
54 | + " command. And not when there is a backslash before the pipe. | |
55 | + if getline(lnum) =~ '[^\\]|\s*\(ene\@!\)' && getline(lnum) !~ '^\s*au\%[tocmd]' | |
56 | 56 | let ind = ind - &sw |
57 | 57 | endif |
58 | 58 |
@@ -498,6 +498,18 @@ | ||
498 | 498 | _OnScroll(hwnd, hwndCtl, zDelta >= 0 ? SB_PAGEUP : SB_PAGEDOWN, 0); |
499 | 499 | } |
500 | 500 | |
501 | +/* | |
502 | + * Invoked when a setting was changed. | |
503 | + */ | |
504 | + static LRESULT CALLBACK | |
505 | +_OnSettingChange(UINT n) | |
506 | +{ | |
507 | + if (n == SPI_SETWHEELSCROLLLINES) | |
508 | + SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, | |
509 | + &mouse_scroll_lines, 0); | |
510 | + return 0; | |
511 | +} | |
512 | + | |
501 | 513 | #if 0 /* disabled, a gap appears below and beside the window, and the window |
502 | 514 | can be moved (in a strange way) */ |
503 | 515 | /* |
@@ -686,6 +698,10 @@ | ||
686 | 698 | _OnMouseWheel(hwnd, HIWORD(wParam)); |
687 | 699 | break; |
688 | 700 | |
701 | + /* Notification for change in SystemParametersInfo() */ | |
702 | + case WM_SETTINGCHANGE: | |
703 | + return _OnSettingChange((UINT)wParam); | |
704 | + | |
689 | 705 | #ifdef FEAT_TOOLBAR |
690 | 706 | case WM_NOTIFY: |
691 | 707 | switch (((LPNMHDR) lParam)->code) |
@@ -94,4 +94,6 @@ | ||
94 | 94 | int pathcmp __ARGS((const char *p, const char *q, int maxlen)); |
95 | 95 | char_u *parse_list_options __ARGS((char_u *option_str, option_table_T *table, int table_size)); |
96 | 96 | int filewritable __ARGS((char_u *fname)); |
97 | +int emsg3 __ARGS((char_u *s, char_u *a1, char_u *a2)); | |
98 | +int emsgn __ARGS((char_u *s, long n)); | |
97 | 99 | /* vim: set ft=c : */ |
@@ -2224,7 +2224,7 @@ | ||
2224 | 2224 | int instr = FALSE; /* inside of string */ |
2225 | 2225 | |
2226 | 2226 | p = line; /* scan from start */ |
2227 | - while ((p = vim_strpbrk(p, "\";")) != NULL) | |
2227 | + while ((p = vim_strpbrk(p, (char_u *)"\";")) != NULL) | |
2228 | 2228 | { |
2229 | 2229 | if (*p == '"') |
2230 | 2230 | { |
@@ -36,5 +36,5 @@ | ||
36 | 36 | #define VIM_VERSION_NODOT "vim70aa" |
37 | 37 | #define VIM_VERSION_SHORT "7.0aa" |
38 | 38 | #define VIM_VERSION_MEDIUM "7.0aa ALPHA" |
39 | -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 14)" | |
40 | -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 14, compiled " | |
39 | +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 16)" | |
40 | +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 16, compiled " |