mirror of
https://github.com/zoriya/vim.git
synced 2025-12-25 08:35:22 +00:00
Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dc065ee7c | ||
|
|
7d1f5dbc0a | ||
|
|
51ac12f683 | ||
|
|
0d9c26dd83 | ||
|
|
f9184a1d31 | ||
|
|
0f7d31ad83 | ||
|
|
1f8a5f0eac | ||
|
|
ba4128faa3 | ||
|
|
7887d88a9f | ||
|
|
505e82870e | ||
|
|
7fae636fc8 | ||
|
|
d042c56e34 | ||
|
|
e6b165e0f4 | ||
|
|
9c96f592af | ||
|
|
42eeac3552 | ||
|
|
24bbcfe8fe | ||
|
|
d7b31706f7 | ||
|
|
a1ba811ac9 | ||
|
|
9a50b1bf21 | ||
|
|
39a58ca3d4 | ||
|
|
d4098f5f19 | ||
|
|
702517dd70 | ||
|
|
b61d40504e | ||
|
|
cf6bf39f68 | ||
|
|
238f4fa798 | ||
|
|
d9fba318b8 | ||
|
|
80b29f273d | ||
|
|
1e498f5e5d | ||
|
|
0017fc52cb | ||
|
|
4eec5ec8ce | ||
|
|
f461c8e7f8 | ||
|
|
ea408854a8 | ||
|
|
29a1c1d374 | ||
|
|
1ec484f58e | ||
|
|
0a5fe2140d | ||
|
|
c4def13f8b | ||
|
|
3b506942eb | ||
|
|
47cc752267 | ||
|
|
f417f2b6af | ||
|
|
f81b0fe011 | ||
|
|
6ad01d6077 | ||
|
|
30abd28f16 | ||
|
|
d114dbee50 | ||
|
|
0c40586a7b | ||
|
|
0dd492fdd5 | ||
|
|
d857f0e0f4 | ||
|
|
3f77047607 | ||
|
|
25414f2917 | ||
|
|
e13305e3be | ||
|
|
3c2def6bd2 | ||
|
|
1d73c88503 | ||
|
|
92124a33fd | ||
|
|
b2ec307fc6 | ||
|
|
e756604ff5 | ||
|
|
f7bbbc506e | ||
|
|
8db7318c2a | ||
|
|
520470a9d6 | ||
|
|
6bab4d1fd7 | ||
|
|
cf851ce930 | ||
|
|
ea424166e2 | ||
|
|
78599adb52 | ||
|
|
c998e3c16e | ||
|
|
f3bd51a172 | ||
|
|
a41461e061 | ||
|
|
8348ea624c | ||
|
|
9f30f50471 |
6
Filelist
6
Filelist
@@ -122,8 +122,6 @@ SRC_ALL2 = \
|
||||
src/proto/undo.pro \
|
||||
src/proto/version.pro \
|
||||
src/proto/window.pro \
|
||||
src/spell/*.diff \
|
||||
src/spell/Makefile \
|
||||
|
||||
|
||||
# source files for Unix only
|
||||
@@ -684,6 +682,9 @@ LANG_GEN = \
|
||||
runtime/tutor/tutor.ru.* \
|
||||
runtime/tutor/tutor.zh.* \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
runtime/spell/??/main.aap \
|
||||
runtime/spell/main.aap \
|
||||
|
||||
# generic language files, binary
|
||||
LANG_GEN_BIN = \
|
||||
@@ -698,6 +699,7 @@ LANG_SRC = \
|
||||
src/po/README_mvc.txt \
|
||||
src/po/cleanup.vim \
|
||||
src/po/Makefile \
|
||||
src/po/Make_cyg.mak \
|
||||
src/po/Make_ming.mak \
|
||||
src/po/Make_mvc.mak \
|
||||
src/po/sjiscorr.c \
|
||||
|
||||
@@ -1,30 +1,22 @@
|
||||
" Vim compiler file
|
||||
" Compiler: BDF to PCF Conversion
|
||||
" Maintainer: Nikolai Weibull <sourc@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/compiler/pcp/bdf/
|
||||
" Latest Revision: 2004-05-22
|
||||
" arch-tag: 2e2f3a55-199b-468c-aa2e-d6b1a7b87806
|
||||
" Compiler: BDF to PCF Conversion
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "bdf"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
CompilerSet makeprg=bdftopcf\ $*
|
||||
setlocal makeprg=bdftopcf\ $*
|
||||
|
||||
CompilerSet errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m,
|
||||
setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m,
|
||||
\%-Z%p^,
|
||||
\%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
|
||||
26
runtime/compiler/gcc.vim
Normal file
26
runtime/compiler/gcc.vim
Normal file
@@ -0,0 +1,26 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GNU C Compiler
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "gcc"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal errorformat=
|
||||
\%*[^\"]\"%f\"%*\\D%l:\ %m,
|
||||
\\"%f\"%*\\D%l:\ %m,
|
||||
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
|
||||
\%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
|
||||
\%f:%l:\ %m,
|
||||
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
|
||||
\%DMaking\ %*\\a\ in\ %f
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,17 +1,13 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Miscrosoft Visual C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2004 Mar 19
|
||||
" Last Change: 2005 Jun 22
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "msvc"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
" The errorformat for MSVC is the default.
|
||||
CompilerSet errorformat&
|
||||
CompilerSet makeprg=nmake
|
||||
setlocal errorformat&
|
||||
setlocal makeprg=nmake
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
" Vim compiler file
|
||||
" Compiler: reStructuredText Documentation Format
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/compiler/pcp/rst/
|
||||
" Latest Revision: 2004-05-22
|
||||
" arch-tag: ac64a95a-5d45-493d-a9f9-f96fc8568657
|
||||
" Compiler: reStructuredText Documentation Format
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "rst"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
CompilerSet errorformat=
|
||||
setlocal errorformat=
|
||||
\%f:%l:\ (%tEBUG/0)\ %m,
|
||||
\%f:%l:\ (%tNFO/1)\ %m,
|
||||
\%f:%l:\ (%tARNING/2)\ %m,
|
||||
@@ -29,5 +23,3 @@ CompilerSet errorformat=
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.0aa. Last change: 2005 May 31
|
||||
*change.txt* For Vim version 7.0aa. Last change: 2005 Jun 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1074,9 +1074,12 @@ normal command-line editing commands are available, including a special
|
||||
history for expressions. When you end the command-line by typing <CR>, Vim
|
||||
computes the result of the expression. If you end it with <Esc>, Vim abandons
|
||||
the expression. If you do not enter an expression, Vim uses the previous
|
||||
expression (like with the "/" command). If the "= register is used for the
|
||||
"p" command, the string is split up at <NL> characters. If the string ends in
|
||||
a <NL>, it is regarded as a linewise register. {not in Vi}
|
||||
expression (like with the "/" command). The expression must evaluate to a
|
||||
string. If the result is a number it's turned into a string. A List,
|
||||
Dictionary or FuncRef results in an error message (use string() to convert).
|
||||
If the "= register is used for the "p" command, the string is split up at <NL>
|
||||
characters. If the string ends in a <NL>, it is regarded as a linewise
|
||||
register. {not in Vi}
|
||||
|
||||
7. Selection and drop registers "*, "+ and "~
|
||||
Use these register for storing and retrieving the selected text for the GUI.
|
||||
@@ -1524,4 +1527,8 @@ found here: |sort()|.
|
||||
Note that using ":sort" with ":global" doesn't sort the matching lines, it's
|
||||
quite useless.
|
||||
|
||||
The details about sorting depend on the library function used. There is no
|
||||
guarantee that sorting is "stable" or obeys the current locale. You will have
|
||||
to try it out.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jun 11
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -36,7 +36,7 @@ done, the features in this document are not available. See |+eval| and
|
||||
|
||||
1.1 Variable types ~
|
||||
*E712*
|
||||
There are four types of variables:
|
||||
There are five types of variables:
|
||||
|
||||
Number A 32 bit signed number.
|
||||
Examples: -123 0x10 0177
|
||||
@@ -50,6 +50,10 @@ Funcref A reference to a function |Funcref|.
|
||||
List An ordered sequence of items |List|.
|
||||
Example: [1, 2, ['a', 'b']]
|
||||
|
||||
Dictionary An associative, unordered array: Each entry has a key and a
|
||||
value. |Dictionary|
|
||||
Example: {'blue': "#0000ff", 'red': "#ff0000"}
|
||||
|
||||
The Number and String types are converted automatically, depending on how they
|
||||
are used.
|
||||
|
||||
@@ -237,15 +241,23 @@ the same value. >
|
||||
|
||||
Note about comparing lists: Two lists are considered equal if they have the
|
||||
same length and all items compare equal, as with using "==". There is one
|
||||
exception: When comparing a number with a string and the string contains extra
|
||||
characters beside the number they are not equal. Example: >
|
||||
echo 4 == "4x"
|
||||
exception: When comparing a number with a string they are considered
|
||||
different. There is no automatic type conversion, as with using "==" on
|
||||
variables. Example: >
|
||||
echo 4 == "4"
|
||||
< 1 >
|
||||
echo [4] == ["4x"]
|
||||
echo [4] == ["4"]
|
||||
< 0
|
||||
|
||||
This is to fix the odd behavior of == that can't be changed for backward
|
||||
compatibility reasons.
|
||||
Thus comparing Lists is more strict than comparing numbers and strings. You
|
||||
can compare simple values this way too by putting them in a string: >
|
||||
|
||||
:let a = 5
|
||||
:let b = "5"
|
||||
echo a == b
|
||||
< 1 >
|
||||
echo [a] == [b]
|
||||
< 0
|
||||
|
||||
|
||||
List unpack ~
|
||||
@@ -440,7 +452,8 @@ Dictionary: >
|
||||
:echo onedict['a']
|
||||
11
|
||||
|
||||
For more info see |list-identity|.
|
||||
Two Dictionaries compare equal if all the key-value pairs compare equal. For
|
||||
more info see |list-identity|.
|
||||
|
||||
|
||||
Dictionary modification ~
|
||||
@@ -947,8 +960,11 @@ register *expr-register*
|
||||
|
||||
The result is the contents of the named register, as a single string.
|
||||
Newlines are inserted where required. To get the contents of the unnamed
|
||||
register use @" or @@. The '=' register can not be used here. See
|
||||
|registers| for an explanation of the available registers.
|
||||
register use @" or @@. See |registers| for an explanation of the available
|
||||
registers.
|
||||
|
||||
When using the '=' register you get the expression itself, not what it
|
||||
evaluates to. Use |eval()| to evaluate it.
|
||||
|
||||
|
||||
nesting *expr-nesting* *E110*
|
||||
@@ -1139,10 +1155,10 @@ v:beval_lnum The number of the line, over which the mouse pointer is. Only
|
||||
valid while evaluating the 'balloonexpr' option.
|
||||
|
||||
*v:beval_text* *beval_text-variable*
|
||||
v:beval_text The text under or after the mouse pointer. Usually a word as it is
|
||||
useful for debugging a C program. 'iskeyword' applies, but a
|
||||
dot and "->" before the position is included. When on a ']'
|
||||
the text before it is used, including the matching '[' and
|
||||
v:beval_text The text under or after the mouse pointer. Usually a word as
|
||||
it is useful for debugging a C program. 'iskeyword' applies,
|
||||
but a dot and "->" before the position is included. When on a
|
||||
']' the text before it is used, including the matching '[' and
|
||||
word before it. When on a Visual area within one line the
|
||||
highlighted text is used.
|
||||
Only valid while evaluating the 'balloonexpr' option.
|
||||
@@ -1599,6 +1615,9 @@ setreg( {n}, {v}[, {opt}]) Number set register to value and type
|
||||
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
|
||||
simplify( {filename}) String simplify filename as much as possible
|
||||
sort( {list} [, {func}]) List sort {list}, using {func} to compare
|
||||
soundfold( {word}) String sound-fold {word}
|
||||
spellbadword() String badly spelled word at cursor
|
||||
spellsuggest({word} [, {max}]) List spelling suggestions
|
||||
split( {expr} [, {pat} [, {keepempty}]])
|
||||
List make List from {pat} separated {expr}
|
||||
strftime( {format}[, {time}]) String time in specified format
|
||||
@@ -2370,6 +2389,17 @@ function({name}) *function()* *E700*
|
||||
{name} can be a user defined function or an internal function.
|
||||
|
||||
|
||||
garbagecollect() *garbagecollect()*
|
||||
Cleanup unused Lists and Dictionaries that have circular
|
||||
references. There is hardly ever a need to invoke this
|
||||
function, as it is automatically done when Vim runs out of
|
||||
memory or is waiting for the user to press a key after
|
||||
'updatetime'. Items without circular references are always
|
||||
freed when they become unused.
|
||||
This is useful if you have deleted a very big List and/or
|
||||
Dictionary with circular references in a script that runs for
|
||||
a long time.
|
||||
|
||||
get({list}, {idx} [, {default}]) *get()*
|
||||
Get item {idx} from List {list}. When this item is not
|
||||
available return {default}. Return zero when {default} is
|
||||
@@ -3289,11 +3319,16 @@ range({expr} [, {max} [, {stride}]]) *range()*
|
||||
- If {stride} is specified: [{expr}, {expr} + {stride}, ...,
|
||||
{max}] (increasing {expr} with {stride} each time, not
|
||||
producing a value past {max}).
|
||||
When the maximum is one before the start the result is an
|
||||
empty list. When the maximum is more than one before the
|
||||
start this is an error.
|
||||
Examples: >
|
||||
range(4) " [0, 1, 2, 3]
|
||||
range(2, 4) " [2, 3, 4]
|
||||
range(2, 9, 3) " [2, 5, 8]
|
||||
range(2, -2, -1) " [2, 1, 0, -1, -2]
|
||||
range(0) " []
|
||||
range(2, 0) " error!
|
||||
<
|
||||
*readfile()*
|
||||
readfile({fname} [, {binary} [, {max}]])
|
||||
@@ -3748,6 +3783,42 @@ sort({list} [, {func}]) *sort()* *E702*
|
||||
return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1
|
||||
endfunc
|
||||
let sortedlist = sort(mylist, "MyCompare")
|
||||
<
|
||||
|
||||
*soundfold()*
|
||||
soundfold({word})
|
||||
Return the sound-folded equivalent of {word}. Uses the first
|
||||
language in 'spellang' for the current window that supports
|
||||
soundfolding. 'spell' must be set. When no sound folding is
|
||||
possible the {word} is returned unmodified.
|
||||
This can be used for making spelling suggestions. Note that
|
||||
the method can be quite slow.
|
||||
|
||||
*spellbadword()*
|
||||
spellbadword() Return the badly spelled word under or after the cursor.
|
||||
The cursor is advanced to the start of the bad word.
|
||||
When no bad word is found in the cursor line an empty String
|
||||
is returned and the cursor doesn't move.
|
||||
|
||||
*spellsuggest()*
|
||||
spellsuggest({word} [, {max}])
|
||||
Return a List with spelling suggestions to replace {word}.
|
||||
When {max} is given up to this number of suggestions are
|
||||
returned. Otherwise up to 25 suggestions are returned.
|
||||
|
||||
{word} can be a badly spelled word followed by other text.
|
||||
This allows for joining two words that were split. The
|
||||
suggestions also include the following text, thus you can
|
||||
replace a line.
|
||||
|
||||
{word} may also be a good word. Similar words will then be
|
||||
returned. {word} itself is also included, most likely as the
|
||||
first entry, thus this can be used to check spelling.
|
||||
|
||||
The spelling information for the current window is used. The
|
||||
'spell' option must be set and the values of 'spelllang' and
|
||||
'spellsuggest' are used.
|
||||
|
||||
|
||||
split({expr} [, {pattern} [, {keepempty}]]) *split()*
|
||||
Make a List out of {expr}. When {pattern} is omitted or empty
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2005 May 22
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2005 Jun 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1227,6 +1227,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:messages| :mes[sages] view previously displayed messages
|
||||
|:mkexrc| :mk[exrc] write current mappings and settings to a file
|
||||
|:mksession| :mks[ession] write session info to a file
|
||||
|:mkspell| :mksp[ell] produce .spl spell file
|
||||
|:mkvimrc| :mkv[imrc] write current mappings and settings to a file
|
||||
|:mkview| :mkvie[w] write view of current window to a file
|
||||
|:mode| :mod[e] show or change the screen mode
|
||||
@@ -1356,6 +1357,10 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:snomagic| :sno[magic] :substitute with 'nomagic'
|
||||
|:sort| :sor[t] sort lines
|
||||
|:source| :so[urce] read Vim or Ex commands from a file
|
||||
|:spelldump| :spelld[ump] split window and fill with all correct words
|
||||
|:spellgood| :spe[llgood] add good word for spelling
|
||||
|:spellrepall| :spellr[epall] replace all bad words like last |z?|
|
||||
|:spellwrong| :spellw[rong] add spelling mistake
|
||||
|:split| :sp[lit] split current window
|
||||
|:sprevious| :spr[evious] split window and go to previous file in the
|
||||
argument list
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Jun 07
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 04
|
||||
|
||||
|
||||
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|.
|
||||
|
||||
*'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
|
||||
{not in Vi}
|
||||
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
|
||||
just like Vi, and don't even (want to) know about the 'compatible'
|
||||
option.
|
||||
When a ".vimrc" file is found while Vim is starting up, this option is
|
||||
switched off, and all options that have not been modified will be set
|
||||
to the Vim defaults. Effectively, this means that when a ".vimrc"
|
||||
file exists, Vim will use the Vim defaults, otherwise it will use the
|
||||
Vi defaults. (Note: This doesn't happen for the system-wide vimrc
|
||||
file). Also see |compatible-default| and |posix-compliance|.
|
||||
When a ".vimrc" or ".gvimrc" file is found while Vim is starting up,
|
||||
this option is switched off, and all options that have not been
|
||||
modified will be set to the Vim defaults. Effectively, this means
|
||||
that when a ".vimrc" or ".gvimrc" file exists, Vim will use the Vim
|
||||
defaults, otherwise it will use the Vi defaults. (Note: This doesn't
|
||||
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
|
||||
"-N". See |-C| and |-N|.
|
||||
Switching this option off makes the Vim defaults be used for options
|
||||
@@ -3316,7 +3318,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
t:Title,v:Visual,w:WarningMsg,W:WildMenu,
|
||||
f:Folded,F:FoldColumn,A:DiffAdd,
|
||||
C:DiffChange,D:DiffDelete,T:DiffText,
|
||||
>:SignColumn")
|
||||
>:SignColumn,B:SpellBad,P:SpellCap,
|
||||
R:SpellRare,L:SpellLocal")
|
||||
global
|
||||
{not in Vi}
|
||||
This option can be used to set highlighting mode for various
|
||||
@@ -3348,8 +3351,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|hl-WildMenu| W wildcard matches displayed for 'wildmenu'
|
||||
|hl-Folded| f line used for closed folds
|
||||
|hl-FoldColumn| F 'foldcolumn'
|
||||
|hl-DiffAdd| A added line in diff mode
|
||||
|hl-DiffChange| C changed line in diff mode
|
||||
|hl-DiffDelete| D deleted line in diff mode
|
||||
|hl-DiffText| T inserted text in diff mode
|
||||
|hl-SignColumn| > column used for |signs|
|
||||
|hl-SpellBad| B misspelled word |spell|
|
||||
|hl-SpellCap| P word that should start with capital|spell|
|
||||
|hl-SpellRare| R rare word |spell|
|
||||
|hl-SpellLocal| L word from other region |spell|
|
||||
|
||||
@@ -5633,6 +5641,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When on spell checking will be done. See |spell|.
|
||||
The languages are specified with 'spelllang'.
|
||||
|
||||
*'spellcapcheck'* *'spc'*
|
||||
'spellcapcheck' 'spc' string (default "[.?!]\_[\])'" \t]\+")
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
Pattern to locate the end of a sentence. The following word will be
|
||||
checked to start with a capital letter. If not then it is highlighted
|
||||
with SpellCap |hl-SpellCap|.
|
||||
When this check is not wanted make this option empty.
|
||||
Only used when 'spell' is set.
|
||||
Be careful with special characters, see |option-backslash| about
|
||||
including spaces and backslashes.
|
||||
|
||||
*'spellfile'* *'spf'*
|
||||
'spellfile' 'spf' string (default empty)
|
||||
local to buffer
|
||||
@@ -5640,10 +5662,23 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
Name of the word list file where words are added for the |zg| and |zw|
|
||||
commands. It must end in ".add".
|
||||
commands. It must end in ".{encoding}.add".
|
||||
*E765*
|
||||
It may also be a comma separated list of names. A count before the
|
||||
|zg| and |zw| commands can be used to access each. This allows using
|
||||
a personal word list file and a project word list file.
|
||||
When a word is added while this option is empty Vim will set it for
|
||||
you: Using the first "spell" directory in 'runtimepath' that is
|
||||
writable and the first language name that appears in 'spelllang'.
|
||||
writable and the first language name that appears in 'spelllang',
|
||||
ignoring the region.
|
||||
The resulting ".spl" file will be used for spell checking, it does not
|
||||
have to appear in 'spelllang'.
|
||||
Normally one file is used for all regions, but you can add the region
|
||||
name if you want to. However, it will then only be used when
|
||||
'spellfile' is set to it, for entries in 'spelllang' only files
|
||||
without region name will be found.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'spelllang'* *'spl'*
|
||||
'spelllang' 'spl' string (default "en")
|
||||
@@ -5651,14 +5686,82 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
A comma separated list of languages. when the 'spell' option is on
|
||||
spellchecking will be done for these languages. Example: >
|
||||
set spelllang=en_us,nl
|
||||
< This means both US English and Dutch words are recognized. Words that
|
||||
are not recognized will be highlighted.
|
||||
A comma separated list of word list names. When the 'spell' option is
|
||||
on spellchecking will be done for these languages. Example: >
|
||||
set spelllang=en_us,nl,medical
|
||||
< This means US English, Dutch and medical words are recognized. Words
|
||||
that are not recognized will be highlighted.
|
||||
The word list name must not include a comma or dot. Using a dash is
|
||||
recommended to separate the two letter language name from a
|
||||
specification. Thus "en-rare" is used for rare English words.
|
||||
A region name must come last and have the form "_xx", where "xx" is
|
||||
the two-letter, lower case region name. You can use more than one
|
||||
region by listing them: "en_us,en_ca" supports both US and Canadian
|
||||
English, but not words specific for Australia, New Zealand or Great
|
||||
Britain.
|
||||
As a special case the name of a .spl file can be given as-is. This is
|
||||
mainly for testing purposes. You must make sure the correct encoding
|
||||
is used, Vim doesn't check it.
|
||||
When 'encoding' is set the word lists are reloaded. Thus it's a good
|
||||
idea to set 'spelllang' after setting 'encoding'.
|
||||
More info at |spell|.
|
||||
How the related spell files are found is explained here: |spell-load|.
|
||||
|
||||
*'spellsuggest'* *'sps'*
|
||||
'spellsuggest' 'sps' string (default "best")
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
Methods used for spelling suggestions. Both for the |z?| command and
|
||||
the |spellsuggest()| function. This is a comma-separated list of
|
||||
items:
|
||||
|
||||
best Internal method that works best for English. Finds
|
||||
changes like "fast" and uses a bit of sound-a-like
|
||||
scoring to improve the ordering.
|
||||
|
||||
double Internal method that uses two methods and mixes the
|
||||
results. The first method is "fast", the other method
|
||||
computes how much the suggestion sounds like the bad
|
||||
word. That only works when the language specifies
|
||||
sound folding. Can be slow and doesn't always give
|
||||
better results.
|
||||
|
||||
fast Internal method that only checks for simple changes:
|
||||
character inserts/deletes/swaps. Works well for
|
||||
simple typing mistakes.
|
||||
|
||||
file:{filename} Read file {filename}, which must have two columns,
|
||||
separated by a slash. The first column contains the
|
||||
bad word, the second column the suggested good word.
|
||||
Example:
|
||||
theribal/terrible ~
|
||||
Use this for common mistakes that do not appear at the
|
||||
top of the suggestion list with the internal methods.
|
||||
Lines without a slash are ignored, use this for
|
||||
comments.
|
||||
The file is used for all languages.
|
||||
|
||||
expr:{expr} Evaluate expression {expr}. Use a function to avoid
|
||||
trouble with spaces. |v:val| holds the badly spelled
|
||||
word. The expression must evaluate to a List of
|
||||
Lists, each with a suggestion and a score.
|
||||
Example:
|
||||
[['the', 33], ['that', 44]]
|
||||
Set 'verbose' and use |z?| to see the scores that the
|
||||
internal methods use. A lower score is better.
|
||||
This may invoke |spellsuggest()| if you temporarily
|
||||
set 'spellsuggest' to exclude the "expr:" part.
|
||||
Errors are silently ignored, unless you set the
|
||||
'verbose' option to a non-zero value.
|
||||
|
||||
Only one of "best", "double" or "fast" may be used. The others may
|
||||
appear several times in any order. Example: >
|
||||
:set sps=file:~/.vim/sugg,best,expr:MySuggest()
|
||||
<
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
|
||||
*'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
|
||||
'splitbelow' 'sb' boolean (default off)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
|
||||
*repeat.txt* For Vim version 7.0aa. Last change: 2005 Jun 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -290,7 +290,7 @@ first line has something like ":map <F1> :help^M", where "^M" is a <CR>. If
|
||||
the first line ends in a <CR>, but following ones don't, you will get an error
|
||||
message, because the <CR> from the first lines will be lost.
|
||||
|
||||
Macintosh: Files that are read with ":source" normally have <CR> <EOL>s.
|
||||
Mac Classic: Files that are read with ":source" normally have <CR> <EOL>s.
|
||||
These always work. If you are using a file with <NL> <EOL>s (for example, a
|
||||
file made on Unix), this will be recognized if 'fileformats' is not empty and
|
||||
the first line does not end in a <CR>. Be careful not to use a file with <NL>
|
||||
@@ -515,6 +515,9 @@ DELETING BREAKPOINTS
|
||||
Delete breakpoint {nr}. Use |:breaklist| to see the number of
|
||||
each breakpoint.
|
||||
|
||||
:breakd[el] *
|
||||
Delete all breakpoints.
|
||||
|
||||
:breakd[el] func [lnum] {name}
|
||||
Delete a breakpoint in a function.
|
||||
|
||||
@@ -576,6 +579,11 @@ It is only included when Vim was compiled with "huge" features.
|
||||
this command.
|
||||
|
||||
|
||||
:profd[el] ... *:profd* *:profdel*
|
||||
Stop profiling for the arguments specified. See |:breakdel|
|
||||
for the arguments.
|
||||
|
||||
|
||||
You must always start with a ":profile start fname" command. The resulting
|
||||
file is written when Vim exits. Here is an example of the output, with line
|
||||
numbers prepended for the explanation:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 13
|
||||
*spell.txt* For Vim version 7.0aa. Last change: 2005 Jul 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -7,8 +7,9 @@
|
||||
Spell checking *spell*
|
||||
|
||||
1. Quick start |spell-quickstart|
|
||||
2. Generating a spell file |spell-mkspell|
|
||||
3. Spell file format |spell-file-format|
|
||||
2. Remarks on spell checking |spell-remarks|
|
||||
3. Generating a spell file |spell-mkspell|
|
||||
4. Spell file format |spell-file-format|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
|
||||
@@ -25,9 +26,10 @@ This command switches on spell checking: >
|
||||
This switches on the 'spell' option and specifies to check for US English.
|
||||
|
||||
The words that are not recognized are highlighted with one of these:
|
||||
SpellBad word not recognized
|
||||
SpellRare rare word
|
||||
SpellLocal wrong spelling for selected region
|
||||
SpellBad word not recognized |hl-SpellBad|
|
||||
SpellCap word not capitalised |hl-SpellCap|
|
||||
SpellRare rare word |hl-SpellRare|
|
||||
SpellLocal wrong spelling for selected region |hl-SpellLocal|
|
||||
|
||||
Vim only checks words for spelling, there is no grammar check.
|
||||
|
||||
@@ -36,12 +38,13 @@ To search for the next misspelled word:
|
||||
*]s* *E756*
|
||||
]s Move to next misspelled word after the cursor.
|
||||
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 Like "]s" but search backwards, find the misspelled
|
||||
word before the cursor.
|
||||
word before the cursor. Doesn't recognize words
|
||||
split over two lines, thus may stop at words that are
|
||||
not highlighted as bad. Does not stop at word with
|
||||
missing capital at the start of a line.
|
||||
|
||||
*]S*
|
||||
]S Like "]s" but only stop at bad words, not at rare
|
||||
@@ -54,49 +57,109 @@ To search for the next misspelled word:
|
||||
To add words to your own word list: *E764*
|
||||
|
||||
*zg*
|
||||
zg Add word under the cursor as a good word to
|
||||
'spellfile'. In Visual mode the selected characters
|
||||
are added as a word (including white space!).
|
||||
zg Add word under the cursor as a good word to the first
|
||||
name in 'spellfile'. In Visual mode the selected
|
||||
characters are added as a word (including white
|
||||
space!). If the word is explicitly marked as bad word
|
||||
in another spell file the result is unpredictable.
|
||||
A count may precede the command to indicate the entry
|
||||
in 'spellfile' to be used. A count of two uses the
|
||||
second entry.
|
||||
|
||||
*zG*
|
||||
zG Like "zg" but add the word to the internal word list
|
||||
|internal-wordlist|.
|
||||
|
||||
*zw*
|
||||
zw Add word under the cursor as a wrong (bad) word to
|
||||
'spellfile'. In Visual mode the selected characters
|
||||
are added as a word (including white space!).
|
||||
zw Like "zg" but mark the word as a wrong (bad) word.
|
||||
|
||||
*:spellg* *:spellgood*
|
||||
:spellg[ood] {word} Add [word} as a good word to 'spellfile'.
|
||||
*zW*
|
||||
zW Like "zw" but add the word to the internal word list
|
||||
|internal-wordlist|.
|
||||
|
||||
:spellw[rong] {word} Add [word} as a wrong (bad) word to 'spellfile'.
|
||||
*:spe* *:spellgood*
|
||||
:[count]spe[llgood] {word}
|
||||
Add [word} as a good word to 'spellfile', like with
|
||||
"zg". Without count the first name is used, with a
|
||||
count of two the second entry, etc.
|
||||
|
||||
After adding a word to 'spellfile' its associated ".spl" file will
|
||||
automatically be updated. More details about the 'spellfile' format below
|
||||
|spell-wordlist-format|.
|
||||
:spe[llgood]! {word} Add [word} as a good word to the internal word list,
|
||||
like with "zG".
|
||||
|
||||
*:spellw* *:spellwrong*
|
||||
:[count]spellw[rong] {word}
|
||||
Add [word} as a wrong (bad) word to 'spellfile', as
|
||||
with "zw". Without count the first name is used, with
|
||||
a count of two the second entry, etc.
|
||||
|
||||
:spellw[rong]! {word} Add [word} as a wrong (bad) word to the internal word
|
||||
list.
|
||||
|
||||
After adding a word to 'spellfile' with the above commands its associated
|
||||
".spl" file will automatically be updated and reloaded. If you change
|
||||
'spellfile' manually you need to use the |:mkspell| command. This sequence of
|
||||
commands mostly works well: >
|
||||
:edit <file in 'spellfile'>
|
||||
< (make changes to the spell file) >
|
||||
:mkspell! %
|
||||
|
||||
More details about the 'spellfile' format below |spell-wordlist-format|.
|
||||
|
||||
*internal-wordlist*
|
||||
The internal word list is used for all buffers where 'spell' is set. It is
|
||||
not stored, it is lost when you exit Vim. It is also cleared when 'encoding'
|
||||
is set.
|
||||
|
||||
|
||||
Finding suggestions for bad words:
|
||||
|
||||
*z?*
|
||||
z? For the badly spelled word under the cursor suggest
|
||||
the correctly spelled word.
|
||||
When there is no badly spelled word under the cursor
|
||||
use the one after the cursor, in the same line.
|
||||
The results are sorted on similarity to the badly
|
||||
spelled word.
|
||||
z? For the word under/after the cursor suggest correctly
|
||||
spelled words. This also works to find alternatives
|
||||
for a word that is not highlighted as a bad word,
|
||||
e.g., when the word after it is bad.
|
||||
The results are sorted on similarity to the word
|
||||
under/after the cursor.
|
||||
This may take a long time. Hit CTRL-C when you are
|
||||
bored.
|
||||
This does not work when there is a line break halfway
|
||||
a bad word (e.g., "the the").
|
||||
You can enter the number of your choice or press
|
||||
<Enter> if you don't want to replace.
|
||||
<Enter> if you don't want to replace. You can also
|
||||
use the mouse to click on your choice (only works if
|
||||
the mouse can be used in Normal mode and when there
|
||||
are no line wraps). Click on the first (header) line
|
||||
to cancel.
|
||||
If 'verbose' is non-zero a score will be displayed to
|
||||
indicate the likeliness to the badly spelled word (the
|
||||
higher the score the more different).
|
||||
When a word was replaced the redo command "." will
|
||||
repeat the word replacement. This works like "ciw",
|
||||
the good word and <Esc>.
|
||||
|
||||
*:spellr* *:spellrepall* *E752* *E753*
|
||||
:spellr[epall] Repeat the replacement done by |z?| for all matches
|
||||
with the replaced word in the current window.
|
||||
|
||||
The 'spellsuggest' option influences how the list of suggestions is generated
|
||||
and sorted. See |'spellsuggest'|.
|
||||
|
||||
The 'spellcapcheck' option is used to check the first word of a sentence
|
||||
starts with a capital. This doesn't work for the first word in the file.
|
||||
When there is a line break right after a sentence the highlighting of the next
|
||||
line may be postponed. Use |CTRL-L| when needed.
|
||||
|
||||
==============================================================================
|
||||
2. Remarks on spell checking *spell-remarks*
|
||||
|
||||
PERFORMANCE
|
||||
|
||||
Note that Vim does on-the-fly spell checking. To make this work fast the
|
||||
word list is loaded in memory. Thus this uses a lot of memory (1 Mbyte or
|
||||
more). There might also be a noticeable delay when the word list is loaded,
|
||||
which happens when 'spelllang' or 'spell' is set. Each word list is only
|
||||
loaded once, they are not deleted when 'spelllang' is made empty or 'spell' is
|
||||
reset. When 'encoding' is set the word lists are reloaded, thus you may
|
||||
notice a delay then too.
|
||||
Vim does on-the-fly spell checking. To make this work fast the word list is
|
||||
loaded in memory. Thus this uses a lot of memory (1 Mbyte or more). There
|
||||
might also be a noticeable delay when the word list is loaded, which happens
|
||||
when 'spell' is set and when 'spelllang' is set while 'spell' was already set.
|
||||
To minimize the delay each word list is only loaded once, it is not deleted
|
||||
when 'spelllang' is made empty or 'spell' is reset. When 'encoding' is set
|
||||
all the word lists are reloaded, thus you may notice a delay then too.
|
||||
|
||||
|
||||
REGIONS
|
||||
@@ -112,26 +175,38 @@ comes in (at least) these variants:
|
||||
en_us USA
|
||||
|
||||
Words that are not used in one region but are used in another region are
|
||||
highlighted with |SpellLocal|.
|
||||
highlighted with SpellLocal |hl-SpellLocal|.
|
||||
|
||||
Always use lowercase letters for the language and region names.
|
||||
|
||||
When adding a word with |zg| or another command it's always added for all
|
||||
regions. You can change that by manually editing the 'spellfile'. See
|
||||
|spell-wordlist-format|.
|
||||
|spell-wordlist-format|. Note that the regions as specified in the files in
|
||||
'spellfile' are only used when all entries in "spelllang" specify the same
|
||||
region (not counting files specified by their .spl name).
|
||||
|
||||
|
||||
SPELL FILES
|
||||
SPELL FILES *spell-load*
|
||||
|
||||
Vim searches for spell files in the "spell" subdirectory of the directories in
|
||||
'runtimepath'. The name is: LL.EEE.spl, where:
|
||||
LL the language name
|
||||
EEE the value of 'encoding'
|
||||
|
||||
The value for "LL" comes from 'spelllang', but excludes the region name.
|
||||
Examples:
|
||||
'spelllang' LL ~
|
||||
en_us en
|
||||
en-rare en-rare
|
||||
medical_ca medical
|
||||
|
||||
Only the first file is loaded, the one that is first in 'runtimepath'. If
|
||||
this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
|
||||
All the ones that are found are used.
|
||||
|
||||
Additionally, the files related to the names in 'spellfile' are loaded. These
|
||||
are the files that |zg| and |zw| add good and wrong words to.
|
||||
|
||||
Exceptions:
|
||||
- Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't
|
||||
matter for spelling.
|
||||
@@ -187,12 +262,31 @@ include characters like '-' in 'iskeyword'. The word characters do depend on
|
||||
|
||||
The table with word characters is stored in the main .spl file. Therefore it
|
||||
matters what the current locale is when generating it! A .add.spl file does
|
||||
not contain a word table.
|
||||
not contain a word table though.
|
||||
|
||||
A word that starts with a digit is always ignored. That includes hex numbers
|
||||
in the form 0xff and 0XFF.
|
||||
|
||||
|
||||
WORD COMBINATIONS
|
||||
|
||||
It is possible to spell-check words that include a space. This is used to
|
||||
recognize words that are invalid when used by themselves, e.g. for "et al.".
|
||||
It can also be used to recognize "the the" and highlight it.
|
||||
|
||||
The number of spaces is irrelevant. In most cases a line break may also
|
||||
appear. However, this makes it difficult to find out where to start checking
|
||||
for spelling mistakes. When you make a change to one line and only that line
|
||||
is redrawn Vim won't look in the previous line, thus when "et" is at the end
|
||||
of the previous line "al." will be flagged as an error. And when you type
|
||||
"the<CR>the" the highlighting doesn't appear until the first line is redrawn.
|
||||
Use |CTRL-L| to redraw right away. "[s" will also stop at a word combination
|
||||
with a line break.
|
||||
|
||||
When encountering a line break Vim skips characters such as '*', '>' and '"',
|
||||
so that comments in C, shell and Vim code can be spell checked.
|
||||
|
||||
|
||||
SYNTAX HIGHLIGHTING *spell-syntax*
|
||||
|
||||
Files that use syntax highlighting can specify where spell checking should be
|
||||
@@ -206,27 +300,53 @@ For the second method adding the @NoSpell cluster will disable spell checking
|
||||
again. This can be used, for example, to add @Spell to the comments of a
|
||||
program, and add @NoSpell for items that shouldn't be checked.
|
||||
|
||||
|
||||
VIM SCRIPTS
|
||||
|
||||
If you want to write a Vim script that does something with spelling, you may
|
||||
find these functions useful:
|
||||
|
||||
spellbadword() find badly spelled word at the cursor
|
||||
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
|
||||
the word list and keeps it small.
|
||||
|
||||
*.aff* *.dic* *Myspell*
|
||||
You can create a Vim spell file from the .aff and .dic files that Myspell
|
||||
uses. Myspell is used by OpenOffice.org and Mozilla. You should be able to
|
||||
find them here:
|
||||
http://lingucomponent.openoffice.org/spell_dic.html
|
||||
You can also use a plain word list.
|
||||
You can also use a plain word list. The results are the same, the choice
|
||||
depends on what word lists you can find.
|
||||
|
||||
:mksp[ell] [-ascii] {outname} {inname} ... *:mksp* *:mkspell*
|
||||
If you install Aap (from www.a-a-p.org) you can use the recipes in the
|
||||
runtime/spell/??/ directories. Aap will take care of downloading the files,
|
||||
apply patches needed for Vim and build the .spl file.
|
||||
|
||||
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.,
|
||||
when using an MS-Windows codepage on Unix) add tables to the .aff file
|
||||
|spell-affix-chars|. If the .aff file doesn't define a table then the word
|
||||
table of the currently active spelling is used. If spelling is not active
|
||||
then Vim will try to guess.
|
||||
|
||||
*:mksp* *:mkspell*
|
||||
:mksp[ell][!] [-ascii] {outname} {inname} ...
|
||||
Generate a Vim spell file word lists. Example: >
|
||||
:mkspell nl nl_NL.words
|
||||
<
|
||||
:mkspell /tmp/nl nl_NL.words
|
||||
< *E751*
|
||||
When {outname} ends in ".spl" it is used as the output
|
||||
file name. Otherwise it should be a language name,
|
||||
such as "en". The file written will be
|
||||
{outname}.{encoding}.spl. {encoding} is the value of
|
||||
the 'encoding' option.
|
||||
such as "en", without the region name. The file
|
||||
written will be "{outname}.{encoding}.spl", where
|
||||
{encoding} is the value of the 'encoding' option.
|
||||
|
||||
When the output file already exists [!] must be used
|
||||
to overwrite it.
|
||||
|
||||
When the [-ascii] argument is present, words with
|
||||
non-ascii characters are skipped. The resulting file
|
||||
@@ -247,13 +367,22 @@ You can also use a plain word list.
|
||||
they appear are used. |spell-affix-REP|
|
||||
|spell-affix-SAL|
|
||||
|
||||
When the spell file was written all currently used
|
||||
spell files will be reloaded.
|
||||
This command uses a lot of memory, required to find
|
||||
the optimal word tree (Polish requires a few hundred
|
||||
Mbyte). The final result will be much smaller.
|
||||
|
||||
:mksp[ell] [-ascii] {add-name}
|
||||
Like ":mkspell" above, using {add-name} as the input
|
||||
file and producing an output file that has ".spl"
|
||||
appended.
|
||||
After the spell file was written and it was being used
|
||||
in a buffer it will be reloaded automatically.
|
||||
|
||||
:mksp[ell] [-ascii] {name}.{enc}.add
|
||||
Like ":mkspell" above, using {name}.{enc}.add as the
|
||||
input file and producing an output file in the same
|
||||
directory that has ".spl" appended.
|
||||
|
||||
:mksp[ell] [-ascii] {name}
|
||||
Like ":mkspell" above, using {name} as the input file
|
||||
and producing an output file in the same directory
|
||||
that has ".{enc}.spl" appended.
|
||||
|
||||
Since you might want to change a Myspell word list for use with Vim the
|
||||
following procedure is recommended:
|
||||
@@ -263,9 +392,11 @@ following procedure is recommended:
|
||||
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
|
||||
"src/spell/*.diff" files can be used.
|
||||
4. Set 'encoding' to the desired encoding and use |:mkspell| to generate the
|
||||
Vim spell file.
|
||||
5. Try out the spell file with ":set spell spelllang=xx_YY".
|
||||
4. Start Vim with the right locale and use |:mkspell| to generate the Vim
|
||||
spell file.
|
||||
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:
|
||||
1. Obtain the new Myspell files as xx_YY.new.aff and xx_UU.new.dic.
|
||||
@@ -275,57 +406,93 @@ When the Myspell files are updated you can merge the differences:
|
||||
You may also need to change xx_YY.aff.
|
||||
4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
|
||||
|
||||
|
||||
SPELL FILE DUMP
|
||||
|
||||
If for some reason you want to check what words are supported by the currently
|
||||
used spelling files, use this command:
|
||||
|
||||
*:spelldump* *:spelld*
|
||||
:spelld[ump] Open a new window and fill it with all currently valid
|
||||
words.
|
||||
Note: For some languages the result may be enormous,
|
||||
causing Vim to run out of memory.
|
||||
|
||||
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
|
||||
the words.
|
||||
|
||||
When all entries to 'spelllang' use the same regions or no regions at all then
|
||||
the region information is included in the dumped words. Otherwise only words
|
||||
for the current region are included and no "/regions" line is generated.
|
||||
|
||||
Comment lines with the name of the .spl file are used as a header above the
|
||||
words that were generated from that .spl file.
|
||||
|
||||
==============================================================================
|
||||
9. 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
|
||||
maintains a word list.
|
||||
|
||||
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
|
||||
spelling we need a list of words that are OK, thus need not to be highlighted.
|
||||
Names will not appear in a dictionary, but do appear in a word list. And
|
||||
some old words are rarely used and are common misspellings. These do appear
|
||||
in a dictionary but not in a word list.
|
||||
spelling we need a list of words that are OK, thus should not to be
|
||||
highlighted. Person and company names will not appear in a dictionary, but do
|
||||
appear in a word list. And some old words are rarely used while they are
|
||||
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
|
||||
with affix compression are used by Myspell (Mozilla and OpenOffice.org). This
|
||||
requires two files, one with .aff and one with .dic extension. The second
|
||||
format is a list of words.
|
||||
There are two formats: A straight list of words and a list using affix
|
||||
compression. The files with affix compression are used by Myspell (Mozilla
|
||||
and OpenOffice.org). This requires two files, one with .aff and one with .dic
|
||||
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.
|
||||
|
||||
Additionally the following items are recognized:
|
||||
|
||||
- Empty and blank lines are ignored.
|
||||
|
||||
- Lines starting with a # are ignored (comment lines).
|
||||
|
||||
- A line starting with "/encoding=", before any word, specifies the encoding
|
||||
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
|
||||
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".
|
||||
In an addition word list the list 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 bad.
|
||||
- A line starting with "/=" specifies a word where case must match exactly.
|
||||
A "?" or "!" may be following: "/=?" and "/=!".
|
||||
- Digits after "/" indicate the regions in which the word is valid. If no
|
||||
regions are specified the word is valid in all regions.
|
||||
In an addition word list the region names should be equal to the main word
|
||||
list!
|
||||
|
||||
- Other lines starting with '/' are reserved for future use. The ones that
|
||||
are not recognized are ignored (but you do get a warning message).
|
||||
|
||||
- A "/" may follow the word with the following items:
|
||||
= Case must match exactly.
|
||||
? Rare word.
|
||||
! Bad (wrong) word.
|
||||
digit A region in which the word is valid. If no regions are
|
||||
specified the word is valid in all regions.
|
||||
|
||||
Example:
|
||||
|
||||
# This is an example word list comment
|
||||
/encoding=latin1 encoding of the file
|
||||
/regions=uscagb regions "us", "ca" and "gb"
|
||||
example word for all regions
|
||||
/1blah word for region 1 "us"
|
||||
/!Vim bad word
|
||||
/?3Campbell rare word in region 3 "gb"
|
||||
/='s mornings keep-case word
|
||||
blah/12 word for regions "us" and "ca"
|
||||
vim/! bad word
|
||||
Campbell/?3 rare word in region 3 "gb"
|
||||
's mornings/= keep-case word
|
||||
|
||||
Note that when "/=" is used the same word with all upper-case letters is not
|
||||
accepted. This is different from a word with mixed case that is automatically
|
||||
marked as keep-case, those words may appear in all upper-case letters.
|
||||
|
||||
|
||||
FORMAT WITH AFFIX COMPRESSION
|
||||
@@ -383,7 +550,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
|
||||
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 ~
|
||||
als als Als ALS ALs AlS aLs aLS
|
||||
@@ -392,7 +559,7 @@ The same word with all upper-case characters will always be OK.
|
||||
AlS AlS ALS als Als ALs aLs aLS
|
||||
|
||||
The KEP affix ID can be used to specifically match a word with identical case
|
||||
only, see below.
|
||||
only, see below |spell-affix-KEP|.
|
||||
|
||||
Note in line 5 to 7 that non-word characters are used. You can include
|
||||
any character in a word. When checking the text a word still only matches
|
||||
@@ -400,7 +567,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.
|
||||
|
||||
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*
|
||||
A flag that Vim adds and is not in Myspell is the flag defined with KEP in the
|
||||
@@ -408,9 +577,12 @@ affix file. This has the meaning that case matters. This can be used if the
|
||||
word does not have the first letter in upper case at the start of a sentence.
|
||||
Example (assuming that = was used for KEP):
|
||||
|
||||
word list matches does not match ~
|
||||
's morgens/= 's morgens 'S morgens 's Morgens
|
||||
's Morgens 's Morgens 'S morgens 's morgens
|
||||
word list matches does not match ~
|
||||
's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS
|
||||
's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens
|
||||
|
||||
The flag can also be used to avoid that the word matches when it is in all
|
||||
upper-case letters.
|
||||
|
||||
*spell-affix-mbyte*
|
||||
The basic word list is normally in an 8-bit encoding, which is mentioned in
|
||||
@@ -418,20 +590,24 @@ 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
|
||||
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
|
||||
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
|
||||
*spell-affix-chars*
|
||||
When using an 8-bit encoding the affix file should define what characters are
|
||||
word characters (as specified with ENC). This is because the system where
|
||||
":mkspell" is used may not support a locale with this encoding and isalpha()
|
||||
won't work. For example when using "cp1250" on Unix.
|
||||
|
||||
*E761* *E762*
|
||||
*E761* *E762* *spell-affix-FOL*
|
||||
*spell-affix-LOW* *spell-affix-UPP*
|
||||
Three lines in the affix file are needed. Simplistic example:
|
||||
|
||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ~
|
||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ~
|
||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ~
|
||||
FOL <20><><EFBFBD> ~
|
||||
LOW <20><><EFBFBD> ~
|
||||
UPP <20><><EFBFBD> ~
|
||||
|
||||
All three lines must have exactly the same number of characters.
|
||||
|
||||
@@ -450,11 +626,70 @@ ASCII characters should be omitted, Vim always handles these in the same way.
|
||||
When the encoding is UTF-8 no word characters need to be specified.
|
||||
|
||||
*E763*
|
||||
All spell files for the same encoding must use the same word characters,
|
||||
otherwise they can't be combined without errors. The XX.ascii.spl spell file
|
||||
generated with the "-ascii" argument will not contain the table with
|
||||
characters, so that it can be combine with spell files for any encoding.
|
||||
Vim allows you to use spell checking for several languages in the same file.
|
||||
You can list them in the 'spelllang' option. As a consequence all spell files
|
||||
for the same encoding must use the same word characters, otherwise they can't
|
||||
be combined without errors. If you get a warning that the word tables differ
|
||||
you may need to generate the .spl file again with |:mkspell|. Check the FOL,
|
||||
LOW and UPP lines in the used .aff file.
|
||||
|
||||
The XX.ascii.spl spell file generated with the "-ascii" argument will not
|
||||
contain the table with characters, so that it can be combine with spell files
|
||||
for any encoding. The .add.spl files also do not contain the table.
|
||||
|
||||
|
||||
MID-WORD CHARACTERS
|
||||
*spell-midword*
|
||||
Some characters are only to be considered word characters if they are used in
|
||||
between two ordinary word characters. An example is the single quote: It is
|
||||
often used to put text in quotes, thus it can't be recognized as a word
|
||||
character, but when it appears in between word characters it must be part of
|
||||
the word. This is needed to detect a spelling error such as they'are. That
|
||||
should be they're, but since "they" and "are" are words themselves that would
|
||||
go unnoticed.
|
||||
|
||||
These characters are defined with MIDWORD in the .aff file:
|
||||
|
||||
MIDWORD '- ~
|
||||
|
||||
|
||||
AFFIXES
|
||||
*spell-affix-PFX* *spell-affix-SFX*
|
||||
The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
|
||||
documentation or the Aspell manual:
|
||||
http://aspell.net/man-html/Affix-Compression.html).
|
||||
|
||||
Note that Myspell ignores any extra text after the relevant info. Vim
|
||||
requires this text to start with a "#" so that mistakes don't go unnoticed.
|
||||
Example:
|
||||
|
||||
SFX F 0 in [^i]n # Spion > Spionin ~
|
||||
SFX F 0 nen in # Bauerin > Bauerinnen ~
|
||||
|
||||
An extra item for Vim is the "rare" flag. It must come after the other
|
||||
fields, before a comment. When used then all words that use the affix will be
|
||||
marked as rare words. Example:
|
||||
|
||||
PFX F 0 nene . rare ~
|
||||
SFX F 0 oin n rare # hardly ever used ~
|
||||
|
||||
However, if the word also appears as a good word in another way it won't be
|
||||
marked as rare.
|
||||
|
||||
*spell-affix-PFXPOSTPONE*
|
||||
When an affix file has very many prefixes that apply to many words it's not
|
||||
possible to build the whole word list in memory. This applies to Hebrew (a
|
||||
list with all words is over a Gbyte). In that case applying prefixes must be
|
||||
postponed. This makes spell checking slower. It is indicated by this keyword
|
||||
in the .aff file:
|
||||
|
||||
PFXPOSTPONE ~
|
||||
|
||||
Only prefixes without a chop string can be postponed, prefixes with a chop
|
||||
string will still be included in the word list.
|
||||
|
||||
|
||||
KEEP-CASE WORDS
|
||||
*spell-affix-KEP*
|
||||
In the affix file a KEP line can be used to define the affix name used for
|
||||
keep-case words. Example:
|
||||
@@ -463,6 +698,8 @@ keep-case words. Example:
|
||||
|
||||
See above for an example |spell-affix-vim|.
|
||||
|
||||
|
||||
RARE WORDS
|
||||
*spell-affix-RAR*
|
||||
In the affix file a RAR line can be used to define the affix name used for
|
||||
rare words. Example:
|
||||
@@ -471,7 +708,24 @@ rare words. Example:
|
||||
|
||||
Rare words are highlighted differently from bad words. This is to be used for
|
||||
words that are correct for the language, but are hardly ever used and could be
|
||||
a typing mistake anyway.
|
||||
a typing mistake anyway. When the same word is found as good it won't be
|
||||
highlighted as rare.
|
||||
|
||||
|
||||
BAD WORDS
|
||||
*spell-affix-BAD*
|
||||
In the affix file a BAD line can be used to define the affix name used for
|
||||
bad words. Example:
|
||||
|
||||
BAD ! ~
|
||||
|
||||
This can be used to exclude words that would otherwise be good. For example
|
||||
"the the" in the .dic file:
|
||||
|
||||
the the/! ~
|
||||
|
||||
Once a word has been marked as bad it won't be undone by encountering the same
|
||||
word as good.
|
||||
|
||||
|
||||
REPLACEMENTS *spell-affix-REP*
|
||||
@@ -487,11 +741,14 @@ used to make spelling suggestions. The items define the "from" text and the
|
||||
REP ch k ~
|
||||
|
||||
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*
|
||||
|
||||
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
|
||||
to prefer suggestions with these letters substituted. Example:
|
||||
|
||||
@@ -501,19 +758,24 @@ to prefer suggestions with these letters substituted. Example:
|
||||
|
||||
The first line specifies the number of MAP lines following. Vim ignores it.
|
||||
|
||||
Each letter must appear in only one of the MAP items. It's a bit more
|
||||
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
|
||||
to be used. The main items define the "from" text and the "to" replacement.
|
||||
Example:
|
||||
Simplistic example:
|
||||
|
||||
SAL CIA X ~
|
||||
SAL CH X ~
|
||||
SAL C K ~
|
||||
SAL K K ~
|
||||
|
||||
TODO: explain how it works.
|
||||
There are a few rules and this can become quite complicated. An explanation
|
||||
how it works can be found in the Aspell manual:
|
||||
http://aspell.net/man-html/Phonetic-Code.html.
|
||||
|
||||
There are a few special items:
|
||||
|
||||
@@ -523,4 +785,32 @@ There are a few special items:
|
||||
|
||||
"1" has the same meaning as "true". Any other value means "false".
|
||||
|
||||
|
||||
SIMPLE SOUNDFOLDING *spell-affix-SOFOFROM* *spell-affix-SOFOTO*
|
||||
|
||||
The SAL mechanism is complex and slow. A simpler mechanism is mapping all
|
||||
characters to another character, mapping similar sounding characters to the
|
||||
same character. At the same time this does case folding. You can not have
|
||||
both SAL items and simple soundfolding.
|
||||
|
||||
There are two items required: one to specify the characters that are mapped
|
||||
and one that specifies the characters they are mapped to. They must have
|
||||
exactly the same number of characters. Example:
|
||||
|
||||
SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ~
|
||||
SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkes ~
|
||||
|
||||
In the example all vowels are mapped to the same character 'e'. Another
|
||||
method would be to leave out all vowels. Some characters that sound nearly
|
||||
the same and are often mixed up, such as 'm' and 'n', are mapped to the same
|
||||
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
|
||||
white space is replaced by one space. Sequences of the same character in
|
||||
SOFOFROM are replaced by one.
|
||||
|
||||
You can use the |soundfold()| function to try out the results. Or set the
|
||||
'verbose' option to see the score in the output of the |z?| command.
|
||||
|
||||
|
||||
vim:tw=78:sw=4:ts=8:ft=help:norl:
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
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
|
||||
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
|
||||
a .vimrc file is found: Mappings are interpreted the moment they are
|
||||
|
||||
@@ -728,14 +728,18 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'sol' options.txt /*'sol'*
|
||||
'sourceany' vi_diff.txt /*'sourceany'*
|
||||
'sp' options.txt /*'sp'*
|
||||
'spc' options.txt /*'spc'*
|
||||
'spell' options.txt /*'spell'*
|
||||
'spellcapcheck' options.txt /*'spellcapcheck'*
|
||||
'spellfile' options.txt /*'spellfile'*
|
||||
'spelllang' options.txt /*'spelllang'*
|
||||
'spellsuggest' options.txt /*'spellsuggest'*
|
||||
'spf' options.txt /*'spf'*
|
||||
'spl' options.txt /*'spl'*
|
||||
'splitbelow' options.txt /*'splitbelow'*
|
||||
'splitright' options.txt /*'splitright'*
|
||||
'spr' options.txt /*'spr'*
|
||||
'sps' options.txt /*'sps'*
|
||||
'sr' options.txt /*'sr'*
|
||||
'srr' options.txt /*'srr'*
|
||||
'ss' options.txt /*'ss'*
|
||||
@@ -1224,6 +1228,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
-y starting.txt /*-y*
|
||||
. repeat.txt /*.*
|
||||
.Xdefaults gui_x11.txt /*.Xdefaults*
|
||||
.aff spell.txt /*.aff*
|
||||
.dic spell.txt /*.dic*
|
||||
.exrc starting.txt /*.exrc*
|
||||
.gvimrc gui.txt /*.gvimrc*
|
||||
.vimrc starting.txt /*.vimrc*
|
||||
@@ -2228,6 +2234,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:print various.txt /*:print*
|
||||
:pro change.txt /*:pro*
|
||||
:prof repeat.txt /*:prof*
|
||||
:profd repeat.txt /*:profd*
|
||||
:profdel repeat.txt /*:profdel*
|
||||
:profile repeat.txt /*:profile*
|
||||
:promptfind change.txt /*:promptfind*
|
||||
:promptr change.txt /*:promptr*
|
||||
@@ -2405,8 +2413,14 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:source repeat.txt /*:source*
|
||||
:source_crnl repeat.txt /*:source_crnl*
|
||||
:sp windows.txt /*:sp*
|
||||
:spellg spell.txt /*:spellg*
|
||||
:spe spell.txt /*:spe*
|
||||
:spelld spell.txt /*:spelld*
|
||||
:spelldump spell.txt /*:spelldump*
|
||||
:spellgood spell.txt /*:spellgood*
|
||||
:spellr spell.txt /*:spellr*
|
||||
:spellrepall spell.txt /*:spellrepall*
|
||||
:spellw spell.txt /*:spellw*
|
||||
:spellwrong spell.txt /*:spellwrong*
|
||||
:split windows.txt /*:split*
|
||||
:split_f windows.txt /*:split_f*
|
||||
:spr windows.txt /*:spr*
|
||||
@@ -3699,6 +3713,9 @@ E748 repeat.txt /*E748*
|
||||
E749 eval.txt /*E749*
|
||||
E75 vi_diff.txt /*E75*
|
||||
E750 repeat.txt /*E750*
|
||||
E751 spell.txt /*E751*
|
||||
E752 spell.txt /*E752*
|
||||
E753 spell.txt /*E753*
|
||||
E754 spell.txt /*E754*
|
||||
E756 spell.txt /*E756*
|
||||
E758 spell.txt /*E758*
|
||||
@@ -3708,6 +3725,8 @@ E760 spell.txt /*E760*
|
||||
E761 spell.txt /*E761*
|
||||
E762 spell.txt /*E762*
|
||||
E763 spell.txt /*E763*
|
||||
E764 spell.txt /*E764*
|
||||
E765 options.txt /*E765*
|
||||
E77 message.txt /*E77*
|
||||
E78 motion.txt /*E78*
|
||||
E79 message.txt /*E79*
|
||||
@@ -3809,6 +3828,7 @@ MiNT os_mint.txt /*MiNT*
|
||||
Moolenaar intro.txt /*Moolenaar*
|
||||
MorphOS os_amiga.txt /*MorphOS*
|
||||
Motif gui_x11.txt /*Motif*
|
||||
Myspell spell.txt /*Myspell*
|
||||
MzScheme if_mzsch.txt /*MzScheme*
|
||||
N pattern.txt /*N*
|
||||
N% motion.txt /*N%*
|
||||
@@ -4986,6 +5006,7 @@ g_CTRL-] tagsrch.txt /*g_CTRL-]*
|
||||
g` motion.txt /*g`*
|
||||
g`a motion.txt /*g`a*
|
||||
ga various.txt /*ga*
|
||||
garbagecollect() eval.txt /*garbagecollect()*
|
||||
gd pattern.txt /*gd*
|
||||
ge motion.txt /*ge*
|
||||
get() eval.txt /*get()*
|
||||
@@ -5127,7 +5148,6 @@ hebrew hebrew.txt /*hebrew*
|
||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||
help various.txt /*help*
|
||||
help-context help.txt /*help-context*
|
||||
help-tags tags 1
|
||||
help-translated various.txt /*help-translated*
|
||||
help-xterm-window various.txt /*help-xterm-window*
|
||||
help.txt help.txt /*help.txt*
|
||||
@@ -5394,6 +5414,7 @@ intel-itanium syntax.txt /*intel-itanium*
|
||||
intellimouse-wheel-problems gui_w32.txt /*intellimouse-wheel-problems*
|
||||
interfaces-5.2 version5.txt /*interfaces-5.2*
|
||||
internal-variables eval.txt /*internal-variables*
|
||||
internal-wordlist spell.txt /*internal-wordlist*
|
||||
internet intro.txt /*internet*
|
||||
intro intro.txt /*intro*
|
||||
intro.txt intro.txt /*intro.txt*
|
||||
@@ -6240,6 +6261,7 @@ sniff-compiling if_sniff.txt /*sniff-compiling*
|
||||
sniff-intro if_sniff.txt /*sniff-intro*
|
||||
sort() eval.txt /*sort()*
|
||||
sorting change.txt /*sorting*
|
||||
soundfold() eval.txt /*soundfold()*
|
||||
space intro.txt /*space*
|
||||
spec-customizing pi_spec.txt /*spec-customizing*
|
||||
spec-how-to-use-it pi_spec.txt /*spec-how-to-use-it*
|
||||
@@ -6251,20 +6273,35 @@ spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
|
||||
special-buffers windows.txt /*special-buffers*
|
||||
speed-up tips.txt /*speed-up*
|
||||
spell spell.txt /*spell*
|
||||
spell-affix-BAD spell.txt /*spell-affix-BAD*
|
||||
spell-affix-FOL spell.txt /*spell-affix-FOL*
|
||||
spell-affix-KEP spell.txt /*spell-affix-KEP*
|
||||
spell-affix-LOW spell.txt /*spell-affix-LOW*
|
||||
spell-affix-MAP spell.txt /*spell-affix-MAP*
|
||||
spell-affix-PFX spell.txt /*spell-affix-PFX*
|
||||
spell-affix-PFXPOSTPONE spell.txt /*spell-affix-PFXPOSTPONE*
|
||||
spell-affix-RAR spell.txt /*spell-affix-RAR*
|
||||
spell-affix-REP spell.txt /*spell-affix-REP*
|
||||
spell-affix-SAL spell.txt /*spell-affix-SAL*
|
||||
spell-affix-SFX spell.txt /*spell-affix-SFX*
|
||||
spell-affix-SOFOFROM spell.txt /*spell-affix-SOFOFROM*
|
||||
spell-affix-SOFOTO spell.txt /*spell-affix-SOFOTO*
|
||||
spell-affix-UPP spell.txt /*spell-affix-UPP*
|
||||
spell-affix-chars spell.txt /*spell-affix-chars*
|
||||
spell-affix-mbyte spell.txt /*spell-affix-mbyte*
|
||||
spell-affix-vim spell.txt /*spell-affix-vim*
|
||||
spell-dic-format spell.txt /*spell-dic-format*
|
||||
spell-file-format spell.txt /*spell-file-format*
|
||||
spell-load spell.txt /*spell-load*
|
||||
spell-midword spell.txt /*spell-midword*
|
||||
spell-mkspell spell.txt /*spell-mkspell*
|
||||
spell-quickstart spell.txt /*spell-quickstart*
|
||||
spell-remarks spell.txt /*spell-remarks*
|
||||
spell-syntax spell.txt /*spell-syntax*
|
||||
spell-wordlist-format spell.txt /*spell-wordlist-format*
|
||||
spell.txt spell.txt /*spell.txt*
|
||||
spellbadword() eval.txt /*spellbadword()*
|
||||
spellsuggest() eval.txt /*spellsuggest()*
|
||||
split() eval.txt /*split()*
|
||||
splitfind windows.txt /*splitfind*
|
||||
splitview windows.txt /*splitview*
|
||||
@@ -7082,6 +7119,7 @@ zC fold.txt /*zC*
|
||||
zD fold.txt /*zD*
|
||||
zE fold.txt /*zE*
|
||||
zF fold.txt /*zF*
|
||||
zG spell.txt /*zG*
|
||||
zH scroll.txt /*zH*
|
||||
zL scroll.txt /*zL*
|
||||
zM fold.txt /*zM*
|
||||
@@ -7099,6 +7137,7 @@ zOS-open-source os_390.txt /*zOS-open-source*
|
||||
zOS-weaknesses os_390.txt /*zOS-weaknesses*
|
||||
zOS-xterm os_390.txt /*zOS-xterm*
|
||||
zR fold.txt /*zR*
|
||||
zW spell.txt /*zW*
|
||||
zX fold.txt /*zX*
|
||||
z^ scroll.txt /*z^*
|
||||
za fold.txt /*za*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 13
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,16 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Range(0) should return an empty list (Servatius Brandt).
|
||||
|
||||
a few builtin functions call set_var() internally to set a variable. They do
|
||||
not check for a valid variable name. Example: setbufvar(1, ";", 1) sets a
|
||||
variable named ";". (Servatius Brandt)
|
||||
|
||||
Patch for if_python to make exit work better with threads. (ugo)
|
||||
Still seems to fail 15% of the time.
|
||||
Vim 7 breaks, works OK with 6.3 version of if_python (Thakkar)
|
||||
|
||||
Add extra list of file locations. Can be used with:
|
||||
:ltag list of matching tags, like :tselect
|
||||
|
||||
@@ -63,6 +53,8 @@ Win32: Balloon text can't contain line break.
|
||||
Patch from Sergey Khorev, 2005 Apr 11
|
||||
Add has("balloon_multiline")
|
||||
|
||||
Win32: Crash when pasting Simplified Chinese in utf-8. (rainux, 2005 June 20)
|
||||
|
||||
Mac unicode patch (Da Woon Jung):
|
||||
- selecting proportional font breaks display
|
||||
- UTF-8 text causes display problems. Font replacement causes this.
|
||||
@@ -75,6 +67,9 @@ changed.
|
||||
Include new PHP indent script from John Wellesz?
|
||||
http://www.vim.org/scripts/download_script.php?src_id=4330
|
||||
|
||||
In Vim indenting use synID() to avoid recognizing "|en" in a string as
|
||||
"|endif".
|
||||
|
||||
autoload:
|
||||
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
|
||||
script names and a help file and produces a script that can be sourced to
|
||||
@@ -98,56 +93,8 @@ Awaiting response:
|
||||
|
||||
PLANNED FOR VERSION 7.0:
|
||||
|
||||
- Add SPELLCHECKER, with support for many languages.
|
||||
- Spell checking code todo's:
|
||||
- Code for making suggestions:
|
||||
- Also need to store "toupper" in the .spl file.
|
||||
- Give better score for words that sound like the bad word?
|
||||
- "sounds-like" matching: Also try variants of the soundslike word.
|
||||
- Aspell has the "special" character, useful?
|
||||
- Support for approximate-regexps will help with finding similar
|
||||
words (agrep http://www.tgries.de/agrep/).
|
||||
- Give a warning for ":mkspell it_IT wordfile", thus using a region
|
||||
name with only one input file.
|
||||
- Also put list of word characters in word list file. Otherwise the
|
||||
one for Italian may differ from the one used for English.
|
||||
- Somehow mark "frequent" words, so that suggestions with "a" and
|
||||
"the" can be preferred?
|
||||
- Make "en-rare" spell file.
|
||||
Convention: use en_US (language_region) and en-rare (language-field)
|
||||
Add hl groups to 'spelllang'?
|
||||
:set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath
|
||||
- Use "engspchk" from Charles Campbell for ideas (commands, rare words).
|
||||
- References: MySpell library (in OpenOffice.org).
|
||||
http://spellchecker.mozdev.org/source.html
|
||||
http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/
|
||||
author: Kevin Hendricks <kevin.hendricks@sympatico.ca>
|
||||
- Update option window for 'verbosefile', 'spell', 'spellfile' and
|
||||
'spelllang'.
|
||||
- Distribution: Need wordlists for many languages; "language pack"
|
||||
Put them on the ftp site, ready to download. Include README for
|
||||
copyrights.
|
||||
- More complicated: Regions with different languages? E.g. comments in
|
||||
English, strings in German (po file).
|
||||
- Work together with OpenOffice.org to update the wordlists. (Adri
|
||||
Verhoef, Aad Nales) Setup vim-spell maillist?
|
||||
- Insert mode completion mechanism that uses the spell word lists.
|
||||
- Charles Campbell asks for method to add "contained" groups to
|
||||
existing syntax items (to add @Spell).
|
||||
Add ":syntax contains {pattern} add=@Spell" command? A bit like ":syn
|
||||
cluster" but change the contains list directly for matching syntax
|
||||
items.
|
||||
- Install spell files with src/main.aap.
|
||||
- Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
|
||||
obtain).
|
||||
- The English dictionaries for different regions are not consistent in
|
||||
their use of words with a dash.
|
||||
Later:
|
||||
- Implement compound words when it works for Myspell. Current idea has
|
||||
the problem that "foo/X" always allows "foofoo", there is no way to
|
||||
specify a word can only be at the start or end, or that only certain
|
||||
words combine.
|
||||
|
||||
- Support using "**" in filename for ":next", ":vimgrep", etc., so that a
|
||||
directory tree can be searched.
|
||||
- REFACTORING: The main() function is very long. Move parts to separate
|
||||
functions, especially loops. Ideas from Walter Briscoe (2003 Apr 3, 2004
|
||||
Feb 9).
|
||||
@@ -155,8 +102,6 @@ PLANNED FOR VERSION 7.0:
|
||||
- Improve the interface between the generic GUI code and the system-specific
|
||||
code. Generic code handles text window with scrollbars, system-specific
|
||||
code menu, toolbar, etc.
|
||||
- Support using "**" in filename for ":next", ":vimgrep", etc., so that a
|
||||
directory tree can be searched.
|
||||
- Store messages to allow SCROLLING BACK for all commands. And other "less"
|
||||
like commands.
|
||||
- "INTELLISENSE". First cleanup the Insert-mode completion.
|
||||
@@ -183,6 +128,7 @@ PLANNED FOR VERSION 7.0:
|
||||
- Put the list of choices right under the place where they would be
|
||||
inserted.
|
||||
- Pre-expand abbreviations, show which abbrevs would match?
|
||||
- Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
|
||||
- UNDO TREE: keep all states of the text, don't delete undo info.
|
||||
When making a change, instead of clearing any future undo (thus redo)
|
||||
info, make a new branch.
|
||||
@@ -289,6 +235,8 @@ Don't count it in only_one_window(). (Alexei Alexandrov)
|
||||
|
||||
Win32: Patch for Korean IME. (Yusung, 2005 March 21)
|
||||
|
||||
When "= evaluation results in a List, use it as a sequence of lines.
|
||||
|
||||
Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug
|
||||
2004). Should also work for 'filetype'.
|
||||
|
||||
@@ -371,7 +319,7 @@ Awaiting updated patches:
|
||||
7 Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Marcin
|
||||
Dalecki has a patch for Motif and Carbon)
|
||||
- Add possibility to highlight specific columns (for Fortran). Or put a
|
||||
line in between columns (e.g. for 'textwidth').
|
||||
line in between columns (e.g., for 'textwidth').
|
||||
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
|
||||
8 Add functions:
|
||||
confirm() add "flags" argument, with 'v' for vertical
|
||||
@@ -665,7 +613,7 @@ GUI:
|
||||
9 On Solaris, creating the popup menu causes the right mouse button no
|
||||
longer to work for extending the selection. (Halevy)
|
||||
9 When running an external program, it can't always be killed with CTRL-C.
|
||||
e.g. on Solaris 5.5, when using "K" (Keech). Other 'guipty' problems on
|
||||
e.g., on Solaris 5.5, when using "K" (Keech). Other 'guipty' problems on
|
||||
Solaris 2.6. (Marley)
|
||||
9 On Solaris: Using a "-geometry" argument, bigger than the window where Vim
|
||||
is started from, causes empty lines below the cmdline. (raf)
|
||||
@@ -760,7 +708,7 @@ MSDOS/DJGPP:
|
||||
sort of sleep, to avoid eating 50% of the CPU time. Test on an unpatched
|
||||
Windows 95 system!
|
||||
8 DJGPP: when shell is bash, make fails. (Donahoe)
|
||||
7 Hitting CTRL-P twice quickly (e.g. in keyword completion) on a 8088
|
||||
7 Hitting CTRL-P twice quickly (e.g., in keyword completion) on a 8088
|
||||
machine, starts printer echo! (John Mullin).
|
||||
7 MSDOS 16 bit version can't work with COMSPEC that has an argument, e.g.:
|
||||
COMSPEC=C:\WINDOWS\COMMAND.COM /E:4096 (Bradley)
|
||||
@@ -1319,6 +1267,36 @@ User Friendlier:
|
||||
Alternative: use BufEnter and BufLeave autocommands.
|
||||
8 make a vimtutor script for Amiga and other systems.
|
||||
7 Add the arguments for configure to the ":version" output?
|
||||
7 When Vim detects a file is being edited elsewhere and it's a gvim session
|
||||
of the same user it should offer a "Raise" button, so that the other gvim
|
||||
window can be displayed. (Eduard)
|
||||
|
||||
|
||||
Spell checking:
|
||||
9 Work together with OpenOffice.org to update the wordlists. (Adri Verhoef,
|
||||
Aad Nales) Setup vim-spell maillist?
|
||||
8 Charles Campbell asks for method to add "contained" groups to existing
|
||||
syntax items (to add @Spell).
|
||||
Add ":syntax contains {pattern} add=@Spell" command? A bit like ":syn
|
||||
cluster" but change the contains list directly for matching syntax items.
|
||||
8 Install spell files with src/main.aap.
|
||||
- References: MySpell library (in OpenOffice.org).
|
||||
http://spellchecker.mozdev.org/source.html
|
||||
http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/
|
||||
author: Kevin Hendricks <kevin.hendricks@sympatico.ca>
|
||||
8 Make "en-rare" spell file? Ask Charles Campbell.
|
||||
8 The English dictionaries for different regions are not consistent in their
|
||||
use of words with a dash.
|
||||
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
|
||||
obtain). But new Myspell wordlist will come (Hagen)
|
||||
7 Insert mode completion mechanism that uses the spell word lists.
|
||||
8 Add hl groups to 'spelllang'?
|
||||
:set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath
|
||||
More complicated: Regions with different languages? E.g., comments
|
||||
in English, strings in German (po file).
|
||||
8 Implement compound words when it works for Myspell. Current idea has the
|
||||
problem that "foo/X" always allows "foofoo", there is no way to specify a
|
||||
word can only be at the start or end, or that only certain words combine.
|
||||
|
||||
|
||||
Diff mode:
|
||||
@@ -2705,6 +2683,8 @@ Searching:
|
||||
Here $paren is evaluated when it's encountered. This is like a regexp
|
||||
inside a regexp. In the above terms it would be:
|
||||
\@((\([^()]\|\@g\)*)\)
|
||||
7 Support for approximate-regexps to find similar words (agrep
|
||||
http://www.tgries.de/agrep/ tre: http://laurikari.net/tre/index.html).
|
||||
8 Add an item for a big character range, so that one can search for a
|
||||
chinese character: \z[234-1234] or \z[XX-YY] or \z[0x23-0x234].
|
||||
7 Add an item stack to allow matching (). One side is "push X on
|
||||
@@ -2940,6 +2920,8 @@ Options:
|
||||
8 Make ":mksession" store buffer-specific options for the specific buffer.
|
||||
8 With ":mksession" always store the 'sessionoptions' option, even when
|
||||
"options" isn't in it. (St-Amant)
|
||||
7 ":with option=value | command": temporarily set an option value and
|
||||
restore it after the command has executed.
|
||||
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.
|
||||
@@ -3071,6 +3053,8 @@ Writing files:
|
||||
|
||||
|
||||
Substitute:
|
||||
8 Substitute with hex/unicode number "\%xff" and "\%uabcd". Just like
|
||||
"\%uabcd" in search pattern.
|
||||
8 Make it easier to replace in all files in the argument list. E.g.:
|
||||
":argsub/oldword/newword/". Works like ":argdo %s/oldword/newword/g|w".
|
||||
- :s///p prints the line after a substitution.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.0aa. Last change: 2005 May 31
|
||||
*various.txt* For Vim version 7.0aa. Last change: 2005 Jun 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -14,7 +14,8 @@ Various commands *various*
|
||||
1. Various commands *various-cmds*
|
||||
|
||||
*CTRL-L*
|
||||
CTRL-L Clear and redraw the screen (later).
|
||||
CTRL-L Clear and redraw the screen. The redraw may happen
|
||||
later, after processing typeahead.
|
||||
|
||||
*:redr* *:redraw*
|
||||
:redr[aw][!] Redraw the screen right now. When ! is included it is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Jun 13
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Jun 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -111,6 +111,9 @@ translated to <Home>, both for the keys and for mappings. Also for <xEnd>,
|
||||
|
||||
":put" now leaves the cursor on the last inserted line.
|
||||
|
||||
When a .gvimrc file exists then 'compatible' is off, just like when a ".vimrc"
|
||||
file exists.
|
||||
|
||||
==============================================================================
|
||||
NEW FEATURES *new-7*
|
||||
|
||||
@@ -145,10 +148,12 @@ with scripts, but they were slow and/or required an external program.
|
||||
The 'spell' option is used to switch spell checking on or off.
|
||||
The 'spelllang' option is used to specify the languages that are accepted.
|
||||
The 'spellfile' option specifies where new words are added.
|
||||
The 'spellsuggest' option specifies the methods used for making suggestions
|
||||
|
||||
The |[s| and |]s| commands can be used to move to the next or previous error.
|
||||
The |zg| and |zw| commands can be used to add good and wrong words.
|
||||
The |z?| command can be used to correct the word.
|
||||
The |:mkspell| command is used to generate a Vim spell file from word lists.
|
||||
|
||||
The "undercurl" highlighting attribute was added to nicely point out spelling
|
||||
mistakes in the GUI (based on patch from Marcin Dalecki).
|
||||
@@ -305,6 +310,7 @@ Options: ~
|
||||
(idea by Hugo Haas)
|
||||
'spell' switch spell checking on/off
|
||||
'spelllang' languages to check spelling for
|
||||
'spellsuggest' methods for spell suggestions
|
||||
'verbosefile' Log messages in a file.
|
||||
|
||||
|
||||
@@ -377,7 +383,10 @@ New functions: ~
|
||||
|reverse()| reverse the order of a List
|
||||
|setqflist()| create a quickfix list (Yegappan Lakshmanan)
|
||||
|sort()| sort a List
|
||||
|soundfold()| get the sound-a-like equivalent of a word
|
||||
|split()| split a String into a List
|
||||
|spellbadword()| get a badly spelled word
|
||||
|spellsuggest()| get suggestions for correct spelling
|
||||
|string()| String representation of a List or Dictionary
|
||||
|system()| Filters {input} through a shell command.
|
||||
|taglist()| Get list of matching tags. (Yegappan Lakshmanan)
|
||||
@@ -435,6 +444,8 @@ Sive syntax file. (Nikolai Weibull)
|
||||
|
||||
Pascal indent file. (Neil Carter)
|
||||
|
||||
Many filetype plugins and others from Nikolai Weibull.
|
||||
|
||||
Moved all the indent settings from the filetype plugin to the indent file.
|
||||
Implemented b:undo_indent to undo indent settings when setting 'filetype' to a
|
||||
different value.
|
||||
@@ -657,6 +668,13 @@ Grahame Bowland and Evan Webb.
|
||||
Added ":scriptnames" to bugreport.vim, so that we can see what plugins were
|
||||
used.
|
||||
|
||||
Win32: If the user changes the setting for the number of lines a scroll wheel
|
||||
click scrolls it is now used immediately. Previously Vim would need to be
|
||||
restarted.
|
||||
|
||||
When using @= in an expression the value is expression @= contains. ":let @=
|
||||
= value" can be used to set the register contents.
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-7*
|
||||
|
||||
@@ -674,6 +692,11 @@ file.
|
||||
When running the tests and one of them fails to produce "test.out" the
|
||||
following tests are still executed. This helps when running out of memory.
|
||||
|
||||
When compiling with EXITFREE defined and the ccmalloc library it is possible
|
||||
to detect memory leaks. Some memory will always reported as leaked, such as
|
||||
allocated by X11 library functions and the memory allocated in alloc_cmdbuff()
|
||||
to store the ":quit" command.
|
||||
|
||||
==============================================================================
|
||||
BUG FIXES *bug-fixes-7*
|
||||
|
||||
@@ -1127,4 +1150,18 @@ may cause the hit-enter prompt. Typing 'a then didn't result in the accented
|
||||
character. Put the character typed at the prompt back in the typeahead buffer
|
||||
so that mapping is done in the right mode.
|
||||
|
||||
setbufvar() and setwinvar() did not give error messages.
|
||||
|
||||
It was possible to set a variable with an illegal name, e.g. with setbufvar().
|
||||
It was possible to define a function with illegal name, e.t. ":func F{-1}()"
|
||||
|
||||
CTRL-W F and "gf" didn't use the same method to get the file name.
|
||||
|
||||
When reporting a conversion error the line number of the last error could be
|
||||
given. Now report the first encountered error.
|
||||
|
||||
When using ":e ++enc=name file" and iconv() was used for conversion an error
|
||||
caused a fallback to no conversion. Now replace a character with '?' and
|
||||
continue.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -30,7 +30,7 @@ DESCRIPTION
|
||||
|
||||
OPTIONS
|
||||
Vertical splits are used to align the lines, as if the "-O" argument
|
||||
was used. To use horizontal splits intead, use the "-o" argument.
|
||||
was used. To use horizontal splits instead, use the "-o" argument.
|
||||
|
||||
For all other arguments see vim(1).
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 May 20
|
||||
" Last Change: 2005 Jul 04
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -71,6 +71,9 @@ endfun
|
||||
" A-A-P recipe
|
||||
au BufNewFile,BufRead *.aap setf aap
|
||||
|
||||
" A2ps printing utility
|
||||
au BufNewFile,BufRead etc/a2ps.cfg,etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps
|
||||
|
||||
" ABAB/4
|
||||
au BufNewFile,BufRead *.abap setf abap
|
||||
|
||||
@@ -194,6 +197,9 @@ au BufNewFile,BufRead *.atl,*.as setf atlas
|
||||
" Automake
|
||||
au BufNewFile,BufRead [mM]akefile.am setf automake
|
||||
|
||||
" Autotest .at files are actually m4
|
||||
au BufNewFile,BufRead *.at setf m4
|
||||
|
||||
" Avenue
|
||||
au BufNewFile,BufRead *.ave setf ave
|
||||
|
||||
@@ -448,6 +454,12 @@ au BufNewFile,BufRead *.d setf d
|
||||
" Desktop files
|
||||
au BufNewFile,BufRead *.desktop,.directory setf desktop
|
||||
|
||||
" Dict config
|
||||
au BufNewFile,BufRead dict.conf,.dictrc setf dictconf
|
||||
|
||||
" Dictd config
|
||||
au BufNewFile,BufRead dictd.conf setf dictdconf
|
||||
|
||||
" Diff files
|
||||
au BufNewFile,BufRead *.diff,*.rej,*.patch setf diff
|
||||
|
||||
@@ -543,6 +555,9 @@ au BufNewFile,BufRead *.exp setf expect
|
||||
" Exports
|
||||
au BufNewFile,BufRead exports setf exports
|
||||
|
||||
" Factor
|
||||
au BufNewFile,BufRead *.factor setf factor
|
||||
|
||||
" Fetchmail RC file
|
||||
au BufNewFile,BufRead .fetchmailrc setf fetchmail
|
||||
|
||||
@@ -594,6 +609,9 @@ au BufNewFile,BufRead *.groovy setf groovy
|
||||
" GNU Server Pages
|
||||
au BufNewFile,BufRead *.gsp setf gsp
|
||||
|
||||
" Group file
|
||||
au BufNewFile,BufRead /etc/group setf group
|
||||
|
||||
" GTK RC
|
||||
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
|
||||
|
||||
@@ -666,6 +684,9 @@ au BufNewFile,BufRead */.icewm/menu setf icemenu
|
||||
" IDL (Interactive Data Language)
|
||||
au BufNewFile,BufRead *.pro setf idlang
|
||||
|
||||
" Indent RC
|
||||
au BufNewFile,BufRead indentrc setf indentrc
|
||||
|
||||
" Inform
|
||||
au BufNewFile,BufRead .indent.pro setf indent
|
||||
|
||||
@@ -730,18 +751,27 @@ au BufNewFile,BufRead *.ace,*.ACE setf lace
|
||||
" Latte
|
||||
au BufNewFile,BufRead *.latte,*.lte setf latte
|
||||
|
||||
" Limits
|
||||
au BufNewFile,BufRead /etc/limits setf limits
|
||||
|
||||
" LambdaProlog (*.mod too, see Modsim)
|
||||
au BufNewFile,BufRead *.sig setf lprolog
|
||||
|
||||
" LDAP LDIF
|
||||
au BufNewFile,BufRead *.ldif setf ldif
|
||||
|
||||
" Ld loader
|
||||
au BufNewFile,BufRead *.ld setf ld
|
||||
|
||||
" Lex
|
||||
au BufNewFile,BufRead *.lex,*.l setf lex
|
||||
|
||||
" Libao
|
||||
au BufNewFile,BufRead /etc/libao.conf,*/.libao setf libao
|
||||
|
||||
" Libsensors
|
||||
au BufNewFile,BufRead /etc/sensors.conf setf sensors
|
||||
|
||||
" LFTP
|
||||
au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp
|
||||
|
||||
@@ -758,9 +788,18 @@ else
|
||||
au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,.emacs,.sawfishrc setf lisp
|
||||
endif
|
||||
|
||||
" SBCL implementation of Common Lisp
|
||||
au BufNewFile,BufRead sbclrc,.sbclrc setf lisp
|
||||
|
||||
" Lite
|
||||
au BufNewFile,BufRead *.lite,*.lt setf lite
|
||||
|
||||
" Login access
|
||||
au BufNewFile,BufRead /etc/login.access setf loginaccess
|
||||
|
||||
" Login defs
|
||||
au BufNewFile,BufRead /etc/login.defs setf logindefs
|
||||
|
||||
" Logtalk
|
||||
au BufNewFile,BufRead *.lgt setf logtalk
|
||||
|
||||
@@ -798,6 +837,9 @@ au BufNewFile,BufRead *.ist,*.mst setf ist
|
||||
" Manpage
|
||||
au BufNewFile,BufRead *.man setf man
|
||||
|
||||
" Man config
|
||||
au BufNewFile,BufRead /etc/man.conf setf manconf
|
||||
|
||||
" Maple V
|
||||
au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
|
||||
|
||||
@@ -914,6 +956,9 @@ au BufNewFile,BufRead *.mush setf mush
|
||||
au BufNewFile,BufRead Muttrc setf muttrc
|
||||
au BufNewFile,BufRead .muttrc*,*/.mutt/muttrc* call s:StarSetf('muttrc')
|
||||
|
||||
" Nano
|
||||
au BufNewFile,BufRead /etc/nanorc,.nanorc setf nanorc
|
||||
|
||||
" Nastran input/DMAP
|
||||
"au BufNewFile,BufRead *.dat setf nastran
|
||||
|
||||
@@ -987,9 +1032,15 @@ au BufNewFile,BufRead *.ora setf ora
|
||||
" Packet filter conf
|
||||
au BufNewFile,BufRead pf.conf setf pf
|
||||
|
||||
" Pam conf
|
||||
au BufNewFile,BufRead /etc/pam.conf setf pamconf
|
||||
|
||||
" PApp
|
||||
au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
|
||||
|
||||
" Password file
|
||||
au BufNewFile,BufRead /etc/passwd,/etc/shadow,/etc/shadow- setf passwd
|
||||
|
||||
" Pascal (also *.p)
|
||||
au BufNewFile,BufRead *.pas setf pascal
|
||||
|
||||
@@ -1201,6 +1252,9 @@ au BufNewFile,BufRead INDEX,INFO
|
||||
" Prolog
|
||||
au BufNewFile,BufRead *.pdb setf prolog
|
||||
|
||||
" Protocols
|
||||
au BufNewFile,BufRead /etc/protocols setf protocols
|
||||
|
||||
" Pyrex
|
||||
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
|
||||
|
||||
@@ -1320,6 +1374,21 @@ au BufNewFile,BufRead sendmail.cf setf sm
|
||||
" Sendmail .mc files are actually m4
|
||||
au BufNewFile,BufRead *.mc setf m4
|
||||
|
||||
" Services
|
||||
au BufNewFile,BufRead /etc/services setf services
|
||||
|
||||
" Service Location config
|
||||
au BufNewFile,BufRead /etc/slp.conf setf slpconf
|
||||
|
||||
" Service Location registration
|
||||
au BufNewFile,BufRead /etc/slp.reg setf slpreg
|
||||
|
||||
" Service Location SPI
|
||||
au BufNewFile,BufRead /etc/slp.spi setf slpspi
|
||||
|
||||
" Setserial config
|
||||
au BufNewFile,BufRead /etc/serial.conf setf setserial
|
||||
|
||||
" SGML
|
||||
au BufNewFile,BufRead *.sgm,*.sgml
|
||||
\ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' |
|
||||
@@ -1436,7 +1505,7 @@ au BufNewFile,BufRead *.sim setf simula
|
||||
au BufNewFile,BufRead *.sin,*.s85 setf sinda
|
||||
|
||||
" SKILL
|
||||
au BufNewFile,BufRead *.il setf skill
|
||||
au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
|
||||
|
||||
" SLRN
|
||||
au BufNewFile,BufRead .slrnrc setf slrnrc
|
||||
@@ -1532,6 +1601,9 @@ au BufNewFile,BufRead *.stp setf stp
|
||||
" Standard ML
|
||||
au BufNewFile,BufRead *.sml setf sml
|
||||
|
||||
" Sysctl
|
||||
au BufNewFile,BufRead /etc/sysctl.conf setf sysctl
|
||||
|
||||
" Sudoers
|
||||
au BufNewFile,BufRead /etc/sudoers,sudoers.tmp setf sudoers
|
||||
|
||||
@@ -1558,7 +1630,27 @@ au BufNewFile,BufRead *.slt setf tsalt
|
||||
au BufNewFile,BufRead *.ti setf terminfo
|
||||
|
||||
" 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
|
||||
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
@@ -1587,15 +1679,30 @@ au BufNewFile,BufReadPost *.tsscl setf tsscl
|
||||
" Motif UIT/UIL files
|
||||
au BufNewFile,BufRead *.uit,*.uil setf uil
|
||||
|
||||
" Udev conf
|
||||
au BufNewFile,BufRead /etc/udev/udev.conf setf udevconf
|
||||
|
||||
" Udev rules
|
||||
au BufNewFile,BufRead /etc/udev/rules.d/*.rules setf udevrules
|
||||
|
||||
" Udev permissions
|
||||
au BufNewFile,BufRead /etc/udev/permissions.d/*.permissions setf udevperm
|
||||
"
|
||||
" Udev symlinks config
|
||||
au BufNewFile,BufRead /etc/udev/cdsymlinks.conf setf sh
|
||||
|
||||
" UnrealScript
|
||||
au BufNewFile,BufRead *.uc setf uc
|
||||
|
||||
" Updatedb
|
||||
au BufNewFile,BufRead /etc/updatedb.conf setf updatedb
|
||||
|
||||
" Verilog HDL
|
||||
au BufNewFile,BufRead *.v setf verilog
|
||||
|
||||
" VHDL
|
||||
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
|
||||
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
|
||||
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
|
||||
|
||||
" Vim script
|
||||
au BufNewFile,BufRead *.vim,.exrc,_exrc setf vim
|
||||
@@ -1670,6 +1777,9 @@ au BufNewFile,BufRead XF86Config
|
||||
" Xorg config
|
||||
au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86c_xfree86_version = 4 | setf xf86conf
|
||||
|
||||
" Xinetd conf
|
||||
au BufNewFile,BufRead /etc/xinetd.conf setf xinetd
|
||||
|
||||
" XS Perl extension interface language
|
||||
au BufNewFile,BufRead *.xs setf xs
|
||||
|
||||
@@ -1699,6 +1809,9 @@ au BufNewFile,BufRead *.csproj,*.csproj.user setf xml
|
||||
" Qt Linguist translation source and Qt User Interface Files are XML
|
||||
au BufNewFile,BufRead *.ts,*.ui setf xml
|
||||
|
||||
" Xdg menus
|
||||
au BufNewFile,BufRead /etc/xdg/menus/*.menu setf xml
|
||||
|
||||
" XSD
|
||||
au BufNewFile,BufRead *.xsd setf xsd
|
||||
|
||||
@@ -1706,7 +1819,23 @@ au BufNewFile,BufRead *.xsd setf xsd
|
||||
au BufNewFile,BufRead *.xsl,*.xslt setf xslt
|
||||
|
||||
" Yacc
|
||||
au BufNewFile,BufRead *.y,*.yy setf yacc
|
||||
au BufNewFile,BufRead *.yy setf yacc
|
||||
|
||||
" Yacc or racc
|
||||
au BufNewFile,BufRead *.y call s:FTy()
|
||||
|
||||
fun! s:FTy()
|
||||
let n = 1
|
||||
while n < 10 && n < line("$")
|
||||
if getline(n) =~ '^\s*\(#\|class\>\)'
|
||||
setf racc
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf yacc
|
||||
endfun
|
||||
|
||||
|
||||
" Yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
||||
@@ -1782,6 +1911,9 @@ au! BufNewFile,BufRead *jarg*
|
||||
" Makefile
|
||||
au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make')
|
||||
|
||||
" Modconf
|
||||
au BufNewFile,BufRead /etc/modprobe.* call s:StarSetf('modconf')
|
||||
|
||||
" Ruby Makefile
|
||||
au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
|
||||
|
||||
@@ -1791,6 +1923,9 @@ au BufNewFile,BufRead muttrc*,Muttrc* call s:StarSetf('muttrc')
|
||||
" Nroff macros
|
||||
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
|
||||
|
||||
" Pam conf
|
||||
au BufNewFile,BufRead /etc/pam.d/* call s:StarSetf('pamconf')
|
||||
|
||||
" Printcap and Termcap
|
||||
au BufNewFile,BufRead *printcap*
|
||||
\ if !did_filetype()
|
||||
@@ -1822,6 +1957,9 @@ au BufNewFile,BufRead XF86Config*
|
||||
" X11 xmodmap
|
||||
au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
|
||||
|
||||
" Xinetd conf
|
||||
au BufNewFile,BufRead /etc/xinetd.d/* call s:StarSetf('xinetd')
|
||||
|
||||
" Z-Shell script
|
||||
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
|
||||
|
||||
|
||||
14
runtime/ftplugin/a2ps.vim
Normal file
14
runtime/ftplugin/a2ps.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: a2ps(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s include=^\\s*Include:
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/alsaconf.vim
Normal file
13
runtime/ftplugin/alsaconf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: alsaconf(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/arch.vim
Normal file
13
runtime/ftplugin/arch.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: GNU Arch inventory file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
@@ -1,11 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Langugage: Automake
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/ftplugin/pcp/automake/
|
||||
" Latest Revision: 2004-05-22
|
||||
" arch-tag: 3a78b0cd-27b2-410a-8e7b-51a1717c2a5b
|
||||
" Language: Automake
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-22
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Same as makefile filetype plugin for now.
|
||||
runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
|
||||
14
runtime/ftplugin/bdf.vim
Normal file
14
runtime/ftplugin/bdf.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: BDF font definition
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=b:COMMENT commentstring=COMMENT\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Mar 27
|
||||
" Last Change: 2005 Jun 22
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -12,6 +12,7 @@ endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Using line continuation here.
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< | if has('vms') | setl isk< | endif"
|
||||
@@ -48,3 +49,6 @@ if has("gui_win32") && !exists("b:browsefilter")
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
14
runtime/ftplugin/calendar.vim
Normal file
14
runtime/ftplugin/calendar.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: calendar(1) input file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/ commentstring& include&
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
@@ -1,24 +1,22 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: generic Changelog file
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/ftplugin/pcp/changelog/
|
||||
" Latest Revision: 2004-04-25
|
||||
" arch-tag: b00e2974-c559-4477-b7b2-3ef3f4061bdb
|
||||
" Language: generic Changelog file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
" Variables:
|
||||
" g:changelog_timeformat -
|
||||
" description: the timeformat used in ChangeLog entries.
|
||||
" default: "%Y-%m-%d".
|
||||
" description: the timeformat used in ChangeLog entries.
|
||||
" default: "%Y-%m-%d".
|
||||
" g:changelog_username -
|
||||
" description: the username to use in ChangeLog entries
|
||||
" default: try to deduce it from environment variables and system files.
|
||||
" description: the username to use in ChangeLog entries
|
||||
" default: try to deduce it from environment variables and system files.
|
||||
" Local Mappings:
|
||||
" <Leader>o -
|
||||
" adds a new changelog entry for the current user for the current date.
|
||||
" adds a new changelog entry for the current user for the current date.
|
||||
" Global Mappings:
|
||||
" <Leader>o -
|
||||
" switches to the ChangeLog buffer opened for the current directory, or
|
||||
" opens it in a new buffer if it exists in the current directory. Then
|
||||
" it does the same as the local <Leader>o described above.
|
||||
" switches to the ChangeLog buffer opened for the current directory, or
|
||||
" opens it in a new buffer if it exists in the current directory. Then
|
||||
" it does the same as the local <Leader>o described above.
|
||||
" Notes:
|
||||
" run 'runtime ftplugin/changelog.vim' to enable the global mapping for
|
||||
" changelog files.
|
||||
@@ -28,16 +26,13 @@
|
||||
|
||||
" If 'filetype' isn't "changelog", we must have been to add ChangeLog opener
|
||||
if &filetype == "changelog"
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let cpo_save = &cpo
|
||||
set cpo-=C
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" The format of the date-time field (should have been called dateformat)
|
||||
if !exists("g:changelog_timeformat")
|
||||
@@ -55,56 +50,56 @@ if &filetype == "changelog"
|
||||
" Get the users login name
|
||||
let login = system('whoami')
|
||||
if v:shell_error
|
||||
let login = 'unknown'
|
||||
let login = 'unknown'
|
||||
else
|
||||
let newline = stridx(login, "\n")
|
||||
if newline != -1
|
||||
let login = strpart(login, 0, newline)
|
||||
endif
|
||||
let newline = stridx(login, "\n")
|
||||
if newline != -1
|
||||
let login = strpart(login, 0, newline)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Try to full name from gecos field in /etc/passwd
|
||||
if filereadable('/etc/passwd')
|
||||
let name = substitute(
|
||||
\system('cat /etc/passwd | grep ^`whoami`'),
|
||||
\'^\%([^:]*:\)\{4}\([^:]*\):.*$', '\1', '')
|
||||
let name = substitute(
|
||||
\system('cat /etc/passwd | grep ^`whoami`'),
|
||||
\'^\%([^:]*:\)\{4}\([^:]*\):.*$', '\1', '')
|
||||
endif
|
||||
|
||||
" If there is no such file, or there was some other problem try
|
||||
" others
|
||||
if !filereadable('/etc/passwd') || v:shell_error
|
||||
" Maybe the environment has something of interest
|
||||
if exists("$NAME")
|
||||
let name = $NAME
|
||||
else
|
||||
" No? well, use the login name and capitalize first
|
||||
" character
|
||||
let name = toupper(login[0]) . strpart(login, 1)
|
||||
endif
|
||||
" Maybe the environment has something of interest
|
||||
if exists("$NAME")
|
||||
let name = $NAME
|
||||
else
|
||||
" No? well, use the login name and capitalize first
|
||||
" character
|
||||
let name = toupper(login[0]) . strpart(login, 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Only keep stuff before the first comma
|
||||
let comma = stridx(name, ',')
|
||||
if comma != -1
|
||||
let name = strpart(name, 0, comma)
|
||||
let name = strpart(name, 0, comma)
|
||||
endif
|
||||
|
||||
" And substitute & in the real name with the login of our user
|
||||
let amp = stridx(name, '&')
|
||||
if amp != -1
|
||||
let name = strpart(name, 0, amp) . toupper(login[0]) .
|
||||
\strpart(login, 1) . strpart(name, amp + 1)
|
||||
let name = strpart(name, 0, amp) . toupper(login[0]) .
|
||||
\strpart(login, 1) . strpart(name, amp + 1)
|
||||
endif
|
||||
|
||||
" Get our hostname
|
||||
let hostname = system("hostname")
|
||||
if v:shell_error
|
||||
let hostname = 'unknownhost'
|
||||
let hostname = 'unknownhost'
|
||||
else
|
||||
let newline = stridx(hostname, "\n")
|
||||
if newline != -1
|
||||
let hostname = strpart(hostname, 0, newline)
|
||||
endif
|
||||
let newline = stridx(hostname, "\n")
|
||||
if newline != -1
|
||||
let hostname = strpart(hostname, 0, newline)
|
||||
endif
|
||||
endif
|
||||
|
||||
" And finally set the username
|
||||
@@ -134,15 +129,15 @@ if &filetype == "changelog"
|
||||
while i != -1
|
||||
let char = str[i + 1]
|
||||
if char == '%'
|
||||
let middle = '%'
|
||||
let middle = '%'
|
||||
elseif char == 'd'
|
||||
let middle = a:date
|
||||
let middle = a:date
|
||||
elseif char == 'u'
|
||||
let middle = a:user
|
||||
let middle = a:user
|
||||
elseif char == 'c'
|
||||
let middle = '{cursor}'
|
||||
let middle = '{cursor}'
|
||||
else
|
||||
let middle = char
|
||||
let middle = char
|
||||
endif
|
||||
let str = strpart(str, 0, i) . middle . strpart(str, i + 2)
|
||||
let i = stridx(str, '%')
|
||||
@@ -169,17 +164,17 @@ if &filetype == "changelog"
|
||||
" Look for an entry for today by our user
|
||||
let date = strftime(g:changelog_timeformat)
|
||||
let search = s:substitute_items(g:changelog_date_entry_search, date,
|
||||
\g:changelog_username)
|
||||
\g:changelog_username)
|
||||
if search(search) > 0
|
||||
" Ok, now we look for the end of the date-entry, and add an entry
|
||||
let pos = nextnonblank(line('.') + 1)
|
||||
let line = getline(pos)
|
||||
while line =~ '^\s\+\S\+'
|
||||
let pos = pos + 1
|
||||
let line = getline(pos)
|
||||
let pos = pos + 1
|
||||
let line = getline(pos)
|
||||
endwhile
|
||||
let insert = s:substitute_items(g:changelog_new_entry_format,
|
||||
\'', '')
|
||||
\'', '')
|
||||
execute "normal! ".(pos - 1)."Go".insert
|
||||
execute pos
|
||||
else
|
||||
@@ -188,18 +183,18 @@ if &filetype == "changelog"
|
||||
|
||||
" No entry today, so create a date-user header and insert an entry
|
||||
let todays_entry = s:substitute_items(g:changelog_new_date_format,
|
||||
\date, g:changelog_username)
|
||||
\date, g:changelog_username)
|
||||
" Make sure we have a cursor positioning
|
||||
if stridx(todays_entry, '{cursor}') == -1
|
||||
let todays_entry = todays_entry.'{cursor}'
|
||||
let todays_entry = todays_entry.'{cursor}'
|
||||
endif
|
||||
|
||||
" Now do the work
|
||||
execute "normal! i".todays_entry
|
||||
if remove_empty
|
||||
while getline('$') == ''
|
||||
$delete
|
||||
endwhile
|
||||
while getline('$') == ''
|
||||
$delete
|
||||
endwhile
|
||||
endif
|
||||
|
||||
1
|
||||
@@ -216,7 +211,7 @@ if &filetype == "changelog"
|
||||
command! -nargs=0 NewChangelogEntry call s:new_changelog_entry()
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl com< tw< fo< et<"
|
||||
let b:undo_ftplugin = "setl com< tw< fo< et< ai<"
|
||||
|
||||
if &textwidth == 0
|
||||
setlocal textwidth=78
|
||||
@@ -224,9 +219,10 @@ if &filetype == "changelog"
|
||||
setlocal comments=
|
||||
setlocal formatoptions+=t
|
||||
setlocal noexpandtab
|
||||
" setlocal autoindent now in indent file
|
||||
setlocal autoindent
|
||||
|
||||
let &cpo = cpo_save
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
else
|
||||
" Add the Changelog opening mapping
|
||||
nmap <silent> <Leader>o :call <SID>open_changelog()<CR>
|
||||
@@ -234,23 +230,21 @@ else
|
||||
function! s:open_changelog()
|
||||
if filereadable('ChangeLog')
|
||||
if bufloaded('ChangeLog')
|
||||
let buf = bufnr('ChangeLog')
|
||||
execute "normal! \<C-W>t"
|
||||
while winbufnr(winnr()) != buf
|
||||
execute "normal! \<C-W>w"
|
||||
endwhile
|
||||
let buf = bufnr('ChangeLog')
|
||||
execute "normal! \<C-W>t"
|
||||
while winbufnr(winnr()) != buf
|
||||
execute "normal! \<C-W>w"
|
||||
endwhile
|
||||
else
|
||||
split ChangeLog
|
||||
split ChangeLog
|
||||
endif
|
||||
|
||||
if exists("g:mapleader")
|
||||
execute "normal " . g:mapleader . "o"
|
||||
execute "normal " . g:mapleader . "o"
|
||||
else
|
||||
execute "normal \\o"
|
||||
execute "normal \\o"
|
||||
endif
|
||||
startinsert!
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
|
||||
13
runtime/ftplugin/conf.vim
Normal file
13
runtime/ftplugin/conf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: generic configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
36
runtime/ftplugin/context.vim
Normal file
36
runtime/ftplugin/context.vim
Normal file
@@ -0,0 +1,36 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo<"
|
||||
|
||||
setlocal comments=:%,b:%D,b:%C,b:%M commentstring=%\ %s formatoptions+=tcroql
|
||||
|
||||
let &l:define='\\\%([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\='
|
||||
\ . 'def\|\\font\|\\\%(future\)\=let'
|
||||
\ . '\|\\new\%(count\|dimen\|skip\|muskip\|box\|toks\|read\|write'
|
||||
\ . '\|fam\|insert\|if\)'
|
||||
|
||||
let &l:include = '^\s*\%(input\|component\)'
|
||||
|
||||
setlocal suffixesadd=.tex
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_skip = 'r:\\\@<!\%(\\\\\)*%'
|
||||
let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],' .
|
||||
\ '\\start\(\a\+\):\\stop\1'
|
||||
endif " exists("loaded_matchit")
|
||||
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
13
runtime/ftplugin/crm.vim
Normal file
13
runtime/ftplugin/crm.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: CRM114
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
@@ -1,20 +1,16 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: CSS
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/ftplugin/pcp/css/
|
||||
" Latest Revision: 2004-04-25
|
||||
" arch-tag: 5fa7c74f-bf1a-47c4-b06f-6efe8f48db3b
|
||||
" Language: CSS
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com<"
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/
|
||||
setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
let &l:include = '^\s*@import\s\+\%(url(\)\='
|
||||
|
||||
13
runtime/ftplugin/cvsrc.vim
Normal file
13
runtime/ftplugin/cvsrc.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: cvs(1) RC file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments= commentstring= formatoptions-=tcroql
|
||||
13
runtime/ftplugin/dictconf.vim
Normal file
13
runtime/ftplugin/dictconf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: dict(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/dictdconf.vim
Normal file
13
runtime/ftplugin/dictdconf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: dictd(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-01
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/dircolors.vim
Normal file
13
runtime/ftplugin/dircolors.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: dircolors(1) input file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/elinks.vim
Normal file
13
runtime/ftplugin/elinks.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: elinks(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/eterm.vim
Normal file
14
runtime/ftplugin/eterm.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: eterm(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s include=^\\s*include
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/fetchmail.vim
Normal file
13
runtime/ftplugin/fetchmail.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: fetchmail(1) RC File
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/gpg.vim
Normal file
13
runtime/ftplugin/gpg.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: gpg(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/group.vim
Normal file
13
runtime/ftplugin/group.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: group(5) user group file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l
|
||||
13
runtime/ftplugin/grub.vim
Normal file
13
runtime/ftplugin/grub.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: grub(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/haskell.vim
Normal file
14
runtime/ftplugin/haskell.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Haskell
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_plugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/help.vim
Normal file
13
runtime/ftplugin/help.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_plugin = "setl fo< tw<"
|
||||
|
||||
setlocal formatoptions+=tcroql textwidth=78
|
||||
14
runtime/ftplugin/indent.vim
Normal file
14
runtime/ftplugin/indent.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: indent(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/ld.vim
Normal file
14
runtime/ftplugin/ld.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: ld(1) script
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*%s*/ include=^\\s*INCLUDE
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/lftp.vim
Normal file
13
runtime/ftplugin/lftp.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: lftp(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/libao.vim
Normal file
13
runtime/ftplugin/libao.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: libao.conf(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/limits.vim
Normal file
13
runtime/ftplugin/limits.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: limits(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/loginaccess.vim
Normal file
13
runtime/ftplugin/loginaccess.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: login.access(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/logindefs.vim
Normal file
13
runtime/ftplugin/logindefs.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: login.defs(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/m4.vim
Normal file
14
runtime/ftplugin/m4.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: m4
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:#,:dnl commentstring=dnl\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/mailcap.vim
Normal file
13
runtime/ftplugin/mailcap.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Mailcap configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/manconf.vim
Normal file
13
runtime/ftplugin/manconf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: man.conf(5) - man configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
@@ -1,16 +1,14 @@
|
||||
" Vim filetype plugin
|
||||
" Language: METAFONT
|
||||
" Maintainer: Dorai Sitaram <ds26@gte.com>
|
||||
" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
|
||||
" Last Change: May 27, 2003
|
||||
" Vim filetype plugin file
|
||||
" Language: MetaFont
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setl com=:%
|
||||
setl fo-=t
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
|
||||
14
runtime/ftplugin/modconf.vim
Normal file
14
runtime/ftplugin/modconf.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: modules.conf(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s include=^\\s*include
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
@@ -1,7 +1,22 @@
|
||||
" Vim filetype plugin
|
||||
" Language: MetaPost
|
||||
" Maintainer: Dorai Sitaram <ds26@gte.com>
|
||||
" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
|
||||
" Last Change: May 27, 2003
|
||||
" Vim filetype plugin file
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
runtime! ftplugin/mf.vim ftplugin/mf_*.vim ftplugin/mf/*.vim
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
if !exists(":FixBeginfigs") != 2
|
||||
command -nargs=0 FixBeginfigs call s:fix_beginfigs()
|
||||
|
||||
function! s:fix_beginfigs()
|
||||
let i = 1
|
||||
g/^beginfig(\d*);$/s//\='beginfig('.i.');'/ | let i = i + 1
|
||||
endfunction
|
||||
endif
|
||||
|
||||
14
runtime/ftplugin/mplayerconf.vim
Normal file
14
runtime/ftplugin/mplayerconf.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: mplayer(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s include=^\\s*include
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
16
runtime/ftplugin/muttrc.vim
Normal file
16
runtime/ftplugin/muttrc.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: mutt RC File
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &l:include = '^\s*source\>'
|
||||
13
runtime/ftplugin/nanorc.vim
Normal file
13
runtime/ftplugin/nanorc.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: nanorc(5) - GNU nano configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/netrc.vim
Normal file
13
runtime/ftplugin/netrc.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: netrc(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l
|
||||
13
runtime/ftplugin/pamconf.vim
Normal file
13
runtime/ftplugin/pamconf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: pam(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/passwd.vim
Normal file
13
runtime/ftplugin/passwd.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: passwd(5) password file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l
|
||||
13
runtime/ftplugin/pinfo.vim
Normal file
13
runtime/ftplugin/pinfo.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: pinfo(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
15
runtime/ftplugin/procmail.vim
Normal file
15
runtime/ftplugin/procmail.vim
Normal file
@@ -0,0 +1,15 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: procmail(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &l:include = '^\s*INCLUDERC\>'
|
||||
14
runtime/ftplugin/prolog.vim
Normal file
14
runtime/ftplugin/prolog.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Prolog
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:% commentstring=%\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/protocols.vim
Normal file
13
runtime/ftplugin/protocols.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: protocols(5) - Internet protocols definition file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/quake.vim
Normal file
13
runtime/ftplugin/quake.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Quake[1-3] configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:// commentstring=//\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/racc.vim
Normal file
14
runtime/ftplugin/racc.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Racc input file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/readline.vim
Normal file
13
runtime/ftplugin/readline.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: readline(3) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/rnc.vim
Normal file
13
runtime/ftplugin/rnc.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Relax NG compact syntax
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
@@ -1,23 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: reStructuredText Documentation Format
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/ftplugin/pcp/rst/
|
||||
" Latest Revision: 2004-04-25
|
||||
" arch-tag: 618bf504-81ba-4518-bad2-43ba2b844a26
|
||||
" Language: reStructuredText documentation format
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms<"
|
||||
let b:undo_ftplugin = "setl com< cms< et< fo<"
|
||||
|
||||
setlocal comments=fb:..
|
||||
setlocal commentstring=..\ %s
|
||||
setlocal expandtab
|
||||
setlocal sts=2 sw=2
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
setlocal comments=fb:.. commentstring=..\ %s expandtab
|
||||
setlocal formatoptions+=tcroql
|
||||
|
||||
13
runtime/ftplugin/screen.vim
Normal file
13
runtime/ftplugin/screen.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: screen(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/sensors.vim
Normal file
13
runtime/ftplugin/sensors.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: sensors.conf(5) - libsensors configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/services.vim
Normal file
13
runtime/ftplugin/services.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: services(5) - Internet network services list
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/setserial.vim
Normal file
13
runtime/ftplugin/setserial.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: setserial(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/sieve.vim
Normal file
14
runtime/ftplugin/sieve.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Sieve filtering language input file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/slpconf.vim
Normal file
14
runtime/ftplugin/slpconf.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: RFC 2614 - An API for Service Location configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:#,:; commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/slpreg.vim
Normal file
14
runtime/ftplugin/slpreg.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: RFC 2614 - An API for Service Location registration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:#,:; commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/slpspi.vim
Normal file
14
runtime/ftplugin/slpspi.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: RFC 2614 - An API for Service Location SPI file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:#,:; commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/sshconfig.vim
Normal file
13
runtime/ftplugin/sshconfig.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: OpenSSH client configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/sudoers.vim
Normal file
13
runtime/ftplugin/sudoers.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: sudoers(5) configuration files
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/sysctl.vim
Normal file
14
runtime/ftplugin/sysctl.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: sysctl.conf(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:;,:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/terminfo.vim
Normal file
13
runtime/ftplugin/terminfo.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: terminfo(5) definition
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/udevconf.vim
Normal file
13
runtime/ftplugin/udevconf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: udev(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-01
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/udevperm.vim
Normal file
13
runtime/ftplugin/udevperm.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: udev(8) permissions file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-01
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/udevrules.vim
Normal file
13
runtime/ftplugin/udevrules.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: udev(8) rules file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-01
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/updatedb.vim
Normal file
13
runtime/ftplugin/updatedb.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: updatedb.conf(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/xdefaults.vim
Normal file
14
runtime/ftplugin/xdefaults.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: X resources files like ~/.Xdefaults (xrdb)
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:! commentstring& inc&
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/xf86conf.vim
Normal file
13
runtime/ftplugin/xf86conf.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: XFree86 Configuration File
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/xinetd.vim
Normal file
14
runtime/ftplugin/xinetd.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: xinetd.conf(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s include=^\\s*include
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/xmodmap.vim
Normal file
13
runtime/ftplugin/xmodmap.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: xmodmap(1) definition file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:! commentstring=!\ %s formatoptions-=t formatoptions+=croql
|
||||
14
runtime/ftplugin/yaml.vim
Normal file
14
runtime/ftplugin/yaml.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: YAML (YAML Ain't Markup Language)
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< et< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s expandtab
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
13
runtime/ftplugin/zsh.vim
Normal file
13
runtime/ftplugin/zsh.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-04
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
@@ -1,7 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: Aap recipe
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2003 Sep 08
|
||||
" Last Change: 2005 Jun 24
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Works mostly like Python.
|
||||
runtime! indent/python.vim
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
" Vim indent file
|
||||
" Language: automake
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/indent/pcp/automake/
|
||||
" Latest Revision: 2004-04-25
|
||||
" arch-tag: 9a2af48c-48d4-4bae-82c3-c801bc9d1976
|
||||
" Language: automake
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" same as makefile indenting for now.
|
||||
source <sfile>:p:h/make.vim
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
runtime! indent/make.vim
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
" Vim indent file
|
||||
" Language: Autoconf configure.{ac,in} file
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/indent/pcp/config/
|
||||
" Latest Revision: 2004-04-25
|
||||
" arch-tag: 7779c341-796f-408e-80e4-a55c26b519a4
|
||||
" TODO: how about nested [()]'s in one line
|
||||
" what's wrong with '\\\@!'?
|
||||
" Language: Autoconf configure.{ac,in} file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
" TODO: how about nested [()]'s in one line
|
||||
" what's wrong with '\\\@!'?
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
source <sfile>:p:h/sh.vim " will set b:did_indent
|
||||
runtime! indent/sh.vim " will set b:did_indent
|
||||
|
||||
setlocal indentexpr=GetConfigIndent()
|
||||
setlocal indentkeys=!^F,o,O,=then,=do,=else,=elif,=esac,=fi,=fin,=fil,=done
|
||||
|
||||
@@ -1,79 +1,83 @@
|
||||
" Vim indent file
|
||||
" Language: CSS
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/indent/pcp/css/
|
||||
" Latest Revision: 2004-04-25
|
||||
" arch-tag: ccfd77a0-1c9a-43f7-a407-bbe704541442
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetCSSIndent()
|
||||
setlocal indentkeys-=:,0# indentkeys-=e
|
||||
setlocal indentkeys=0{,0},!^F,o,O
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetCSSIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! s:LookupLine(lnum)
|
||||
" find a non-blank line above the current line
|
||||
let lnum = prevnonblank(a:lnum - 1)
|
||||
function s:prevnonblanknoncomment(lnum)
|
||||
let lnum = a:lnum
|
||||
while lnum > 1
|
||||
let lnum = prevnonblank(lnum)
|
||||
let line = getline(lnum)
|
||||
if line =~ '\*/'
|
||||
while lnum > 1 && line !~ '/\*'
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
if line =~ '^\s*/\*'
|
||||
let lnum -= 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = getline(lnum)
|
||||
|
||||
" if the line has an end comment sequence we need to find a line
|
||||
" that isn't affected by the comment.
|
||||
if line =~ '\*/'
|
||||
while line !~ '/\*'
|
||||
let lnum = lnum - 1
|
||||
let line = getline(lnum)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" if the line we found only contained the comment and whitespace
|
||||
" we need to find another line to use...
|
||||
if line =~ '^\s*/\*'
|
||||
return s:LookupLine(lnum)
|
||||
else
|
||||
return lnum
|
||||
endif
|
||||
function s:count_braces(lnum, count_open)
|
||||
let n_open = 0
|
||||
let n_close = 0
|
||||
let line = getline(a:lnum)
|
||||
let pattern = '[{}]'
|
||||
let i = match(line, pattern)
|
||||
while i != -1
|
||||
if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'css\%(Comment\|StringQ\{1,2}\)'
|
||||
if line[i] == '{'
|
||||
let n_open += 1
|
||||
elseif line[i] == '}'
|
||||
if n_open > 0
|
||||
let n_open -= 1
|
||||
else
|
||||
let n_close += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let i = match(line, pattern, i + 1)
|
||||
endwhile
|
||||
return a:count_open ? n_open : n_close
|
||||
endfunction
|
||||
|
||||
function GetCSSIndent()
|
||||
let lnum = s:LookupLine(v:lnum)
|
||||
let line = getline(v:lnum)
|
||||
if line =~ '^\s*\*'
|
||||
return cindent(v:lnum)
|
||||
elseif line =~ '^\s*}'
|
||||
return indent(v:lnum) - &sw
|
||||
endif
|
||||
|
||||
if lnum == 0
|
||||
let pnum = s:prevnonblanknoncomment(v:lnum - 1)
|
||||
if pnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
" remove commented stuff from line
|
||||
let line = substitute(getline(lnum), '/\*.\*/', '', 'eg')
|
||||
let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw
|
||||
|
||||
let ind = indent(lnum)
|
||||
|
||||
" check for opening brace on the previous line
|
||||
" skip if it also contains a closing brace...
|
||||
if line =~ '{\(.*}\)\@!'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
let line = getline(v:lnum)
|
||||
|
||||
" check for closing brace first on current line
|
||||
if line =~ '^\s*}'
|
||||
let ind = ind - &sw
|
||||
let pline = getline(pnum)
|
||||
if pline =~ '}\s*$'
|
||||
let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
|
||||
12
runtime/indent/dictconf.vim
Normal file
12
runtime/indent/dictconf.vim
Normal file
@@ -0,0 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: dict(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-30
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent
|
||||
inoremap <buffer> # X#
|
||||
12
runtime/indent/dictdconf.vim
Normal file
12
runtime/indent/dictdconf.vim
Normal file
@@ -0,0 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: dictd(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-07-01
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent
|
||||
inoremap <buffer> # X#
|
||||
@@ -1,13 +1,15 @@
|
||||
" Vim indent file
|
||||
" Language: DocBook Documentation Format
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/indent/pcp/docbk/
|
||||
" Latest Revision: 2004-05-22
|
||||
" arch-tag: 3d073af7-1d69-42a2-99ad-9a49a21eb28f
|
||||
" Language: DocBook Documentation Format
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Same as XML indenting for now.
|
||||
runtime! indent/xml.vim
|
||||
|
||||
setlocal indentexpr=XmlIndentGet(v:lnum,0)
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
if exists('*XmlIndentGet')
|
||||
setlocal indentexpr=XmlIndentGet(v:lnum,0)
|
||||
endif
|
||||
|
||||
@@ -1,49 +1,35 @@
|
||||
" Vim indent file
|
||||
" Language: Eterm configuration file
|
||||
" Maintainer: Nikolai Weibull <source@pcppopper.org>
|
||||
" URL: http://www.pcppopper.org/vim/indent/pcp/eterm/
|
||||
" Latest Revision: 2004-04-25
|
||||
" arch-tag: a22a92b1-c59f-4f47-8207-b21db6549b21
|
||||
" Language: Eterm configuration file
|
||||
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
|
||||
" Latest Revision: 2005-06-29
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetEtermIndent()
|
||||
setlocal indentkeys=!^F,o,O,=end
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetEtermIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetEtermIndent()
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = getline(lnum)
|
||||
let ind = indent(lnum)
|
||||
|
||||
if line =~ '^\s*begin\>'
|
||||
if getline(lnum) =~ '^\s*begin\>'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
let line = getline(v:lnum)
|
||||
|
||||
" Check for closing brace on current line
|
||||
if line =~ '^\s*end\>'
|
||||
if getline(v:lnum) =~ '^\s*end\>'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
" vim: set sts=2 sw=2:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user