1
0
forked from aniani/vim

updated for version 7.0098

This commit is contained in:
Bram Moolenaar 2005-06-30 22:04:15 +00:00
parent e6b165e0f4
commit d042c56e34
19 changed files with 139 additions and 96 deletions

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2005 Jun 28 *options.txt* For Vim version 7.0aa. Last change: 2005 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1443,7 +1443,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|fold-marker|. |fold-marker|.
*'compatible'* *'cp'* *'nocompatible'* *'nocp'* *'compatible'* *'cp'* *'nocompatible'* *'nocp'*
'compatible' 'cp' boolean (default on, off when a .vimrc file is found) 'compatible' 'cp' boolean (default on, off when a .vimrc or .gvimrc file
is found)
global global
{not in Vi} {not in Vi}
This option has the effect of making Vim either more Vi-compatible, or This option has the effect of making Vim either more Vi-compatible, or
@ -1458,12 +1459,13 @@ A jump table for the options with a short description can be found at |Q_op|.
options. This default was chosen for those people who want to use Vim options. This default was chosen for those people who want to use Vim
just like Vi, and don't even (want to) know about the 'compatible' just like Vi, and don't even (want to) know about the 'compatible'
option. option.
When a ".vimrc" file is found while Vim is starting up, this option is When a ".vimrc" or ".gvimrc" file is found while Vim is starting up,
switched off, and all options that have not been modified will be set this option is switched off, and all options that have not been
to the Vim defaults. Effectively, this means that when a ".vimrc" modified will be set to the Vim defaults. Effectively, this means
file exists, Vim will use the Vim defaults, otherwise it will use the that when a ".vimrc" or ".gvimrc" file exists, Vim will use the Vim
Vi defaults. (Note: This doesn't happen for the system-wide vimrc defaults, otherwise it will use the Vi defaults. (Note: This doesn't
file). Also see |compatible-default| and |posix-compliance|. happen for the system-wide vimrc or gvimrc file). Also see
|compatible-default| and |posix-compliance|.
You can also set this option with the "-C" argument, and reset it with You can also set this option with the "-C" argument, and reset it with
"-N". See |-C| and |-N|. "-N". See |-C| and |-N|.
Switching this option off makes the Vim defaults be used for options Switching this option off makes the Vim defaults be used for options

View File

@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 29 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -7,8 +7,9 @@
Spell checking *spell* Spell checking *spell*
1. Quick start |spell-quickstart| 1. Quick start |spell-quickstart|
2. Generating a spell file |spell-mkspell| 2. Remarks on spell checking |spell-remarks|
3. Spell file format |spell-file-format| 3. Generating a spell file |spell-mkspell|
4. Spell file format |spell-file-format|
{Vi does not have any of these commands} {Vi does not have any of these commands}
@ -36,8 +37,6 @@ To search for the next misspelled word:
*]s* *E756* *]s* *E756*
]s Move to next misspelled word after the cursor. ]s Move to next misspelled word after the cursor.
A count before the command can be used to repeat. A count before the command can be used to repeat.
This uses the @Spell and @NoSpell clusters from syntax
highlighting, see |spell-syntax|.
*[s* *[s*
[s Like "]s" but search backwards, find the misspelled [s Like "]s" but search backwards, find the misspelled
@ -72,9 +71,9 @@ zw Add word under the cursor as a wrong (bad) word to
:spellw[rong] {word} Add [word} as a wrong (bad) word to 'spellfile'. :spellw[rong] {word} Add [word} as a wrong (bad) word to 'spellfile'.
After adding a word to 'spellfile' with the above commands its associated After adding a word to 'spellfile' with the above commands its associated
".spl" file will automatically be updated. If you edit 'spellfile' manually ".spl" file will automatically be updated and reloaded. If you change
you need to use the |:mkspell| command. This sequence of commands mostly 'spellfile' manually you need to use the |:mkspell| command. This sequence of
works well: > commands mostly works well: >
:exe 'e ' . &spellfile :exe 'e ' . &spellfile
< (make changes to the spell file) > < (make changes to the spell file) >
:mkspell! % :mkspell! %
@ -83,12 +82,11 @@ More details about the 'spellfile' format below |spell-wordlist-format|.
Finding suggestions for bad words: Finding suggestions for bad words:
*z?* *z?*
z? For the word under/after the cursor suggest correctly z? For the word under/after the cursor suggest correctly
spelled words. This also works to find alternative spelled words. This also works to find alternatives
for words that are not highlighted as bad words, e.g., for a word that is not highlighted as a bad word,
when the word after it is bad. e.g., when the word after it is bad.
The results are sorted on similarity to the word The results are sorted on similarity to the word
under/after the cursor. under/after the cursor.
This may take a long time. Hit CTRL-C when you are This may take a long time. Hit CTRL-C when you are
@ -99,7 +97,7 @@ z? For the word under/after the cursor suggest correctly
<Enter> if you don't want to replace. You can also <Enter> if you don't want to replace. You can also
use the mouse to click on your choice (only works if use the mouse to click on your choice (only works if
the mouse can be used in Normal mode and when there the mouse can be used in Normal mode and when there
are no line wraps!). Click on the first (header) line are no line wraps). Click on the first (header) line
to cancel. to cancel.
If 'verbose' is non-zero a score will be displayed to If 'verbose' is non-zero a score will be displayed to
indicate the likeliness to the badly spelled word (the indicate the likeliness to the badly spelled word (the
@ -115,17 +113,18 @@ z? For the word under/after the cursor suggest correctly
The 'spellsuggest' option influences how the list of suggestions is generated The 'spellsuggest' option influences how the list of suggestions is generated
and sorted. See |'spellsuggest'|. and sorted. See |'spellsuggest'|.
==============================================================================
2. Remarks on spell checking *spell-remarks*
PERFORMANCE PERFORMANCE
Note that Vim does on-the-fly spell checking. To make this work fast the word Vim does on-the-fly spell checking. To make this work fast the word list is
list is loaded in memory. Thus this uses a lot of memory (1 Mbyte or more). loaded in memory. Thus this uses a lot of memory (1 Mbyte or more). There
There might also be a noticeable delay when the word list is loaded, which might also be a noticeable delay when the word list is loaded, which happens
happens when 'spell' is set and when 'spelllang' is set while 'spell' was when 'spell' is set and when 'spelllang' is set while 'spell' was already set.
already set. To minimize the delay each word list is only loaded once, it To minimize the delay each word list is only loaded once, it is not deleted
is not deleted when 'spelllang' is made empty or 'spell' is reset. When when 'spelllang' is made empty or 'spell' is reset. When 'encoding' is set
'encoding' is set all the word lists are reloaded, thus you may notice a delay all the word lists are reloaded, thus you may notice a delay then too.
then too.
REGIONS REGIONS
@ -272,9 +271,10 @@ find these functions useful:
spellbadword() find badly spelled word at the cursor spellbadword() find badly spelled word at the cursor
spellsuggest() get list of spelling suggestions spellsuggest() get list of spelling suggestions
soundfold() get the sound-a-like version of a word
============================================================================== ==============================================================================
2. Generating a spell file *spell-mkspell* 3. Generating a spell file *spell-mkspell*
Vim uses a binary file format for spelling. This greatly speeds up loading Vim uses a binary file format for spelling. This greatly speeds up loading
the word list and keeps it small. the word list and keeps it small.
@ -284,7 +284,7 @@ uses. Myspell is used by OpenOffice.org and Mozilla. You should be able to
find them here: find them here:
http://lingucomponent.openoffice.org/spell_dic.html http://lingucomponent.openoffice.org/spell_dic.html
You can also use a plain word list. The results are the same, the choice You can also use a plain word list. The results are the same, the choice
depends on what you find. depends on what word lists you can find.
Make sure your current locale is set properly, otherwise Vim doesn't know what Make sure your current locale is set properly, otherwise Vim doesn't know what
characters are upper/lower case letters. If the locale isn't available (e.g., characters are upper/lower case letters. If the locale isn't available (e.g.,
@ -296,7 +296,7 @@ then Vim will try to guess.
*:mksp* *:mkspell* *:mksp* *:mkspell*
:mksp[ell][!] [-ascii] {outname} {inname} ... :mksp[ell][!] [-ascii] {outname} {inname} ...
Generate a Vim spell file word lists. Example: > Generate a Vim spell file word lists. Example: >
:mkspell nl nl_NL.words :mkspell /tmp/nl nl_NL.words
< *E751* < *E751*
When {outname} ends in ".spl" it is used as the output When {outname} ends in ".spl" it is used as the output
file name. Otherwise it should be a language name, file name. Otherwise it should be a language name,
@ -304,7 +304,7 @@ then Vim will try to guess.
written will be "{outname}.{encoding}.spl", where written will be "{outname}.{encoding}.spl", where
{encoding} is the value of the 'encoding' option. {encoding} is the value of the 'encoding' option.
When the output file already exists [!] must be added When the output file already exists [!] must be used
to overwrite it. to overwrite it.
When the [-ascii] argument is present, words with When the [-ascii] argument is present, words with
@ -330,18 +330,18 @@ then Vim will try to guess.
the optimal word tree (Polish requires a few hundred the optimal word tree (Polish requires a few hundred
Mbyte). The final result will be much smaller. Mbyte). The final result will be much smaller.
When the spell file was written all currently used After the spell file was written and it was being used
spell files will be reloaded. in a buffer it will be reloaded automatically.
:mksp[ell] [-ascii] {name}.{enc}.add :mksp[ell] [-ascii] {name}.{enc}.add
Like ":mkspell" above, using {name}.{enc}.add as the Like ":mkspell" above, using {name}.{enc}.add as the
input file and producing an output file that has input file and producing an output file in the same
".spl" appended. directory that has ".spl" appended.
:mksp[ell] [-ascii] {name} :mksp[ell] [-ascii] {name}
Like ":mkspell" above, using {name} as the input file Like ":mkspell" above, using {name} as the input file
and producing an output file that has ".{enc}.spl" and producing an output file in the same directory
appended. that has ".{enc}.spl" appended.
Since you might want to change a Myspell word list for use with Vim the Since you might want to change a Myspell word list for use with Vim the
following procedure is recommended: following procedure is recommended:
@ -351,9 +351,11 @@ following procedure is recommended:
3. Change the xx_YY.aff and xx_YY.dic files to remove bad words, add missing 3. Change the xx_YY.aff and xx_YY.dic files to remove bad words, add missing
words, define word characters with FOL/LOW/UPP, etc. The distributed words, define word characters with FOL/LOW/UPP, etc. The distributed
"src/spell/*.diff" files can be used. "src/spell/*.diff" files can be used.
4. Set 'encoding' to the desired encoding and use |:mkspell| to generate the 4. Start Vim with the right locale and use |:mkspell| to generate the Vim
Vim spell file. spell file.
5. Try out the spell file with ":set spell spelllang=xx_YY". 5. Try out the spell file with ":set spell spelllang=xx" if you wrote it in
a spell directory in 'runtimepath, or ":set spelllang=xx.enc.spl" if you
wrote it somewhere else.
When the Myspell files are updated you can merge the differences: When the Myspell files are updated you can merge the differences:
1. Obtain the new Myspell files as xx_YY.new.aff and xx_UU.new.dic. 1. Obtain the new Myspell files as xx_YY.new.aff and xx_UU.new.dic.
@ -372,8 +374,8 @@ used spelling files, use this command:
*:spelldump* *:spelld* *:spelldump* *:spelld*
:spelld[ump] Open a new window and fill it with all currently valid :spelld[ump] Open a new window and fill it with all currently valid
words. words.
Note: For some languages the result may be huge and Note: For some languages the result may be enormous,
Vim may run out of memory. causing Vim to run out of memory.
The format of the word list is used |spell-wordlist-format|. You should be The format of the word list is used |spell-wordlist-format|. You should be
able to read it with ":mkspell" to generate one .spl file that includes all able to read it with ":mkspell" to generate one .spl file that includes all
@ -382,46 +384,59 @@ the words.
Only words for the current region are included. No "/regions" line is Only words for the current region are included. No "/regions" line is
generated. generated.
Comment lines are used to indicate which .spl file the words came from. Comment lines with the name of the .spl file are used as a header above the
words that were generated from that .spl file.
============================================================================== ==============================================================================
3. Spell file format *spell-file-format* 4. Spell file format *spell-file-format*
This is the format of the files that are used by the person who creates and This is the format of the files that are used by the person who creates and
maintains a word list. maintains a word list.
Note that we avoid the word "dictionary" here. That is because the goal of Note that we avoid the word "dictionary" here. That is because the goal of
spell checking differs from writing a dictionary (as in the book). For spell checking differs from writing a dictionary (as in the book). For
spelling we need a list of words that are OK, thus need not to be highlighted. spelling we need a list of words that are OK, thus should not to be
Names will not appear in a dictionary, but do appear in a word list. And highlighted. Person and company names will not appear in a dictionary, but do
some old words are rarely used and are common misspellings. These do appear appear in a word list. And some old words are rarely used while they are
in a dictionary but not in a word list. common misspellings. These do appear in a dictionary but not in a word list.
There are two formats: one with affix compression and one without. The files There are two formats: A straigth list of words and a list using affix
with affix compression are used by Myspell (Mozilla and OpenOffice.org). This compression. The files with affix compression are used by Myspell (Mozilla
requires two files, one with .aff and one with .dic extension. The second and OpenOffice.org). This requires two files, one with .aff and one with .dic
format is a list of words. extension.
FORMAT OF WORD LIST *spell-wordlist-format* FORMAT OF STRAIGHT WORD LIST *spell-wordlist-format*
The words must appear one per line. That is all that is required. The words must appear one per line. That is all that is required.
Additionally the following items are recognized: Additionally the following items are recognized:
- Empty and blank lines are ignored. - Empty and blank lines are ignored.
- Lines starting with a # are ignored (comment lines). - Lines starting with a # are ignored (comment lines).
- A line starting with "/encoding=", before any word, specifies the encoding - A line starting with "/encoding=", before any word, specifies the encoding
of the file. After the second '=' comes an encoding name. This tells Vim of the file. After the second '=' comes an encoding name. This tells Vim
to setup conversion from the specified encoding to 'encoding'. to setup conversion from the specified encoding to 'encoding'. Thus you can
use one word list for several target encodings.
- A line starting with "/regions=" specifies the region names that are - A line starting with "/regions=" specifies the region names that are
supported. Each region name must be two ASCII letters. The first one is supported. Each region name must be two ASCII letters. The first one is
region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca". region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca".
In an addition word list the list should be equal to the main word list! In an addition word list the region names should be equal to the main word
list!
- A line starting with "/?" specifies a word that should be marked as rare. - A line starting with "/?" specifies a word that should be marked as rare.
- A line starting with "/!" specifies a word that should be marked as bad. - A line starting with "/!" specifies a word that should be marked as bad.
- A line starting with "/=" specifies a word where case must match exactly. - A line starting with "/=" specifies a word where case must match exactly.
A "?" or "!" may be following: "/=?" and "/=!". A "?" or "!" may be following: "/=?" and "/=!".
- Digits after "/" indicate the regions in which the word is valid. If no - Digits after "/" indicate the regions in which the word is valid. If no
regions are specified the word is valid in all regions. regions are specified the word is valid in all regions.
- Other lines starting with '/' are reserved for future use. The ones that - Other lines starting with '/' are reserved for future use. The ones that
are not recognized are ignored (but you do get a warning message). are not recognized are ignored (but you do get a warning message).
@ -492,7 +507,7 @@ is required at this position. The same word with a lower-case letter at this
position will not match. When some of the other letters are upper-case it will position will not match. When some of the other letters are upper-case it will
not match either. not match either.
The same word with all upper-case characters will always be OK. The word with all upper-case characters will always be OK.
word list matches does not match ~ word list matches does not match ~
als als Als ALS ALs AlS aLs aLS als als Als ALS ALs AlS aLs aLS
@ -509,7 +524,9 @@ when it appears with a non-word character before and after it. For Myspell a
word starting with a non-word character probably won't work. word starting with a non-word character probably won't work.
After the word there is an optional slash and flags. Most of these flags are After the word there is an optional slash and flags. Most of these flags are
letters that indicate the affixes that can be used with this word. letters that indicate the affixes that can be used with this word. These are
specified with SFX and PFX lines in the .aff file. See the Myspell
documentation.
*spell-affix-vim* *spell-affix-vim*
A flag that Vim adds and is not in Myspell is the flag defined with KEP in the A flag that Vim adds and is not in Myspell is the flag defined with KEP in the
@ -527,7 +544,8 @@ the affix file. The affix file must always be in the same encoding as the
word list. This is compatible with Myspell. For Vim the encoding may also be word list. This is compatible with Myspell. For Vim the encoding may also be
something else, any encoding that "iconv" supports. The "SET" line must something else, any encoding that "iconv" supports. The "SET" line must
specify the name of the encoding. When using a multi-byte encoding it's specify the name of the encoding. When using a multi-byte encoding it's
possible to use more different affixes. possible to use more different affixes (but Myspell doesn't support that, thus
you may not want to use it anyway).
CHARACTER TABLES CHARACTER TABLES
@ -677,11 +695,14 @@ used to make spelling suggestions. The items define the "from" text and the
REP ch k ~ REP ch k ~
The first line specifies the number of REP lines following. Vim ignores it. The first line specifies the number of REP lines following. Vim ignores it.
Don't include simple one-character replacements or swaps. Vim will try these
anyway. You can include whole words if you want to, but you might want to use
the "file:" item in 'spellsuggest' instead.
SIMILAR CHARACTERS *spell-affix-MAP* SIMILAR CHARACTERS *spell-affix-MAP*
In the affix file MAP items can be used to define letters that very much In the affix file MAP items can be used to define letters that are very much
alike. This is mostly used for a letter with different accents. This is used alike. This is mostly used for a letter with different accents. This is used
to prefer suggestions with these letters substituted. Example: to prefer suggestions with these letters substituted. Example:
@ -691,22 +712,23 @@ to prefer suggestions with these letters substituted. Example:
The first line specifies the number of MAP lines following. Vim ignores it. The first line specifies the number of MAP lines following. Vim ignores it.
A letter must only appear in one of the MAP items. It's a bit more efficient Each letter must appear in only one of the MAP items. It's a bit more
if the first letter is ASCII or at least one without accents. efficient if the first letter is ASCII or at least one without accents.
SOUNDS-A-LIKE *spell-affix-SAL* SOUND-A-LIKE *spell-affix-SAL*
In the affix file SAL items can be used to define the sounds-a-like mechanism In the affix file SAL items can be used to define the sounds-a-like mechanism
to be used. The main items define the "from" text and the "to" replacement. to be used. The main items define the "from" text and the "to" replacement.
Example: Simplistic example:
SAL CIA X ~ SAL CIA X ~
SAL CH X ~ SAL CH X ~
SAL C K ~ SAL C K ~
SAL K K ~ SAL K K ~
An explantion how it works can be found in the Aspell manual: There are a few rules and this can become quite complicated. An explantion
how it works can be found in the Aspell manual:
http://aspell.net/man-html/Phonetic-Code.html. http://aspell.net/man-html/Phonetic-Code.html.
There are a few special items: There are a few special items:
@ -723,7 +745,7 @@ SIMPLE SOUNDFOLDING *spell-affix-SOFOFROM* *spell-affix-SOFOTO*
The SAL mechanism is complex and slow. A simpler mechanism is mapping all The SAL mechanism is complex and slow. A simpler mechanism is mapping all
characters to another character, mapping similar sounding characters to the characters to another character, mapping similar sounding characters to the
same character. At the same time this does case folding. You can not have same character. At the same time this does case folding. You can not have
SAL items at the same time. both SAL items and simple soundfolding.
There are two items required: one to speficy the characters that are mapped There are two items required: one to speficy the characters that are mapped
and one that specifies the characters they are mapped to. They must have and one that specifies the characters they are mapped to. They must have
@ -733,9 +755,9 @@ exactly the same number of characters. Example:
SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkes ~ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkes ~
In the example all vowels are mapped to the same character 'e'. Another In the example all vowels are mapped to the same character 'e'. Another
method is to leave out all vowels. Some characters that sound nearly the same method would be to leave out all vowels. Some characters that sound nearly
and are often mixed up, such as 'm' and 'n', are mapped to the same character. the same and are often mixed up, such as 'm' and 'n', are mapped to the same
Don't do this too much, all words will start looking alike. character. Don't do this too much, all words will start looking alike.
Characters that do not appear in SOFOFROM will be left out, except that all Characters that do not appear in SOFOFROM will be left out, except that all
white space is replaced by one space. Sequences of the same character in white space is replaced by one space. Sequences of the same character in

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2005 May 31 *starting.txt* For Vim version 7.0aa. Last change: 2005 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -890,7 +890,8 @@ set, it will be set to 'nocompatible'. This has the side effect of setting or
resetting other options (see 'compatible'). But only the options that have resetting other options (see 'compatible'). But only the options that have
not been set or reset will be changed. This has the same effect like the not been set or reset will be changed. This has the same effect like the
value of 'compatible' had this value when starting Vim. Note that this value of 'compatible' had this value when starting Vim. Note that this
doesn't happen for the system-wide vimrc file. doesn't happen for the system-wide vimrc file. It does also happen for gvimrc
files.
But there is a side effect of setting or resetting 'compatible' at the moment But there is a side effect of setting or resetting 'compatible' at the moment
a .vimrc file is found: Mappings are interpreted the moment they are a .vimrc file is found: Mappings are interpreted the moment they are

View File

@ -6293,6 +6293,7 @@ spell-load spell.txt /*spell-load*
spell-midword spell.txt /*spell-midword* spell-midword spell.txt /*spell-midword*
spell-mkspell spell.txt /*spell-mkspell* spell-mkspell spell.txt /*spell-mkspell*
spell-quickstart spell.txt /*spell-quickstart* spell-quickstart spell.txt /*spell-quickstart*
spell-remarks spell.txt /*spell-remarks*
spell-syntax spell.txt /*spell-syntax* spell-syntax spell.txt /*spell-syntax*
spell-wordlist-format spell.txt /*spell-wordlist-format* spell-wordlist-format spell.txt /*spell-wordlist-format*
spell.txt spell.txt /*spell.txt* spell.txt spell.txt /*spell.txt*

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types " Vim support file to detect file types
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jun 29 " Last Change: 2005 Jun 30
" Listen very carefully, I will say this only once " Listen very carefully, I will say this only once
if exists("did_load_filetypes") if exists("did_load_filetypes")
@ -1585,7 +1585,27 @@ au BufNewFile,BufRead *.slt setf tsalt
au BufNewFile,BufRead *.ti setf terminfo au BufNewFile,BufRead *.ti setf terminfo
" TeX " TeX
au BufNewFile,BufRead *.tex,*.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
au BufNewFile,BufRead *.tex call s:FTtex()
fun! s:FTtex()
let n = 1
while n < 10 && n < line("$")
let line = getline(n)
if line =~ '^\s*\\\%(documentclass\>\|usepackage\>\|begin{\)'
setf tex
return
elseif line =~ '^\s*\\\%(start\l\+\|setup\l\+\|usemodule\)\>'
setf context
return
endif
let n = n + 1
endwhile
setf tex
endfun
" Context
au BufNewFile,BufRead tex/context/*/*.tex setf context
" Texinfo " Texinfo
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
@ -1746,7 +1766,7 @@ au BufNewFile,BufRead *.y call s:FTy()
fun! s:FTy() fun! s:FTy()
let n = 1 let n = 1
while n < 10 while n < 10 && n < line("$")
if getline(n) =~ '^\s*\(#\|class\>\)' if getline(n) =~ '^\s*\(#\|class\>\)'
setf racc setf racc
return return

View File

@ -1,6 +1,6 @@
" Vim indent file " Vim indent file
" Language: C-shell (tcsh) " Language: C-shell (tcsh)
" Maintainor: Gautam Iyer <gautam@math.uchicago.edu> " Maintainer: Gautam Iyer <gautam@math.uchicago.edu>
" Last Modified: Wed 04 Feb 2004 04:36:07 PM CST " Last Modified: Wed 04 Feb 2004 04:36:07 PM CST
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.

View File

@ -4829,7 +4829,7 @@ struct prt_dsc_line_S
#define SIZEOF_CSTR(s) (sizeof(s) - 1) #define SIZEOF_CSTR(s) (sizeof(s) - 1)
struct prt_dsc_comment_S prt_dsc_table[] = static struct prt_dsc_comment_S prt_dsc_table[] =
{ {
{PRT_DSC_TITLE, SIZEOF_CSTR(PRT_DSC_TITLE), PRT_DSC_TITLE_TYPE}, {PRT_DSC_TITLE, SIZEOF_CSTR(PRT_DSC_TITLE), PRT_DSC_TITLE_TYPE},
{PRT_DSC_VERSION, SIZEOF_CSTR(PRT_DSC_VERSION), {PRT_DSC_VERSION, SIZEOF_CSTR(PRT_DSC_VERSION),
@ -4876,6 +4876,7 @@ static int prt_next_dsc __ARGS((struct prt_dsc_line_S *p_dsc_line));
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
static int prt_build_cid_fontname __ARGS((int font, char_u *name, int name_len)); static int prt_build_cid_fontname __ARGS((int font, char_u *name, int name_len));
static void prt_def_cidfont __ARGS((char *new_name, int height, char *cidfont)); static void prt_def_cidfont __ARGS((char *new_name, int height, char *cidfont));
static void prt_dup_cidfont __ARGS((char *original_name, char *new_name));
static int prt_match_encoding __ARGS((char *p_encoding, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_encoding_S **pp_mbenc)); static int prt_match_encoding __ARGS((char *p_encoding, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_encoding_S **pp_mbenc));
static int prt_match_charset __ARGS((char *p_charset, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_charset_S **pp_mbchar)); static int prt_match_charset __ARGS((char *p_charset, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_charset_S **pp_mbchar));
#endif #endif

View File

@ -19,8 +19,10 @@ extern "C" {
BOOL WINAPI global_ime_TranslateMessage(CONST MSG *); BOOL WINAPI global_ime_TranslateMessage(CONST MSG *);
void WINAPI global_ime_set_position(POINT*); void WINAPI global_ime_set_position(POINT*);
void WINAPI global_ime_set_font(LOGFONT*); void WINAPI global_ime_set_font(LOGFONT*);
#if 0
void WINAPI global_ime_status_evacuate(void); void WINAPI global_ime_status_evacuate(void);
void WINAPI global_ime_status_restore(void); void WINAPI global_ime_status_restore(void);
#endif
void WINAPI global_ime_set_status(int status); void WINAPI global_ime_set_status(int status);
int WINAPI global_ime_get_status(void); int WINAPI global_ime_get_status(void);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -989,7 +989,6 @@ EXTERN char breakat_flags[256]; /* which characters are in 'breakat' */
/* these are in version.c */ /* these are in version.c */
extern char *Version; extern char *Version;
extern char *mediumVersion;
#if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC) #if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC)
extern char longVersion[]; extern char longVersion[];
#else #else
@ -1200,11 +1199,6 @@ EXTERN char pseps[2] /* normal path separator string */
= {'\\', 0} = {'\\', 0}
# endif # endif
; ;
EXTERN char psepsN[2] /* abnormal path separator string */
# ifdef DO_INIT
= {'/', 0}
# endif
;
#endif #endif
#ifdef FEAT_VIRTUALEDIT #ifdef FEAT_VIRTUALEDIT
@ -1244,7 +1238,6 @@ EXTERN char *netbeansArg INIT(= NULL); /* the -nb[:host:port:passwd] arg */
EXTERN int netbeansCloseFile INIT(= 0); /* send killed if != 0 */ EXTERN int netbeansCloseFile INIT(= 0); /* send killed if != 0 */
EXTERN int netbeansFireChanges INIT(= 1); /* send buffer changes if != 0 */ EXTERN int netbeansFireChanges INIT(= 1); /* send buffer changes if != 0 */
EXTERN int netbeansForcedQuit INIT(= 0);/* don't write modified files */ EXTERN int netbeansForcedQuit INIT(= 0);/* don't write modified files */
EXTERN int netbeansOpenFile INIT(= 1); /* send fileOpened if != 0 */
EXTERN int netbeansReadFile INIT(= 1); /* OK to read from disk if != 0 */ EXTERN int netbeansReadFile INIT(= 1); /* OK to read from disk if != 0 */
EXTERN int netbeansSuppressNoLines INIT(= 0); /* skip "No lines in buffer" */ EXTERN int netbeansSuppressNoLines INIT(= 0); /* skip "No lines in buffer" */
EXTERN int usingNetbeans INIT(= 0); /* set if -nb flag is used */ EXTERN int usingNetbeans INIT(= 0); /* set if -nb flag is used */

View File

@ -29,7 +29,6 @@
#define CSCOPE_DBFILE "cscope.out" #define CSCOPE_DBFILE "cscope.out"
#define CSCOPE_PROMPT ">> " #define CSCOPE_PROMPT ">> "
#define CSCOPE_QUERIES "sgdct efi"
/* /*
* s 0name Find this C symbol * s 0name Find this C symbol

View File

@ -1366,6 +1366,7 @@ del_trailing_spaces(ptr)
/* /*
* Like strncpy(), but always terminate the result with one NUL. * Like strncpy(), but always terminate the result with one NUL.
* "to" must be "len + 1" long!
*/ */
void void
vim_strncpy(to, from, len) vim_strncpy(to, from, len)

View File

@ -24,7 +24,6 @@
#endif #endif
#define nbdebug(a) nbdbg##a #define nbdebug(a) nbdbg##a
#define nbprint(a) nbprt##a
#define NB_TRACE 0x00000001 #define NB_TRACE 0x00000001
#define NB_TRACE_VERBOSE 0x00000002 #define NB_TRACE_VERBOSE 0x00000002

View File

@ -6645,14 +6645,12 @@ set_bool_option(opt_idx, varp, value, opt_flags)
psepc = '/'; psepc = '/';
psepcN = '\\'; psepcN = '\\';
pseps[0] = '/'; pseps[0] = '/';
psepsN[0] = '\\';
} }
else else
{ {
psepc = '\\'; psepc = '\\';
psepcN = '/'; psepcN = '/';
pseps[0] = '\\'; pseps[0] = '\\';
psepsN[0] = '/';
} }
/* need to adjust the file name arguments and buffer names. */ /* need to adjust the file name arguments and buffer names. */

View File

@ -467,7 +467,9 @@ static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent",
# define FDO_JUMP 0x400 # define FDO_JUMP 0x400
#endif #endif
EXTERN char_u *p_fp; /* 'formatprg' */ EXTERN char_u *p_fp; /* 'formatprg' */
#ifdef HAVE_FSYNC
EXTERN int p_fs; /* 'fsync' */ EXTERN int p_fs; /* 'fsync' */
#endif
EXTERN int p_gd; /* 'gdefault' */ EXTERN int p_gd; /* 'gdefault' */
#ifdef FEAT_PRINTER #ifdef FEAT_PRINTER
EXTERN char_u *p_pdev; /* 'printdevice' */ EXTERN char_u *p_pdev; /* 'printdevice' */

View File

@ -14,7 +14,6 @@
#define BINARY_FILE_IO #define BINARY_FILE_IO
#define USE_EXE_NAME /* use argv[0] for $VIM */ #define USE_EXE_NAME /* use argv[0] for $VIM */
#define NO_COOKED_INPUT /* mch_inchar() doesn't return whole lines */
#define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */ #define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */
#define USE_TERM_CONSOLE #define USE_TERM_CONSOLE
#ifdef DJGPP #ifdef DJGPP

View File

@ -2509,8 +2509,8 @@ win_line(wp, lnum, startrow, endrow)
starts */ starts */
int spell_attr = 0; /* attributes desired by spelling */ int spell_attr = 0; /* attributes desired by spelling */
int word_end = 0; /* last byte with same spell_attr */ int word_end = 0; /* last byte with same spell_attr */
static linenr_T checked_lnum = 0; /* line number for checked_col */ static linenr_T checked_lnum = 0; /* line number for "checked_col" */
static int checked_col = 0; /* column in checked_lnum up to which static int checked_col = 0; /* column in "checked_lnum" up to which
* there are no spell errors */ * there are no spell errors */
int cur_checked_col = 0; /* checked column for current line */ int cur_checked_col = 0; /* checked column for current line */
#endif #endif

View File

@ -1469,7 +1469,10 @@ struct file_buffer
/* for spell checking */ /* for spell checking */
garray_T b_langp; /* list of pointers to slang_T, see spell.c */ garray_T b_langp; /* list of pointers to slang_T, see spell.c */
char_u b_spell_ismw[256];/* flags: is midword char */
# ifdef FEAT_MBYTE
char_u *b_spell_ismw_mb; /* multi-byte midword chars */
# endif
#endif /* FEAT_SYN_HL */ #endif /* FEAT_SYN_HL */
#ifdef FEAT_SIGNS #ifdef FEAT_SIGNS

View File

@ -28,7 +28,7 @@
#include "version.h" #include "version.h"
char *Version = VIM_VERSION_SHORT; char *Version = VIM_VERSION_SHORT;
char *mediumVersion = VIM_VERSION_MEDIUM; static char *mediumVersion = VIM_VERSION_MEDIUM;
#if defined(HAVE_DATE_TIME) || defined(PROTO) #if defined(HAVE_DATE_TIME) || defined(PROTO)
# if (defined(VMS) && defined(VAXC)) || defined(PROTO) # if (defined(VMS) && defined(VAXC)) || defined(PROTO)

View File

@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA" #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 29)" #define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 30)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 29, compiled " #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 30, compiled "