mirror of
https://github.com/zoriya/vim.git
synced 2025-12-25 00:25:21 +00:00
Compare commits
50 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dac7569612 | ||
|
|
d04da7cb4a | ||
|
|
7bc4f93c07 | ||
|
|
172ddb60c2 | ||
|
|
b73568149f | ||
|
|
0c17875ef3 | ||
|
|
b35c338f96 | ||
|
|
0c5fa7d740 | ||
|
|
d1f13fd597 | ||
|
|
4ccb265bd4 | ||
|
|
7d11244c99 | ||
|
|
97cc2384c0 | ||
|
|
14f5827940 | ||
|
|
8139889a5f | ||
|
|
6f3d6b48a6 | ||
|
|
e1704bada4 | ||
|
|
b213da0b57 | ||
|
|
ec3cfeb199 | ||
|
|
1e91f2606b | ||
|
|
718f007499 | ||
|
|
d09acef44b | ||
|
|
66b7985ec9 | ||
|
|
770456589e | ||
|
|
696c2116dc | ||
|
|
f94a13c286 | ||
|
|
01c10524d2 | ||
|
|
f5fe79a5f3 | ||
|
|
6f586de755 | ||
|
|
2b017fae8f | ||
|
|
4fabd7dd4a | ||
|
|
be1e9e9fc1 | ||
|
|
2623b4f412 | ||
|
|
e8cdcef875 | ||
|
|
fca93c093e | ||
|
|
c11073c9aa | ||
|
|
afa6b9af86 | ||
|
|
cdab905136 | ||
|
|
77fceb8908 | ||
|
|
e48a2dd3af | ||
|
|
231e1a1723 | ||
|
|
e2db4361d2 | ||
|
|
ac0ddc15e9 | ||
|
|
7c0a86b1e8 | ||
|
|
b4a80cdd91 | ||
|
|
7c82130a76 | ||
|
|
2c66669c33 | ||
|
|
57c0ea8692 | ||
|
|
465748e411 | ||
|
|
dd7d846475 | ||
|
|
0551410a14 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -30,6 +30,7 @@ src/auto/pathdef.c
|
||||
*.suo
|
||||
*.res
|
||||
*.RES
|
||||
src/if_perl.c
|
||||
src/pathdef.c
|
||||
src/Obj*/pathdef.c
|
||||
gvimext.dll
|
||||
@@ -41,6 +42,7 @@ gvimext.lib
|
||||
*.mo
|
||||
*.swp
|
||||
*~
|
||||
src/po/vim.pot
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
|
||||
14
Filelist
14
Filelist
@@ -261,6 +261,7 @@ SRC_DOS = \
|
||||
src/Make_mvc.mak \
|
||||
src/Make_w16.mak \
|
||||
src/bigvim.bat \
|
||||
src/bigvim64.bat \
|
||||
src/msvcsetup.bat \
|
||||
src/msvc2008.bat \
|
||||
src/msvc2010.bat \
|
||||
@@ -352,6 +353,7 @@ SRC_DOS_BIN = \
|
||||
src/xpm/COPYRIGHT \
|
||||
src/xpm/README.txt \
|
||||
src/xpm/include/*.h \
|
||||
src/xpm/x64/lib/libXpm.a \
|
||||
src/xpm/x64/lib/libXpm.lib \
|
||||
src/xpm/x86/lib/libXpm.a \
|
||||
src/xpm/x86/lib/libXpm.lib \
|
||||
@@ -691,9 +693,17 @@ LANG_GEN = \
|
||||
runtime/tutor/Makefile \
|
||||
runtime/tutor/tutor.utf-8 \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.??.* \
|
||||
runtime/tutor/tutor.??.utf-8 \
|
||||
runtime/tutor/tutor.??.euc \
|
||||
runtime/tutor/tutor.??.sjis \
|
||||
runtime/tutor/tutor.??.iso9 \
|
||||
runtime/tutor/tutor.??.big5 \
|
||||
runtime/tutor/tutor.??.cp1250 \
|
||||
runtime/tutor/tutor.??.cp1251 \
|
||||
runtime/tutor/tutor.??.cp737 \
|
||||
runtime/tutor/tutor.??_??.utf-8 \
|
||||
runtime/tutor/tutor.bar \
|
||||
runtime/tutor/tutor.bar.* \
|
||||
runtime/tutor/tutor.bar.utf-8 \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
runtime/spell/??/main.aap \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2012 Jul 10
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -263,8 +263,10 @@ Name triggered by ~
|
||||
Startup and exit
|
||||
|VimEnter| after doing all the startup stuff
|
||||
|GUIEnter| after starting the GUI successfully
|
||||
|GUIFailed| after starting the GUI failed
|
||||
|TermResponse| after the terminal response to |t_RV| is received
|
||||
|
||||
|QuitPre| when using `:quit`, before deciding whether to quit
|
||||
|VimLeavePre| before exiting Vim, before writing the viminfo file
|
||||
|VimLeave| before exiting Vim, after writing the viminfo file
|
||||
|
||||
@@ -312,6 +314,7 @@ Name triggered by ~
|
||||
|SessionLoadPost| after loading a session file
|
||||
|
||||
|MenuPopup| just before showing the popup menu
|
||||
|CompleteDone| after Insert mode completion is done
|
||||
|
||||
|User| to be used in combination with ":doautocmd"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.3. Last change: 2012 Aug 08
|
||||
*diff.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -86,16 +86,16 @@ diff mode. You could use a construct like this: >
|
||||
While already in Vim you can start diff mode in three ways.
|
||||
|
||||
*E98*
|
||||
:diffsplit {filename} *:diffs* *:diffsplit*
|
||||
:diffs[plit] {filename} *:diffs* *:diffsplit*
|
||||
Open a new window on the file {filename}. The options are set
|
||||
as for "vimdiff" for the current and the newly opened window.
|
||||
Also see 'diffexpr'.
|
||||
|
||||
*:difft* *:diffthis*
|
||||
:diffthis Make the current window part of the diff windows. This sets
|
||||
:difft[his] Make the current window part of the diff windows. This sets
|
||||
the options like for "vimdiff".
|
||||
|
||||
:diffpatch {patchfile} *E816* *:diffp* *:diffpatch*
|
||||
:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch*
|
||||
Use the current buffer, patch it with the diff found in
|
||||
{patchfile} and open a buffer on the result. The options are
|
||||
set as for "vimdiff".
|
||||
@@ -123,9 +123,9 @@ Since the option values are remembered with the buffer, you can edit another
|
||||
file for a moment and come back to the same file and be in diff mode again.
|
||||
|
||||
*:diffo* *:diffoff*
|
||||
:diffoff Switch off diff mode for the current window.
|
||||
:diffo[ff] Switch off diff mode for the current window.
|
||||
|
||||
:diffoff! Switch off diff mode for the current window and in all windows
|
||||
:diffo[ff]! Switch off diff mode for the current window and in all windows
|
||||
in the current tab page where 'diff' is set.
|
||||
|
||||
The ":diffoff" command resets the relevant options to their default value.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.3. Last change: 2012 Aug 02
|
||||
*eval.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -759,7 +759,7 @@ of a |List| is different from the original |List|. When using "is" without
|
||||
a |List| or a |Dictionary| it is equivalent to using "equal", using "isnot"
|
||||
equivalent to using "not equal". Except that a different type means the
|
||||
values are different: "4 == '4'" is true, "4 is '4'" is false and "0 is []" is
|
||||
false and not a error. "is#"/"isnot#" and "is?"/"isnot?" can be used to match
|
||||
false and not an error. "is#"/"isnot#" and "is?"/"isnot?" can be used to match
|
||||
and ignore case.
|
||||
|
||||
When comparing a String with a Number, the String is converted to a Number,
|
||||
@@ -4635,8 +4635,8 @@ pyeval({expr}) *pyeval()*
|
||||
Numbers and strings are returned as they are (strings are
|
||||
copied though).
|
||||
Lists are represented as Vim |List| type.
|
||||
Dictionaries are represented as Vim |Dictionary| type with
|
||||
keys converted to strings.
|
||||
Dictionaries are represented as Vim |Dictionary| type,
|
||||
non-string keys result in error.
|
||||
{only available when compiled with the |+python| feature}
|
||||
|
||||
*E726* *E727*
|
||||
@@ -5253,8 +5253,9 @@ setreg({regname}, {value} [,{options}])
|
||||
|
||||
If {options} contains no register settings, then the default
|
||||
is to use character mode unless {value} ends in a <NL>.
|
||||
Setting the '=' register is not possible.
|
||||
Returns zero for success, non-zero for failure.
|
||||
Setting the '=' register is not possible, but you can use >
|
||||
:let @= = var_expr
|
||||
< Returns zero for success, non-zero for failure.
|
||||
|
||||
Examples: >
|
||||
:call setreg(v:register, @*)
|
||||
|
||||
@@ -93,7 +93,7 @@ Details
|
||||
This is also the keymap when 'keymap=hebrew' is set. The advantage of
|
||||
'keymap' is that it works properly when using UTF8, e.g. it inserts the
|
||||
correct characters; 'hkmap' does not. The 'keymap' keyboard can also
|
||||
insert niqud and te`amim. To see what those mappings are,look at the
|
||||
insert niqud and te`amim. To see what those mappings are, look at the
|
||||
keymap file 'hebrew.vim' etc.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2012 Aug 02
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2012 Sep 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -159,6 +159,26 @@ vim.bindeval(str) *python-bindeval*
|
||||
vimlist or vimdictionary python type that are connected to original
|
||||
list or dictionary. Thus modifications to these objects imply
|
||||
modifications of the original.
|
||||
|
||||
Additionally, vimlist and vimdictionary type have read-write
|
||||
`.locked` attribute that returns
|
||||
Value Meaning ~
|
||||
zero Variable is not locked
|
||||
vim.VAR_LOCKED Variable is locked, but can be unlocked
|
||||
vim.VAR_FIXED Variable is locked and can't be unlocked
|
||||
integer constants. If variable is not fixed, you can do
|
||||
`var.locked=True` to lock it and `var.locked=False` to unlock.
|
||||
There is no recursive locking like |:lockvar|! does. There is also
|
||||
no way to lock a specific key or check whether it is locked (in any
|
||||
case these locks are ignored by anything except |:let|: |extend()|
|
||||
does not care, neither does python interface).
|
||||
|
||||
Vimdictionary type also supports `.scope` attribute which is one of
|
||||
Value Meaning ~
|
||||
zero Dictionary is not a scope one
|
||||
vim.VAR_DEF_SCOPE Function-local or global scope dictionary
|
||||
vim.VAR_SCOPE Other scope dictionary
|
||||
|
||||
2. if expression evaluates to a function reference, then it returns
|
||||
callable vimfunction object. Use self keyword argument to assign
|
||||
|self| object for dictionary functions.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.3. Last change: 2011 Sep 02
|
||||
*indent.txt* For Vim version 7.3. Last change: 2012 Aug 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -540,7 +540,7 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
*cino-star*
|
||||
*N Vim searches for unclosed comments at most N lines away. This
|
||||
limits the time needed to search for the start of a comment.
|
||||
If your /* */ comments stop indenting afer N lines this is the
|
||||
If your /* */ comments stop indenting after N lines this is the
|
||||
value you will want to change.
|
||||
(default 70 lines).
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.3. Last change: 2011 May 15
|
||||
*intro.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -394,6 +394,8 @@ CTRL-{char} {char} typed as a control character; that is, typing {char}
|
||||
*quotecommandquote*
|
||||
"command" A reference to a command that you can type is enclosed in
|
||||
double quotes.
|
||||
`command` New style command, this distinguishes it from other
|
||||
quoted text and strings.
|
||||
|
||||
*key-notation* *key-codes* *keycodes*
|
||||
These names for keys are used in the documentation. They can also be used
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.3. Last change: 2012 Aug 15
|
||||
*todo.txt* For Vim version 7.3. Last change: 2012 Oct 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,50 +34,122 @@ not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Patch with Test for patch 7.3.673 (Christian Brabandt, 2012 Oct 3)
|
||||
|
||||
Patch for C-\ e when editing expression. (Christian Brabandt, 2012 Oct 3)
|
||||
Correction by ZyX.
|
||||
|
||||
Go through more coverity reports.
|
||||
|
||||
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
|
||||
|
||||
Checking runtime scripts: Thilo Six, 2012 Jun 6.
|
||||
|
||||
Crash with 1023 byte directory name. (Danek Duvall, 2012 Sep 19)
|
||||
|
||||
Patch for wrong text in balloon, Issue 58. (Dominique Pelle)
|
||||
|
||||
Patch for menu.vim to correct message about adding spell file.
|
||||
(Jiri Sedlak, 2012 Sep 24)
|
||||
|
||||
GTK: problem with 'L' in 'guioptions' changing the window width.
|
||||
(Aaron Cornelius, 2012 Feb 6)
|
||||
|
||||
Checking runtime scripts: Thilo Six, 2012 Jun 6.
|
||||
Patch for SGR mouse with older xterm. (Hayaki Saito, 2012 Sep 19)
|
||||
|
||||
Patch for crash with an autocommand. (ZyX, 2012 Sep 6, second one)
|
||||
Also patch for garbage, but use vim_strncpy() instead.
|
||||
|
||||
Patch to fix crash on Win32 when setting 'encoding'. (Jiri Sedlak, 2012 Sep
|
||||
12)
|
||||
|
||||
Patch to update example using empty(). (ZyX, 2012 Sep 13)
|
||||
|
||||
Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3.
|
||||
|
||||
Updated French and Esperanto files. (Dominique Pelle, 2012 Aug 19)
|
||||
|
||||
When showing diffs filler lines may be hidden at first.
|
||||
Patch by Christian Brabandt, 2012 Sep 6.
|
||||
|
||||
Patch for memory leaks on exception. (ZyX, 2012 Sep 9)
|
||||
|
||||
The CompleteDone autocommand needs some info passed to it:
|
||||
- The word that was selected (empty if abandoned complete)
|
||||
- Type of completion: tag, omnifunc, user func.
|
||||
|
||||
mouse_sgr is not ordered alphabetically in :version output.
|
||||
Docs list mouse_urxvt as normal feature, should be big. (Hayaki Saito, 2012
|
||||
Aug 16)
|
||||
|
||||
":gundo" command: global undo. Undoes changes spread over multiple files in
|
||||
the order they were made. Also ":gredo". Both with a count. Useful when
|
||||
tests fail after making changes and you forgot in which files.
|
||||
|
||||
Patch to make updating tabline faster. (Arseny Kapoulkine, 2012 Oct 3)
|
||||
|
||||
Crash with vimdiff. (Don Cruickshank, 2012 Sep 23)
|
||||
|
||||
Win32: use 'guifontwide' for IME composition. (Taro Muraoka, 2012 Sep 30)
|
||||
Update Oct 2.
|
||||
|
||||
Patch to make multibyte input work on Win32 console when codepage differs from
|
||||
'encoding'. (Ken Takata, 2012 Sep 29)
|
||||
|
||||
It's possible to defined an input() function that overrides the built-in one.
|
||||
(ZyX, 2012 Sep 28)
|
||||
|
||||
Win32: When a directory name contains an exclamation mark, completion doesn't
|
||||
complete the contents of the directory. No escaping for the "!"? (Jan
|
||||
Stocker, 2012 Jan 5)
|
||||
|
||||
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
|
||||
28) Asked for tests.
|
||||
|
||||
Patch for IME handling, adds 'imactivatefunc' and 'imstatusfunc' option.
|
||||
(Yukihiro Nakadaira, 2012 Aug 16)
|
||||
Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18)
|
||||
|
||||
Issue 54: document behavior of -complete, also expands arg.
|
||||
|
||||
New syntax files for apt. (quidame, 2012 Sep 21)
|
||||
|
||||
Patch for if_lua. (Luis Carvalho, 2012 Aug 26, update Aug 29, another Aug 30,
|
||||
then Sep 1)
|
||||
|
||||
Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
MS-Windows: Crash opening very long file name starting with "\\".
|
||||
(Christian Brock, 2012 Jun 29)
|
||||
|
||||
Win32: patch for current directory, "loading iof conv". (Ken Takata, 2012 Sep
|
||||
15)
|
||||
|
||||
It's probably a good idea to make a negative value for 'sts' use the value of
|
||||
'sw'. Patch by So8res, Oct 3 2012
|
||||
|
||||
Syntax update problem in one buffer opened in two windows, bottom window is
|
||||
not correctly updated. (Paul Harris, 2012 Feb 27)
|
||||
|
||||
Patch to add assignments in cscope. (Uli Meis, Estabrooks, 2012 Sep 1)
|
||||
Alternate patch by Gary Johnson, Sep 4.
|
||||
|
||||
Patch to add getsid(). (Tyru, 2011 Oct 2) Do we want this? Update Oct 4.
|
||||
Or use expand('<sid>')?
|
||||
|
||||
Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18)
|
||||
|
||||
Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers,
|
||||
2012 Aug 4)
|
||||
|
||||
Patch for Tab behavior with 'conceal'. (Dominique Pelle, 2012 Mar 18)
|
||||
Patch to test functionality of 'conceal' with tabs. (Simon Ruderich, 2012 Sep
|
||||
5) Update with screencol() and screenrow() functions: Sep 7.
|
||||
|
||||
Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott,
|
||||
2012 Aug 11) Disallow :new when BufUnload is being handled?
|
||||
|
||||
MS-Windows ACL support doesn't work well. Patch from Ken Takata, 2012 Aug 29.
|
||||
Update Aug 31.
|
||||
|
||||
MS-Windows resizing problems:
|
||||
- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun
|
||||
20. Uses getWindowRect() instead of GetWindowPlacement()
|
||||
@@ -94,6 +166,9 @@ The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O.
|
||||
Suggestion for another map. (Philip Mat, 2012 Jun 18)
|
||||
But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
|
||||
|
||||
Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012
|
||||
Aug 16)
|
||||
|
||||
URXVT:
|
||||
- will get stuck if byte sequence does not containe expected semicolon.
|
||||
- Use urxvt mouse support also in xterm. Explanations:
|
||||
@@ -108,17 +183,24 @@ Do give the prompt? Quit with an error?
|
||||
|
||||
Patch for 'backupcopy' default behavior for symlinks on Windows. (David Pope,
|
||||
2012 Mar 21, update Mar 31)
|
||||
With fix for memory leak: Ken Takata, 2012 Aug 24
|
||||
Another update Sep 24.
|
||||
|
||||
Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14)
|
||||
|
||||
Patch for input method status. (Hirohito Higashi, 2012 Apr 18)
|
||||
|
||||
Patch to print the result of a :python command. (Maxim Philippov
|
||||
<philippovmi@gmail.com>, 2012 Aug 16) Update Aug 17.
|
||||
|
||||
Problem with winfixheight and resizing. (Yukihiro Nakadaira, 2011 Sep 17)
|
||||
Patch Sep 18.
|
||||
|
||||
Patch for IME problems. Remove hacking code for old IM. (Yukihiro Nakadaira,
|
||||
2012 Jul 20)
|
||||
|
||||
/[^\n] does match at a line break. Expected to do the same as /.
|
||||
|
||||
Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27)
|
||||
And one for gui_x11.txt.
|
||||
|
||||
@@ -162,9 +244,6 @@ Patch to add ":py3do". (Lilydjwg, 2012 Apr 7)
|
||||
|
||||
Plugin for Modeleasy. (Massimiliano Tripoli, 2011 Nov 29)
|
||||
|
||||
When using remote-silent the -R flag is not passed on. (Axel Bender, 2012 May
|
||||
31)
|
||||
|
||||
Updated syntax file for ssh_config, maintainer doesn't respond.
|
||||
(Leonard Ehrenfried, 2011 Sep 26)
|
||||
|
||||
@@ -725,10 +804,6 @@ Support a 'systemencoding' option (for Unix). It specifies the encoding of
|
||||
file names. (Kikuchan, 2010 Oct 5). Useful on a latin1 or double-byte Asian
|
||||
system when 'encoding' is "utf-8".
|
||||
|
||||
Win32: A --remote command that has a directory name starting with a ( doesn't
|
||||
work, the backslash is removed, assuming that it escapes the (. (Valery
|
||||
Kondakoff, 2009 May 13)
|
||||
|
||||
Win32 GUI: Changing manifest helps for dpi changes (Joe Castro, 2009 Mar 27)
|
||||
|
||||
Win32 GUI: last message from startup doesn't show up when there is an echoerr
|
||||
@@ -914,6 +989,15 @@ escaping characters where the backslash is not removed later. Asked Chris for
|
||||
an alternate solution, also for src/ex_getln.c.
|
||||
This also fails when the file or directory name contains "%". (Thoml, 2008
|
||||
July 7)
|
||||
Using --remote-silent while the current directory has a # in the name does not
|
||||
work, the # needs to be escaped. (Tramblay Bruno, 2012 Sep 15)
|
||||
|
||||
When using remote-silent the -R flag is not passed on. (Axel Bender, 2012 May
|
||||
31)
|
||||
|
||||
Win32: A --remote command that has a directory name starting with a ( doesn't
|
||||
work, the backslash is removed, assuming that it escapes the (. (Valery
|
||||
Kondakoff, 2009 May 13)
|
||||
|
||||
Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull,
|
||||
2008 May 14)
|
||||
|
||||
@@ -1681,7 +1681,7 @@ in your plugin file!
|
||||
HEADER
|
||||
|
||||
You will probably add new corrections to the plugin and soon have several
|
||||
versions laying around. And when distributing this file, people will want to
|
||||
versions lying around. And when distributing this file, people will want to
|
||||
know who wrote this wonderful plugin and where they can send remarks.
|
||||
Therefore, put a header at the top of your plugin: >
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ position.
|
||||
lines as used for the last Visual operation, but at
|
||||
the current cursor position, multiplied by [count].
|
||||
When the previous Visual operation was on a block both
|
||||
the width and height of the block are multipiled by
|
||||
the width and height of the block are multiplied by
|
||||
[count].
|
||||
When there was no previous Visual operation [count]
|
||||
characters are selected. This is like moving the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Aug 02
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -128,6 +128,11 @@ au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf set
|
||||
" Arc Macro Language
|
||||
au BufNewFile,BufRead *.aml setf aml
|
||||
|
||||
" APT config file
|
||||
au BufNewFile,BufRead apt.conf setf aptconf
|
||||
au BufNewFile,BufRead */.aptitude/config setf aptconf
|
||||
au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf
|
||||
|
||||
" Arch Inventory file
|
||||
au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch
|
||||
|
||||
@@ -633,6 +638,9 @@ au BufNewFile,BufRead *.dsl setf dsl
|
||||
" DTD (Document Type Definition for XML)
|
||||
au BufNewFile,BufRead *.dtd setf dtd
|
||||
|
||||
" DTS/DSTI (device tree files)
|
||||
au BufNewFile,BufRead *.dts,*.dtsi setf dts
|
||||
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo)
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
|
||||
|
||||
@@ -1772,6 +1780,10 @@ func! SetFileTypeSH(name)
|
||||
" Some .sh scripts contain #!/bin/tcsh.
|
||||
call SetFileTypeShell("tcsh")
|
||||
return
|
||||
elseif a:name =~ '\<zsh\>'
|
||||
" Some .sh scripts contain #!/bin/zsh.
|
||||
call SetFileTypeShell("zsh")
|
||||
return
|
||||
elseif a:name =~ '\<ksh\>'
|
||||
let b:is_kornshell = 1
|
||||
if exists("b:is_bash")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: generic Changelog file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-05-02
|
||||
" Latest Revision: 2012-08-23
|
||||
" Variables:
|
||||
" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) -
|
||||
" description: the timeformat used in ChangeLog entries.
|
||||
@@ -106,10 +106,10 @@ if &filetype == 'changelog'
|
||||
|
||||
function! s:passwd_field(line, field)
|
||||
let fields = split(a:line, ':', 1)
|
||||
if len(fields) < field
|
||||
if len(fields) < a:field
|
||||
return ""
|
||||
endif
|
||||
return fields[field - 1]
|
||||
return fields[a:field - 1]
|
||||
endfunction
|
||||
|
||||
function! s:capitalize(word)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zimbu
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 May 18
|
||||
" Last Change: 2012 Sep 08
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -34,7 +34,7 @@ setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m
|
||||
|
||||
" When the matchit plugin is loaded, this makes the % command skip parens and
|
||||
" braces in comments.
|
||||
let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=}\|\<UNTIL\>'
|
||||
let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)'
|
||||
|
||||
let b:match_skip = 's:comment\|string\|zimbuchar'
|
||||
|
||||
@@ -43,12 +43,36 @@ setlocal et sts=2 sw=2
|
||||
|
||||
" Does replace when a dot, space or closing brace is typed.
|
||||
func! GCUpperDot(what)
|
||||
let col = col(".") - strlen(a:what)
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}'
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' && v:char != ','
|
||||
" no space or dot after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperCommon(a:what)
|
||||
endfunc
|
||||
|
||||
" Does not replace when a dot is typed.
|
||||
func! GCUpper(what)
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')' && v:char != ','
|
||||
" no space or other "terminating" character after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperCommon(a:what)
|
||||
endfunc
|
||||
|
||||
" Only replaces when a space is typed.
|
||||
func! GCUpperSpace(what)
|
||||
if v:char != ' '
|
||||
" no space after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperCommon(a:what)
|
||||
endfunc
|
||||
|
||||
func! GCUpperCommon(what)
|
||||
let col = col(".") - strlen(a:what)
|
||||
if col > 1 && getline('.')[col - 2] != ' '
|
||||
" no space before the typed text
|
||||
let g:got_char = 999
|
||||
@@ -64,34 +88,15 @@ func! GCUpperDot(what)
|
||||
return toupper(a:what)
|
||||
endfunc
|
||||
|
||||
" Does not replace when a dot is typed.
|
||||
func! GCUpper(what)
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')'
|
||||
" no space after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperDot(a:what)
|
||||
endfunc
|
||||
|
||||
" Only replaces when a space is typed.
|
||||
func! GCUpperSpace(what)
|
||||
if v:char != ' '
|
||||
" no space after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperDot(a:what)
|
||||
endfunc
|
||||
|
||||
iabbr <buffer> <expr> alias GCUpperSpace("alias")
|
||||
iabbr <buffer> <expr> arg GCUpperDot("arg")
|
||||
iabbr <buffer> <expr> bad GCUpper("bad")
|
||||
iabbr <buffer> <expr> break GCUpper("break")
|
||||
iabbr <buffer> <expr> case GCUpperSpace("case")
|
||||
iabbr <buffer> <expr> catch GCUpperSpace("catch")
|
||||
iabbr <buffer> <expr> check GCUpperDot("check")
|
||||
iabbr <buffer> <expr> class GCUpperSpace("class")
|
||||
iabbr <buffer> <expr> interface GCUpperSpace("interface")
|
||||
iabbr <buffer> <expr> implements GCUpperSpace("implements")
|
||||
iabbr <buffer> <expr> shared GCUpperSpace("shared")
|
||||
iabbr <buffer> <expr> continue GCUpper("continue")
|
||||
iabbr <buffer> <expr> default GCUpper("default")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Zimbu
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2011 Jun 19
|
||||
" Last Change: 2012 Sep 08
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -101,7 +101,7 @@ func GetZimbuIndent(lnum)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|BITS\|MODULE\|SHARED\)\>'
|
||||
if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|INTERFACE\|BITS\|MODULE\|SHARED\)\>'
|
||||
let plindent += &sw
|
||||
endif
|
||||
if thisline =~ '^\s*\(}\|ELSEIF\>\|ELSE\>\|CATCH\|FINALLY\|GENERATE_ELSEIF\>\|GENERATE_ELSE\>\|UNTIL\>\)'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2010 Sep 22
|
||||
" Last change: 2012 Aug 30
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
@@ -198,7 +198,8 @@ else
|
||||
" - "=== ", line of "=", "---", "+++ " (SVK diff)
|
||||
" - "=== ", "--- ", "+++ " (bzr diff, common case)
|
||||
" - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
|
||||
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
|
||||
" - "# HG changeset patch" in first line (Mercurial export format)
|
||||
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
|
||||
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
|
||||
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
|
||||
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
|
||||
|
||||
493
runtime/syntax/aptconf.vim
Normal file
493
runtime/syntax/aptconf.vim
Normal file
@@ -0,0 +1,493 @@
|
||||
" Vim syntax file
|
||||
" Language: APT config file
|
||||
" Maintainer: Yann Amar <quidame@poivron.org>
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x and 7.x: Quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = 'aptconf'
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Errors:
|
||||
" Catch all that is not overridden by next rules/items:
|
||||
syn match aptconfError display '[^[:blank:]]'
|
||||
syn match aptconfError display '^[^[:blank:]][^:{]*'
|
||||
|
||||
" Options:
|
||||
" Define a general regular expression for the options that are not defined
|
||||
" later as keywords. Following apt.conf(5), we know that options are case
|
||||
" insensitive, and can contain alphanumeric characters and '/-:._+'; we
|
||||
" assume that there can not be consecutive colons (::) which is used as
|
||||
" syntax operator; we also assume that an option name can not start or end
|
||||
" by a colon.
|
||||
syn case ignore
|
||||
syn match aptconfRegexpOpt '[-[:alnum:]/.+_]\+\(:[-[:alnum:]/.+_]\+\)*' contained display
|
||||
|
||||
" Keywords:
|
||||
setlocal iskeyword+=/,-,.,_,+
|
||||
"setlocal iskeyword+=: is problematic, because of the '::' separator
|
||||
|
||||
" Incomplete keywords will be treated differently than completely bad strings:
|
||||
syn keyword aptconfGroupIncomplete
|
||||
\ a[cquire] a[ptitude] d[ebtags] d[ebug] d[ir] d[pkg] d[select]
|
||||
\ o[rderlist] p[ackagemanager] p[kgcachegen] q[uiet] r[pm]
|
||||
\ u[nattended-upgrade]
|
||||
|
||||
" Only the following keywords can be used at toplevel (to begin an option):
|
||||
syn keyword aptconfGroup
|
||||
\ acquire apt aptitude debtags debug dir dpkg dselect
|
||||
\ orderlist packagemanager pkgcachegen quiet rpm
|
||||
\ unattended-upgrade
|
||||
|
||||
" Possible options for each group:
|
||||
" Acquire: {{{
|
||||
syn keyword aptconfAcquire contained
|
||||
\ cdrom Check-Valid-Until CompressionTypes ForceHash ftp gpgv
|
||||
\ GzipIndexes http https Languages Max-ValidTime Min-ValidTime PDiffs
|
||||
\ Queue-Mode Retries Source-Symlinks
|
||||
|
||||
syn keyword aptconfAcquireCDROM contained
|
||||
\ AutoDetect CdromOnly Mount UMount
|
||||
|
||||
syn keyword aptconfAcquireCompressionTypes contained
|
||||
\ bz2 lzma gz Order
|
||||
|
||||
syn keyword aptconfAcquireFTP contained
|
||||
\ Passive Proxy ProxyLogin Timeout
|
||||
|
||||
syn keyword aptconfAcquireHTTP contained
|
||||
\ AllowRedirect Dl-Limit Max-Age No-Cache No-Store Pipeline-Depth
|
||||
\ Proxy Timeout User-Agent
|
||||
|
||||
syn keyword aptconfAcquireHTTPS contained
|
||||
\ CaInfo CaPath CrlFile IssuerCert SslCert SslForceVersion SslKey
|
||||
\ Verify-Host Verify-Peer
|
||||
|
||||
syn keyword aptconfAcquireMaxValidTime contained
|
||||
\ Debian Debian-Security
|
||||
|
||||
syn keyword aptconfAcquirePDiffs contained
|
||||
\ FileLimit SizeLimit
|
||||
|
||||
syn cluster aptconfAcquire_ contains=aptconfAcquire,
|
||||
\ aptconfAcquireCDROM,aptconfAcquireCompressionTypes,aptconfAcquireFTP,
|
||||
\ aptconfAcquireHTTP,aptconfAcquireHTTPS,aptconfAcquireMaxValidTime,
|
||||
\ aptconfAcquirePDiffs
|
||||
" }}}
|
||||
" Apt: {{{
|
||||
syn keyword aptconfApt contained
|
||||
\ Architecture Architectures Archive Authentication AutoRemove
|
||||
\ Build-Essential Cache Cache-Grow Cache-Limit Cache-Start CDROM
|
||||
\ Changelogs Clean-Installed Compressor Default-Release
|
||||
\ Force-LoopBreak Get Ignore-Hold Immediate-Configure
|
||||
\ Install-Recommends Install-Suggests Keep-Fds List-Cleanup
|
||||
\ NeverAutoRemove Never-MarkAuto-Sections Periodic Status-Fd Update
|
||||
|
||||
syn keyword aptconfAptAuthentication contained
|
||||
\ TrustCDROM
|
||||
|
||||
syn keyword aptconfAptAutoRemove contained
|
||||
\ RecommendsImportant SuggestsImportant
|
||||
|
||||
syn keyword aptconfAptCache contained
|
||||
\ AllNames AllVersions Generate GivenOnly Important Installed NamesOnly
|
||||
\ RecurseDepends ShowFull
|
||||
|
||||
syn keyword aptconfAptCDROM contained
|
||||
\ Fast NoAct NoMount Rename
|
||||
|
||||
syn keyword aptconfAptChangelogs contained
|
||||
\ Server
|
||||
|
||||
syn keyword aptconfAptCompressor contained
|
||||
\ bzip2 gzip lzma xz
|
||||
|
||||
syn keyword aptconfAptCompressorAll contained
|
||||
\ Binary CompressArg Cost Extension Name UncompressArg
|
||||
|
||||
syn keyword aptconfAptGet contained
|
||||
\ AllowUnauthenticated Arch-Only Assume-No Assume-Yes AutomaticRemove
|
||||
\ Build-Dep-Automatic Compile Diff-Only Download Download-Only Dsc-Only
|
||||
\ Fix-Broken Fix-Missing Force-Yes HideAutoRemove Host-Architecture
|
||||
\ List-Cleanup Only-Source Print-URIs Purge ReInstall Remove
|
||||
\ Show-Upgraded Show-User-Simulation-Note Show-Versions Simulate
|
||||
\ Tar-Only Trivial-Only Upgrade
|
||||
|
||||
syn keyword aptconfAptPeriodic contained
|
||||
\ AutocleanInterval BackupArchiveInterval BackupLevel
|
||||
\ Download-Upgradeable-Packages MaxAge MaxSize MinAge
|
||||
\ Unattended-Upgrade Update-Package-Lists Verbose
|
||||
|
||||
syn keyword aptconfAptUpdate contained
|
||||
\ Pre-Invoke Post-Invoke Post-Invoke-Success
|
||||
|
||||
syn cluster aptconfApt_ contains=aptconfApt,
|
||||
\ aptconfAptAuthentication,aptconfAptAutoRemove,aptconfAptCache,
|
||||
\ aptconfAptCDROM,aptconfAptChangelogs,aptconfAptCompressor,
|
||||
\ aptconfAptCompressorAll,aptconfAptGet,aptconfAptPeriodic,
|
||||
\ aptconfAptUpdate
|
||||
" }}}
|
||||
" Aptitude: {{{
|
||||
syn keyword aptconfAptitude contained
|
||||
\ Allow-Null-Upgrade Always-Use-Safe-Resolver Autoclean-After-Update
|
||||
\ Auto-Install Auto-Fix-Broken Cmdline Debtags-Binary
|
||||
\ Debtags-Update-Options Delete-Unused Delete-Unused-Pattern
|
||||
\ Display-Planned-Action Forget-New-On-Install Forget-New-On-Update
|
||||
\ Get-Root-Command Ignore-Old-Tmp Ignore-Recommends-Important
|
||||
\ Keep-Recommends Keep-Suggests Keep-Unused-Pattern LockFile Log
|
||||
\ Logging Parse-Description-Bullets Pkg-Display-Limit ProblemResolver
|
||||
\ Purge-Unused Recommends-Important Safe-Resolver Screenshot Sections
|
||||
\ Simulate Spin-Interval Suggests-Important Suppress-Read-Only-Warning
|
||||
\ Theme Track-Dselect-State UI Warn-Not-Root
|
||||
|
||||
syn keyword aptconfAptitudeCmdline contained
|
||||
\ Always-Prompt Assume-Yes Disable-Columns Download-Only Fix-Broken
|
||||
\ Ignore-Trust-Violations Package-Display-Format Package-Display-Width
|
||||
\ Progress Request-Strictness Resolver-Debug Resolver-Dump
|
||||
\ Resolver-Show-Steps Safe-Upgrade Show-Deps Show-Size-Changes
|
||||
\ Show-Versions Show-Why Simulate Verbose Version-Display-Format
|
||||
\ Versions-Group-By Versions-Show-Package-Names Visual-Preview
|
||||
\ Why-Display-Mode
|
||||
|
||||
syn keyword aptconfAptitudeCmdlineProgress contained
|
||||
\ Percent-On-Right Retain-Completed
|
||||
|
||||
syn keyword aptconfAptitudeCmdlineSafeUpgrade contained
|
||||
\ No-New-Installs
|
||||
|
||||
syn keyword aptconfAptitudeLogging contained
|
||||
\ File Levels
|
||||
|
||||
syn keyword aptconfAptitudeProblemResolver contained
|
||||
\ Allow-Break-Holds BreakHoldScore Break-Hold-Level BrokenScore
|
||||
\ DefaultResolutionScore Discard-Null-Solution
|
||||
\ EssentialRemoveScore ExtraScore FullReplacementScore FutureHorizon
|
||||
\ Hints ImportantScore Infinity InstallScore Keep-All-Level KeepScore
|
||||
\ NonDefaultScore Non-Default-Level OptionalScore PreserveAutoScore
|
||||
\ PreserveManualScore RemoveScore Remove-Essential-Level Remove-Level
|
||||
\ RequiredScore ResolutionScore Safe-Level SolutionCost StandardScore
|
||||
\ StepLimit StepScore Trace-Directory Trace-File
|
||||
\ UndoFullReplacementScore UnfixedSoftScore UpgradeScore
|
||||
|
||||
syn keyword aptconfAptitudeSafeResolver contained
|
||||
\ No-New-Installs No-New-Upgrades Show-Resolver-Actions
|
||||
|
||||
syn keyword aptconfAptitudeScreenshot contained
|
||||
\ Cache-Max IncrementalLoadLimit
|
||||
|
||||
syn keyword aptconfAptitudeSections contained
|
||||
\ Descriptions Top-Sections
|
||||
|
||||
syn keyword aptconfAptitudeUI contained
|
||||
\ Advance-On-Action Auto-Show-Reasons Default-Grouping
|
||||
\ Default-Package-View Default-Preview-Grouping Default-Sorting
|
||||
\ Description-Visible-By-Default Exit-On-Last-Close Fill-Text
|
||||
\ Flat-View-As-First-View HelpBar Incremental-Search InfoAreaTabs
|
||||
\ KeyBindings MenuBar-Autohide Minibuf-Download-Bar Minibuf-Prompts
|
||||
\ New-package-Commands Package-Display-Format Package-Header-Format
|
||||
\ Package-Status-Format Pause-After-Download Preview-Limit
|
||||
\ Prompt-On-Exit Styles ViewTabs
|
||||
|
||||
syn keyword aptconfAptitudeUIStyles contained
|
||||
\ Bullet ChangeLogNewerVersion Default DepBroken DisabledMenuEntry
|
||||
\ DownloadHit DownloadProgress EditLine Error Header HighlightedMenuBar
|
||||
\ HighlightedMenuEntry MediaChange MenuBar MenuBorder MenuEntry
|
||||
\ MineBomb MineBorder MineFlag MineNumber1 MineNumber2 MineNumber3
|
||||
\ MineNumber4 MineNumber5 MineNumber6 MineNumber7 MineNumber8
|
||||
\ MultiplexTab MultiplexTabHighlighted PkgBroken PkgBrokenHighlighted
|
||||
\ PkgIsInstalled PkgIsInstalledHighlighted PkgNotInstalled
|
||||
\ PkgNotInstalledHighlighted PkgToDowngrade PkgToDowngradeHighlighted
|
||||
\ PkgToHold PkgToHoldHighlighted PkgToInstall PkgToInstallHighlighted
|
||||
\ PkgToRemove PkgToRemoveHighlighted PkgToUpgrade
|
||||
\ PkgToUpgradeHighlighted Progress SolutionActionApproved
|
||||
\ SolutionActionRejected Status TreeBackground TrustWarning
|
||||
|
||||
syn keyword aptconfAptitudeUIStylesElements contained
|
||||
\ bg clear fg flip set
|
||||
|
||||
syn cluster aptconfAptitude_ contains=aptconfAptitude,
|
||||
\ aptconfAptitudeCmdline,aptconfAptitudeCmdlineProgress,
|
||||
\ aptconfAptitudeCmdlineSafeUpgrade,aptconfAptitudeLogging,
|
||||
\ aptconfAptitudeProblemResolver,aptconfAptitudeSafeResolver,
|
||||
\ aptconfAptitudeScreenshot,aptconfAptitudeSections,aptconfAptitudeUI,
|
||||
\ aptconfAptitudeUIStyles,aptconfAptitudeUIStylesElements
|
||||
" }}}
|
||||
" DebTags: {{{
|
||||
syn keyword aptconfDebTags contained
|
||||
\ Vocabulary
|
||||
|
||||
syn cluster aptconfDebTags_ contains=aptconfDebTags
|
||||
" }}}
|
||||
" Debug: {{{
|
||||
syn keyword aptconfDebug contained
|
||||
\ Acquire aptcdrom BuildDeps Hashes IdentCdrom Nolocking
|
||||
\ pkgAcquire pkgAutoRemove pkgCacheGen pkgDepCache pkgDPkgPM
|
||||
\ pkgDPkgProgressReporting pkgInitialize pkgOrderList
|
||||
\ pkgPackageManager pkgPolicy pkgProblemResolver sourceList
|
||||
|
||||
syn keyword aptconfDebugAcquire contained
|
||||
\ cdrom Ftp gpgv Http Https netrc
|
||||
|
||||
syn keyword aptconfDebugPkgAcquire contained
|
||||
\ Auth Diffs RRed Worker
|
||||
|
||||
syn keyword aptconfDebugPkgDepCache contained
|
||||
\ AutoInstall Marker
|
||||
|
||||
syn keyword aptconfDebugPkgProblemResolver contained
|
||||
\ ShowScores
|
||||
|
||||
syn cluster aptconfDebug_ contains=aptconfDebug,
|
||||
\ aptconfDebugAcquire,aptconfDebugPkgAcquire,aptconfDebugPkgDepCache,
|
||||
\ aptconfDebugPkgProblemResolver
|
||||
" }}}
|
||||
" Dir: {{{
|
||||
syn keyword aptconfDir contained
|
||||
\ Aptitude Bin Cache Etc Ignore-Files-Silently Log Media Parts RootDir
|
||||
\ State
|
||||
|
||||
syn keyword aptconfDirAptitude contained
|
||||
\ state
|
||||
|
||||
syn keyword aptconfDirBin contained
|
||||
\ apt-get apt-cache dpkg dpkg-buildpackage dpkg-source gpg gzip Methods
|
||||
\ solvers
|
||||
|
||||
syn keyword aptconfDirCache contained
|
||||
\ Archives Backup pkgcache srcpkgcache
|
||||
|
||||
syn keyword aptconfDirEtc contained
|
||||
\ Main Netrc Parts Preferences PreferencesParts SourceList SourceParts
|
||||
\ VendorList VendorParts Trusted TrustedParts
|
||||
|
||||
syn keyword aptconfDirLog contained
|
||||
\ History Terminal
|
||||
|
||||
syn keyword aptconfDirMedia contained
|
||||
\ MountPath
|
||||
|
||||
syn keyword aptconfDirState contained
|
||||
\ cdroms extended_states Lists mirrors status
|
||||
|
||||
syn cluster aptconfDir_ contains=aptconfDir,
|
||||
\ aptconfDirAptitude,aptconfDirBin,aptconfDirCache,aptconfDirEtc,
|
||||
\ aptconfDirLog,aptconfDirMedia,aptconfDirState
|
||||
" }}}
|
||||
" DPkg: {{{
|
||||
syn keyword aptconfDPkg contained
|
||||
\ Build-Options Chroot-Directory ConfigurePending FlushSTDIN MaxArgs
|
||||
\ MaxBytes NoTriggers options Pre-Install-Pkgs Pre-Invoke Post-Invoke
|
||||
\ Run-Directory StopOnError Tools TriggersPending
|
||||
|
||||
syn keyword aptconfDPkgTools contained
|
||||
\ Options Version
|
||||
|
||||
syn cluster aptconfDPkg_ contains=aptconfDPkg,
|
||||
\ aptconfDPkgOrderList,aptconfDPkgOrderListScore,aptconfDPkgTools
|
||||
" }}}
|
||||
" DSelect: {{{
|
||||
syn keyword aptconfDSelect contained
|
||||
\ CheckDir Clean Options PromptAfterUpdate UpdateOptions
|
||||
|
||||
syn cluster aptconfDSelect_ contains=aptconfDSelect
|
||||
" }}}
|
||||
" OrderList: {{{
|
||||
syn keyword aptconfOrderList contained
|
||||
\ Score
|
||||
|
||||
syn keyword aptconfOrderListScore contained
|
||||
\ Delete Essential Immediate PreDepends
|
||||
|
||||
syn cluster aptconfOrderList_ contains=aptconfOrderList,
|
||||
\ aptconfOrderListScore
|
||||
" }}}
|
||||
" PackageManager: {{{
|
||||
syn keyword aptconfPackageManager contained
|
||||
\ Configure
|
||||
|
||||
syn cluster aptconfPackageManager_ contains=aptconfPackageManager
|
||||
" }}}
|
||||
" PkgCacheGen: {{{
|
||||
syn keyword aptconfPkgCacheGen contained
|
||||
\ Essential
|
||||
|
||||
syn cluster aptconfPkgCacheGen_ contains=aptconfPkgCacheGen
|
||||
" }}}
|
||||
" Quiet: {{{
|
||||
syn keyword aptconfQuiet contained
|
||||
\ NoUpdate
|
||||
|
||||
syn cluster aptconfQuiet_ contains=aptconfQuiet
|
||||
" }}}
|
||||
" Rpm: {{{
|
||||
syn keyword aptconfRpm contained
|
||||
\ Post-Invoke Pre-Invoke
|
||||
|
||||
syn cluster aptconfRpm_ contains=aptconfRpm
|
||||
" }}}
|
||||
" Unattened Upgrade: {{{
|
||||
syn keyword aptconfUnattendedUpgrade contained
|
||||
\ AutoFixInterruptedDpkg Automatic-Reboot InstallOnShutdown Mail
|
||||
\ MailOnlyOnError MinimalSteps Origins-Pattern Package-Blacklist
|
||||
\ Remove-Unused-Dependencies
|
||||
|
||||
syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade
|
||||
" }}}
|
||||
|
||||
syn case match
|
||||
|
||||
" Now put all the keywords (and 'valid' options) in a single cluster:
|
||||
syn cluster aptconfOptions contains=aptconfRegexpOpt,
|
||||
\ @aptconfAcquire_,@aptconfApt_,@aptconfAptitude_,@aptconfDebTags_,
|
||||
\ @aptconfDebug_,@aptconfDir_,@aptconfDPkg_,@aptconfDSelect_,
|
||||
\ @aptconfOrderList_,@aptconfPackageManager_,@aptconfPkgCacheGen_,
|
||||
\ @aptconfQuiet_,@aptconfRpm_,@aptconfUnattendedUpgrade_
|
||||
|
||||
" Syntax:
|
||||
syn match aptconfSemiColon ';'
|
||||
syn match aptconfDoubleColon '::'
|
||||
syn match aptconfCurlyBraces '[{}]'
|
||||
syn region aptconfValue start='"' end='"' oneline display
|
||||
syn region aptconfInclude matchgroup=aptconfOperator start='{' end='}' contains=ALLBUT,aptconfGroup,aptconfGroupIncomplete,@aptconfCommentSpecial
|
||||
syn region aptconfInclude matchgroup=aptconfOperator start='::' end='{'me=s-1 contains=@aptconfOptions,aptconfError display
|
||||
syn region aptconfInclude matchgroup=aptconfOperator start='::' end='::\|\s'me=s-1 oneline contains=@aptconfOptions,aptconfError display
|
||||
|
||||
" Basic Syntax Errors: XXX avoid to generate false positives !!!
|
||||
"
|
||||
" * Invalid comment format (seems to not cause errors, but...):
|
||||
syn match aptconfAsError display '^#.*'
|
||||
"
|
||||
" * When a semicolon is missing after a double-quoted string:
|
||||
" There are some cases (for example in the Dir group of options, but not only)
|
||||
" where this syntax is valid. So we don't treat it as a strict error.
|
||||
syn match aptconfAsError display '"[^"]*"[^;]'me=e-1
|
||||
syn match aptconfAsError display '"[^"]*"$'
|
||||
"
|
||||
" * When double quotes are missing around a value (before a semicolon):
|
||||
" This omission has no effect if the value is a single string (without blank
|
||||
" characters). But apt.conf(5) says that quotes are required, and this item
|
||||
" avoids to match unquoted keywords.
|
||||
syn match aptconfAsError display '\s[^"[:blank:]]*[^}"];'me=e-1
|
||||
"
|
||||
" * When only one double quote is missing around a value (before a semicolon):
|
||||
" No comment for that: it must be highly visible.
|
||||
syn match aptconfError display '\(\s\|;\)"[^"[:blank:]]\+;'me=e-1
|
||||
syn match aptconfError display '\(\s\|;\)[^"[:blank:]]\+";'me=e-1
|
||||
"
|
||||
" * When space is missing between option and (quoted) value:
|
||||
" TODO (partially implemented)
|
||||
syn match aptconfError display '::[^[:blank:]]*"'
|
||||
|
||||
" Special Actions:
|
||||
syn match aptconfAction '^#\(clear\|include\)\>'
|
||||
syn region aptconfAction matchgroup=aptconfAction start='^#clear\>' end=';'me=s-1 oneline contains=aptconfGroup,aptconfDoubleColon,@aptconfOptions
|
||||
syn region aptconfAction matchgroup=aptconfAction start='^#include\>' end=';'me=s-1 oneline contains=aptconfRegexpOpt
|
||||
|
||||
" Comments:
|
||||
syn keyword aptconfTodo TODO FIXME NOTE XXX contained
|
||||
syn cluster aptconfCommentSpecial contains=@Spell,aptconfTodo
|
||||
syn match aptconfComment '//.*' contains=@aptconfCommentSpecial
|
||||
syn region aptconfComment start='/\*' end='\*/' contains=@aptconfCommentSpecial
|
||||
|
||||
" Highlight Definitions:
|
||||
hi def link aptconfTodo Todo
|
||||
hi def link aptconfError Error
|
||||
hi def link aptconfComment Comment
|
||||
hi def link aptconfOperator Operator
|
||||
|
||||
hi def link aptconfAction PreProc
|
||||
hi def link aptconfOption Type
|
||||
hi def link aptconfValue String
|
||||
hi def link aptconfRegexpOpt Normal
|
||||
hi def link aptconfAsError Special
|
||||
|
||||
hi def link aptconfSemiColon aptconfOperator
|
||||
hi def link aptconfDoubleColon aptconfOperator
|
||||
hi def link aptconfCurlyBraces aptconfOperator
|
||||
|
||||
hi def link aptconfGroupIncomplete Special
|
||||
hi def link aptconfGroup aptconfOption
|
||||
|
||||
hi def link aptconfAcquire aptconfOption
|
||||
hi def link aptconfAcquireCDROM aptconfOption
|
||||
hi def link aptconfAcquireCompressionTypes aptconfOption
|
||||
hi def link aptconfAcquireFTP aptconfOption
|
||||
hi def link aptconfAcquireHTTP aptconfOption
|
||||
hi def link aptconfAcquireHTTPS aptconfOption
|
||||
hi def link aptconfAcquireMaxValidTime aptconfOption
|
||||
hi def link aptconfAcquirePDiffs aptconfOption
|
||||
|
||||
hi def link aptconfApt aptconfOption
|
||||
hi def link aptconfAptAuthentication aptconfOption
|
||||
hi def link aptconfAptAutoRemove aptconfOption
|
||||
hi def link aptconfAptCache aptconfOption
|
||||
hi def link aptconfAptCDROM aptconfOption
|
||||
hi def link aptconfAptChangelogs aptconfOption
|
||||
hi def link aptconfAptCompressor aptconfOption
|
||||
hi def link aptconfAptCompressorAll aptconfOption
|
||||
hi def link aptconfAptGet aptconfOption
|
||||
hi def link aptconfAptPeriodic aptconfOption
|
||||
hi def link aptconfAptUpdate aptconfOption
|
||||
|
||||
hi def link aptconfAptitude aptconfOption
|
||||
hi def link aptconfAptitudeCmdline aptconfOption
|
||||
hi def link aptconfAptitudeCmdlineProgress aptconfOption
|
||||
hi def link aptconfAptitudeCmdlineSafeUpgrade aptconfOption
|
||||
hi def link aptconfAptitudeLogging aptconfOption
|
||||
hi def link aptconfAptitudeProblemResolver aptconfOption
|
||||
hi def link aptconfAptitudeSafeResolver aptconfOption
|
||||
hi def link aptconfAptitudeScreenshot aptconfOption
|
||||
hi def link aptconfAptitudeSections aptconfOption
|
||||
hi def link aptconfAptitudeUI aptconfOption
|
||||
hi def link aptconfAptitudeUIStyles aptconfOption
|
||||
hi def link aptconfAptitudeUIStylesElements aptconfOption
|
||||
|
||||
hi def link aptconfDebTags aptconfOption
|
||||
|
||||
hi def link aptconfDebug aptconfOption
|
||||
hi def link aptconfDebugAcquire aptconfOption
|
||||
hi def link aptconfDebugPkgAcquire aptconfOption
|
||||
hi def link aptconfDebugPkgDepCache aptconfOption
|
||||
hi def link aptconfDebugPkgProblemResolver aptconfOption
|
||||
|
||||
hi def link aptconfDir aptconfOption
|
||||
hi def link aptconfDirAptitude aptconfOption
|
||||
hi def link aptconfDirBin aptconfOption
|
||||
hi def link aptconfDirCache aptconfOption
|
||||
hi def link aptconfDirEtc aptconfOption
|
||||
hi def link aptconfDirLog aptconfOption
|
||||
hi def link aptconfDirMedia aptconfOption
|
||||
hi def link aptconfDirState aptconfOption
|
||||
|
||||
hi def link aptconfDPkg aptconfOption
|
||||
hi def link aptconfDPkgTools aptconfOption
|
||||
|
||||
hi def link aptconfDSelect aptconfOption
|
||||
|
||||
hi def link aptconfOrderList aptconfOption
|
||||
hi def link aptconfOrderListScore aptconfOption
|
||||
|
||||
hi def link aptconfPackageManager aptconfOption
|
||||
|
||||
hi def link aptconfPkgCacheGen aptconfOption
|
||||
|
||||
hi def link aptconfQuiet aptconfOption
|
||||
|
||||
hi def link aptconfRpm aptconfOption
|
||||
|
||||
hi def link aptconfUnattendedUpgrade aptconfOption
|
||||
|
||||
let b:current_syntax = "aptconf"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: ASN.1
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/asn.vim
|
||||
" Last Change: 2001 Apr 26
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -12,6 +12,9 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" keyword definitions
|
||||
syn keyword asnExternal DEFINITIONS BEGIN END IMPORTS EXPORTS FROM
|
||||
syn match asnExternal "\<IMPLICIT\s\+TAGS\>"
|
||||
@@ -76,6 +79,8 @@ if version >= 508 || !exists("did_asn_syn_inits")
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
let b:current_syntax = "asn"
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
" Vim syntax file
|
||||
" Language: CL
|
||||
" (pronounced alphabetically, and NOT known as Clever)
|
||||
" (CL was created by Multibase, http://www.mbase.com.au)
|
||||
" Language: CL
|
||||
" (pronounced alphabetically, and NOT known as Clever)
|
||||
" (CL was created by Multibase, http://www.mbase.com.au)
|
||||
" Filename extensions: *.ent
|
||||
" *.eni
|
||||
" *.eni
|
||||
" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
|
||||
" Version: 4
|
||||
" Last Change: May 11 2012
|
||||
" Version: 5
|
||||
" Last Change: Aug 16 2012
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
if version >= 600
|
||||
setlocal iskeyword=@,48-57,_,-,
|
||||
setlocal iskeyword=@,48-57,_,-,
|
||||
else
|
||||
set iskeyword=@,48-57,_,-,
|
||||
set iskeyword=@,48-57,_,-,
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
@@ -27,87 +27,87 @@ syn case ignore
|
||||
syn sync lines=300
|
||||
|
||||
"If/else/elsif/endif and while/wend mismatch errors
|
||||
syn match clifError "\<wend\>"
|
||||
syn match clifError "\<elsif\>"
|
||||
syn match clifError "\<else\>"
|
||||
syn match clifError "\<endif\>"
|
||||
syn match clifError "\<wend\>"
|
||||
syn match clifError "\<elsif\>"
|
||||
syn match clifError "\<else\>"
|
||||
syn match clifError "\<endif\>"
|
||||
|
||||
syn match clSpaceError "\s\+$"
|
||||
syn match clSpaceError "\s\+$"
|
||||
|
||||
" If and while regions
|
||||
syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
|
||||
syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
|
||||
syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
|
||||
syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
|
||||
|
||||
" Make those TODO notes and debugging stand out!
|
||||
syn keyword clTodo contained TODO BUG DEBUG FIX
|
||||
syn match clNeedsWork contained "NEED[S]*\s\s*WORK"
|
||||
syn keyword clDebug contained debug
|
||||
syn keyword clTodo contained TODO BUG DEBUG FIX
|
||||
syn match clNeedsWork contained "NEED[S]*\s\s*WORK"
|
||||
syn keyword clDebug contained debug
|
||||
|
||||
syn match clComment "#.*$" contains=clTodo,clNeedsWork
|
||||
syn region clProcedure oneline start="^\s*[{}]" end="$"
|
||||
syn match clInclude "^\s*include\s.*"
|
||||
syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell
|
||||
syn region clProcedure oneline start="^\s*[{}]" end="$"
|
||||
syn match clInclude "^\s*include\s.*"
|
||||
|
||||
" We don't put "debug" in the clSetOptions;
|
||||
" we contain it in clSet so we can make it stand out.
|
||||
syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
|
||||
syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
|
||||
syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
|
||||
syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
|
||||
|
||||
syn match clPreProc "^\s*#P.*"
|
||||
syn match clPreProc "^\s*#P.*"
|
||||
|
||||
syn keyword clConditional else elsif
|
||||
syn keyword clWhile continue endloop
|
||||
syn keyword clConditional else elsif
|
||||
syn keyword clWhile continue endloop
|
||||
" 'break' needs to be a region so we can sync on it above.
|
||||
syn region clBreak oneline start="^\s*break" end="$"
|
||||
syn region clBreak oneline start="^\s*break" end="$"
|
||||
|
||||
syn match clOperator "[!;|)(:.><+*=-]"
|
||||
syn match clOperator "[!;|)(:.><+*=-]"
|
||||
|
||||
syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
|
||||
syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
|
||||
|
||||
syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+
|
||||
syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+
|
||||
syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell
|
||||
syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell
|
||||
|
||||
syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
|
||||
syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
|
||||
|
||||
syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
|
||||
syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
|
||||
|
||||
syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
|
||||
syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_cl_syntax_inits")
|
||||
if version < 508
|
||||
let did_cl_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
if version >= 508 || !exists("did_cl_syntax_inits")
|
||||
if version < 508
|
||||
let did_cl_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink clifError Error
|
||||
HiLink clSpaceError Error
|
||||
HiLink clWhile Repeat
|
||||
HiLink clConditional Conditional
|
||||
HiLink clDebug Debug
|
||||
HiLink clNeedsWork Todo
|
||||
HiLink clTodo Todo
|
||||
HiLink clComment Comment
|
||||
HiLink clProcedure Procedure
|
||||
HiLink clBreak Procedure
|
||||
HiLink clInclude Include
|
||||
HiLink clSetOption Statement
|
||||
HiLink clSet Identifier
|
||||
HiLink clPreProc PreProc
|
||||
HiLink clOperator Operator
|
||||
HiLink clNumber Number
|
||||
HiLink clString String
|
||||
HiLink clQuote Delimiter
|
||||
HiLink clReserved Identifier
|
||||
HiLink clFunction Function
|
||||
HiLink clStatement Statement
|
||||
HiLink clifError Error
|
||||
HiLink clSpaceError Error
|
||||
HiLink clWhile Repeat
|
||||
HiLink clConditional Conditional
|
||||
HiLink clDebug Debug
|
||||
HiLink clNeedsWork Todo
|
||||
HiLink clTodo Todo
|
||||
HiLink clComment Comment
|
||||
HiLink clProcedure Procedure
|
||||
HiLink clBreak Procedure
|
||||
HiLink clInclude Include
|
||||
HiLink clSetOption Statement
|
||||
HiLink clSet Identifier
|
||||
HiLink clPreProc PreProc
|
||||
HiLink clOperator Operator
|
||||
HiLink clNumber Number
|
||||
HiLink clString String
|
||||
HiLink clQuote Delimiter
|
||||
HiLink clReserved Identifier
|
||||
HiLink clFunction Function
|
||||
HiLink clStatement Statement
|
||||
|
||||
delcommand HiLink
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "cl"
|
||||
|
||||
" vim: ts=8 sw=4
|
||||
" vim: ts=8 sw=8
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: Cascading Style Sheets
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/css.vim
|
||||
" Last Change: 2011 Dec 14
|
||||
" CSS2 by Nikolai Weibull
|
||||
" Full CSS2, HTML4 support by Yeti
|
||||
" Language: Cascading Style Sheets
|
||||
" Previous Contributor List:
|
||||
" Claudio Fleiner <claudio@fleiner.com> (Maintainer)
|
||||
" Yeti (Add full CSS2, HTML4 support)
|
||||
" Nikolai Weibull (Add CSS2 support)
|
||||
" Maintainer: Jules Wang <w.jq0722@gmail.com>
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -17,8 +18,12 @@ endif
|
||||
let main_syntax = 'css'
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
" All HTML4 tags
|
||||
syn keyword cssTagName abbr acronym address applet area a b base
|
||||
syn keyword cssTagName basefont bdo big blockquote body br button
|
||||
syn keyword cssTagName caption center cite code col colgroup dd del
|
||||
@@ -27,32 +32,51 @@ syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
|
||||
syn keyword cssTagName iframe img input ins isindex kbd label legend li
|
||||
syn keyword cssTagName link map menu meta noframes noscript ol optgroup
|
||||
syn keyword cssTagName option p param pre q s samp script select small
|
||||
syn keyword cssTagName span strike strong style sub sup tbody td
|
||||
syn keyword cssTagName span strike strong style sub sup table tbody td
|
||||
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
|
||||
syn match cssTagName "\<table\>"
|
||||
syn keyword cssTagName object
|
||||
|
||||
" HTML5 new tags 5*6=30
|
||||
syn keyword cssTagName article aside audio bdi canvas command
|
||||
syn keyword cssTagName datalist details embed figcaption figure footer
|
||||
syn keyword cssTagName header hgroup keygen mark meter nav
|
||||
syn keyword cssTagName output progress rt rp ruby section
|
||||
syn keyword cssTagName source summary time track video wbr
|
||||
|
||||
" Tags not supported in HTML5
|
||||
syn keyword cssDeprecated acronym applet basefont big center dir
|
||||
syn keyword cssDeprecated font frame frameset noframes strike tt
|
||||
|
||||
"syn match cssTagName "\<table\>"
|
||||
syn match cssTagName "\*"
|
||||
|
||||
syn match cssTagName "@page\>" nextgroup=cssDefinition
|
||||
|
||||
syn match cssSelectorOp "[+>.]"
|
||||
syn match cssSelectorOp2 "[~|]\?=" contained
|
||||
" selectors
|
||||
syn match cssSelectorOp "[,>+]"
|
||||
syn match cssSelectorOp2 "[~|^$*]\?=" contained
|
||||
" FIXME: add HTML5 attribute
|
||||
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
|
||||
|
||||
" .class and #id
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
|
||||
|
||||
try
|
||||
syn match cssIdentifier "#[A-Za-z<>-<2D>_@][A-Za-z<>-<2D>0-9_@-]*"
|
||||
catch /^.*/
|
||||
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
|
||||
endtry
|
||||
|
||||
syn match cssTagName "@page\>" nextgroup=cssDefinition
|
||||
" FIXME: use cssVendor here
|
||||
syn match cssTagName "@\(-\(webkit\|moz\|o\|ms\)-\)\=keyframes\>" nextgroup=cssDefinition
|
||||
|
||||
syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
|
||||
syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
|
||||
syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
|
||||
"syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
|
||||
syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier
|
||||
|
||||
syn match cssValueInteger contained "[-+]\=\d\+"
|
||||
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\)"
|
||||
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
|
||||
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
|
||||
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
|
||||
@@ -73,20 +97,78 @@ syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon na
|
||||
syn case match
|
||||
syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
|
||||
syn case ignore
|
||||
|
||||
syn match cssImportant contained "!\s*important\>"
|
||||
|
||||
syn match cssColor contained "\<transparent\>"
|
||||
syn match cssColor contained "\<white\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
|
||||
"syn match cssColor contained "\<rgb\s*(\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*)"
|
||||
|
||||
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\)\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\)\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear\|radial\)-gradient\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y|\Z\)\=\|translate\(3d\|X\|Y|\Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y|\Z\)\=\|perspective\)\s*(" end=")" oneline keepend
|
||||
|
||||
syn match cssImportant contained "!\s*important\>"
|
||||
|
||||
syn keyword cssCommonAttr contained auto none inherit
|
||||
" Prop and Attr
|
||||
" Reference: http://www.w3schools.com/cssref/default.asp
|
||||
syn keyword cssCommonAttr contained auto none inherit all
|
||||
syn keyword cssCommonAttr contained top bottom
|
||||
syn keyword cssCommonAttr contained medium normal
|
||||
|
||||
|
||||
syn match cssAnimationProp contained "\<animation\(-\(name\|duration\|timing-function\|delay\|iteration-cout\|play-state\)\)\=\>"
|
||||
|
||||
|
||||
syn keyword cssAnimationAttr contained infinite alternate paused running
|
||||
" bugfix: escape linear-gradient
|
||||
syn match cssAnimationAttr contained "\<linear\(-gradient\)\@!\>"
|
||||
syn match cssAnimationAttr contained "\<ease\(-\(in-out\|out\|in\)\)\=\>"
|
||||
|
||||
syn match cssBackgroundProp contained "\<background\(-\(color\|image\|attachment\|position\|clip\|origin\|size\)\)\=\>"
|
||||
syn keyword cssBackgroundAttr contained center fixed over contain
|
||||
syn match cssBackgroundAttr contained "\<no-repeat\>"
|
||||
syn match cssBackgroundAttr contained "\<repeat\(-[xy]\)\=\>"
|
||||
syn match cssBackgroundAttr contained "\<\(border\|content\|padding\)-box\>"
|
||||
|
||||
|
||||
syn match cssBorderOutlineProp contained "\<border\(-\(top\|right\|bottom\|left\)\)\=\(-\(width\|color\|style\)\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<border-\(top\|bottom\)-\(left\|right\)\(-radius\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<border-image\(-\(outset\|repeat\|slice\|source\|width\)\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<border-radius\>"
|
||||
syn keyword cssBorderOutlineAttr contained thin thick medium
|
||||
syn keyword cssBorderOutlineAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssBorderOutlineAttr contained hidden visible scroll collapse
|
||||
syn keyword cssBorderOutlineAttr contained stretch round
|
||||
|
||||
|
||||
syn match cssBoxProp contained "\<overflow\(-\(x\|y\|style\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<rotation\(-point\)=\>"
|
||||
syn keyword cssBoxAttr contained visible hidden scroll auto
|
||||
syn match cssBoxAttr contained "\<no-\(display\|content\)\>"
|
||||
|
||||
syn keyword cssColorProp contained opacity
|
||||
syn match cssColorProp contained "\<color-profile\>"
|
||||
syn match cssColorProp contained "\<rendering-intent\>"
|
||||
|
||||
|
||||
syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>"
|
||||
syn keyword cssDimensionProp contained height
|
||||
syn keyword cssDimensionProp contained width
|
||||
|
||||
" shadow and sizing are in other property groups
|
||||
syn match cssFlexibleBoxProp contained "\<box-\(align\|direction\|flex\|ordinal-group\|orient\|pack\|shadow\|sizing\)\>"
|
||||
syn keyword cssFlexibleBoxAttr contained start end center baseline stretch
|
||||
syn keyword cssFlexibleBoxAttr contained normal reverse
|
||||
syn keyword cssFlexibleBoxAttr contained single mulitple
|
||||
syn keyword cssFlexibleBoxAttr contained horizontal
|
||||
" bugfix: escape vertial-align
|
||||
syn match cssFlexibleBoxAttr contained "\<vertical\(-align\)\@!\>"
|
||||
syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
|
||||
|
||||
|
||||
syn match cssFontProp contained "\<font\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\)\=\>"
|
||||
syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
|
||||
syn match cssFontAttr contained "\<small\(-\(caps\|caption\)\)\=\>"
|
||||
@@ -95,67 +177,92 @@ syn match cssFontAttr contained "\<message-box\>"
|
||||
syn match cssFontAttr contained "\<status-bar\>"
|
||||
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
|
||||
syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
|
||||
syn keyword cssFontAttr contained bold bolder lighter larger smaller
|
||||
syn keyword cssFontAttr contained icon menu
|
||||
syn match cssFontAttr contained "\<caption\>"
|
||||
syn keyword cssFontAttr contained large smaller larger
|
||||
syn keyword cssFontAttr contained narrower wider
|
||||
syn keyword cssFontAttr contained bold bolder light lighter larger smaller
|
||||
syn keyword cssFontAttr contained icon menu caption
|
||||
syn keyword cssFontAttr contained large smaller larger narrower wider
|
||||
syn keyword cssFontAttr contained Courier Arial Georgia Times
|
||||
|
||||
syn keyword cssColorProp contained color
|
||||
syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\=\>"
|
||||
syn keyword cssColorAttr contained center scroll fixed
|
||||
syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
|
||||
syn match cssColorAttr contained "\<no-repeat\>"
|
||||
|
||||
syn keyword cssGeneratedContentProp contained content quotes crop
|
||||
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
|
||||
syn match cssGeneratedContentProp contained "\<move-to\>"
|
||||
syn match cssGeneratedContentProp contained "\<page-policy\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
|
||||
|
||||
|
||||
syn match cssGridProp contained "\<grid-\(columns\|rows\)\>"
|
||||
|
||||
syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>"
|
||||
|
||||
syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
|
||||
syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
|
||||
syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
|
||||
syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
|
||||
syn keyword cssListAttr contained disc circle square hebrew armenian georgian
|
||||
syn keyword cssListAttr contained inside outside
|
||||
|
||||
|
||||
syn match cssMarginProp contained "\<margin\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
|
||||
syn match cssMultiColumnProp contained "\<column\(-\(\break-\(after\|before\)\|count\|gap\|rule\(-\(color\|style\|width\)\)\=\)\|span\|width\)\=\>"
|
||||
|
||||
|
||||
syn match cssPaddingProp contained "\<padding\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
|
||||
syn keyword cssPositioningProp contained bottom clear clip display float left
|
||||
syn keyword cssPositioningProp contained position right top visibility
|
||||
syn match cssPositioningProp contained "\<z-index\>"
|
||||
syn keyword cssPositioningAttr contained block inline compact
|
||||
syn match cssPositioningAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
|
||||
syn keyword cssPositioningAttr contained left right both
|
||||
syn match cssPositioningAttr contained "\<list-item\>"
|
||||
syn match cssPositioningAttr contained "\<inline-\(block\|table\)\>"
|
||||
syn keyword cssPositioningAttr contained static relative absolute fixed
|
||||
|
||||
syn match cssPrintProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
|
||||
syn keyword cssPrintProp contained orphans widows
|
||||
syn keyword cssPrintAttr contained landscape portrait crop cross always avoid
|
||||
|
||||
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>"
|
||||
syn keyword cssTableAttr contained fixed collapse separate show hide once always
|
||||
|
||||
|
||||
syn keyword cssTextProp contained color direction
|
||||
syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
|
||||
syn match cssTextProp contained "\<text-\(justify\|\outline\|overflow\|warp\|align-last\)\>"
|
||||
syn match cssTextProp contained "\<word-\(break\|\wrap\)\>"
|
||||
syn match cssTextProp contained "\<white-space\>"
|
||||
syn match cssTextProp contained "\<hanging-punctuation\>"
|
||||
syn match cssTextProp contained "\<punctuation-trim\>"
|
||||
syn match cssTextAttr contained "\<line-through\>"
|
||||
syn match cssTextAttr contained "\<text-indent\>"
|
||||
syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
|
||||
syn keyword cssTextAttr contained ltr rtl embed nowrap
|
||||
syn keyword cssTextAttr contained underline overline blink sub super middle
|
||||
syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
|
||||
syn keyword cssTextAttr contained capitalize uppercase lowercase
|
||||
syn keyword cssTextAttr contained center justify baseline sub super
|
||||
syn match cssTextAttr contained "\<pre\(-\(line\|wrap\)\)\=\>"
|
||||
syn match cssTextAttr contained "\<\(allow\|force\)-end\>"
|
||||
syn keyword cssTextAttr contained start end adjacent
|
||||
syn match cssTextAttr contained "\<inter-\(word\|ideographic\|cluster\)\>"
|
||||
syn keyword cssTextAttr contained distribute kashida first last
|
||||
syn keyword cssTextAttr contained clip ellipsis unrestricted suppress
|
||||
syn match cssTextAttr contained "\<break-all\>"
|
||||
syn match cssTextAttr contained "\<break-word\>"
|
||||
syn keyword cssTextAttr contained hyphenate
|
||||
|
||||
syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<\(width\|z-index\)\>"
|
||||
syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
|
||||
syn keyword cssBoxProp contained width height float clear overflow clip visibility
|
||||
syn keyword cssBoxAttr contained thin thick both
|
||||
syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssBoxAttr contained hidden visible scroll collapse
|
||||
|
||||
syn keyword cssGeneratedContentProp contained content quotes
|
||||
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
|
||||
syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
|
||||
syn match cssAuralAttr contained "\<lower\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
|
||||
syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
|
||||
syn keyword cssGeneratedContentAttr contained inside outside
|
||||
syn match cssTransformProp contained "\<transform\(-\(origin\|style\)\)\=\>"
|
||||
syn match cssTransformProp contained "\<perspective\(-origin\)\=\>"
|
||||
syn match cssTransformProp contained "\<backface-visibility\>"
|
||||
|
||||
syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
|
||||
syn keyword cssPagingProp contained size marks inside orphans widows
|
||||
syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
|
||||
|
||||
syn keyword cssUIProp contained cursor
|
||||
syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
|
||||
syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
|
||||
syn keyword cssUIAttr contained default crosshair pointer move wait help
|
||||
syn keyword cssUIAttr contained thin thick
|
||||
syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssUIAttr contained invert
|
||||
|
||||
syn match cssRenderAttr contained "\<marker\>"
|
||||
syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>"
|
||||
syn keyword cssRenderProp contained position top bottom direction
|
||||
syn match cssRenderProp contained "\<\(left\|right\)\>"
|
||||
syn keyword cssRenderAttr contained block inline compact
|
||||
syn match cssRenderAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
|
||||
syn keyword cssRenderAttr contained static relative absolute fixed
|
||||
syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
|
||||
syn match cssRenderAttr contained "\<bidi-override\>"
|
||||
syn match cssTransitionProp contained "\<transition\(-\(delay\|duration\|property\|timing-function\)\)\=\>"
|
||||
|
||||
syn match cssUIProp contained "\<nav-\(down\|index\|left\|right\|up\)\=\>"
|
||||
syn match cssUIProp contained "\<outline-offset\>"
|
||||
syn match cssUIProp contained "\<box-sizing\>"
|
||||
syn keyword cssUIProp contained appearance icon resize
|
||||
syn keyword cssUIAttr contained window button menu field
|
||||
|
||||
syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
|
||||
syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>"
|
||||
@@ -171,30 +278,54 @@ syn keyword cssAuralAttr contained below level above higher
|
||||
syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
|
||||
syn keyword cssAuralAttr contained faster slower
|
||||
syn keyword cssAuralAttr contained male female child code digits continuous
|
||||
syn match cssAuralAttr contained "\<lower\>"
|
||||
|
||||
" cursor
|
||||
syn keyword cssUIProp contained cursor
|
||||
syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
|
||||
syn keyword cssUIAttr contained crosshair default help move pointer
|
||||
syn keyword cssUIAttr contained progress wait
|
||||
|
||||
" FIXME: I could not find them in reference
|
||||
syn keyword cssUIAttr contained invert maker size zoom
|
||||
syn match cssRenderAttr contained "\<run-in\>"
|
||||
syn match cssRenderAttr contained "\<text-rendering\>"
|
||||
syn match cssRenderAttr contained "\<font-smoothing\>"
|
||||
syn match cssRenderProp contained "\<marker-offset\>"
|
||||
syn match cssRenderAttr contained "\<bidi-override\>"
|
||||
|
||||
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>"
|
||||
syn keyword cssTableAttr contained fixed collapse separate show hide once always
|
||||
|
||||
" FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
|
||||
syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
|
||||
syn match cssBraces contained "[{}]"
|
||||
syn match cssError contained "{@<>"
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition
|
||||
syn match cssBraceError "}"
|
||||
|
||||
" Pseudo class
|
||||
syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssPseudoClassId,cssUnicodeEscape
|
||||
syn keyword cssPseudoClassId contained link visited active hover focus before after left right
|
||||
syn keyword cssPseudoClassId link visited active hover focus before after left right lang
|
||||
syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
|
||||
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
|
||||
" FIXME: handle functions.
|
||||
"syn region cssPseudoClassLang matchgroup=cssPseudoClassId start="lang(" end=")"
|
||||
syn match cssPseudoClassId contained "\<\(last\|only\|nth\|nth-last\)-child\>"
|
||||
syn match cssPseudoClassId contained "\<\(first\|last\|only\|nth\|nth-last\)-of-type\>"
|
||||
syn keyword cssPseudoClassId root empty target enable disabled checked not invalid
|
||||
syn match cssPseudoClassId contained "::\(-moz-\)\=selection"
|
||||
|
||||
" Comment
|
||||
syn region cssComment start="/\*" end="\*/" contains=@Spell
|
||||
syn region cssComment start="//" skip="\\$" end="$" keepend contains=@Spell
|
||||
|
||||
syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
|
||||
syn match cssSpecialCharQQ +\\"+ contained
|
||||
syn match cssSpecialCharQ +\\'+ contained
|
||||
syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
|
||||
syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
|
||||
|
||||
" Vendor Prefix
|
||||
syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)"
|
||||
|
||||
|
||||
if main_syntax == "css"
|
||||
syn sync minlines=10
|
||||
@@ -212,31 +343,75 @@ if version >= 508 || !exists("did_css_syn_inits")
|
||||
endif
|
||||
|
||||
HiLink cssComment Comment
|
||||
HiLink cssVendor Comment
|
||||
HiLink cssTagName Statement
|
||||
HiLink cssDeprecated Error
|
||||
HiLink cssSelectorOp Special
|
||||
HiLink cssSelectorOp2 Special
|
||||
HiLink cssFontProp StorageClass
|
||||
HiLink cssColorProp StorageClass
|
||||
HiLink cssTextProp StorageClass
|
||||
|
||||
HiLink cssAnimationProp StorageClass
|
||||
HiLink cssBackgroundProp StorageClass
|
||||
HiLink cssBorderOutlineProp StorageClass
|
||||
HiLink cssBoxProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssColorProp StorageClass
|
||||
HiLink cssContentForPagedMediaProp StorageClass
|
||||
HiLink cssDimensionProp StorageClass
|
||||
HiLink cssFlexibleBoxProp StorageClass
|
||||
HiLink cssFontProp StorageClass
|
||||
HiLink cssGeneratedContentProp StorageClass
|
||||
HiLink cssGridProp StorageClass
|
||||
HiLink cssHyerlinkProp StorageClass
|
||||
HiLink cssLineboxProp StorageClass
|
||||
HiLink cssListProp StorageClass
|
||||
HiLink cssMarginProp StorageClass
|
||||
HiLink cssMarqueeProp StorageClass
|
||||
HiLink cssMultiColumnProp StorageClass
|
||||
HiLink cssPaddingProp StorageClass
|
||||
HiLink cssPagedMediaProp StorageClass
|
||||
HiLink cssPositioningProp StorageClass
|
||||
HiLink cssPrintProp StorageClass
|
||||
HiLink cssRubyProp StorageClass
|
||||
HiLink cssSpeechProp StorageClass
|
||||
HiLink cssTableProp StorageClass
|
||||
HiLink cssTextProp StorageClass
|
||||
HiLink cssTransformProp StorageClass
|
||||
HiLink cssTransitionProp StorageClass
|
||||
HiLink cssUIProp StorageClass
|
||||
HiLink cssAuralProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssGeneratedContentProp StorageClass
|
||||
HiLink cssPagingProp StorageClass
|
||||
HiLink cssTableProp StorageClass
|
||||
HiLink cssUIProp StorageClass
|
||||
HiLink cssFontAttr Type
|
||||
HiLink cssColorAttr Type
|
||||
HiLink cssTextAttr Type
|
||||
|
||||
HiLink cssAnimationAttr Type
|
||||
HiLink cssBackgroundAttr Type
|
||||
HiLink cssBorderOutlineAttr Type
|
||||
HiLink cssBoxAttr Type
|
||||
HiLink cssRenderAttr Type
|
||||
HiLink cssAuralAttr Type
|
||||
HiLink cssColorAttr Type
|
||||
HiLink cssContentForPagedMediaAttr Type
|
||||
HiLink cssDimensionAttr Type
|
||||
HiLink cssFlexibleBoxAttr Type
|
||||
HiLink cssFontAttr Type
|
||||
HiLink cssGeneratedContentAttr Type
|
||||
HiLink cssPagingAttr Type
|
||||
HiLink cssGridAttr Type
|
||||
HiLink cssHyerlinkAttr Type
|
||||
HiLink cssLineboxAttr Type
|
||||
HiLink cssListAttr Type
|
||||
HiLink cssMarginAttr Type
|
||||
HiLink cssMarqueeAttr Type
|
||||
HiLink cssMultiColumnAttr Type
|
||||
HiLink cssPaddingAttr Type
|
||||
HiLink cssPagedMediaAttr Type
|
||||
HiLink cssPositioningAttr Type
|
||||
HiLink cssPrintAttr Type
|
||||
HiLink cssRubyAttr Type
|
||||
HiLink cssSpeechAttr Type
|
||||
HiLink cssTableAttr Type
|
||||
HiLink cssTextAttr Type
|
||||
HiLink cssTransformAttr Type
|
||||
HiLink cssTransitionAttr Type
|
||||
HiLink cssUIAttr Type
|
||||
HiLink cssAuralAttr Type
|
||||
HiLink cssRenderAttr Type
|
||||
HiLink cssCommonAttr Type
|
||||
|
||||
HiLink cssPseudoClassId PreProc
|
||||
HiLink cssPseudoClassLang Constant
|
||||
HiLink cssValueLength Number
|
||||
@@ -277,6 +452,7 @@ if main_syntax == 'css'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
|
||||
26
runtime/syntax/dts.vim
Normal file
26
runtime/syntax/dts.vim
Normal file
@@ -0,0 +1,26 @@
|
||||
" Vim syntax file
|
||||
" Language: dts/dtsi (device tree files)
|
||||
" Maintainer: Daniel Mack <vim@zonque.org>
|
||||
" Last Change: 2012 Oct 04
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax region dtsComment start="/\*" end="\*/"
|
||||
syntax match dtsReference "&[[:alpha:][:digit:]_]\+"
|
||||
syntax region dtsBinaryProperty start="\[" end="\]"
|
||||
syntax match dtsStringProperty "\".*\""
|
||||
syntax match dtsKeyword "/.*/"
|
||||
syntax match dtsLabel "^[[:space:]]*[[:alpha:][:digit:]_]\+:"
|
||||
syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment
|
||||
syntax region dtsCommentInner start="/\*" end="\*/"
|
||||
|
||||
hi def link dtsCellProperty Number
|
||||
hi def link dtsBinaryProperty Number
|
||||
hi def link dtsStringProperty String
|
||||
hi def link dtsKeyword Include
|
||||
hi def link dtsLabel Label
|
||||
hi def link dtsReference Macro
|
||||
hi def link dtsComment Comment
|
||||
hi def link dtsCommentInner Comment
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: GDB command files
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/gdb.vim
|
||||
" Last Change: 2009 May 25
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -12,6 +12,9 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn keyword gdbInfo contained address architecture args breakpoints catch common copying dcache
|
||||
syn keyword gdbInfo contained display files float frame functions handle line
|
||||
syn keyword gdbInfo contained locals program registers scope set sharedlibrary signals
|
||||
@@ -32,7 +35,7 @@ syn match gdbFuncDef "\<define\>.*"
|
||||
syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef
|
||||
syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty
|
||||
|
||||
" some commonly used abreviations
|
||||
" some commonly used abbreviations
|
||||
syn keyword gdbStatement c disp undisp disas p
|
||||
|
||||
syn region gdbDocument matchgroup=gdbFuncDef start="\<document\>.*$" matchgroup=gdbFuncDef end="^end\s*$"
|
||||
@@ -65,12 +68,12 @@ syn match gdbSet "\<input-radix\>"
|
||||
syn match gdbSet "\<demangle-style\>"
|
||||
syn match gdbSet "\<output-radix\>"
|
||||
|
||||
syn match gdbComment "^\s*#.*"
|
||||
syn match gdbComment "^\s*#.*" contains=@Spell
|
||||
|
||||
syn match gdbVariable "\$\K\k*"
|
||||
|
||||
" Strings and constants
|
||||
syn region gdbString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region gdbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
syn match gdbCharacter "'[^']*'" contains=gdbSpecialChar,gdbSpecialCharError
|
||||
syn match gdbCharacter "'\\''" contains=gdbSpecialChar
|
||||
syn match gdbCharacter "'[^\\]'"
|
||||
@@ -108,4 +111,6 @@ endif
|
||||
|
||||
let b:current_syntax = "gdb"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: hg (Mercurial) commit file
|
||||
" Maintainer: Ken Takata <kentkt at csc dot jp>
|
||||
" Last Change: 2012 Aug 2
|
||||
" Last Change: 2012 Aug 23
|
||||
" Filenames: hg-editor-*.txt
|
||||
" License: VIM License
|
||||
" URL: https://github.com/k-takata/hg-vim
|
||||
@@ -10,12 +10,12 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match hgcommitComment "^HG:.*$"
|
||||
syn match hgcommitUser "^HG: user: \zs.*$" contained containedin=hgcommitComment
|
||||
syn match hgcommitBranch "^HG: branch \zs.*$" contained containedin=hgcommitComment
|
||||
syn match hgcommitAdded "^HG: \zsadded .*$" contained containedin=hgcommitComment
|
||||
syn match hgcommitChanged "^HG: \zschanged .*$" contained containedin=hgcommitComment
|
||||
syn match hgcommitRemoved "^HG: \zsremoved .*$" contained containedin=hgcommitComment
|
||||
syn match hgcommitComment "^HG:.*$" contains=@NoSpell
|
||||
syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
|
||||
hi def link hgcommitComment Comment
|
||||
hi def link hgcommitUser String
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: HTML
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/html.vim
|
||||
" Last Change: 2006 Jun 19
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
@@ -17,6 +17,9 @@ if !exists("main_syntax")
|
||||
let main_syntax = 'html'
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" don't use standard HiLink, it will not work with included syntax files
|
||||
if version < 508
|
||||
command! -nargs=+ HtmlHiLink hi link <args>
|
||||
@@ -37,7 +40,7 @@ syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,ja
|
||||
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
|
||||
syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
|
||||
syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
|
||||
syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
|
||||
syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
|
||||
syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
|
||||
syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
|
||||
syn match htmlTagError contained "[^>]<"ms=s+1
|
||||
@@ -98,11 +101,11 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
|
||||
|
||||
" Comments (the real ones or the old netscape ones)
|
||||
if exists("html_wrong_comments")
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>+
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
|
||||
else
|
||||
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError
|
||||
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError,@Spell
|
||||
syn match htmlCommentError contained "[^><!]"
|
||||
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc
|
||||
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell
|
||||
endif
|
||||
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
|
||||
|
||||
@@ -147,7 +150,8 @@ if !exists("html_no_rendering")
|
||||
syn region htmlItalicUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
|
||||
syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
|
||||
|
||||
syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
|
||||
syn match htmlLeadingSpace "^\s\+" contained
|
||||
syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc
|
||||
syn region htmlH1 start="<h1\>" end="</h1>"me=e-5 contains=@htmlTop
|
||||
syn region htmlH2 start="<h2\>" end="</h2>"me=e-5 contains=@htmlTop
|
||||
syn region htmlH3 start="<h3\>" end="</h3>"me=e-5 contains=@htmlTop
|
||||
@@ -164,8 +168,8 @@ if main_syntax != 'java' || exists("java_javascript")
|
||||
" JAVA SCRIPT
|
||||
syn include @htmlJavaScript syntax/javascript.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
syn region htmlScriptTag contained start=+<script+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
HtmlHiLink htmlScriptTag htmlTag
|
||||
|
||||
" html events (i.e. arguments that include javascript commands)
|
||||
@@ -189,7 +193,7 @@ if main_syntax != 'java' || exists("java_vb")
|
||||
" VB SCRIPT
|
||||
syn include @htmlVbScript syntax/vb.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script [^>]*language *=[^>]*vbscript[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
endif
|
||||
|
||||
syn cluster htmlJavaScript add=@htmlPreproc
|
||||
@@ -246,6 +250,7 @@ if version >= 508 || !exists("did_html_syn_inits")
|
||||
HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic
|
||||
HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic
|
||||
HtmlHiLink htmlLink Underlined
|
||||
HtmlHiLink htmlLeadingSpace None
|
||||
if !exists("html_my_rendering")
|
||||
hi def htmlBold term=bold cterm=bold gui=bold
|
||||
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
|
||||
@@ -289,4 +294,6 @@ if main_syntax == 'html'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim syntax file " Language: Java
|
||||
" Vim syntax file
|
||||
" Language: Java
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/java.vim
|
||||
" Last Change: 2011 Dec 30
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" Please check :help java.vim for comments on some of the options available.
|
||||
|
||||
@@ -17,6 +18,9 @@ if !exists("main_syntax")
|
||||
syn region javaFold start="{" end="}" transparent fold
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" don't use standard HiLink, it will not work with included syntax files
|
||||
if version < 508
|
||||
command! -nargs=+ JavaHiLink hi link <args>
|
||||
@@ -26,7 +30,8 @@ endif
|
||||
|
||||
" some characters that cannot be in a java program (outside a string)
|
||||
syn match javaError "[\\@`]"
|
||||
syn match javaError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/"
|
||||
syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|[^-]->\|\*\/"
|
||||
|
||||
syn match javaOK "\.\.\."
|
||||
|
||||
" use separate name so that it can be deleted in javacc.vim
|
||||
@@ -161,7 +166,7 @@ if !exists("java_ignore_javadoc") && main_syntax != 'jsp'
|
||||
syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell
|
||||
syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag
|
||||
|
||||
syn region javaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
|
||||
syn region javaDocTags contained start="{@\(code\|link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
|
||||
syn match javaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
|
||||
syn match javaDocParam contained "\s\S\+"
|
||||
syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
|
||||
@@ -341,5 +346,7 @@ if main_syntax == 'java'
|
||||
endif
|
||||
|
||||
let b:spell_options="contained"
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: JavaCC, a Java Compiler Compiler written by JavaSoft
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/javacc.vim
|
||||
" Last Change: 2001 Jun 20
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" Uses java.vim, and adds a few special things for JavaCC Parser files.
|
||||
" Those files usually have the extension *.jj
|
||||
@@ -15,6 +15,9 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" source the java.vim file
|
||||
if version < 600
|
||||
source <sfile>:p:h/java.vim
|
||||
@@ -44,7 +47,7 @@ syn keyword javaccPackages options DEBUG_PARSER DEBUG_LOOKAHEAD DEBUG_TOKEN_MANA
|
||||
syn keyword javaccPackages COMMON_TOKEN_ACTION IGNORE_CASE CHOICE_AMBIGUITY_CHECK
|
||||
syn keyword javaccPackages OTHER_AMBIGUITY_CHECK STATIC LOOKAHEAD ERROR_REPORTING
|
||||
syn keyword javaccPackages USER_TOKEN_MANAGER USER_CHAR_STREAM JAVA_UNICODE_ESCAPE
|
||||
syn keyword javaccPackages UNICODE_INPUT
|
||||
syn keyword javaccPackages UNICODE_INPUT JDK_VERSION
|
||||
syn match javaccPackages "PARSER_END([^)]*)"
|
||||
syn match javaccPackages "PARSER_BEGIN([^)]*)"
|
||||
syn match javaccSpecToken "<EOF>"
|
||||
@@ -73,5 +76,7 @@ if version >= 508 || !exists("did_css_syn_inits")
|
||||
endif
|
||||
|
||||
let b:current_syntax = "javacc"
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
" (ss) repaired several quoting and grouping glitches
|
||||
" (ss) fixed regex parsing issue with multiple qualifiers [gi]
|
||||
" (ss) additional factoring of keywords, globals, and members
|
||||
" Last Change: 2010 Mar 25
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -23,6 +23,9 @@ if !exists("main_syntax")
|
||||
let main_syntax = 'javascript'
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Drop fold if it set but vim doesn't support it.
|
||||
if version < 600 && exists("javaScript_fold")
|
||||
unlet javaScript_fold
|
||||
@@ -131,5 +134,7 @@ let b:current_syntax = "javascript"
|
||||
if main_syntax == 'javascript'
|
||||
unlet main_syntax
|
||||
endif
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Makefile
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/make.vim
|
||||
" Last Change: 2008 Aug 04
|
||||
" Last Change: 2012 Oct 05
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -12,6 +12,10 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
" some special characters
|
||||
syn match makeSpecial "^\s*[@+-]\+"
|
||||
syn match makeNextLine "\\\n\s*"
|
||||
@@ -25,8 +29,8 @@ syn match makeOverride "^ *override"
|
||||
hi link makeOverride makeStatement
|
||||
hi link makeExport makeStatement
|
||||
|
||||
" Koehler: catch unmatched define/endef keywords. endef only matches it is by itself on a line
|
||||
syn region makeDefine start="^\s*define\s" end="^\s*endef\s*$" contains=makeStatement,makeIdent,makePreCondit,makeDefine
|
||||
" catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend
|
||||
syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" contains=makeStatement,makeIdent,makePreCondit,makeDefine
|
||||
|
||||
" Microsoft Makefile specials
|
||||
syn case ignore
|
||||
@@ -48,8 +52,8 @@ syn match makeConfig "@[A-Za-z0-9_]\+@"
|
||||
|
||||
" make targets
|
||||
" syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>"
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource
|
||||
|
||||
syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError
|
||||
@@ -134,4 +138,6 @@ endif
|
||||
|
||||
let b:current_syntax = "make"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
" Filename extensions: *.p (collides with Pascal),
|
||||
" *.i (collides with assembler)
|
||||
" *.w (collides with cweb)
|
||||
" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
|
||||
" Contributors: Chris Ruprecht <chris@ruprecht.org>
|
||||
" Philip Uren <philu@computer.org>
|
||||
" Mikhail Kuperblum <mikhail@whasup.com>
|
||||
" John Florian <jflorian@voyager.net>
|
||||
" Version: 11
|
||||
" Last Change: May 11 2012
|
||||
" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
|
||||
" Contributors: Chris Ruprecht <chris@ruprecht.org>
|
||||
" Philip Uren <philu@computer.org>
|
||||
" Mikhail Kuperblum <mikhail@whasup.com>
|
||||
" John Florian <jflorian@voyager.net>
|
||||
" Version: 12
|
||||
" Last Change: Aug 16 2012
|
||||
|
||||
" For version 5.x: Clear all syntax item
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
@@ -34,7 +34,7 @@ set expandtab
|
||||
syn case ignore
|
||||
|
||||
" Progress Blocks of code and mismatched "end." errors.
|
||||
syn match ProgressEndError "\<end\>"
|
||||
syn match ProgressEndError "\<end\>"
|
||||
syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\<do\>" matchgroup=ProgressDo end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
|
||||
syn region ProgressForBlock transparent matchgroup=ProgressFor start="\<for\>" matchgroup=ProgressFor end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
|
||||
syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\<repeat\>" matchgroup=ProgressRepeat end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
|
||||
@@ -44,20 +44,20 @@ syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\<case\>
|
||||
" and they could go in ProgressReserved,
|
||||
" but I found it more helpful to highlight them in a different color.
|
||||
syn keyword ProgressConditional if else then when otherwise
|
||||
syn keyword ProgressFor each where
|
||||
syn keyword ProgressFor each where
|
||||
|
||||
" Make those TODO and debugging notes stand out!
|
||||
syn keyword ProgressTodo contained TODO BUG FIX
|
||||
syn keyword ProgressDebug contained DEBUG
|
||||
syn keyword ProgressTodo contained TODO BUG FIX
|
||||
syn keyword ProgressDebug contained DEBUG
|
||||
syn keyword ProgressDebug debugger
|
||||
|
||||
" If you like to highlight the whole line of
|
||||
" the start and end of procedures
|
||||
" to make the whole block of code stand out:
|
||||
syn match ProgressProcedure "^\s*procedure.*"
|
||||
syn match ProgressProcedure "^\s*end\s\s*procedure.*"
|
||||
syn match ProgressFunction "^\s*function.*"
|
||||
syn match ProgressFunction "^\s*end\s\s*function.*"
|
||||
syn match ProgressProcedure "^\s*procedure.*"
|
||||
syn match ProgressProcedure "^\s*end\s\s*procedure.*"
|
||||
syn match ProgressFunction "^\s*function.*"
|
||||
syn match ProgressFunction "^\s*end\s\s*function.*"
|
||||
" ... otherwise use this:
|
||||
" syn keyword ProgressFunction procedure function
|
||||
|
||||
@@ -99,14 +99,14 @@ syn keyword ProgressReserved window-maxim[ized] window-minim[ized] window-normal
|
||||
" Strings. Handles embedded quotes.
|
||||
" Note that, for some reason, Progress doesn't use the backslash, "\"
|
||||
" as the escape character; it uses tilde, "~".
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+ contains=@Spell
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+ contains=@Spell
|
||||
|
||||
syn match ProgressIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>()"
|
||||
|
||||
" syn match ProgressDelimiter "()"
|
||||
|
||||
syn match ProgressMatrixDelimiter "[][]"
|
||||
syn match ProgressMatrixDelimiter "[][]"
|
||||
" If you prefer you can highlight the range:
|
||||
"syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]"
|
||||
|
||||
@@ -114,7 +114,7 @@ syn match ProgressNumber "\<\-\=\d\+\(u\=l\=\|lu\|f\)\>"
|
||||
syn match ProgressByte "\$[0-9a-fA-F]\+"
|
||||
|
||||
" More values: Logicals, and Progress's unknown value, ?.
|
||||
syn match ProgressNumber "?"
|
||||
syn match ProgressNumber "?"
|
||||
syn keyword ProgressNumber true false yes no
|
||||
|
||||
" If you don't like tabs:
|
||||
@@ -123,9 +123,9 @@ syn match ProgressShowTab "\t"
|
||||
" If you don't like white space on the end of lines, uncomment this:
|
||||
" syn match ProgressSpaceError "\s\+$"
|
||||
|
||||
syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug
|
||||
syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment
|
||||
syn region ProgressPreProc start="&" end="\>" contained
|
||||
syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug,@Spell
|
||||
syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment
|
||||
syn region ProgressPreProc start="&" end="\>" contained
|
||||
|
||||
" This next line works reasonably well.
|
||||
" syn match ProgressOperator "[!;|)(:.><+*=-]"
|
||||
@@ -277,7 +277,7 @@ syn keyword ProgressOperator write-fragment write-message write-processing-instr
|
||||
syn keyword ProgressOperator xml-data-type xml-node-name xml-node-type xml-schema-pat[h] xml-suppress-namespace-processing y y-of year year-offset yes-no
|
||||
syn keyword ProgressOperator yes-no-cancel
|
||||
|
||||
syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] datetime datetime-tz
|
||||
syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] datetime datetime-tz
|
||||
|
||||
syn sync lines=800
|
||||
|
||||
@@ -285,40 +285,40 @@ syn sync lines=800
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_progress_syntax_inits")
|
||||
if version < 508
|
||||
let did_progress_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
if version < 508
|
||||
let did_progress_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
" The default methods for highlighting. Can be overridden later.
|
||||
HiLink ProgressByte Number
|
||||
HiLink ProgressCase Repeat
|
||||
HiLink ProgressComment Comment
|
||||
HiLink ProgressConditional Conditional
|
||||
HiLink ProgressDebug Debug
|
||||
HiLink ProgressDo Repeat
|
||||
HiLink ProgressEndError Error
|
||||
HiLink ProgressFor Repeat
|
||||
HiLink ProgressFunction Procedure
|
||||
HiLink ProgressIdentifier Identifier
|
||||
HiLink ProgressInclude Include
|
||||
HiLink ProgressMatrixDelimiter Identifier
|
||||
HiLink ProgressNumber Number
|
||||
HiLink ProgressOperator Operator
|
||||
HiLink ProgressPreProc PreProc
|
||||
HiLink ProgressProcedure Procedure
|
||||
HiLink ProgressQuote Delimiter
|
||||
HiLink ProgressRepeat Repeat
|
||||
HiLink ProgressReserved Statement
|
||||
HiLink ProgressSpaceError Error
|
||||
HiLink ProgressString String
|
||||
HiLink ProgressTodo Todo
|
||||
HiLink ProgressType Statement
|
||||
HiLink ProgressShowTab Error
|
||||
" The default methods for highlighting. Can be overridden later.
|
||||
HiLink ProgressByte Number
|
||||
HiLink ProgressCase Repeat
|
||||
HiLink ProgressComment Comment
|
||||
HiLink ProgressConditional Conditional
|
||||
HiLink ProgressDebug Debug
|
||||
HiLink ProgressDo Repeat
|
||||
HiLink ProgressEndError Error
|
||||
HiLink ProgressFor Repeat
|
||||
HiLink ProgressFunction Procedure
|
||||
HiLink ProgressIdentifier Identifier
|
||||
HiLink ProgressInclude Include
|
||||
HiLink ProgressMatrixDelimiter Identifier
|
||||
HiLink ProgressNumber Number
|
||||
HiLink ProgressOperator Operator
|
||||
HiLink ProgressPreProc PreProc
|
||||
HiLink ProgressProcedure Procedure
|
||||
HiLink ProgressQuote Delimiter
|
||||
HiLink ProgressRepeat Repeat
|
||||
HiLink ProgressReserved Statement
|
||||
HiLink ProgressSpaceError Error
|
||||
HiLink ProgressString String
|
||||
HiLink ProgressTodo Todo
|
||||
HiLink ProgressType Statement
|
||||
HiLink ProgressShowTab Error
|
||||
|
||||
delcommand HiLink
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "progress"
|
||||
@@ -326,4 +326,4 @@ let b:current_syntax = "progress"
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8 sw=4
|
||||
" vim: ts=8 sw=8
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Feb 11
|
||||
" Last Change: 2012 Sep 25
|
||||
|
||||
" This file sets up for syntax highlighting.
|
||||
" It is loaded from "syntax.vim" and "manual.vim".
|
||||
@@ -46,6 +46,8 @@ fun! s:SynSet()
|
||||
echohl None
|
||||
endif
|
||||
let s = &filetype
|
||||
elseif s == "OFF"
|
||||
let s = ""
|
||||
endif
|
||||
|
||||
if s != ""
|
||||
|
||||
@@ -658,7 +658,7 @@ NOTE: If you were to exit Vim and start it again with vim TEST , the file
|
||||
4. Type w TEST , where TEST is a filename that does not exist yet. Verify
|
||||
that you see :'<,'>w TEST before you press <ENTER>.
|
||||
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or !ls
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or :!ls
|
||||
to see it. Do not remove it yet! We will use it in the next lesson.
|
||||
|
||||
NOTE: Pressing v starts Visual selection. You can move the cursor around
|
||||
|
||||
@@ -645,7 +645,7 @@ RIMARKO: Ĉiuj : komandoj devas finiĝi per tajpo de <Enenklavo>
|
||||
3. Nun tajpu: :w TESTO (kie TESTO estas la elektita dosiernomo)
|
||||
|
||||
4. Tio konservas la tutan dosieron (instruilon de Vim) kun la nomo TESTO.
|
||||
Por kontroli tion, tajpu :!dir aŭ !ls denove por vidigi vian
|
||||
Por kontroli tion, tajpu :!dir aŭ :!ls denove por vidigi vian
|
||||
dosierujon.
|
||||
|
||||
RIMARKO: Se vi volus eliri el Vim kaj restartigi ĝin denove per vim TESTO,
|
||||
|
||||
@@ -707,7 +707,7 @@ NOTE : Si vous quittez Vim et le red
|
||||
V<>rifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entr<74>e>.
|
||||
|
||||
5. Vim va enregistrer les lignes s<>lectionn<6E>es dans le fichier TEST.
|
||||
Utilisez :!dir ou !ls pour le voir. Ne l'effacez pas encore !
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
Nous allons l'utiliser dans la le<6C>on suivante.
|
||||
|
||||
NOTE : L'appui de v d<>marre la s<>lection Visuelle. Vous pouvez d<>placer le
|
||||
|
||||
@@ -707,7 +707,7 @@ NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST,
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entrée>.
|
||||
|
||||
5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST.
|
||||
Utilisez :!dir ou !ls pour le voir. Ne l'effacez pas encore !
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
Nous allons l'utiliser dans la leçon suivante.
|
||||
|
||||
NOTE : L'appui de v démarre la sélection Visuelle. Vous pouvez déplacer le
|
||||
|
||||
@@ -659,7 +659,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST ,
|
||||
Provjerite da zaista pi<70>e :'<,'>w TEST
|
||||
prije nego <20>to pritisnite <ENTER>.
|
||||
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili !ls .
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili :!ls .
|
||||
Nemojte je jo<6A> brisati! Koristiti <20>e te je u sljede<64>oj lekciji.
|
||||
|
||||
NAPOMENA: Tipka v zapo<70>inje Vizualno ozna<6E>avanje. Mo<4D>ete pomicati kursor
|
||||
|
||||
@@ -659,7 +659,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST ,
|
||||
Provjerite da zaista pi<70>e :'<,'>w TEST
|
||||
prije nego <20>to pritisnite <ENTER>.
|
||||
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili !ls .
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili :!ls .
|
||||
Nemojte je jo<6A> brisati! Koristiti <20>e te je u sljede<64>oj lekciji.
|
||||
|
||||
NAPOMENA: Tipka v zapo<70>inje Vizualno ozna<6E>avanje. Mo<4D>ete pomicati kursor
|
||||
|
||||
@@ -659,7 +659,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST ,
|
||||
Provjerite da zaista piše :'<,'>w TEST
|
||||
prije nego što pritisnite <ENTER>.
|
||||
|
||||
5. Vim će spremiti označeni tekst u TEST. Provjerite sa :!dir ili !ls .
|
||||
5. Vim će spremiti označeni tekst u TEST. Provjerite sa :!dir ili :!ls .
|
||||
Nemojte je još brisati! Koristiti će te je u sljedećoj lekciji.
|
||||
|
||||
NAPOMENA: Tipka v započinje Vizualno označavanje. Možete pomicati kursor
|
||||
|
||||
@@ -117,7 +117,7 @@ NOTE:
|
||||
<20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD> 1.5: <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD> - <20>ɲ<EFBFBD>
|
||||
|
||||
|
||||
** <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɲä<C9B2><C3A4><EFBFBD><EFBFBD>ˤ<EFBFBD> A <20><EFBFBD><F2B2A1A4>ޤ<EFBFBD><DEA4>礦 **
|
||||
** <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD>ɲä<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD> A <20><EFBFBD><F2B2A1A4>ޤ<EFBFBD><DEA4>礦 **
|
||||
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>ǽ<EFBFBD><C7BD>ιԤ˥<D4A4><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뤬<EFBFBD><EBA4AC><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD><CBA4>äƤ⤫<C6A4>ޤ<EFBFBD><DEA4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -232,7 +232,7 @@ NOTE: <ESC>
|
||||
<20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD> 2.3: <20><><EFBFBD>ڥ졼<DAA5><ECA1BC><EFBFBD>ȥ⡼<C8A5><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
¿<><C2BF><EFBFBD>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤϥ<C9A4><CFA5>ڥ졼<DAA5><ECA1BC><EFBFBD>ȥ⡼<C8A5><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A4ABA4>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>äޤ<C3A4><DEA4><EFBFBD>
|
||||
¿<><C2BF><EFBFBD>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤϥ<C9A4><CFA5>ڥ졼<DAA5><ECA1BC><EFBFBD>ȥ⡼<C8A5><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A4ABA4>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>ä<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޥ<EFBFBD><DEA5><EFBFBD> d <20>Υ<EFBFBD><CEA5>ڥ졼<DAA5><ECA1BC><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>ͤˤʤäƤ<C3A4><C6A4>ޤ<EFBFBD>:
|
||||
|
||||
d <20>⡼<EFBFBD><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -259,7 +259,7 @@ NOTE:
|
||||
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD>Ƭ<EFBFBD>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
|
||||
2. 2dw <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4><EFBFBD>ñ<EFBFBD><C3B1>2<EFBFBD><32>ʬ<EFBFBD><CAAC>ư<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||
2. 2dw <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4><EFBFBD>ñ<EFBFBD><C3B1>2<EFBFBD><32>ʬ<EFBFBD><CAAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
3. 3e <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4><EFBFBD>3<EFBFBD><33><EFBFBD>ܤ<EFBFBD>ñ<EFBFBD><C3B1><EFBFBD>ν<EFBFBD>ü<EFBFBD>˰<EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
|
||||
@@ -326,8 +326,8 @@ NOTE:
|
||||
|
||||
** <20>Ǹ<EFBFBD><C7B8>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4>ˤ<EFBFBD> u <20><EFBFBD><F2B2A1A4>ޤ<EFBFBD><DEA4><EFBFBD>U <20>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD>Τμ<CEA4><CEBC>äǤ<C3A4><C7A4><EFBFBD> **
|
||||
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>Ԥ˥<D4A4><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>δְ㤤<D6B0>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD>礦<EFBFBD><EFBFBD>
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>Ԥ˥<D4A4><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>δְ㤤<D6B0>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
2. x <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD>Ƭ<EFBFBD><C6AC>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
3. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>u <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4>ƺǸ<C6BA><C7B8>˼¹Ԥ<C2B9><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޥ<EFBFBD><DEA5>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
4. <20><><EFBFBD>٤ϡ<D9A4>x <20><><EFBFBD><EFBFBD><EFBFBD>Ѥ<EFBFBD><D1A4>Ƹ<EFBFBD><C6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
@@ -633,7 +633,7 @@ Note:
|
||||
3. <20>Ǥ<EFBFBD> :w TEST <20>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD>פ<EFBFBD><D7A4>ޤ<EFBFBD><DEA4>礦 (TEST <20>ϡ<EFBFBD><CFA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD>Ǥ<EFBFBD>)<29><>
|
||||
|
||||
4. <20><><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD><EFBFBD>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD> TEST <20>Ȥ<EFBFBD><C8A4><EFBFBD>̾<EFBFBD><CCBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
<20>⤦<EFBFBD><E2A4A6><EFBFBD><EFBFBD> :!dir <20>⤷<EFBFBD><E2A4B7><EFBFBD><EFBFBD> !ls <20>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD>פ<EFBFBD><D7A4>Ƴ<EFBFBD>ǧ<EFBFBD><C7A7><EFBFBD>Ƥߤޤ<DFA4><DEA4>礦<EFBFBD><E7A4A6>
|
||||
<20>⤦<EFBFBD><E2A4A6><EFBFBD><EFBFBD> :!dir <20>⤷<EFBFBD><E2A4B7><EFBFBD><EFBFBD> :!ls <20>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD>פ<EFBFBD><D7A4>Ƴ<EFBFBD>ǧ<EFBFBD><C7A7><EFBFBD>Ƥߤޤ<DFA4><DEA4>礦<EFBFBD><E7A4A6>
|
||||
|
||||
Note: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>̾ TEST <20>ȶ<EFBFBD><C8B6>˵<EFBFBD>ư<EFBFBD><C6B0><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>塼<EFBFBD>ȥꥢ<C8A5><EAA5A2><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4>夬<EFBFBD><E5A4AC><EFBFBD>Ϥ<EFBFBD><CFA4>Ǥ<EFBFBD><C7A4><EFBFBD>
|
||||
|
||||
@@ -117,7 +117,7 @@ NOTE:
|
||||
<20><><EFBFBD>b<EFBFBD>X<EFBFBD><58> 1.5: <20>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>ҏW - <20>lj<EFBFBD>
|
||||
|
||||
|
||||
** <20>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>lj<EFBFBD><C789><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD> A <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤 **
|
||||
** <20>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD>lj<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD> A <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤 **
|
||||
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>ŏ<EFBFBD><C58F>̍s<CC8D>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
<20>J<EFBFBD>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>܂<EFBFBD><DC82>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
|
||||
@@ -232,7 +232,7 @@ NOTE: <ESC>
|
||||
<20><><EFBFBD>b<EFBFBD>X<EFBFBD><58> 2.3: <20>I<EFBFBD>y<EFBFBD><79><EFBFBD>[<5B>^<5E>ƃ<EFBFBD><C683>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD>̓I<CD83>y<EFBFBD><79><EFBFBD>[<5B>^<5E>ƃ<EFBFBD><C683>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>ɕύX<CF8D><58><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD>̓I<CD83>y<EFBFBD><79><EFBFBD>[<5B>^<5E>ƃ<EFBFBD><C683>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>ɕύX<CF8D><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
|
||||
<20>폜<EFBFBD>R<EFBFBD>}<7D><><EFBFBD>h d <20>̃I<CC83>y<EFBFBD><79><EFBFBD>[<5B>^<5E>͎<EFBFBD><CD8E>̗l<CC97>ɂȂ<C982><C882>Ă<EFBFBD><C482>܂<EFBFBD>:
|
||||
|
||||
d <20><><EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD>
|
||||
@@ -259,7 +259,7 @@ NOTE:
|
||||
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>s<EFBFBD>̐擪<CC90>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
||||
|
||||
2. 2dw <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>ĒP<C492><50>2<EFBFBD><EFBFBD><C295>ړ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
|
||||
2. 2dw <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>ĒP<C492><50>2<EFBFBD><EFBFBD><C295>폜<EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
|
||||
|
||||
3. 3e <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD>3<EFBFBD>ڂ̒P<CC92><50><EFBFBD>̏I<CC8F>[<5B>Ɉړ<C988><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
||||
|
||||
@@ -326,8 +326,8 @@ NOTE:
|
||||
|
||||
** <20>Ō<EFBFBD><C58C>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD> u <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>BU <20>͍s<CD8D>S<EFBFBD>̂̎<CC82><CC8E><EFBFBD><EFBFBD>ł<EFBFBD><C582>B **
|
||||
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>s<EFBFBD>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>A<EFBFBD>ŏ<EFBFBD><C58F>̊ԈႢ<D488>ɃJ<C983>[<5B>\
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>傤<EFBFBD>B
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>s<EFBFBD>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>A<EFBFBD>ŏ<EFBFBD><C58F>̊ԈႢ<D488>ɃJ<C983>[<5B>\<EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
2. x <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>擪<EFBFBD>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD>폜<EFBFBD><ED8F9C><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
3. <20><><EFBFBD><EFBFBD><EFBFBD>Au <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>čŌ<C48D><C58C>Ɏ<EFBFBD><C98E>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>R<EFBFBD>}<7D><><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
4. <20><><EFBFBD>x<EFBFBD>́Ax <20><><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD>Č<EFBFBD><C48C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>S<EFBFBD>ďC<C48F><43><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
@@ -633,7 +633,7 @@ Note:
|
||||
3. <20>ł<EFBFBD> :w TEST <20>ƃ^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>܂<EFBFBD><DC82>傤 (TEST <20>́A<CD81>I<EFBFBD>t<F182BE83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD>)<29>B
|
||||
|
||||
4. <20><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>S<EFBFBD>̂<EFBFBD> TEST <20>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>O<EFBFBD>ŕۑ<C595><DB91><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x :!dir <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> !ls <20>ƃ^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>Ċm<C48A>F<EFBFBD><46><EFBFBD>Ă݂܂<DD82><DC82>傤<EFBFBD>B
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x :!dir <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :!ls <20>ƃ^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>Ċm<C48A>F<EFBFBD><46><EFBFBD>Ă݂܂<DD82><DC82>傤<EFBFBD>B
|
||||
|
||||
Note: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim <20><><EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD> TEST <20>Ƌ<EFBFBD><C68B>ɋN<C98B><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƁA<C681>ۑ<EFBFBD><DB91><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20>`<60><><EFBFBD>[<5B>g<EFBFBD><67><EFBFBD>A<EFBFBD><41><EFBFBD>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>オ<EFBFBD><E382AA><EFBFBD>͂<EFBFBD><CD82>ł<EFBFBD><C582>B
|
||||
|
||||
@@ -117,7 +117,7 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく
|
||||
レッスン 1.5: テキスト編集 - 追加
|
||||
|
||||
|
||||
** テキスト追加するには A を押しましょう **
|
||||
** テキストを追加するには A を押しましょう **
|
||||
|
||||
1. 以下の ---> と示された最初の行にカーソルを移動しましょう。
|
||||
カーソルがその文字上にあってもかまいません。
|
||||
@@ -232,7 +232,7 @@ NOTE: <ESC> キーを押すとノーマルモードに移行します。その
|
||||
レッスン 2.3: オペレータとモーション
|
||||
|
||||
|
||||
多くのコマンドはオペレータとモーションからテキストに変更を加ます。
|
||||
多くのコマンドはオペレータとモーションからテキストに変更を加えます。
|
||||
削除コマンド d のオペレータは次の様になっています:
|
||||
|
||||
d モーション
|
||||
@@ -259,7 +259,7 @@ NOTE: 冒険したい人は、ノーマルモードにてコマンドなしに
|
||||
|
||||
1. 以下の ---> と示された行の先頭にカーソルを移動します。
|
||||
|
||||
2. 2dw をタイプして単語2つ分移動します。
|
||||
2. 2dw をタイプして単語2つ分削除します。
|
||||
|
||||
3. 3e をタイプして3つ目の単語の終端に移動します。
|
||||
|
||||
@@ -326,8 +326,8 @@ NOTE: オペレータ d とモーションの間にカウントを使った場
|
||||
|
||||
** 最後のコマンドを取り消すには u を押します。U は行全体の取消です。 **
|
||||
|
||||
1. 以下の ---> と示された行にカーソルを移動し、最初の間違いにカーソ
|
||||
ルを移動しましょう。
|
||||
1. 以下の ---> と示された行にカーソルを移動し、最初の間違いにカーソル
|
||||
を移動しましょう。
|
||||
2. x をタイプしていらない先頭の文字を削除しましょう。
|
||||
3. さぁ、u をタイプして最後に実行したコマンドを取り消しましょう。
|
||||
4. 今度は、x を使用して誤りを全て修正しましょう。
|
||||
@@ -633,7 +633,7 @@ Note: 全ての : コマンドは <ENTER> を押して終了しなければな
|
||||
3. では :w TEST とタイプしましょう (TEST は、選んだファイル名です)。
|
||||
|
||||
4. これによりファイル全体が TEST という名前で保存されます。
|
||||
もう一度 :!dir もしくは !ls とタイプして確認してみましょう。
|
||||
もう一度 :!dir もしくは :!ls とタイプして確認してみましょう。
|
||||
|
||||
Note: ここで Vim を終了し、ファイル名 TEST と共に起動すると、保存した時の
|
||||
チュートリアルの複製ができ上がるはずです。
|
||||
|
||||
@@ -551,7 +551,7 @@ cw
|
||||
|
||||
** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϻθ<CFBA> <20><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7><EFBFBD>, :#,# w FILENAME <20>Ͻʽÿ<CABD>. **
|
||||
|
||||
1. <20>ٽ<EFBFBD> <20>ѹ<EFBFBD>, :!dir <20>̳<EFBFBD> !ls <20><> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>丮<EFBFBD><E4B8AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƿ<DEBE> <20><>
|
||||
1. <20>ٽ<EFBFBD> <20>ѹ<EFBFBD>, :!dir <20>̳<EFBFBD> :!ls <20><> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>丮<EFBFBD><E4B8AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƿ<DEBE> <20><>
|
||||
TEST <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
2. Ŀ<><C4BF><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ű<EFBFBD> <20><>, Ctrl-g <20><> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20>ٹ<EFBFBD>ȣ<EFBFBD><C8A3>
|
||||
|
||||
@@ -551,7 +551,7 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
|
||||
|
||||
** 파일의 일부를 저장하려면, :#,# w FILENAME 하십시오. **
|
||||
|
||||
1. 다시 한번, :!dir 이나 !ls 를 입력하여 디렉토리의 목록을 받아온 후
|
||||
1. 다시 한번, :!dir 이나 :!ls 를 입력하여 디렉토리의 목록을 받아온 후
|
||||
TEST 같은 적합한 이름을 선택합니다.
|
||||
|
||||
2. 커서를 이 페이지의 처음으로 옮긴 후, Ctrl-g 를 입력하여 그 줄의 줄번호를
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du n
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST f<EFBFBD>r du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for <EFBFBD> se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved <EFBFBD> trykke v startes visuelt valg. Du kan flytte mark<EFBFBD>ren rundt for
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST»
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST før du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du n
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST f<>r du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for <20> se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved <20> trykke v startes visuelt valg. Du kan flytte mark<72>ren rundt for
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST»
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST før du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for
|
||||
|
||||
@@ -671,7 +671,7 @@ Pozn
|
||||
4. Nap<61><70> w TEST , kde TEST je meno s<>boru, ktor<6F> zatial neexistuje.
|
||||
Skontroluj, e vid<69><64> :'<,'>w TEST predt<64>m ne<6E> stla<6C><61><EFBFBD> Enter.
|
||||
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo !ls
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo :!ls
|
||||
pre overenie. Zatial ho e<>te nema<6D>! Pou<6F>ijeme ho v <20>al<61>ej lekcii.
|
||||
|
||||
POZN<EFBFBD>MKA: Stla<6C>en<65>m kl<6B>vesy v sa spust<73> vizu<7A>lne ozna<6E>ovanie.
|
||||
|
||||
@@ -671,7 +671,7 @@ Pozn
|
||||
4. Nap<61><70> w TEST , kde TEST je meno s<>boru, ktor<6F> zatial neexistuje.
|
||||
Skontroluj, e vid<69><64> :'<,'>w TEST predt<64>m ne<6E> stla<6C><61><EFBFBD> Enter.
|
||||
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo !ls
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo :!ls
|
||||
pre overenie. Zatial ho e<>te nema<6D>! Pou<6F>ijeme ho v <20>al<61>ej lekcii.
|
||||
|
||||
POZN<EFBFBD>MKA: Stla<6C>en<65>m kl<6B>vesy v sa spust<73> vizu<7A>lne ozna<6E>ovanie.
|
||||
|
||||
@@ -671,7 +671,7 @@ Poznámka: že ak ukončíš prácu s editorom Vim a znovu ho spustíš príkazo
|
||||
4. Napíš w TEST , kde TEST je meno súboru, ktorý zatial neexistuje.
|
||||
Skontroluj, e vidíš :'<,'>w TEST predtým než stlačíš Enter.
|
||||
|
||||
5. Vim zapíše označené riadky do súboru TEST. Použi :!dir alebo !ls
|
||||
5. Vim zapíše označené riadky do súboru TEST. Použi :!dir alebo :!ls
|
||||
pre overenie. Zatial ho ešte nemaž! Použijeme ho v ďalšej lekcii.
|
||||
|
||||
POZNÁMKA: Stlačením klávesy v sa spustí vizuálne označovanie.
|
||||
|
||||
@@ -658,7 +658,7 @@ NOTE: If you were to exit Vim and start it again with vim TEST , the file
|
||||
4. Type w TEST , where TEST is a filename that does not exist yet. Verify
|
||||
that you see :'<,'>w TEST before you press <ENTER>.
|
||||
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or !ls
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or :!ls
|
||||
to see it. Do not remove it yet! We will use it in the next lesson.
|
||||
|
||||
NOTE: Pressing v starts Visual selection. You can move the cursor around
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim tutor support file
|
||||
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Last Change: 2008 Jul 21
|
||||
" Last Change: 2012 Sep 21
|
||||
|
||||
" This Vim script is used for detecting if a translation of the
|
||||
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
|
||||
@@ -72,14 +72,20 @@ if s:ext =~? '\.ko'
|
||||
endif
|
||||
endif
|
||||
|
||||
" The Chinese tutor is available in two encodings, guess which one to use
|
||||
" The Chinese tutor is available in three encodings, guess which one to use
|
||||
" This segment is from the above lines and modified by
|
||||
" Mendel L Chan <beos@turbolinux.com.cn> for Chinese vim tutorial
|
||||
" When 'encoding' is utf-8, choose between China (simplified) and Taiwan
|
||||
" (traditional) based on the language, suggested by Alick Zhao.
|
||||
if s:ext =~? '\.zh'
|
||||
if &enc =~ 'big5\|cp950'
|
||||
let s:ext = ".zh.big5"
|
||||
elseif &enc != 'utf-8'
|
||||
let s:ext = ".zh.euc"
|
||||
elseif s:ext =~? 'zh_tw' || (exists("s:lang") && s:lang =~? 'zh_tw')
|
||||
let s:ext = ".zh_tw"
|
||||
else
|
||||
let s:ext = ".zh_cn"
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
996
runtime/tutor/tutor.zh_cn.utf-8
Normal file
996
runtime/tutor/tutor.zh_cn.utf-8
Normal file
@@ -0,0 +1,996 @@
|
||||
===============================================================================
|
||||
= 欢 迎 阅 读 《 V I M 教 程 》 —— 版本 1.7 =
|
||||
===============================================================================
|
||||
|
||||
Vim 是一个具有很多命令的功能非常强大的编辑器。限于篇幅,在本教程当中
|
||||
就不详细介绍了。本教程的设计目标是讲述一些必要的基本命令,而掌握好这
|
||||
些命令,您就能够很容易地将 Vim 当作一个通用编辑器来使用了。
|
||||
|
||||
完成本教程的内容大约需要25-30分钟,取决于您训练的时间。
|
||||
|
||||
注意:
|
||||
每一节的命令操作将会更改本文。推荐您复制本文的一个副本,然后在副本上
|
||||
进行训练(如果您是通过"vimtutor"来启动教程的,那么本文就已经是副本了)。
|
||||
|
||||
切记一点:本教程的设计思路是在使用中进行学习的。也就是说,您需要通过
|
||||
执行命令来学习它们本身的正确用法。如果您只是阅读而不操作,那么您可能
|
||||
会很快遗忘这些命令的!
|
||||
|
||||
好了,现在请确定您的Shift-Lock(大小写锁定键)还没有按下,然后按键盘上
|
||||
的字母键 j 足够多次来移动光标,直到第一节的内容能够完全充满屏幕。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第一节:移动光标
|
||||
|
||||
|
||||
** 要移动光标,请依照说明分别按下 h、j、k、l 键。 **
|
||||
|
||||
^
|
||||
k 提示: h 的键位于左边,每次按下就会向左移动。
|
||||
< h l > l 的键位于右边,每次按下就会向右移动。
|
||||
j j 键看起来很象一支尖端方向朝下的箭头。
|
||||
v
|
||||
|
||||
1. 请随意在屏幕内移动光标,直至您觉得舒服为止。
|
||||
|
||||
2. 按下下行键(j),直到出现光标重复下行。
|
||||
|
||||
---> 现在您应该已经学会如何移动到下一讲吧。
|
||||
|
||||
3. 现在请使用下行键,将光标移动到第一讲第二节。
|
||||
|
||||
提示:如果您不敢确定您所按下的字母,请按下<ESC>键回到正常(Normal)模式。
|
||||
然后再次从键盘输入您想要的命令。
|
||||
|
||||
提示:光标键应当也能正常工作的。但是使用hjkl键,在习惯之后您就能够更快
|
||||
地在屏幕内四处移动光标。真的是这样!
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第二节:VIM的进入和退出
|
||||
|
||||
|
||||
!! 特别提示:敬请阅读本一节的完整内容,然后再执行以下所讲解的命令。
|
||||
|
||||
1. 按<ESC>键(这是为了确保您处在正常模式)。
|
||||
|
||||
2. 然后输入: :q! <回车>
|
||||
这种方式的退出编辑器会丢弃您进入编辑器以来所做的改动。
|
||||
|
||||
3. 如果您看到了命令行提示符,请输入能够带您回到本教程的命令,那就是:
|
||||
vimtutor <回车>
|
||||
|
||||
4. 如果您自信已经牢牢记住了这些步骤的话,请从步骤1执行到步骤3退出,然
|
||||
后再次进入编辑器。
|
||||
|
||||
提示: :q! <回车> 会丢弃您所做的任何改动。几讲之后您将学会如何保存改动到文件。
|
||||
|
||||
5. 将光标下移到第一讲第三节。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第三节:文本编辑之删除
|
||||
|
||||
|
||||
** 在正常(Normal)模式下,可以按下 x 键来删除光标所在位置的字符。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
2. 为了修正输入错误,请将光标移至准备删除的字符的位置处。
|
||||
|
||||
3. 然后按下 x 键将错误字符删除掉。
|
||||
|
||||
4. 重复步骤2到步骤4,直到句子修正为止。
|
||||
|
||||
---> The ccow jumpedd ovverr thhe mooon.
|
||||
|
||||
5. 好了,该行已经修正了,下面是第一讲第四节。
|
||||
|
||||
特别提示:在浏览本教程时,不要强行记忆。记住一点:在使用中学习。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第四节:文本编辑之插入
|
||||
|
||||
|
||||
** 在正常模式下,可以按下 i 键来插入文本。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
2. 为了使得第一行内容雷同于第二行,请将光标移至文本第一个准备插入字符
|
||||
的位置。
|
||||
|
||||
3. 然后按下 i 键,接着输入必要的文本字符。
|
||||
|
||||
4. 每个错误修正完毕后,请按下 <ESC> 键返回正常模式。
|
||||
重复步骤2至步骤4以便修正句子。
|
||||
|
||||
---> There is text misng this .
|
||||
---> There is some text missing from this line.
|
||||
|
||||
5. 如果您对文本插入操作已经很满意,请接着阅读下面的第一讲第五节。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第五节:文本编辑之添加
|
||||
|
||||
|
||||
** 按 A 键以添加文本。 **
|
||||
|
||||
1. 移动光标到下面第一个标记有 ---> 的一行。
|
||||
光标放在那一行的哪个字符上并不重要。
|
||||
|
||||
2. 按 A 键输入必要的添加内容。
|
||||
|
||||
3. 文本添加完毕后,按 <ESC> 键回到正常模式。
|
||||
|
||||
4. 移动光标到下面第二个标记有 ---> 的一行。重复步骤2和步骤3以改正这个句子。
|
||||
|
||||
---> There is some text missing from th
|
||||
There is some text missing from this line.
|
||||
---> There is also some text miss
|
||||
There is also some text missing here.
|
||||
|
||||
5. 当您对添加文本操作感到满意时,请继续学习第一讲第六节。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第六节:编辑文件
|
||||
|
||||
** 使用 :wq 以保存文件并退出。 **
|
||||
|
||||
特别提示:在执行以下步骤之前,请先读完整个小节!
|
||||
|
||||
1. 如您在第一讲第二节中所做的那样退出本教程: :q!
|
||||
或者,如果您可以访问另一个终端,请在那里执行以下操作。
|
||||
|
||||
2. 在 shell 的提示符下输入命令: vim tutor <回车>
|
||||
'vim'是启动 Vim 编辑器的命令,'tutor'是您希望编辑的文件的名字。
|
||||
请使用一个可以改动的文件。
|
||||
|
||||
3. 使用您在前面的教程中学到的命令插入删除文本。
|
||||
|
||||
4. 保存改动过的文件并退出 Vim,按这些键: :wq <回车>
|
||||
|
||||
5. 如果您在步骤1中已经退出 vimtutor,请重启 vimtutor 移动到下面的小结一节。
|
||||
|
||||
6. 阅读完以上步骤,弄懂它们的意义,然后在实践中进行练习。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲小结
|
||||
|
||||
|
||||
1. 光标在屏幕文本中的移动既可以用箭头键,也可以使用 hjkl 字母键。
|
||||
h (左移) j (下行) k (上行) l (右移)
|
||||
|
||||
2. 欲进入 Vim 编辑器(从命令行提示符),请输入:vim 文件名 <回车>
|
||||
|
||||
3. 欲退出 Vim 编辑器,请输入 <ESC> :q! <回车> 放弃所有改动。
|
||||
或者输入 <ESC> :wq <回车> 保存改动。
|
||||
|
||||
4. 在正常模式下删除光标所在位置的字符,请按: x
|
||||
|
||||
5. 欲插入或添加文本,请输入:
|
||||
|
||||
i 输入欲插入文本 <ESC> 在光标前插入文本
|
||||
A 输入欲添加文本 <ESC> 在一行后添加文本
|
||||
|
||||
特别提示:按下 <ESC> 键会带您回到正常模式或者撤消一个不想输入或部分完整
|
||||
的命令。
|
||||
|
||||
好了,第一讲到此结束。下面接下来继续第二讲的内容。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第一节:删除类命令
|
||||
|
||||
|
||||
** 输入 dw 可以从光标处删除至一个单词的末尾。**
|
||||
|
||||
1. 请按下 <ESC> 键确保您处于正常模式。
|
||||
|
||||
2. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
3. 请将光标移至准备要删除的单词的起始处。
|
||||
|
||||
4. 接着输入 dw 删除掉该单词。
|
||||
|
||||
特别提示:当您输入时,字母 d 会同时出现在屏幕的最后一行。Vim 在等待您输入
|
||||
字母 w。如果您看到的是除 d 外的其他字符,那表明您按错了;请按下 <ESC> 键,
|
||||
然后重新再来。
|
||||
|
||||
---> There are a some words fun that don't belong paper in this sentence.
|
||||
|
||||
5. 重复步骤3和步骤4,直至句子修正完毕。接着继续第二讲第二节内容。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第二节:更多删除类命令
|
||||
|
||||
|
||||
** 输入 d$ 从当前光标删除到行末。**
|
||||
|
||||
1. 请按下 <ESC> 键确保您处于正常模式。
|
||||
|
||||
2. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
3. 请将光标移动到该行的尾部(也就是在第一个点号‘.’后面)。
|
||||
|
||||
4. 然后输入 d$ 从光标处删至当前行尾部。
|
||||
|
||||
---> Somebody typed the end of this line twice. end of this line twice.
|
||||
|
||||
|
||||
5. 请继续学习第二讲第三节就知道是怎么回事了。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第三节:关于命令和对象
|
||||
|
||||
|
||||
许多改变文本的命令都由一个操作符和一个动作构成。
|
||||
使用删除操作符 d 的删除命令的格式如下:
|
||||
|
||||
d motion
|
||||
|
||||
其中:
|
||||
d - 删除操作符。
|
||||
motion - 操作符的操作对象(在下面列出)。
|
||||
|
||||
一个简短的动作列表:
|
||||
w - 从当前光标当前位置直到下一个单词起始处,不包括它的第一个字符。
|
||||
e - 从当前光标当前位置直到单词末尾,包括最后一个字符。
|
||||
$ - 从当前光标当前位置直到当前行末。
|
||||
|
||||
因此输入 de 会从当前光标位置删除到单词末尾。
|
||||
|
||||
特别提示:
|
||||
对于勇于探索者,请在正常模式下面仅按代表相应动作的键而不使用操作符,您
|
||||
将看到光标的移动正如上面的对象列表所代表的一样。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第四节:使用计数指定动作
|
||||
|
||||
|
||||
** 在动作前输入数字会使它重复那么多次。 **
|
||||
|
||||
1. 移动光标到下面标记有 ---> 的一行的开始。
|
||||
|
||||
2. 输入 2w 使光标向前移动两个单词。
|
||||
|
||||
3. 输入 3e 使光标向前移动到第三个单词的末尾。
|
||||
|
||||
4. 输入 0 (数字零) 移动光标到行首。
|
||||
|
||||
5. 重复步骤2和步骤3,尝试不同的数字。
|
||||
|
||||
---> This is just a line with words you can move around in.
|
||||
|
||||
6. 请继续学习第二讲第五节。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第五节:使用计数以删除更多
|
||||
|
||||
|
||||
** 使用操作符时输入数字可以使它重复那么多次。 **
|
||||
|
||||
上面已经提到过删除操作符和动作的组合,您可以在组合中动作之前插入一个数字以
|
||||
删除更多:
|
||||
d number(数字) motion
|
||||
|
||||
1. 移动光标到下面标记有 ---> 的一行中第一个大写字母单词上。
|
||||
|
||||
2. 输入 d2w 以删除两个大写字母单词。
|
||||
|
||||
3. 重复步骤1和步骤2,使用不同的数字使得用一个命令就能删除全部相邻的大写字母
|
||||
单词
|
||||
|
||||
---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第六节:操作整行
|
||||
|
||||
|
||||
** 输入 dd 可以删除整一个当前行。 **
|
||||
|
||||
鉴于整行删除的高频度,Vi 的设计者决定要简化整行删除操作,您仅需要在同一行上
|
||||
击打两次 d 就可以删除掉光标所在的整行了。
|
||||
|
||||
1. 请将光标移动到本节中下面的短句段落中的第二行。
|
||||
2. 输入 dd 删除该行。
|
||||
3. 然后移动到第四行。
|
||||
4. 接着输入 2dd 删除两行。
|
||||
|
||||
---> 1) Roses are red,
|
||||
---> 2) Mud is fun,
|
||||
---> 3) Violets are blue,
|
||||
---> 4) I have a car,
|
||||
---> 5) Clocks tell time,
|
||||
---> 6) Sugar is sweet
|
||||
---> 7) And so are you.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第七节:撤消类命令
|
||||
|
||||
|
||||
** 输入 u 来撤消最后执行的命令,输入 U 来撤消对整行的修改。 **
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行,并将其置于第一个错误
|
||||
处。
|
||||
2. 输入 x 删除第一个不想保留的字母。
|
||||
3. 然后输入 u 撤消最后执行的(一次)命令。
|
||||
4. 这次要使用 x 修正本行的所有错误。
|
||||
5. 现在输入一个大写的 U ,恢复到该行的原始状态。
|
||||
6. 接着多次输入 u 以撤消 U 以及更前的命令。
|
||||
7. 然后多次输入 CTRL-R (先按下 CTRL 键不放开,接着按 R 键),这样就
|
||||
可以重做被撤消的命令,也就是撤消掉撤消命令。
|
||||
|
||||
---> Fiix the errors oon thhis line and reeplace them witth undo.
|
||||
|
||||
8. 这些都是非常有用的命令。下面是第二讲的小结了。
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲小结
|
||||
|
||||
|
||||
1. 欲从当前光标删除至下一个单词,请输入:dw
|
||||
2. 欲从当前光标删除至当前行末尾,请输入:d$
|
||||
3. 欲删除整行,请输入:dd
|
||||
|
||||
4. 欲重复一个动作,请在它前面加上一个数字:2w
|
||||
5. 在正常模式下修改命令的格式是:
|
||||
operator [number] motion
|
||||
其中:
|
||||
operator - 操作符,代表要做的事情,比如 d 代表删除
|
||||
[number] - 可以附加的数字,代表动作重复的次数
|
||||
motion - 动作,代表在所操作的文本上的移动,例如 w 代表单词(word),
|
||||
$ 代表行末等等。
|
||||
|
||||
6. 欲移动光标到行首,请按数字0键:0
|
||||
|
||||
7. 欲撤消以前的操作,请输入:u (小写的u)
|
||||
欲撤消在一行中所做的改动,请输入:U (大写的U)
|
||||
欲撤消以前的撤消命令,恢复以前的操作结果,请输入:CTRL-R
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第一节:置入类命令
|
||||
|
||||
|
||||
** 输入 p 将最后一次删除的内容置入光标之后。 **
|
||||
|
||||
1. 请将光标移动到本节中下面第一个标记有 ---> 的一行。
|
||||
|
||||
2. 输入 dd 将该行删除,这样会将该行保存到 Vim 的一个寄存器中。
|
||||
|
||||
3. 接着将光标移动到 c) 一行,即准备置入的位置的上方。记住:是上方哦。
|
||||
|
||||
4. 然后在正常模式下(<ESC>键进入)输入 p 将该行粘贴置入。
|
||||
|
||||
5. 重复步骤2至步骤4,将所有的行依序放置到正确的位置上。
|
||||
|
||||
---> d) Can you learn too?
|
||||
---> b) Violets are blue,
|
||||
---> c) Intelligence is learned,
|
||||
---> a) Roses are red,
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第二节:替换类命令
|
||||
|
||||
|
||||
** 输入 r 和一个字符替换光标所在位置的字符。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
2. 请移动光标到第一个出错的位置。
|
||||
|
||||
3. 接着输入 r 和要替换成的字符,这样就能将错误替换掉了。
|
||||
|
||||
4. 重复步骤2和步骤3,直到第一行已经修改完毕。
|
||||
|
||||
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
|
||||
---> When this line was typed in, someone pressed some wrong keys!
|
||||
|
||||
5. 然后我们继续学习第三讲第三节。
|
||||
|
||||
特别提示:切记您要在使用中学习,而不是在记忆中学习。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第三节:更改类命令
|
||||
|
||||
|
||||
** 要改变文本直到一个单词的末尾,请输入 ce **
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
2. 接着把光标放在单词 lubw 的字母 u 的位置那里。
|
||||
|
||||
3. 然后输入 cw 以及正确的单词(在本例中是输入 ine )。
|
||||
|
||||
4. 最后按 <ESC> 键,然后光标定位到下一个错误第一个准备更改的字母处。
|
||||
|
||||
5. 重复步骤3和步骤4,直到第一个句子完全雷同第二个句子。
|
||||
|
||||
---> This lubw has a few wptfd that mrrf changing usf the change operator.
|
||||
---> This line has a few words that need changing using the change operator.
|
||||
|
||||
提示:请注意 ce 命令不仅仅是删除了一个单词,它也让您进入插入模式了。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第四节:使用c更改更多
|
||||
|
||||
|
||||
** 更改类操作符可以与删除中使用的同样的动作配合使用。 **
|
||||
|
||||
1. 更改类操作符的工作方式跟删除类是一致的。操作格式是:
|
||||
|
||||
c [number] motion
|
||||
|
||||
2. 动作参数(motion)也是一样的,比如 w 代表单词,$代表行末等等。
|
||||
|
||||
3. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
4. 接着将光标移动到第一个错误处。
|
||||
|
||||
5. 然后输入 c$ 使得该行剩下的部分更正得同第二行一样。最后按 <ESC> 键。
|
||||
|
||||
---> The end of this line needs some help to make it like the second.
|
||||
---> The end of this line needs to be corrected using the c$ command.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲小结
|
||||
|
||||
|
||||
1. 要重新置入已经删除的文本内容,请按小写字母 p 键。该操作可以将已删除
|
||||
的文本内容置于光标之后。如果最后一次删除的是一个整行,那么该行将置
|
||||
于当前光标所在行的下一行。
|
||||
|
||||
2. 要替换光标所在位置的字符,请输入小写的 r 和要替换掉原位置字符的新字
|
||||
符即可。
|
||||
|
||||
3. 更改类命令允许您改变从当前光标所在位置直到动作指示的位置中间的文本。
|
||||
比如输入 ce 可以替换当前光标到单词的末尾的内容;输入 c$ 可以替换当
|
||||
前光标到行末的内容。
|
||||
|
||||
4. 更改类命令的格式是:
|
||||
|
||||
c [number] motion
|
||||
|
||||
现在我们继续学习下一讲。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第一节:定位及文件状态
|
||||
|
||||
** 输入 CTRL-G 显示当前编辑文件中当前光标所在行位置以及文件状态信息。
|
||||
输入大写 G 则直接跳转到文件中的某一指定行。**
|
||||
|
||||
提示:切记要先通读本节内容,之后才可以执行以下步骤!!!
|
||||
|
||||
1. 按下 CTRL 键不放开然后按 g 键。我们称这个键组合为 CTRL-G。
|
||||
您会看到页面最底部出现一个状态信息行,显示的内容是当前编辑的文件名
|
||||
和文件中光标位置。请记住行号,它会在步骤3中用到。
|
||||
|
||||
提示:您也许会在屏幕的右下角看到光标位置,这会在 'ruler' 选项设置时发生
|
||||
(参见 :help 'ruler')
|
||||
|
||||
2. 输入大写 G 可以使得当前光标直接跳转到文件最后一行。
|
||||
输入 gg 可以使得当前光标直接跳转到文件第一行。
|
||||
|
||||
3. 输入您曾停留的行号,然后输入大写 G。这样就可以返回到您第一次按下
|
||||
CTRL-G 时所在的行了。
|
||||
|
||||
4. 如果您觉得没问题的话,请执行步骤1至步骤3的操作进行练习。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第二节:搜索类命令
|
||||
|
||||
|
||||
** 输入 / 加上一个字符串可以用以在当前文件中查找该字符串。**
|
||||
|
||||
1. 在正常模式下输入 / 字符。您此时会注意到该字符和光标都会出现在屏幕底
|
||||
部,这跟 : 命令是一样的。
|
||||
|
||||
2. 接着输入 errroor <回车>。那个errroor就是您要查找的字符串。
|
||||
|
||||
3. 要查找同上一次的字符串,只需要按 n 键。要向相反方向查找同上一次的字
|
||||
符串,请输入大写 N 即可。
|
||||
|
||||
4. 如果您想逆向查找字符串,请使用 ? 代替 / 进行。
|
||||
|
||||
5. 要回到您之前的位置按 CTRL-O (按住 Ctrl 键不放同时按下字母 o)。重复按可以
|
||||
回退更多步。CTRL-I 会跳转到较新的位置。
|
||||
|
||||
---> "errroor" is not the way to spell error; errroor is an error.
|
||||
提示:如果查找已经到达文件末尾,查找会自动从文件头部继续查找,除非
|
||||
'wrapscan' 选项被复位。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第三节:配对括号的查找
|
||||
|
||||
|
||||
** 输入 % 可以查找配对的括号 )、]、}。**
|
||||
|
||||
1. 把光标放在本节下面标记有 --> 那一行中的任何一个 (、[ 或 { 处。
|
||||
|
||||
2. 接着按 % 字符。
|
||||
|
||||
3. 此时光标的位置应当是在配对的括号处。
|
||||
|
||||
4. 再次按 % 就可以跳回配对的第一个括号处。
|
||||
|
||||
5. 移动光标到另一个 (、)、[、]、{ 或 } 处,按 % 查看其所作所为。
|
||||
|
||||
---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
|
||||
|
||||
|
||||
提示:在程序调试时,这个功能用来查找不配对的括号是很有用的。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第四节:替换命令
|
||||
|
||||
|
||||
** 输入 :s/old/new/g 可以替换 old 为 new。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
2. 输入 :s/thee/the <回车> 。请注意该命令只改变光标所在行的第一个匹配
|
||||
串。
|
||||
|
||||
3. 输入 :s/thee/the/g 则是替换全行的匹配串,该行中所有的 "thee" 都会被
|
||||
改变。
|
||||
|
||||
---> thee best time to see thee flowers is in thee spring.
|
||||
|
||||
4. 要替换两行之间出现的每个匹配串,请
|
||||
输入 :#,#s/old/new/g 其中 #,# 代表的是替换操作的若干行中
|
||||
首尾两行的行号。
|
||||
输入 :%s/old/new/g 则是替换整个文件中的每个匹配串。
|
||||
输入 :%s/old/new/gc 会找到整个文件中的每个匹配串,并且对每个匹配串
|
||||
提示是否进行替换。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲小结
|
||||
|
||||
|
||||
1. CTRL-G 用于显示当前光标所在位置和文件状态信息。
|
||||
G 用于将光标跳转至文件最后一行。
|
||||
先敲入一个行号然后输入大写 G 则是将光标移动至该行号代表的行。
|
||||
gg 用于将光标跳转至文件第一行。
|
||||
|
||||
2. 输入 / 然后紧随一个字符串是在当前所编辑的文档中正向查找该字符串。
|
||||
输入 ? 然后紧随一个字符串则是在当前所编辑的文档中反向查找该字符串。
|
||||
完成一次查找之后按 n 键是重复上一次的命令,可在同一方向上查
|
||||
找下一个匹配字符串所在;或者按大写 N 向相反方向查找下一匹配字符串所在。
|
||||
CTRL-O 带您跳转回较旧的位置,CTRL-I 则带您到较新的位置。
|
||||
|
||||
3. 如果光标当前位置是括号(、)、[、]、{、},按 % 会将光标移动到配对的括号上。
|
||||
|
||||
4. 在一行内替换头一个字符串 old 为新的字符串 new,请输入 :s/old/new
|
||||
在一行内替换所有的字符串 old 为新的字符串 new,请输入 :s/old/new/g
|
||||
在两行内替换所有的字符串 old 为新的字符串 new,请输入 :#,#s/old/new/g
|
||||
在文件内替换所有的字符串 old 为新的字符串 new,请输入 :%s/old/new/g
|
||||
进行全文替换时询问用户确认每个替换需添加 c 标志 :%s/old/new/gc
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第一节:在 VIM 内执行外部命令的方法
|
||||
|
||||
|
||||
** 输入 :! 然后紧接着输入一个外部命令可以执行该外部命令。**
|
||||
|
||||
1. 按下我们所熟悉的 : 命令使光标移动到屏幕底部。这样您就可以输入一行命令了。
|
||||
|
||||
2. 接着输入感叹号 ! 这个字符,这样就允许您执行外部的 shell 命令了。
|
||||
|
||||
3. 我们以 ls 命令为例。输入 !ls <回车> 。该命令就会列举出您当前目录的
|
||||
内容,就如同您在命令行提示符下输入 ls 命令的结果一样。如果 !ls 没起
|
||||
作用,您可以试试 :!dir 看看。
|
||||
|
||||
提示:所有的外部命令都可以以这种方式执行,包括带命令行参数的那些。
|
||||
|
||||
提示:所有的 : 命令都必须以敲 <回车> 键结束。从今以后我们就不会总是提到这一点
|
||||
了。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第二节:关于保存文件的更多信息
|
||||
|
||||
|
||||
** 要将对文件的改动保存到文件中,请输入 :w FILENAME 。**
|
||||
|
||||
1. 输入 :!dir 或者 :!ls 获知当前目录的内容。您应当已知道最后还得敲
|
||||
<回车> 吧。
|
||||
|
||||
2. 选择一个未被用到的文件名,比如 TEST。
|
||||
|
||||
3. 接着输入 :w TEST (此处 TEST 是您所选择的文件名。)
|
||||
|
||||
4. 该命令会以 TEST 为文件名保存整个文件 (Vim 教程)。为了验证这一点,
|
||||
请再次输入 :!dir 或 :!ls 查看您的目录列表内容。
|
||||
|
||||
请注意:如果您退出 Vim 然后在以命令 vim TEST 再次启动 Vim,那么该文件内
|
||||
容应该同您保存时的文件内容是完全一样的。
|
||||
|
||||
5. 现在您可以删除 TEST 文件了。在 MS-DOS 下,请输入: :!del TEST
|
||||
在 Unix 下,请输入: :!rm TEST
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第三节:一个具有选择性的保存命令
|
||||
|
||||
|
||||
** 要保存文件的部分内容,请输入 v motion :w FILENAME **
|
||||
|
||||
1. 移动光标到本行。
|
||||
|
||||
2. 接着按 v 键,将光标移动至下面第五个条目上。您会注意到之间的文本被高亮了。
|
||||
|
||||
3. 然后按 : 字符。您将看到屏幕底部会出现 :'<,'> 。
|
||||
|
||||
4. 现在请输入 w TEST,其中 TEST 是一个未被使用的文件名。确认您看到了
|
||||
:'<,'>w TEST 之后按 <回车> 键。
|
||||
|
||||
5. 这时 Vim 会把选中的行写入到以 TEST 命名的文件中去。使用 :!dir 或 :!ls
|
||||
确认文件被正确保存。这次先别删除它!我们在下一讲中会用到它。
|
||||
|
||||
提示:按 v 键使 Vim 进入可视模式进行选取。您可以四处移动光标使选取区域变大或
|
||||
变小。接着您可以使用一个操作符对选中文本进行操作。例如,按 d 键会删除
|
||||
选中的文本内容。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第四节:提取和合并文件
|
||||
|
||||
|
||||
** 要向当前文件中插入另外的文件的内容,请输入 :r FILENAME **
|
||||
|
||||
1. 请把光标移动到本行上面一行。
|
||||
|
||||
特别提示:执行步骤2之后您将看到第五讲第三节的文字,请届时往下移动
|
||||
以再次看到本讲内容。
|
||||
|
||||
2. 接着通过命令 :r TEST 将前面创建的名为 TEST 的文件提取进来。
|
||||
您所提取进来的文件将从光标所在位置处开始置入。
|
||||
|
||||
3. 为了确认文件已经提取成功,移动光标回到原来的位置就可以注意有两份第
|
||||
五讲第三节的内容,一份是原始内容,另外一份是来自文件的副本。
|
||||
|
||||
提示:您还可以读取外部命令的输出。例如, :r !ls 可以读取 ls 命令的输出,并
|
||||
把它放置在光标下面。
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲小结
|
||||
|
||||
|
||||
1. :!command 用于执行一个外部命令 command。
|
||||
|
||||
请看一些实际例子:
|
||||
(MS-DOS) (Unix)
|
||||
:!dir :!ls - 用于显示当前目录的内容。
|
||||
:!del FILENAME :!rm FILENAME - 用于删除名为 FILENAME 的文件。
|
||||
|
||||
2. :w FILENAME 可将当前 VIM 中正在编辑的文件保存到名为 FILENAME 的文
|
||||
件中。
|
||||
|
||||
3. v motion :w FILENAME 可将当前编辑文件中可视模式下选中的内容保存到文件
|
||||
FILENAME 中。
|
||||
|
||||
4. :r FILENAME 可提取磁盘文件 FILENAME 并将其插入到当前文件的光标位置
|
||||
后面。
|
||||
|
||||
5. :r !dir 可以读取 dir 命令的输出并将其放置到当前文件的光标位置后面。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第一节:打开类命令
|
||||
|
||||
|
||||
** 输入 o 将在光标的下方打开新的一行并进入插入模式。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
2. 接着输入小写的 o 在光标 *下方* 打开新的一行,这个命令会使您
|
||||
进入插入模式。
|
||||
|
||||
3. 然后输入一些文字,之后按 <ESC> 键退出插入模式而进入正常模式。
|
||||
|
||||
---> After typing o the cursor is placed on the open line in Insert mode.
|
||||
|
||||
4. 为了在光标 *上方* 打开新的一行,只需要输入大写的 O 而不是小写的 o
|
||||
就可以了。请在下行测试一下吧。
|
||||
|
||||
---> Open up a line above this by typing O while the cursor is on this line.
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第二节:附加类命令
|
||||
|
||||
|
||||
** 输入 a 将可在光标之后插入文本。 **
|
||||
|
||||
1. 请在正常模式下将光标移动到本节中下面标记有 ---> 的第一行的行首。
|
||||
|
||||
2. 接着输入 e 直到光标位于 li 的末尾。
|
||||
|
||||
3. 输入小写的 a 则可在光标之后插入文本了。
|
||||
|
||||
4. 将单词补充完整,就像下一行中的那样。之后按 <ESC> 键退出插入模式回到
|
||||
正常模式。
|
||||
|
||||
5. 使用 e 移动光标到下一步不完整的单词,重复步骤3和步骤4。
|
||||
|
||||
---> This li will allow you to pract appendi text to a line.
|
||||
---> This line will allow you to practice appending text to a line.
|
||||
|
||||
提示:a、i 和 A 都会带您进入插入模式,惟一的区别在于字符插入的位置。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第三节:另外一个置换类命令的版本
|
||||
|
||||
|
||||
** 输入大写的 R 可连续替换多个字符。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。移动光标到第一个 xxx 的
|
||||
起始位置。
|
||||
|
||||
2. 然后输入大写的 R 开始把第一行中的不同于第二行的剩余字符逐一输入,就
|
||||
可以全部替换掉原有的字符而使得第一行完全雷同第二行了。
|
||||
|
||||
3. 接着按 <ESC> 键退出替换模式回到正常模式。您可以注意到尚未替换的文本
|
||||
仍然保持原状。
|
||||
|
||||
4. 重复以上步骤,将剩余的 xxx 也替换掉。
|
||||
|
||||
---> Adding 123 to xxx gives you xxx.
|
||||
---> Adding 123 to 456 gives you 579.
|
||||
|
||||
提示:替换模式与插入模式相似,不过每个输入的字符都会删除一个已有的字符。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第四节:复制粘贴文本
|
||||
|
||||
|
||||
** 使用操作符 y 复制文本,使用 p 粘贴文本 **
|
||||
|
||||
1. 定位到下面标记有 ---> 的一行,将光标移动到 "a)" 之后。
|
||||
|
||||
2. 接着使用 v 进入可视模式,移动光标到 "first" 的前面。
|
||||
|
||||
3. 现在输入 y 以抽出(复制)高亮的文本。
|
||||
|
||||
4. 然后移动光标到下一行的末尾:j$
|
||||
|
||||
5. 接着输入 p 以放置(粘贴)复制了的文本。然后输入:a second <ESC>。
|
||||
|
||||
6. 使用可视模式选中 " item.",用 y 复制,再用 j$ 将光标移动到下一行末尾,
|
||||
用 p 将文本粘贴到那里。
|
||||
|
||||
---> a) this is the first item.
|
||||
b)
|
||||
|
||||
提示:您还可以把 y 当作操作符来使用;例如 yw 可以用来复制一个单词。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第五节:设置类命令的选项
|
||||
|
||||
|
||||
** 设置可使查找或者替换可忽略大小写的选项 **
|
||||
|
||||
1. 要查找单词 ignore 可在正常模式下输入 /ignore <回车>。
|
||||
要重复查找该词,可以重复按 n 键。
|
||||
|
||||
2. 然后设置 ic 选项(Ignore Case,忽略大小写),请输入: :set ic
|
||||
|
||||
3. 现在可以通过键入 n 键再次查找单词 ignore。注意到 Ignore 和 IGNORE 现在
|
||||
也被找到了。
|
||||
|
||||
4. 然后设置 hlsearch 和 incsearch 这两个选项,请输入: :set hls is
|
||||
|
||||
5. 现在可以再次输入查找命令,看看会有什么效果: /ignore <回车>
|
||||
|
||||
6. 要禁用忽略大小写,请输入: :set noic
|
||||
|
||||
提示:要移除匹配项的高亮显示,请输入: :nohlsearch
|
||||
提示:如果您想要仅在一次查找时忽略字母大小写,您可以使用 \c:
|
||||
/ignore\c <回车>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲小结
|
||||
|
||||
1. 输入小写的 o 可以在光标下方打开新的一行并进入插入模式。
|
||||
输入大写的 O 可以在光标上方打开新的一行。
|
||||
|
||||
2. 输入小写的 a 可以在光标所在位置之后插入文本。
|
||||
输入大写的 A 可以在光标所在行的行末之后插入文本。
|
||||
|
||||
3. e 命令可以使光标移动到单词末尾。
|
||||
|
||||
4. 操作符 y 复制文本,p 粘贴先前复制的文本。
|
||||
|
||||
5. 输入大写的 R 将进入替换模式,直至按 <ESC> 键回到正常模式。
|
||||
|
||||
6. 输入 :set xxx 可以设置 xxx 选项。一些有用的选项如下:
|
||||
'ic' 'ignorecase' 查找时忽略字母大小写
|
||||
'is' 'incsearch' 查找短语时显示部分匹配
|
||||
'hls' 'hlsearch' 高亮显示所有的匹配短语
|
||||
选项名可以用完整版本,也可以用缩略版本。
|
||||
|
||||
7. 在选项前加上 no 可以关闭选项: :set noic
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲第一节:获取帮助信息
|
||||
|
||||
|
||||
** 使用在线帮助系统 **
|
||||
|
||||
Vim 拥有一个细致全面的在线帮助系统。要启动该帮助系统,请选择如下三种方
|
||||
法之一:
|
||||
- 按下 <HELP> 键 (如果键盘上有的话)
|
||||
- 按下 <F1> 键 (如果键盘上有的话)
|
||||
- 输入 :help <回车>
|
||||
|
||||
请阅读帮助窗口中的文字以了解帮助是如何工作的。
|
||||
输入 CTRL-W CTRL-W 可以使您在窗口之间跳转。
|
||||
输入 :q <回车> 可以关闭帮助窗口。
|
||||
|
||||
提供一个正确的参数给":help"命令,您可以找到关于该主题的帮助。请试验以
|
||||
下参数(可别忘了按回车键哦):
|
||||
|
||||
:help w
|
||||
:help c_CTRL-D
|
||||
:help insert-index
|
||||
:help user-manual
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲第二节:创建启动脚本
|
||||
|
||||
|
||||
** 启用 Vim 的特性 **
|
||||
|
||||
Vim 的功能特性要比 Vi 多得多,但其中大部分都没有缺省启用。为了使用更多的
|
||||
特性,您得创建一个 vimrc 文件。
|
||||
|
||||
1. 开始编辑 vimrc 文件,具体命令取决于您所使用的操作系统:
|
||||
:edit ~/.vimrc 这是 Unix 系统所使用的命令
|
||||
:edit $VIM/_vimrc 这是 MS-Windows 系统所使用的命令
|
||||
|
||||
2. 接着读取 vimrc 示例文件的内容:
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
|
||||
3. 保存文件,命令为:
|
||||
:write
|
||||
|
||||
下次您启动 Vim 时,编辑器就会有了语法高亮的功能。
|
||||
您可以把您喜欢的各种设置添加到这个 vimrc 文件中。
|
||||
要了解更多信息请输入 :help vimrc-intro
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲第三节:补全功能
|
||||
|
||||
|
||||
** 使用 CTRL-D 和 <TAB> 可以进行命令行补全 **
|
||||
|
||||
1. 请确保 Vim 不是在以兼容模式运行: :set nocp
|
||||
|
||||
2. 查看一下当前目录下已经存在哪些文件,输入: :!ls 或者 :!dir
|
||||
|
||||
3. 现在输入一个目录的起始部分,例如输入: :e
|
||||
|
||||
4. 接着按 CTRL-D 键,Vim 会显示以 e 开始的命令的列表。
|
||||
|
||||
5. 然后按 <TAB> 键,Vim 会补全命令为 :edit 。
|
||||
|
||||
6. 现在添加一个空格,以及一个已有文件的文件名的起始部分,例如: :edit FIL
|
||||
|
||||
7. 接着按 <TAB> 键,Vim 会补全文件名(如果它是惟一匹配的)。
|
||||
|
||||
提示:补全对于许多命令都有效。您只需尝试按 CTRL-D 和 <TAB>。
|
||||
它对于 :help 命令非常有用。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲小结
|
||||
|
||||
|
||||
1. 输入 :help 或者按 <F1> 键或 <Help> 键可以打开帮助窗口。
|
||||
|
||||
2. 输入 :help cmd 可以找到关于 cmd 命令的帮助。
|
||||
|
||||
3. 输入 CTRL-W CTRL-W 可以使您在窗口之间跳转。
|
||||
|
||||
4. 输入 :q 以关闭帮助窗口
|
||||
|
||||
5. 您可以创建一个 vimrc 启动脚本文件用来保存您偏好的设置。
|
||||
|
||||
6. 当输入 : 命令时,按 CTRL-D 可以查看可能的补全结果。
|
||||
按 <TAB> 可以使用一个补全。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
vim 教程到此就结束了。本教程只是为了简明地介绍一下 Vim 编辑器,但已足以让您
|
||||
很容易使用这个编辑器了。毋庸质疑,vim还有很多很多的命令,本教程所介
|
||||
绍的距离完整的差得很远。所以您要精通的话,还望继续努力哦。下一步您可以阅读
|
||||
Vim 的用户手册,使用的命令是: :help user-manual
|
||||
|
||||
下面这本书值得推荐用于更进一步的阅读和学习:
|
||||
Vim - Vi Improved - 作者:Steve Oualline
|
||||
出版社:New Riders
|
||||
这是第一本完全讲解 Vim 的书籍。它对于初学者特别有用。其中包含有大量实例
|
||||
和图示。
|
||||
欲知详情,请访问 http://iccf-holland.org/click5.html
|
||||
|
||||
以下这本书比较老了而且内容更多是关于 Vi 而非 Vim,但是也值得推荐:
|
||||
Learning the Vi Editor - 作者:Linda Lamb
|
||||
出版社:O'Reilly & Associates Inc.
|
||||
这是一本不错的书,通过它您几乎能够了解到任何您想要使用 Vi 做的事情。
|
||||
此书的第六个版本也包含了一些关于 Vim 的信息。
|
||||
|
||||
本教程是由来自 Calorado School of Mines 的 Michael C. Pierce 和
|
||||
Robert K. Ware 所编写的,其中很多创意由来自 Colorado State University 的
|
||||
Charles Smith 提供。编者的电子邮箱是:bware@mines.colorado.edu
|
||||
|
||||
本教程已由 Bram Moolenaar 专为 Vim 进行修订。
|
||||
|
||||
译制者附言:
|
||||
===========
|
||||
简体中文教程翻译版之译制者为梁昌泰 <beos@turbolinux.com.cn>,还有
|
||||
另外一个联系地址:linuxrat@gnuchina.org。
|
||||
|
||||
繁体中文教程是从简体中文教程翻译版使用 Debian GNU/Linux 中文项目小
|
||||
组的于广辉先生编写的中文汉字转码器 autoconvert 转换而成的,并对转
|
||||
换的结果做了一些细节的改动。
|
||||
|
||||
变更记录:
|
||||
=========
|
||||
2012年10月01日 赵涛 <alick9188@gmail.com>
|
||||
将 vimtutor 中译版从 1.5 升级到 1.7。
|
||||
|
||||
2002年08月30日 梁昌泰 <beos@turbolinux.com.cn>
|
||||
感谢 RMS@SMTH 的指正,将多处错误修正。
|
||||
|
||||
2002年04月22日 梁昌泰 <linuxrat@gnuchina.org>
|
||||
感谢 xuandong@sh163.net 的指正,将两处错别字修正。
|
||||
|
||||
2002年03月18日 梁昌泰 <linuxrat@gnuchina.org>
|
||||
根据Bram Molenaar先生在2002年03月16日的来信要求,将vimtutor1.4中译
|
||||
版升级到vimtutor1.5。
|
||||
|
||||
2001年11月15日 梁昌泰 <linuxrat@gnuchina.org>
|
||||
将vimtutor1.4中译版提交给Bram Molenaar和Sven Guckes。
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -45,6 +45,10 @@ Visual Studio
|
||||
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, and VS 2008)
|
||||
is straightforward. (These instructions should also work for VS 4 and VS 5.)
|
||||
|
||||
Using VS C++ 2008 Express is recommended, the binaries build with that run on
|
||||
nearly all platforms. Binaries from later versions may not run on Windows 95
|
||||
or XP.
|
||||
|
||||
To build Vim from the command line with MSVC, use Make_mvc.mak.
|
||||
Visual Studio installed a batch file called vcvars32.bat, which you must
|
||||
run to set up paths for nmake and MSVC.
|
||||
@@ -172,6 +176,10 @@ This includes the IDE and the debugger.
|
||||
To set the environment execute the msvc2008.bat script. You can then build
|
||||
Vim with Make_mvc.mak.
|
||||
|
||||
For building 64 bit binaries you also need to install the SDK:
|
||||
"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1"
|
||||
You don't need the examples and documentation.
|
||||
|
||||
|
||||
Visual C++ 2010 Express Edition *msvc-2010-express*
|
||||
-------------------------------
|
||||
@@ -296,10 +304,12 @@ Now you have created the Windows binary from your Linux box! Have fun...
|
||||
6. Building with Python support
|
||||
===============================
|
||||
|
||||
(written by Ron Aaron: <ronaharon@yahoo.com>)
|
||||
For building with MSVC 2008 the "Windows Installer" from www.python.org
|
||||
works fine.
|
||||
|
||||
This has been tested with the mingw32 compiler, and the ActiveState
|
||||
ActivePython:
|
||||
(rest written by Ron Aaron: <ronaharon@yahoo.com>)
|
||||
|
||||
Building with the mingw32 compiler, and the ActiveState ActivePython:
|
||||
http://www.ActiveState.com/Products/ActivePython/
|
||||
|
||||
After installing the ActivePython, you will have to create a 'mingw32'
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
# Makefile for VIM on Win32, using 'EGCS/mingw32 1.1.2'.
|
||||
# Makefile for VIM on Win32
|
||||
#
|
||||
# Info at http://www.mingw.org
|
||||
# Also requires 'GNU make 3.77', which you can get through a link
|
||||
# to 'JanJaap's page from the above page.
|
||||
# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
|
||||
# Also requires GNU make, which you can download from the same sites.
|
||||
# Get missing libraries from http://gnuwin32.sf.net.
|
||||
#
|
||||
# Tested on Win32 NT 4 and Win95.
|
||||
#
|
||||
# To make everything, just 'make -f Make_ming.mak'
|
||||
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'
|
||||
# After a run, you can 'make -f Make_ming.mak clean' to clean up
|
||||
# To make everything, just 'make -f Make_ming.mak'.
|
||||
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
|
||||
# After a run, you can 'make -f Make_ming.mak clean' to clean up.
|
||||
#
|
||||
# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
|
||||
# it's just run out of memory or something. Run again, and it will continue
|
||||
@@ -20,8 +21,8 @@
|
||||
# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
|
||||
# http://www.matcode.com/mpress.htm
|
||||
#
|
||||
# Maintained by Ron Aaron <ronaharon@yahoo.com>
|
||||
# updated 2003 Jan 20
|
||||
# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
|
||||
# Updated 2012 Sep 5.
|
||||
|
||||
#>>>>> choose options:
|
||||
# set to yes for a debug build
|
||||
@@ -31,32 +32,33 @@ OPTIMIZE=MAXSPEED
|
||||
# set to yes to make gvim, no for vim
|
||||
GUI=yes
|
||||
# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
|
||||
# set to TINY to make minimal version (few features)
|
||||
# Set to TINY to make minimal version (few features).
|
||||
FEATURES=BIG
|
||||
# set to one of i386, i486, i586, i686 as the minimum target processor
|
||||
# Set to one of i386, i486, i586, i686 as the minimum target processor.
|
||||
# For amd64/x64 architecture set ARCH=x86-64 .
|
||||
ARCH=i386
|
||||
# set to yes to cross-compile from unix; no=native Windows
|
||||
# Set to yes to cross-compile from unix; no=native Windows.
|
||||
CROSS=no
|
||||
# set to path to iconv.h and libiconv.a to enable using 'iconv.dll'
|
||||
# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
|
||||
#ICONV="."
|
||||
ICONV=yes
|
||||
GETTEXT=yes
|
||||
# set to yes to include multibyte support
|
||||
# Set to yes to include multibyte support.
|
||||
MBYTE=yes
|
||||
# set to yes to include IME support
|
||||
# Set to yes to include IME support.
|
||||
IME=yes
|
||||
DYNAMIC_IME=yes
|
||||
# set to yes to enable writing a postscript file with :hardcopy
|
||||
# Set to yes to enable writing a postscript file with :hardcopy.
|
||||
POSTSCRIPT=no
|
||||
# set to yes to enable OLE support
|
||||
# Set to yes to enable OLE support.
|
||||
OLE=no
|
||||
# Set the default $(WINVER) to make it work with pre-Win2k
|
||||
# Set the default $(WINVER) to make it work with pre-Win2k.
|
||||
ifndef WINVER
|
||||
WINVER = 0x0500
|
||||
endif
|
||||
# Set to yes to enable Cscope support
|
||||
# Set to yes to enable Cscope support.
|
||||
CSCOPE=yes
|
||||
# Set to yes to enable Netbeans support
|
||||
# Set to yes to enable Netbeans support.
|
||||
NETBEANS=$(GUI)
|
||||
|
||||
|
||||
@@ -431,11 +433,32 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef XPM
|
||||
# Only allow XPM for a GUI build.
|
||||
ifeq (yes, $(GUI))
|
||||
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
|
||||
|
||||
ifndef XPM
|
||||
ifeq ($(ARCH),i386)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),i486)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),i586)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),i686)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),x86-64)
|
||||
XPM = xpm/x64
|
||||
endif
|
||||
endif
|
||||
ifdef XPM
|
||||
ifneq ($(XPM),no)
|
||||
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),yes)
|
||||
@@ -565,10 +588,10 @@ TARGET := gvim$(DEBUG_SUFFIX).exe
|
||||
DEFINES += $(DEF_GUI)
|
||||
OBJ += $(GUIOBJ)
|
||||
LFLAGS += -mwindows
|
||||
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
|
||||
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
else
|
||||
TARGET := vim$(DEBUG_SUFFIX).exe
|
||||
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
|
||||
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
endif
|
||||
|
||||
ifdef GETTEXT
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
|
||||
# and Win64, using the Microsoft Visual C++ compilers. Known to work with
|
||||
# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005),
|
||||
# VC9 (VS2008), and VC10 (VS2010).
|
||||
# VC9 (VS2008), VC10 (VS2010) and VC11 (VS2012)
|
||||
#
|
||||
# To build using other Windows compilers, see INSTALLpc.txt
|
||||
#
|
||||
@@ -15,6 +15,9 @@
|
||||
# This will build the console version of Vim with no additional interfaces.
|
||||
# To add features, define any of the following:
|
||||
#
|
||||
# For MSVC 11 you need to specify where the Win32.mak file is, e.g.:
|
||||
# SDK_INCLUDE_DIR="C:\Program Files\Microsoft SDKs\Windows\v7.1\Include"
|
||||
#
|
||||
# !!!! After changing features do "nmake clean" first !!!!
|
||||
#
|
||||
# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
|
||||
@@ -213,6 +216,7 @@ CPU = i386
|
||||
# We're on Windows 95
|
||||
CPU = i386
|
||||
!endif # !PROCESSOR_ARCHITECTURE
|
||||
OBJDIR = $(OBJDIR)$(CPU)
|
||||
|
||||
# Build a retail version by default
|
||||
|
||||
@@ -226,7 +230,12 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
|
||||
|
||||
# Get all sorts of useful, standard macros from the Platform SDK.
|
||||
|
||||
!ifdef SDK_INCLUDE_DIR
|
||||
!include $(SDK_INCLUDE_DIR)\Win32.mak
|
||||
!else
|
||||
!include <Win32.mak>
|
||||
!endif
|
||||
|
||||
|
||||
# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
|
||||
WP64CHECK = /Wp64
|
||||
@@ -283,10 +292,12 @@ NETBEANS_LIB = WSock32.lib
|
||||
|
||||
!ifndef XPM
|
||||
# XPM is not set, use the included xpm files, depending on the architecture.
|
||||
!if ("$(CPU)" == "AMD64") || ("$(CPU)" == "IA64")
|
||||
!if "$(CPU)" == "AMD64"
|
||||
XPM = xpm\x64
|
||||
!else
|
||||
!elseif "$(CPU)" == "i386"
|
||||
XPM = xpm\x86
|
||||
!else
|
||||
XPM = no
|
||||
!endif
|
||||
!endif
|
||||
!if "$(XPM)" != "no"
|
||||
@@ -392,6 +403,9 @@ MSVCVER = 10.0
|
||||
!if "$(_NMAKE_VER)" == "10.00.30319.01"
|
||||
MSVCVER = 10.0
|
||||
!endif
|
||||
!if "$(_NMAKE_VER)" == "11.00.50727.1"
|
||||
MSVCVER = 11.0
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Abort bulding VIM if version of VC is unrecognised.
|
||||
@@ -406,7 +420,7 @@ MSVCVER = 10.0
|
||||
!endif
|
||||
|
||||
# Convert processor ID to MVC-compatible number
|
||||
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0")
|
||||
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0")
|
||||
!if "$(CPUNR)" == "i386"
|
||||
CPUARG = /G3
|
||||
!elseif "$(CPUNR)" == "i486"
|
||||
@@ -440,7 +454,7 @@ OPTFLAG = /O2
|
||||
OPTFLAG = /Ox
|
||||
!endif
|
||||
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0")
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
|
||||
# Use link time code generation if not worried about size
|
||||
!if "$(OPTIMIZE)" != "SPACE"
|
||||
OPTFLAG = $(OPTFLAG) /GL
|
||||
@@ -905,7 +919,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
|
||||
|
||||
# Report link time code generation progress if used.
|
||||
!ifdef NODEBUG
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0")
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
|
||||
!if "$(OPTIMIZE)" != "SPACE"
|
||||
LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
|
||||
!endif
|
||||
|
||||
95
src/auto/configure
vendored
95
src/auto/configure
vendored
@@ -4648,15 +4648,7 @@ $as_echo "not set, default to /usr" >&6; }
|
||||
|
||||
LUA_INC=
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
# Extract the first word of "lua", so it can be a program name with args.
|
||||
# Extract the first word of "lua", so it can be a program name with args.
|
||||
set dummy lua; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
@@ -4696,8 +4688,8 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
|
||||
$as_echo_n "checking Lua version... " >&6; }
|
||||
if test "${vi_cv_version_lua+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -4706,23 +4698,31 @@ else
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua" >&5
|
||||
$as_echo "$vi_cv_version_lua" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
if test "X$vi_cv_version_lua" != "X"; then
|
||||
if test "X$LUA_INC" != "X"; then
|
||||
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
|
||||
else
|
||||
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
|
||||
@@ -4734,16 +4734,21 @@ $as_echo "no" >&6; }
|
||||
$as_echo "#define FEAT_LUA 1" >>confdefs.h
|
||||
|
||||
if test "$enable_luainterp" = "dynamic"; then
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
|
||||
vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
|
||||
else
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
vi_cv_dll_name_lua="liblua${vi_cv_version_lua}.so$LUA_SONAME"
|
||||
fi
|
||||
$as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
|
||||
|
||||
LUA_LIBS=""
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so$LUA_SONAME\\\" $LUA_CFLAGS"
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test "$fail_if_missing" = "yes" -a -z "$LUA_SRC"; then
|
||||
@@ -5330,6 +5335,7 @@ __:
|
||||
@echo "python_LIBS='$(LIBS)'"
|
||||
@echo "python_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
|
||||
@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
@@ -5350,6 +5356,9 @@ eof
|
||||
fi
|
||||
|
||||
|
||||
if test "X$python_DLLLIBRARY" != "X"; then
|
||||
python_INSTSONAME="$python_DLLLIBRARY"
|
||||
fi
|
||||
PYTHON_LIBS="${vi_cv_path_python_plibs}"
|
||||
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
|
||||
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
|
||||
@@ -5633,6 +5642,7 @@ __:
|
||||
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
||||
@echo "python3_LIBS='$(LIBS)'"
|
||||
@echo "python3_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
@@ -5645,6 +5655,9 @@ eof
|
||||
fi
|
||||
|
||||
|
||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||
python3_INSTSONAME="$python3_DLLLIBRARY"
|
||||
fi
|
||||
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
||||
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
@@ -6319,26 +6332,34 @@ $as_echo_n "checking Ruby version... " >&6; }
|
||||
if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
|
||||
$as_echo "OK" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
|
||||
$as_echo_n "checking Ruby rbconfig... " >&6; }
|
||||
ruby_rbconfig="RbConfig"
|
||||
if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
|
||||
ruby_rbconfig="Config"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
|
||||
$as_echo "$ruby_rbconfig" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
|
||||
$as_echo_n "checking Ruby header files... " >&6; }
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
|
||||
if test "X$rubyhdrdir" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
|
||||
$as_echo "$rubyhdrdir" >&6; }
|
||||
RUBY_CFLAGS="-I$rubyhdrdir"
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'`
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"`
|
||||
if test -d "$rubyhdrdir/$rubyarch"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
|
||||
fi
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'`
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
|
||||
if test "X$rubylibs" != "X"; then
|
||||
RUBY_LIBS="$rubylibs"
|
||||
fi
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
|
||||
if test -f "$rubylibdir/$librubya"; then
|
||||
librubyarg="$librubyarg"
|
||||
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
|
||||
@@ -6350,7 +6371,7 @@ $as_echo "$rubyhdrdir" >&6; }
|
||||
if test "X$librubyarg" != "X"; then
|
||||
RUBY_LIBS="$librubyarg $RUBY_LIBS"
|
||||
fi
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
@@ -6363,7 +6384,7 @@ $as_echo "$rubyhdrdir" >&6; }
|
||||
$as_echo "#define FEAT_RUBY 1" >>confdefs.h
|
||||
|
||||
if test "$enable_rubyinterp" = "dynamic"; then
|
||||
libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG["RUBY_SO_NAME"], Config::CONFIG["DLEXT"]'`
|
||||
libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
|
||||
$as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
|
||||
|
||||
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
|
||||
|
||||
51
src/buffer.c
51
src/buffer.c
@@ -2635,7 +2635,7 @@ buflist_list(eap)
|
||||
continue;
|
||||
msg_putchar('\n');
|
||||
if (buf_spname(buf) != NULL)
|
||||
STRCPY(NameBuff, buf_spname(buf));
|
||||
vim_strncpy(NameBuff, buf_spname(buf), MAXPATHL - 1);
|
||||
else
|
||||
home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE);
|
||||
|
||||
@@ -3058,7 +3058,7 @@ fileinfo(fullname, shorthelp, dont_truncate)
|
||||
|
||||
*p++ = '"';
|
||||
if (buf_spname(curbuf) != NULL)
|
||||
STRCPY(p, buf_spname(curbuf));
|
||||
vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
|
||||
else
|
||||
{
|
||||
if (!fullname && curbuf->b_fname != NULL)
|
||||
@@ -3234,12 +3234,15 @@ maketitle()
|
||||
{
|
||||
/* format: "fname + (path) (1 of 2) - VIM" */
|
||||
|
||||
#define SPACE_FOR_FNAME (IOSIZE - 100)
|
||||
#define SPACE_FOR_DIR (IOSIZE - 20)
|
||||
#define SPACE_FOR_ARGNR (IOSIZE - 10) /* at least room for " - VIM" */
|
||||
if (curbuf->b_fname == NULL)
|
||||
vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100);
|
||||
vim_strncpy(buf, (char_u *)_("[No Name]"), SPACE_FOR_FNAME);
|
||||
else
|
||||
{
|
||||
p = transstr(gettail(curbuf->b_fname));
|
||||
vim_strncpy(buf, p, IOSIZE - 100);
|
||||
vim_strncpy(buf, p, SPACE_FOR_FNAME);
|
||||
vim_free(p);
|
||||
}
|
||||
|
||||
@@ -3263,7 +3266,7 @@ maketitle()
|
||||
buf[off++] = ' ';
|
||||
buf[off++] = '(';
|
||||
home_replace(curbuf, curbuf->b_ffname,
|
||||
buf + off, IOSIZE - off, TRUE);
|
||||
buf + off, SPACE_FOR_DIR - off, TRUE);
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
/* avoid "c:/name" to be reduced to "c" */
|
||||
if (isalpha(buf[off]) && buf[off + 1] == ':')
|
||||
@@ -3274,18 +3277,28 @@ maketitle()
|
||||
if (p == buf + off)
|
||||
/* must be a help buffer */
|
||||
vim_strncpy(buf + off, (char_u *)_("help"),
|
||||
(size_t)(IOSIZE - off - 1));
|
||||
(size_t)(SPACE_FOR_DIR - off - 1));
|
||||
else
|
||||
*p = NUL;
|
||||
|
||||
/* translate unprintable chars */
|
||||
p = transstr(buf + off);
|
||||
vim_strncpy(buf + off, p, (size_t)(IOSIZE - off - 1));
|
||||
vim_free(p);
|
||||
/* Translate unprintable chars and concatenate. Keep some
|
||||
* room for the server name. When there is no room (very long
|
||||
* file name) use (...). */
|
||||
if (off < SPACE_FOR_DIR)
|
||||
{
|
||||
p = transstr(buf + off);
|
||||
vim_strncpy(buf + off, p, (size_t)(SPACE_FOR_DIR - off));
|
||||
vim_free(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
vim_strncpy(buf + off, (char_u *)"...",
|
||||
(size_t)(SPACE_FOR_ARGNR - off));
|
||||
}
|
||||
STRCAT(buf, ")");
|
||||
}
|
||||
|
||||
append_arg_number(curwin, buf, IOSIZE, FALSE);
|
||||
append_arg_number(curwin, buf, SPACE_FOR_ARGNR, FALSE);
|
||||
|
||||
#if defined(FEAT_CLIENTSERVER)
|
||||
if (serverName != NULL)
|
||||
@@ -3337,7 +3350,7 @@ maketitle()
|
||||
else
|
||||
{
|
||||
if (buf_spname(curbuf) != NULL)
|
||||
i_name = (char_u *)buf_spname(curbuf);
|
||||
i_name = buf_spname(curbuf);
|
||||
else /* use file name only in icon */
|
||||
i_name = gettail(curbuf->b_ffname);
|
||||
*i_str = NUL;
|
||||
@@ -3753,7 +3766,7 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar,
|
||||
case STL_FILENAME:
|
||||
fillable = FALSE; /* don't change ' ' to fillchar */
|
||||
if (buf_spname(wp->w_buffer) != NULL)
|
||||
STRCPY(NameBuff, buf_spname(wp->w_buffer));
|
||||
vim_strncpy(NameBuff, buf_spname(wp->w_buffer), MAXPATHL - 1);
|
||||
else
|
||||
{
|
||||
t = (opt == STL_FULLPATH) ? wp->w_buffer->b_ffname
|
||||
@@ -5231,7 +5244,7 @@ write_viminfo_bufferlist(fp)
|
||||
* Return special buffer name.
|
||||
* Returns NULL when the buffer has a normal file name.
|
||||
*/
|
||||
char *
|
||||
char_u *
|
||||
buf_spname(buf)
|
||||
buf_T *buf;
|
||||
{
|
||||
@@ -5250,9 +5263,9 @@ buf_spname(buf)
|
||||
goto win_found;
|
||||
win_found:
|
||||
if (win != NULL && win->w_llist_ref != NULL)
|
||||
return _(msg_loclist);
|
||||
return (char_u *)_(msg_loclist);
|
||||
else
|
||||
return _(msg_qflist);
|
||||
return (char_u *)_(msg_qflist);
|
||||
}
|
||||
#endif
|
||||
#ifdef FEAT_QUICKFIX
|
||||
@@ -5261,12 +5274,12 @@ win_found:
|
||||
if (bt_nofile(buf))
|
||||
{
|
||||
if (buf->b_sfname != NULL)
|
||||
return (char *)buf->b_sfname;
|
||||
return _("[Scratch]");
|
||||
return buf->b_sfname;
|
||||
return (char_u *)_("[Scratch]");
|
||||
}
|
||||
#endif
|
||||
if (buf->b_fname == NULL)
|
||||
return _("[No Name]");
|
||||
return (char_u *)_("[No Name]");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -455,31 +455,31 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
|
||||
|
||||
LUA_INC=
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
dnl -- try to find Lua executable
|
||||
AC_PATH_PROG(vi_cv_path_lua, lua)
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
dnl -- find Lua version
|
||||
AC_CACHE_CHECK(Lua version, vi_cv_version_lua,
|
||||
[ vi_cv_version_lua=`${vi_cv_path_lua} -e "print(_VERSION)" | sed 's/.* //'` ])
|
||||
fi
|
||||
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include)
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
dnl -- try to find Lua executable
|
||||
AC_PATH_PROG(vi_cv_path_lua, lua)
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
dnl -- find Lua version
|
||||
AC_CACHE_CHECK(Lua version, vi_cv_version_lua,
|
||||
[ vi_cv_version_lua=`${vi_cv_path_lua} -e "print(_VERSION)" | sed 's/.* //'` ])
|
||||
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
if test "X$vi_cv_version_lua" != "X"; then
|
||||
if test "X$LUA_INC" != "X"; then
|
||||
dnl Test alternate location using version
|
||||
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
|
||||
else
|
||||
@@ -491,17 +491,22 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
|
||||
LUA_PRO="if_lua.pro"
|
||||
AC_DEFINE(FEAT_LUA)
|
||||
if test "$enable_luainterp" = "dynamic"; then
|
||||
dnl Determine the SONAME for the current version, but fallback to
|
||||
dnl liblua${vi_cv_version_lua}.so if no SONAME-versioned file is found.
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
|
||||
vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
|
||||
else
|
||||
dnl Determine the SONAME for the current version, but fallback to
|
||||
dnl liblua${vi_cv_version_lua}.so if no SONAME-versioned file is found.
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
vi_cv_dll_name_lua="liblua${vi_cv_version_lua}.so$LUA_SONAME"
|
||||
fi
|
||||
AC_DEFINE(DYNAMIC_LUA)
|
||||
LUA_LIBS=""
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so$LUA_SONAME\\\" $LUA_CFLAGS"
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test "$fail_if_missing" = "yes" -a -z "$LUA_SRC"; then
|
||||
@@ -889,6 +894,7 @@ __:
|
||||
@echo "python_LIBS='$(LIBS)'"
|
||||
@echo "python_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
|
||||
@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
@@ -909,6 +915,9 @@ eof
|
||||
fi
|
||||
])
|
||||
|
||||
if test "X$python_DLLLIBRARY" != "X"; then
|
||||
python_INSTSONAME="$python_DLLLIBRARY"
|
||||
fi
|
||||
PYTHON_LIBS="${vi_cv_path_python_plibs}"
|
||||
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
|
||||
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
|
||||
@@ -1082,6 +1091,7 @@ __:
|
||||
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
||||
@echo "python3_LIBS='$(LIBS)'"
|
||||
@echo "python3_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
@@ -1094,6 +1104,9 @@ eof
|
||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
||||
])
|
||||
|
||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||
python3_INSTSONAME="$python3_DLLLIBRARY"
|
||||
fi
|
||||
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
||||
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
@@ -1429,24 +1442,30 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
AC_MSG_CHECKING(Ruby version)
|
||||
if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
|
||||
AC_MSG_RESULT(OK)
|
||||
AC_MSG_CHECKING(Ruby rbconfig)
|
||||
ruby_rbconfig="RbConfig"
|
||||
if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
|
||||
ruby_rbconfig="Config"
|
||||
fi
|
||||
AC_MSG_RESULT($ruby_rbconfig)
|
||||
AC_MSG_CHECKING(Ruby header files)
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG[['rubyhdrdir']] || $ruby_rbconfig::CONFIG[['archdir']] || \\$hdrdir" 2>/dev/null`
|
||||
if test "X$rubyhdrdir" != "X"; then
|
||||
AC_MSG_RESULT($rubyhdrdir)
|
||||
RUBY_CFLAGS="-I$rubyhdrdir"
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["arch"]]'`
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['arch']]"`
|
||||
if test -d "$rubyhdrdir/$rubyarch"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
|
||||
fi
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["ruby_version"]].gsub(/\./, "")[[0,2]]'`
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'`
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['LIBS']]"`
|
||||
if test "X$rubylibs" != "X"; then
|
||||
RUBY_LIBS="$rubylibs"
|
||||
fi
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBY_A"]])'`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBYARG']])"`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBY_A']])"`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['libdir']])"`
|
||||
if test -f "$rubylibdir/$librubya"; then
|
||||
librubyarg="$librubyarg"
|
||||
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
|
||||
@@ -1459,7 +1478,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
if test "X$librubyarg" != "X"; then
|
||||
RUBY_LIBS="$librubyarg $RUBY_LIBS"
|
||||
fi
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'`
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['LDFLAGS']]"`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should only
|
||||
dnl be included if requested by passing --with-mac-arch to
|
||||
@@ -1474,7 +1493,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
RUBY_PRO="if_ruby.pro"
|
||||
AC_DEFINE(FEAT_RUBY)
|
||||
if test "$enable_rubyinterp" = "dynamic"; then
|
||||
libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG[["RUBY_SO_NAME"]], Config::CONFIG[["DLEXT"]]'`
|
||||
libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_SO']]"`
|
||||
AC_DEFINE(DYNAMIC_RUBY)
|
||||
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
|
||||
RUBY_LIBS=
|
||||
|
||||
@@ -4194,8 +4194,8 @@ ins_compl_get_exp(ini)
|
||||
ins_buf->b_fname == NULL
|
||||
? buf_spname(ins_buf)
|
||||
: ins_buf->b_sfname == NULL
|
||||
? (char *)ins_buf->b_fname
|
||||
: (char *)ins_buf->b_sfname);
|
||||
? ins_buf->b_fname
|
||||
: ins_buf->b_sfname);
|
||||
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
||||
}
|
||||
else if (*e_cpt == NUL)
|
||||
|
||||
@@ -4851,7 +4851,7 @@ do_sub(eap)
|
||||
#ifdef FEAT_EVAL
|
||||
if (do_count)
|
||||
{
|
||||
/* prevent accidently changing the buffer by a function */
|
||||
/* prevent accidentally changing the buffer by a function */
|
||||
save_ma = curbuf->b_p_ma;
|
||||
curbuf->b_p_ma = FALSE;
|
||||
sandbox++;
|
||||
@@ -5264,7 +5264,7 @@ do_sub_msg(count_only)
|
||||
* is assumed to be 'p' if missing.
|
||||
*
|
||||
* This is implemented in two passes: first we scan the file for the pattern and
|
||||
* set a mark for each line that (not) matches. secondly we execute the command
|
||||
* set a mark for each line that (not) matches. Secondly we execute the command
|
||||
* for each line that has a mark. This is required because after deleting
|
||||
* lines we do not know where to search for the next match.
|
||||
*/
|
||||
@@ -5896,9 +5896,14 @@ find_help_tags(arg, num_matches, matches, keep_lang)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* replace "[:...:]" with "\[:...:]"; "[+...]" with "\[++...]" */
|
||||
if (arg[0] == '[' && (arg[1] == ':'
|
||||
|| (arg[1] == '+' && arg[2] == '+')))
|
||||
/* Replace:
|
||||
* "[:...:]" with "\[:...:]"
|
||||
* "[++...]" with "\[++...]"
|
||||
* "\{" with "\\{"
|
||||
*/
|
||||
if ((arg[0] == '[' && (arg[1] == ':'
|
||||
|| (arg[1] == '+' && arg[2] == '+')))
|
||||
|| (arg[0] == '\\' && arg[1] == '{'))
|
||||
*d++ = '\\';
|
||||
|
||||
for (s = arg; *s; ++s)
|
||||
|
||||
@@ -1688,8 +1688,7 @@ check_changed_any(hidden)
|
||||
msg_didout = FALSE;
|
||||
}
|
||||
if (EMSG2(_("E162: No write since last change for buffer \"%s\""),
|
||||
buf_spname(buf) != NULL ? (char_u *)buf_spname(buf) :
|
||||
buf->b_fname))
|
||||
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname))
|
||||
{
|
||||
save = no_wait_return;
|
||||
no_wait_return = FALSE;
|
||||
|
||||
@@ -6466,7 +6466,7 @@ ex_colorscheme(eap)
|
||||
#endif
|
||||
}
|
||||
else if (load_colors(eap->arg) == FAIL)
|
||||
EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
|
||||
EMSG2(_("E185: Cannot find color scheme '%s'"), eap->arg);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -7602,7 +7602,7 @@ ex_tabs(eap)
|
||||
msg_putchar(bufIsChanged(wp->w_buffer) ? '+' : ' ');
|
||||
msg_putchar(' ');
|
||||
if (buf_spname(wp->w_buffer) != NULL)
|
||||
STRCPY(IObuff, buf_spname(wp->w_buffer));
|
||||
vim_strncpy(IObuff, buf_spname(wp->w_buffer), IOSIZE - 1);
|
||||
else
|
||||
home_replace(wp->w_buffer, wp->w_buffer->b_fname,
|
||||
IObuff, IOSIZE, TRUE);
|
||||
|
||||
@@ -667,9 +667,10 @@ getcmdline(firstc, count, indent)
|
||||
c = plain_vgetc();
|
||||
--no_mapping;
|
||||
--allow_keys;
|
||||
/* CTRL-\ e doesn't work when obtaining an expression. */
|
||||
if (c != Ctrl_N && c != Ctrl_G
|
||||
&& (c != 'e' || ccline.cmdfirstc == '='))
|
||||
/* CTRL-\ e doesn't work when obtaining an expression, unless it
|
||||
* is in a mapping. */
|
||||
if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
|
||||
|| (ccline.cmdfirstc == '=' && KeyTyped)))
|
||||
{
|
||||
vungetc(c);
|
||||
c = Ctrl_BSL;
|
||||
|
||||
15
src/fileio.c
15
src/fileio.c
@@ -7060,8 +7060,23 @@ buf_check_timestamp(buf, focus)
|
||||
}
|
||||
|
||||
if (reload)
|
||||
{
|
||||
/* Reload the buffer. */
|
||||
buf_reload(buf, orig_mode);
|
||||
#ifdef FEAT_PERSISTENT_UNDO
|
||||
if (buf->b_p_udf && buf->b_ffname != NULL)
|
||||
{
|
||||
char_u hash[UNDO_HASH_SIZE];
|
||||
buf_T *save_curbuf = curbuf;
|
||||
|
||||
/* Any existing undo file is unusable, write it now. */
|
||||
curbuf = buf;
|
||||
u_compute_hash(hash);
|
||||
u_write_undo(NULL, FALSE, buf, hash);
|
||||
curbuf = save_curbuf;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* Trigger FileChangedShell when the file was changed in any way. */
|
||||
|
||||
@@ -37,8 +37,7 @@ static void gui_set_fg_color __ARGS((char_u *name));
|
||||
static void gui_set_bg_color __ARGS((char_u *name));
|
||||
static win_T *xy2win __ARGS((int x, int y));
|
||||
|
||||
#if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) \
|
||||
&& !defined(__APPLE__)
|
||||
#if defined(UNIX) && !defined(MACOS_X) && !defined(__APPLE__)
|
||||
# define MAY_FORK
|
||||
static void gui_do_fork __ARGS((void));
|
||||
|
||||
@@ -784,11 +783,9 @@ error:
|
||||
gui_exit(rc)
|
||||
int rc;
|
||||
{
|
||||
#ifndef __BEOS__
|
||||
/* don't free the fonts, it leads to a BUS error
|
||||
* richard@whitequeen.com Jul 99 */
|
||||
free_highlight_fonts();
|
||||
#endif
|
||||
gui.in_use = FALSE;
|
||||
gui_mch_exit(rc);
|
||||
}
|
||||
|
||||
@@ -464,7 +464,8 @@ luaV_pushtypval(lua_State *L, typval_T *tv)
|
||||
switch (tv->v_type)
|
||||
{
|
||||
case VAR_STRING:
|
||||
lua_pushstring(L, (char *) tv->vval.v_string);
|
||||
lua_pushstring(L, tv->vval.v_string == NULL
|
||||
? "" : (char *)tv->vval.v_string);
|
||||
break;
|
||||
case VAR_NUMBER:
|
||||
lua_pushinteger(L, (int) tv->vval.v_number);
|
||||
|
||||
@@ -2649,7 +2649,8 @@ vim_to_mzscheme(typval_T *vim_value, int depth, Scheme_Hash_Table *visited)
|
||||
new_value = FALSE;
|
||||
else if (vim_value->v_type == VAR_STRING)
|
||||
{
|
||||
result = scheme_make_string((char *)vim_value->vval.v_string);
|
||||
result = scheme_make_string(vim_value->vval.v_string == NULL
|
||||
? "" : (char *)vim_value->vval.v_string);
|
||||
MZ_GC_CHECK();
|
||||
}
|
||||
else if (vim_value->v_type == VAR_NUMBER)
|
||||
|
||||
@@ -155,7 +155,7 @@ typedef int perl_key;
|
||||
# define Perl_set_context dll_Perl_set_context
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# define Perl_sv_2bool_flags dll_Perl_sv_2bool_flags
|
||||
# define Perl_xs_apiversion_bootcheck dll_Perl_xs_apiversion_bootcheck
|
||||
# define Perl_xs_apiversion_bootcheck dll_Perl_xs_apiversion_bootcheck
|
||||
# else
|
||||
# define Perl_sv_2bool dll_Perl_sv_2bool
|
||||
# endif
|
||||
@@ -225,6 +225,9 @@ typedef int perl_key;
|
||||
# define Perl_call_list dll_Perl_call_list
|
||||
# define Perl_Iscopestack_ix_ptr dll_Perl_Iscopestack_ix_ptr
|
||||
# define Perl_Iunitcheckav_ptr dll_Perl_Iunitcheckav_ptr
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# define PL_thr_key *dll_PL_thr_key
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Declare HANDLE for perl.dll and function pointers.
|
||||
@@ -315,6 +318,9 @@ static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*);
|
||||
static void (*Perl_sv_free2)(pTHX_ SV*);
|
||||
static void (*Perl_sys_init)(int* argc, char*** argv);
|
||||
static void (*Perl_sys_term)(void);
|
||||
static void (*Perl_call_list)(pTHX_ I32, AV*);
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
# else
|
||||
static SV** (*Perl_ISv_ptr)(register PerlInterpreter*);
|
||||
static SV*** (*Perl_Istack_max_ptr)(register PerlInterpreter*);
|
||||
static SV*** (*Perl_Istack_base_ptr)(register PerlInterpreter*);
|
||||
@@ -326,16 +332,20 @@ static I32** (*Perl_Imarkstack_ptr_ptr)(register PerlInterpreter*);
|
||||
static I32** (*Perl_Imarkstack_max_ptr)(register PerlInterpreter*);
|
||||
static SV*** (*Perl_Istack_sp_ptr)(register PerlInterpreter*);
|
||||
static OP** (*Perl_Iop_ptr)(register PerlInterpreter*);
|
||||
static void (*Perl_call_list)(pTHX_ I32, AV*);
|
||||
static I32* (*Perl_Iscopestack_ix_ptr)(register PerlInterpreter*);
|
||||
static AV** (*Perl_Iunitcheckav_ptr)(register PerlInterpreter*);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
static perl_key* dll_PL_thr_key;
|
||||
#else
|
||||
static GV** (*Perl_Idefgv_ptr)(register PerlInterpreter*);
|
||||
static GV** (*Perl_Ierrgv_ptr)(register PerlInterpreter*);
|
||||
static SV* (*Perl_Isv_yes_ptr)(register PerlInterpreter*);
|
||||
static void (*boot_DynaLoader)_((pTHX_ CV*));
|
||||
static perl_key* (*Perl_Gthr_key_ptr)_((pTHX));
|
||||
#endif
|
||||
static void (*boot_DynaLoader)_((pTHX_ CV*));
|
||||
|
||||
/*
|
||||
* Table of name to function pointer of perl.
|
||||
@@ -447,6 +457,7 @@ static struct {
|
||||
# endif
|
||||
#endif
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
|
||||
{"PL_thr_key", (PERL_PROC*)&dll_PL_thr_key},
|
||||
#else
|
||||
{"Perl_Idefgv_ptr", (PERL_PROC*)&Perl_Idefgv_ptr},
|
||||
{"Perl_Ierrgv_ptr", (PERL_PROC*)&Perl_Ierrgv_ptr},
|
||||
|
||||
161
src/if_py_both.h
161
src/if_py_both.h
@@ -71,21 +71,41 @@ static struct PyMethodDef OutputMethods[] = {
|
||||
/* Output buffer management
|
||||
*/
|
||||
|
||||
static int
|
||||
OutputSetattr(PyObject *self, char *name, PyObject *val)
|
||||
{
|
||||
if (val == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_AttributeError, _("can't delete OutputObject attributes"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strcmp(name, "softspace") == 0)
|
||||
{
|
||||
if (!PyInt_Check(val))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, _("softspace must be an integer"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
((OutputObject *)(self))->softspace = PyInt_AsLong(val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyErr_SetString(PyExc_AttributeError, _("invalid attribute"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
OutputWrite(PyObject *self, PyObject *args)
|
||||
{
|
||||
int len;
|
||||
Py_ssize_t len = 0;
|
||||
char *str = NULL;
|
||||
int error = ((OutputObject *)(self))->error;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len))
|
||||
return NULL;
|
||||
|
||||
/* TODO: This works around a gcc optimizer problem and avoids Vim
|
||||
* from crashing. Should find a real solution. */
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
Python_Lock_Vim();
|
||||
writer((writefn)(error ? emsg : msg), (char_u *)str, len);
|
||||
@@ -331,7 +351,8 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookupDict)
|
||||
|
||||
if (our_tv->v_type == VAR_STRING)
|
||||
{
|
||||
result = Py_BuildValue("s", our_tv->vval.v_string);
|
||||
result = Py_BuildValue("s", our_tv->vval.v_string == NULL
|
||||
? "" : (char *)our_tv->vval.v_string);
|
||||
}
|
||||
else if (our_tv->v_type == VAR_NUMBER)
|
||||
{
|
||||
@@ -612,6 +633,14 @@ pyll_add(PyObject *self, pylinkedlist_T *ref, pylinkedlist_T **last)
|
||||
|
||||
static PyTypeObject DictionaryType;
|
||||
|
||||
#define DICTKEY_GET_NOTEMPTY(err) \
|
||||
DICTKEY_GET(err) \
|
||||
if (*key == NUL) \
|
||||
{ \
|
||||
PyErr_SetString(PyExc_ValueError, _("empty keys are not allowed")); \
|
||||
return err; \
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PyObject_HEAD
|
||||
@@ -664,7 +693,7 @@ pydict_to_tv(PyObject *obj, typval_T *tv, PyObject *lookupDict)
|
||||
if (valObject == NULL)
|
||||
return -1;
|
||||
|
||||
DICTKEY_GET(-1)
|
||||
DICTKEY_GET_NOTEMPTY(-1)
|
||||
|
||||
di = dictitem_alloc(key);
|
||||
|
||||
@@ -735,7 +764,7 @@ pymap_to_tv(PyObject *obj, typval_T *tv, PyObject *lookupDict)
|
||||
return -1;
|
||||
}
|
||||
|
||||
DICTKEY_GET(-1)
|
||||
DICTKEY_GET_NOTEMPTY(-1)
|
||||
|
||||
valObject = PyTuple_GetItem(litem, 1);
|
||||
if (valObject == NULL)
|
||||
@@ -779,6 +808,44 @@ pymap_to_tv(PyObject *obj, typval_T *tv, PyObject *lookupDict)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyInt
|
||||
DictionarySetattr(DictionaryObject *self, char *name, PyObject *val)
|
||||
{
|
||||
if (val == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_AttributeError, _("Cannot delete DictionaryObject attributes"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strcmp(name, "locked") == 0)
|
||||
{
|
||||
if (self->dict->dv_lock == VAR_FIXED)
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, _("Cannot modify fixed dictionary"));
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PyBool_Check(val))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, _("Only boolean objects are allowed"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (val == Py_True)
|
||||
self->dict->dv_lock = VAR_LOCKED;
|
||||
else
|
||||
self->dict->dv_lock = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
PyErr_SetString(PyExc_AttributeError, _("Cannot set this attribute"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static PyInt
|
||||
DictionaryLength(PyObject *self)
|
||||
{
|
||||
@@ -789,16 +856,22 @@ DictionaryLength(PyObject *self)
|
||||
DictionaryItem(PyObject *self, PyObject *keyObject)
|
||||
{
|
||||
char_u *key;
|
||||
dictitem_T *val;
|
||||
dictitem_T *di;
|
||||
DICTKEY_DECL
|
||||
|
||||
DICTKEY_GET(NULL)
|
||||
DICTKEY_GET_NOTEMPTY(NULL)
|
||||
|
||||
val = dict_find(((DictionaryObject *) (self))->dict, key, -1);
|
||||
di = dict_find(((DictionaryObject *) (self))->dict, key, -1);
|
||||
|
||||
DICTKEY_UNREF
|
||||
|
||||
return ConvertToPyObject(&val->di_tv);
|
||||
if (di == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_IndexError, _("no such key in dictionary"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ConvertToPyObject(&di->di_tv);
|
||||
}
|
||||
|
||||
static PyInt
|
||||
@@ -816,7 +889,7 @@ DictionaryAssItem(PyObject *self, PyObject *keyObject, PyObject *valObject)
|
||||
return -1;
|
||||
}
|
||||
|
||||
DICTKEY_GET(-1)
|
||||
DICTKEY_GET_NOTEMPTY(-1)
|
||||
|
||||
di = dict_find(d, key, -1);
|
||||
|
||||
@@ -826,6 +899,7 @@ DictionaryAssItem(PyObject *self, PyObject *keyObject, PyObject *valObject)
|
||||
|
||||
if (di == NULL)
|
||||
{
|
||||
DICTKEY_UNREF
|
||||
PyErr_SetString(PyExc_IndexError, _("no such key in dictionary"));
|
||||
return -1;
|
||||
}
|
||||
@@ -850,6 +924,7 @@ DictionaryAssItem(PyObject *self, PyObject *keyObject, PyObject *valObject)
|
||||
|
||||
if (dict_add(d, di) == FAIL)
|
||||
{
|
||||
DICTKEY_UNREF
|
||||
vim_free(di);
|
||||
PyErr_SetVim(_("failed to add key to dictionary"));
|
||||
return -1;
|
||||
@@ -1235,6 +1310,44 @@ ListConcatInPlace(PyObject *self, PyObject *obj)
|
||||
return self;
|
||||
}
|
||||
|
||||
static int
|
||||
ListSetattr(ListObject *self, char *name, PyObject *val)
|
||||
{
|
||||
if (val == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_AttributeError, _("Cannot delete DictionaryObject attributes"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strcmp(name, "locked") == 0)
|
||||
{
|
||||
if (self->list->lv_lock == VAR_FIXED)
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, _("Cannot modify fixed list"));
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PyBool_Check(val))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, _("Only boolean objects are allowed"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (val == Py_True)
|
||||
self->list->lv_lock = VAR_LOCKED;
|
||||
else
|
||||
self->list->lv_lock = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
PyErr_SetString(PyExc_AttributeError, _("Cannot set this attribute"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static struct PyMethodDef ListMethods[] = {
|
||||
{"extend", (PyCFunction)ListConcatInPlace, METH_O, ""},
|
||||
{ NULL, NULL, 0, NULL }
|
||||
@@ -2521,8 +2634,10 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookupDict)
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
else if (PyBytes_Check(obj))
|
||||
{
|
||||
char_u *result = (char_u *) PyBytes_AsString(obj);
|
||||
char_u *result;
|
||||
|
||||
if (PyString_AsStringAndSize(obj, (char **) &result, NULL) == -1)
|
||||
return -1;
|
||||
if (result == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -2540,7 +2655,8 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookupDict)
|
||||
if (bytes == NULL)
|
||||
return -1;
|
||||
|
||||
result = (char_u *) PyBytes_AsString(bytes);
|
||||
if(PyString_AsStringAndSize(bytes, (char **) &result, NULL) == -1)
|
||||
return -1;
|
||||
if (result == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -2563,7 +2679,8 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookupDict)
|
||||
if (bytes == NULL)
|
||||
return -1;
|
||||
|
||||
result=(char_u *) PyString_AsString(bytes);
|
||||
if(PyString_AsStringAndSize(bytes, (char **) &result, NULL) == -1)
|
||||
return -1;
|
||||
if (result == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -2578,8 +2695,10 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookupDict)
|
||||
}
|
||||
else if (PyString_Check(obj))
|
||||
{
|
||||
char_u *result = (char_u *) PyString_AsString(obj);
|
||||
char_u *result;
|
||||
|
||||
if(PyString_AsStringAndSize(obj, (char **) &result, NULL) == -1)
|
||||
return -1;
|
||||
if (result == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -2633,7 +2752,8 @@ ConvertToPyObject(typval_T *tv)
|
||||
switch (tv->v_type)
|
||||
{
|
||||
case VAR_STRING:
|
||||
return PyBytes_FromString((char *) tv->vval.v_string);
|
||||
return PyBytes_FromString(tv->vval.v_string == NULL
|
||||
? "" : (char *)tv->vval.v_string);
|
||||
case VAR_NUMBER:
|
||||
return PyLong_FromLong((long) tv->vval.v_number);
|
||||
#ifdef FEAT_FLOAT
|
||||
@@ -2645,7 +2765,8 @@ ConvertToPyObject(typval_T *tv)
|
||||
case VAR_DICT:
|
||||
return DictionaryNew(tv->vval.v_dict);
|
||||
case VAR_FUNC:
|
||||
return FunctionNew(tv->vval.v_string);
|
||||
return FunctionNew(tv->vval.v_string == NULL
|
||||
? (char_u *)"" : tv->vval.v_string);
|
||||
case VAR_UNKNOWN:
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
# undef _XOPEN_SOURCE /* pyconfig.h defines it as well. */
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include <Python.h>
|
||||
#if defined(MACOS) && !defined(MACOS_X_UNIX)
|
||||
# include "macglue.h"
|
||||
@@ -54,6 +52,10 @@
|
||||
#undef main /* Defined in python.h - aargh */
|
||||
#undef HAVE_FCNTL_H /* Clash with os_win32.h */
|
||||
|
||||
#if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000
|
||||
# define PY_SSIZE_T_CLEAN
|
||||
#endif
|
||||
|
||||
static void init_structs(void);
|
||||
|
||||
#define PyBytes_FromString PyString_FromString
|
||||
@@ -161,6 +163,7 @@ struct PyMethodDef { Py_ssize_t a; };
|
||||
# define PyInt_FromLong dll_PyInt_FromLong
|
||||
# define PyLong_AsLong dll_PyLong_AsLong
|
||||
# define PyLong_FromLong dll_PyLong_FromLong
|
||||
# define PyBool_Type (*dll_PyBool_Type)
|
||||
# define PyInt_Type (*dll_PyInt_Type)
|
||||
# define PyLong_Type (*dll_PyLong_Type)
|
||||
# define PyList_GetItem dll_PyList_GetItem
|
||||
@@ -191,6 +194,7 @@ struct PyMethodDef { Py_ssize_t a; };
|
||||
# define PyRun_SimpleString dll_PyRun_SimpleString
|
||||
# define PyRun_String dll_PyRun_String
|
||||
# define PyString_AsString dll_PyString_AsString
|
||||
# define PyString_AsStringAndSize dll_PyString_AsStringAndSize
|
||||
# define PyString_FromString dll_PyString_FromString
|
||||
# define PyString_FromStringAndSize dll_PyString_FromStringAndSize
|
||||
# define PyString_Size dll_PyString_Size
|
||||
@@ -218,6 +222,8 @@ struct PyMethodDef { Py_ssize_t a; };
|
||||
# define _PyObject_NextNotImplemented (*dll__PyObject_NextNotImplemented)
|
||||
# endif
|
||||
# define _Py_NoneStruct (*dll__Py_NoneStruct)
|
||||
# define _Py_ZeroStruct (*dll__Py_ZeroStruct)
|
||||
# define _Py_TrueStruct (*dll__Py_TrueStruct)
|
||||
# define PyObject_Init dll__PyObject_Init
|
||||
# define PyObject_GetIter dll_PyObject_GetIter
|
||||
# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02020000
|
||||
@@ -260,6 +266,7 @@ static long(*dll_PyInt_AsLong)(PyObject *);
|
||||
static PyObject*(*dll_PyInt_FromLong)(long);
|
||||
static long(*dll_PyLong_AsLong)(PyObject *);
|
||||
static PyObject*(*dll_PyLong_FromLong)(long);
|
||||
static PyTypeObject* dll_PyBool_Type;
|
||||
static PyTypeObject* dll_PyInt_Type;
|
||||
static PyTypeObject* dll_PyLong_Type;
|
||||
static PyObject*(*dll_PyList_GetItem)(PyObject *, PyInt);
|
||||
@@ -288,6 +295,7 @@ static PyObject*(*dll_PyModule_GetDict)(PyObject *);
|
||||
static int(*dll_PyRun_SimpleString)(char *);
|
||||
static PyObject *(*dll_PyRun_String)(char *, int, PyObject *, PyObject *);
|
||||
static char*(*dll_PyString_AsString)(PyObject *);
|
||||
static int(*dll_PyString_AsStringAndSize)(PyObject *, char **, int *);
|
||||
static PyObject*(*dll_PyString_FromString)(const char *);
|
||||
static PyObject*(*dll_PyString_FromStringAndSize)(const char *, PyInt);
|
||||
static PyInt(*dll_PyString_Size)(PyObject *);
|
||||
@@ -316,6 +324,8 @@ static PyObject* (*dll_PyObject_GetIter)(PyObject *);
|
||||
static iternextfunc dll__PyObject_NextNotImplemented;
|
||||
# endif
|
||||
static PyObject* dll__Py_NoneStruct;
|
||||
static PyObject* _Py_ZeroStruct;
|
||||
static PyObject* dll__Py_TrueStruct;
|
||||
# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02020000
|
||||
static int (*dll_PyType_IsSubtype)(PyTypeObject *, PyTypeObject *);
|
||||
# endif
|
||||
@@ -356,8 +366,15 @@ static struct
|
||||
PYTHON_PROC *ptr;
|
||||
} python_funcname_table[] =
|
||||
{
|
||||
#ifndef PY_SSIZE_T_CLEAN
|
||||
{"PyArg_Parse", (PYTHON_PROC*)&dll_PyArg_Parse},
|
||||
{"PyArg_ParseTuple", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
|
||||
{"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue},
|
||||
#else
|
||||
{"_PyArg_Parse_SizeT", (PYTHON_PROC*)&dll_PyArg_Parse},
|
||||
{"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
|
||||
{"_Py_BuildValue_SizeT", (PYTHON_PROC*)&dll_Py_BuildValue},
|
||||
#endif
|
||||
{"PyMem_Free", (PYTHON_PROC*)&dll_PyMem_Free},
|
||||
{"PyMem_Malloc", (PYTHON_PROC*)&dll_PyMem_Malloc},
|
||||
{"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString},
|
||||
@@ -378,6 +395,7 @@ static struct
|
||||
{"PyInt_FromLong", (PYTHON_PROC*)&dll_PyInt_FromLong},
|
||||
{"PyLong_AsLong", (PYTHON_PROC*)&dll_PyLong_AsLong},
|
||||
{"PyLong_FromLong", (PYTHON_PROC*)&dll_PyLong_FromLong},
|
||||
{"PyBool_Type", (PYTHON_PROC*)&dll_PyBool_Type},
|
||||
{"PyInt_Type", (PYTHON_PROC*)&dll_PyInt_Type},
|
||||
{"PyLong_Type", (PYTHON_PROC*)&dll_PyLong_Type},
|
||||
{"PyList_GetItem", (PYTHON_PROC*)&dll_PyList_GetItem},
|
||||
@@ -406,6 +424,7 @@ static struct
|
||||
{"PyRun_SimpleString", (PYTHON_PROC*)&dll_PyRun_SimpleString},
|
||||
{"PyRun_String", (PYTHON_PROC*)&dll_PyRun_String},
|
||||
{"PyString_AsString", (PYTHON_PROC*)&dll_PyString_AsString},
|
||||
{"PyString_AsStringAndSize", (PYTHON_PROC*)&dll_PyString_AsStringAndSize},
|
||||
{"PyString_FromString", (PYTHON_PROC*)&dll_PyString_FromString},
|
||||
{"PyString_FromStringAndSize", (PYTHON_PROC*)&dll_PyString_FromStringAndSize},
|
||||
{"PyString_Size", (PYTHON_PROC*)&dll_PyString_Size},
|
||||
@@ -419,7 +438,6 @@ static struct
|
||||
{"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv},
|
||||
{"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type},
|
||||
{"PyType_Ready", (PYTHON_PROC*)&dll_PyType_Ready},
|
||||
{"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue},
|
||||
{"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod},
|
||||
# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 \
|
||||
&& SIZEOF_SIZE_T != SIZEOF_INT
|
||||
@@ -438,6 +456,8 @@ static struct
|
||||
{"_PyObject_NextNotImplemented", (PYTHON_PROC*)&dll__PyObject_NextNotImplemented},
|
||||
# endif
|
||||
{"_Py_NoneStruct", (PYTHON_PROC*)&dll__Py_NoneStruct},
|
||||
{"_Py_ZeroStruct", (PYTHON_PROC*)&dll__Py_ZeroStruct},
|
||||
{"_Py_TrueStruct", (PYTHON_PROC*)&dll__Py_TrueStruct},
|
||||
# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02020000
|
||||
{"PyType_IsSubtype", (PYTHON_PROC*)&dll_PyType_IsSubtype},
|
||||
# endif
|
||||
@@ -578,14 +598,15 @@ static PyTypeObject RangeType;
|
||||
static int initialised = 0;
|
||||
#define PYINITIALISED initialised
|
||||
|
||||
/* Add conversion from PyInt? */
|
||||
#define DICTKEY_GET(err) \
|
||||
if (!PyString_Check(keyObject)) \
|
||||
{ \
|
||||
PyErr_SetString(PyExc_TypeError, _("only string keys are allowed")); \
|
||||
return err; \
|
||||
} \
|
||||
key = (char_u *) PyString_AsString(keyObject);
|
||||
if (PyString_AsStringAndSize(keyObject, (char **) &key, NULL) == -1) \
|
||||
return err;
|
||||
|
||||
#define DICTKEY_UNREF
|
||||
#define DICTKEY_DECL
|
||||
|
||||
@@ -939,31 +960,6 @@ OutputGetattr(PyObject *self, char *name)
|
||||
return Py_FindMethod(OutputMethods, self, name);
|
||||
}
|
||||
|
||||
static int
|
||||
OutputSetattr(PyObject *self, char *name, PyObject *val)
|
||||
{
|
||||
if (val == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_AttributeError, _("can't delete OutputObject attributes"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strcmp(name, "softspace") == 0)
|
||||
{
|
||||
if (!PyInt_Check(val))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, _("softspace must be an integer"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
((OutputObject *)(self))->softspace = PyInt_AsLong(val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyErr_SetString(PyExc_AttributeError, _("invalid attribute"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/***************/
|
||||
|
||||
static int
|
||||
@@ -1025,8 +1021,8 @@ static int CurrentSetattr(PyObject *, char *, PyObject *);
|
||||
|
||||
static PySequenceMethods BufferAsSeq = {
|
||||
(PyInquiry) BufferLength, /* sq_length, len(x) */
|
||||
(binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */
|
||||
(PyIntArgFunc) 0, /* BufferRepeat, */ /* sq_repeat, x*n */
|
||||
(binaryfunc) 0, /* BufferConcat, sq_concat, x+y */
|
||||
(PyIntArgFunc) 0, /* BufferRepeat, sq_repeat, x*n */
|
||||
(PyIntArgFunc) BufferItem, /* sq_item, x[i] */
|
||||
(PyIntIntArgFunc) BufferSlice, /* sq_slice, x[i:j] */
|
||||
(PyIntObjArgProc) BufferAssItem, /* sq_ass_item, x[i]=v */
|
||||
@@ -1576,6 +1572,10 @@ PythonMod_Init(void)
|
||||
PyDict_SetItemString(dict, "buffers", (PyObject *)(void *)&TheBufferList);
|
||||
PyDict_SetItemString(dict, "current", (PyObject *)(void *)&TheCurrent);
|
||||
PyDict_SetItemString(dict, "windows", (PyObject *)(void *)&TheWindowList);
|
||||
PyDict_SetItemString(dict, "VAR_LOCKED", PyInt_FromLong(VAR_LOCKED));
|
||||
PyDict_SetItemString(dict, "VAR_FIXED", PyInt_FromLong(VAR_FIXED));
|
||||
PyDict_SetItemString(dict, "VAR_SCOPE", PyInt_FromLong(VAR_SCOPE));
|
||||
PyDict_SetItemString(dict, "VAR_DEF_SCOPE", PyInt_FromLong(VAR_DEF_SCOPE));
|
||||
|
||||
if (PyErr_Occurred())
|
||||
return -1;
|
||||
@@ -1642,7 +1642,7 @@ static PyTypeObject DictionaryType = {
|
||||
(destructor) DictionaryDestructor,
|
||||
(printfunc) 0,
|
||||
(getattrfunc) DictionaryGetattr,
|
||||
(setattrfunc) 0,
|
||||
(setattrfunc) DictionarySetattr,
|
||||
(cmpfunc) 0,
|
||||
(reprfunc) 0,
|
||||
|
||||
@@ -1669,6 +1669,13 @@ DictionaryDestructor(PyObject *self)
|
||||
static PyObject *
|
||||
DictionaryGetattr(PyObject *self, char *name)
|
||||
{
|
||||
DictionaryObject *this = ((DictionaryObject *) (self));
|
||||
|
||||
if (strcmp(name, "locked") == 0)
|
||||
return PyInt_FromLong(this->dict->dv_lock);
|
||||
else if (strcmp(name, "scope") == 0)
|
||||
return PyInt_FromLong(this->dict->dv_scope);
|
||||
|
||||
return Py_FindMethod(DictionaryMethods, self, name);
|
||||
}
|
||||
|
||||
@@ -1700,7 +1707,7 @@ static PyTypeObject ListType = {
|
||||
(destructor) ListDestructor,
|
||||
(printfunc) 0,
|
||||
(getattrfunc) ListGetattr,
|
||||
(setattrfunc) 0,
|
||||
(setattrfunc) ListSetattr,
|
||||
(cmpfunc) 0,
|
||||
(reprfunc) 0,
|
||||
|
||||
@@ -1727,6 +1734,9 @@ ListDestructor(PyObject *self)
|
||||
static PyObject *
|
||||
ListGetattr(PyObject *self, char *name)
|
||||
{
|
||||
if (strcmp(name, "locked") == 0)
|
||||
return PyInt_FromLong(((ListObject *)(self))->list->lv_lock);
|
||||
|
||||
return Py_FindMethod(ListMethods, self, name);
|
||||
}
|
||||
|
||||
@@ -1787,6 +1797,10 @@ do_pyeval (char_u *str, typval_T *rettv)
|
||||
case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
|
||||
case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
|
||||
case VAR_FUNC: func_ref(rettv->vval.v_string); break;
|
||||
case VAR_UNKNOWN:
|
||||
rettv->v_type = VAR_NUMBER;
|
||||
rettv->vval.v_number = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
195
src/if_python3.c
195
src/if_python3.c
@@ -42,8 +42,6 @@
|
||||
# undef _DEBUG
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#ifdef F_BLANK
|
||||
# undef F_BLANK
|
||||
#endif
|
||||
@@ -66,6 +64,10 @@
|
||||
#undef main /* Defined in python.h - aargh */
|
||||
#undef HAVE_FCNTL_H /* Clash with os_win32.h */
|
||||
|
||||
#if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000
|
||||
# define PY_SSIZE_T_CLEAN
|
||||
#endif
|
||||
|
||||
static void init_structs(void);
|
||||
|
||||
/* The "surrogateescape" error handler is new in Python 3.1 */
|
||||
@@ -85,6 +87,10 @@ static void init_structs(void);
|
||||
#define PyString_AsString(obj) PyBytes_AsString(obj)
|
||||
#define PyString_Size(obj) PyBytes_GET_SIZE(bytes)
|
||||
#define PyString_FromString(repr) PyUnicode_FromString(repr)
|
||||
#define PyString_AsStringAndSize(obj, buffer, len) PyBytes_AsStringAndSize(obj, buffer, len)
|
||||
#define PyInt_Check(obj) PyLong_Check(obj)
|
||||
#define PyInt_FromLong(i) PyLong_FromLong(i)
|
||||
#define PyInt_AsLong(obj) PyLong_AsLong(obj)
|
||||
|
||||
#if defined(DYNAMIC_PYTHON3) || defined(PROTO)
|
||||
|
||||
@@ -155,7 +161,6 @@ static void init_structs(void);
|
||||
# define PyRun_String py3_PyRun_String
|
||||
# define PySys_SetObject py3_PySys_SetObject
|
||||
# define PySys_SetArgv py3_PySys_SetArgv
|
||||
# define PyType_Type (*py3_PyType_Type)
|
||||
# define PyType_Ready py3_PyType_Ready
|
||||
#undef Py_BuildValue
|
||||
# define Py_BuildValue py3_Py_BuildValue
|
||||
@@ -164,21 +169,31 @@ static void init_structs(void);
|
||||
# define Py_Finalize py3_Py_Finalize
|
||||
# define Py_IsInitialized py3_Py_IsInitialized
|
||||
# define _Py_NoneStruct (*py3__Py_NoneStruct)
|
||||
# define _Py_FalseStruct (*py3__Py_FalseStruct)
|
||||
# define _Py_TrueStruct (*py3__Py_TrueStruct)
|
||||
# define _PyObject_NextNotImplemented (*py3__PyObject_NextNotImplemented)
|
||||
# define PyModule_AddObject py3_PyModule_AddObject
|
||||
# define PyImport_AppendInittab py3_PyImport_AppendInittab
|
||||
# define _PyUnicode_AsString py3__PyUnicode_AsString
|
||||
# if PY_VERSION_HEX >= 0x030300f0
|
||||
# undef _PyUnicode_AsString
|
||||
# define _PyUnicode_AsString py3_PyUnicode_AsUTF8String
|
||||
# else
|
||||
# define _PyUnicode_AsString py3__PyUnicode_AsString
|
||||
# endif
|
||||
# undef PyUnicode_AsEncodedString
|
||||
# define PyUnicode_AsEncodedString py3_PyUnicode_AsEncodedString
|
||||
# undef PyBytes_AsString
|
||||
# define PyBytes_AsString py3_PyBytes_AsString
|
||||
# define PyBytes_AsStringAndSize py3_PyBytes_AsStringAndSize
|
||||
# undef PyBytes_FromString
|
||||
# define PyBytes_FromString py3_PyBytes_FromString
|
||||
# define PyFloat_FromDouble py3_PyFloat_FromDouble
|
||||
# define PyFloat_AsDouble py3_PyFloat_AsDouble
|
||||
# define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr
|
||||
# define PyType_Type (*py3_PyType_Type)
|
||||
# define PySlice_Type (*py3_PySlice_Type)
|
||||
# define PyFloat_Type (*py3_PyFloat_Type)
|
||||
# define PyBool_Type (*py3_PyBool_Type)
|
||||
# define PyErr_NewException py3_PyErr_NewException
|
||||
# ifdef Py_DEBUG
|
||||
# define _Py_NegativeRefcount py3__Py_NegativeRefcount
|
||||
@@ -238,7 +253,6 @@ static PyObject* (*py3_PyList_GetItem)(PyObject *, Py_ssize_t);
|
||||
static PyObject* (*py3_PyImport_ImportModule)(const char *);
|
||||
static PyObject* (*py3_PyImport_AddModule)(const char *);
|
||||
static int (*py3_PyErr_BadArgument)(void);
|
||||
static PyTypeObject* py3_PyType_Type;
|
||||
static PyObject* (*py3_PyErr_Occurred)(void);
|
||||
static PyObject* (*py3_PyModule_GetDict)(PyObject *);
|
||||
static int (*py3_PyList_SetItem)(PyObject *, Py_ssize_t, PyObject *);
|
||||
@@ -268,11 +282,18 @@ static void (*py3_PyErr_Clear)(void);
|
||||
static PyObject*(*py3__PyObject_Init)(PyObject *, PyTypeObject *);
|
||||
static iternextfunc py3__PyObject_NextNotImplemented;
|
||||
static PyObject* py3__Py_NoneStruct;
|
||||
static PyObject* py3__Py_FalseStruct;
|
||||
static PyObject* py3__Py_TrueStruct;
|
||||
static int (*py3_PyModule_AddObject)(PyObject *m, const char *name, PyObject *o);
|
||||
static int (*py3_PyImport_AppendInittab)(const char *name, PyObject* (*initfunc)(void));
|
||||
#if PY_VERSION_HEX >= 0x030300f0
|
||||
static char* (*py3_PyUnicode_AsUTF8String)(PyObject *unicode);
|
||||
#else
|
||||
static char* (*py3__PyUnicode_AsString)(PyObject *unicode);
|
||||
#endif
|
||||
static PyObject* (*py3_PyUnicode_AsEncodedString)(PyObject *unicode, const char* encoding, const char* errors);
|
||||
static char* (*py3_PyBytes_AsString)(PyObject *bytes);
|
||||
static int (*py3_PyBytes_AsStringAndSize)(PyObject *bytes, char **buffer, int *length);
|
||||
static PyObject* (*py3_PyBytes_FromString)(char *str);
|
||||
static PyObject* (*py3_PyFloat_FromDouble)(double num);
|
||||
static double (*py3_PyFloat_AsDouble)(PyObject *);
|
||||
@@ -280,8 +301,10 @@ static PyObject* (*py3_PyObject_GenericGetAttr)(PyObject *obj, PyObject *name);
|
||||
static PyObject* (*py3_PyModule_Create2)(struct PyModuleDef* module, int module_api_version);
|
||||
static PyObject* (*py3_PyType_GenericAlloc)(PyTypeObject *type, Py_ssize_t nitems);
|
||||
static PyObject* (*py3_PyType_GenericNew)(PyTypeObject *type, PyObject *args, PyObject *kwds);
|
||||
static PyTypeObject* py3_PyType_Type;
|
||||
static PyTypeObject* py3_PySlice_Type;
|
||||
static PyTypeObject* py3_PyFloat_Type;
|
||||
static PyTypeObject* py3_PyBool_Type;
|
||||
static PyObject* (*py3_PyErr_NewException)(char *name, PyObject *base, PyObject *dict);
|
||||
static PyObject* (*py3_PyCapsule_New)(void *, char *, PyCapsule_Destructor);
|
||||
static void* (*py3_PyCapsule_GetPointer)(PyObject *, char *);
|
||||
@@ -325,7 +348,13 @@ static struct
|
||||
{"PySys_SetArgv", (PYTHON_PROC*)&py3_PySys_SetArgv},
|
||||
{"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome},
|
||||
{"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize},
|
||||
#ifndef PY_SSIZE_T_CLEAN
|
||||
{"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple},
|
||||
{"Py_BuildValue", (PYTHON_PROC*)&py3_Py_BuildValue},
|
||||
#else
|
||||
{"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&py3_PyArg_ParseTuple},
|
||||
{"_Py_BuildValue_SizeT", (PYTHON_PROC*)&py3_Py_BuildValue},
|
||||
#endif
|
||||
{"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free},
|
||||
{"PyMem_Malloc", (PYTHON_PROC*)&py3_PyMem_Malloc},
|
||||
{"PyList_New", (PYTHON_PROC*)&py3_PyList_New},
|
||||
@@ -349,7 +378,6 @@ static struct
|
||||
{"PyImport_ImportModule", (PYTHON_PROC*)&py3_PyImport_ImportModule},
|
||||
{"PyImport_AddModule", (PYTHON_PROC*)&py3_PyImport_AddModule},
|
||||
{"PyErr_BadArgument", (PYTHON_PROC*)&py3_PyErr_BadArgument},
|
||||
{"PyType_Type", (PYTHON_PROC*)&py3_PyType_Type},
|
||||
{"PyErr_Occurred", (PYTHON_PROC*)&py3_PyErr_Occurred},
|
||||
{"PyModule_GetDict", (PYTHON_PROC*)&py3_PyModule_GetDict},
|
||||
{"PyList_SetItem", (PYTHON_PROC*)&py3_PyList_SetItem},
|
||||
@@ -361,7 +389,6 @@ static struct
|
||||
{"PyObject_GetIter", (PYTHON_PROC*)&py3_PyObject_GetIter},
|
||||
{"PyLong_FromLong", (PYTHON_PROC*)&py3_PyLong_FromLong},
|
||||
{"PyDict_New", (PYTHON_PROC*)&py3_PyDict_New},
|
||||
{"Py_BuildValue", (PYTHON_PROC*)&py3_Py_BuildValue},
|
||||
{"PyType_Ready", (PYTHON_PROC*)&py3_PyType_Ready},
|
||||
{"PyDict_SetItemString", (PYTHON_PROC*)&py3_PyDict_SetItemString},
|
||||
{"PyLong_AsLong", (PYTHON_PROC*)&py3_PyLong_AsLong},
|
||||
@@ -373,12 +400,19 @@ static struct
|
||||
{"Py_IsInitialized", (PYTHON_PROC*)&py3_Py_IsInitialized},
|
||||
{"_PyObject_NextNotImplemented", (PYTHON_PROC*)&py3__PyObject_NextNotImplemented},
|
||||
{"_Py_NoneStruct", (PYTHON_PROC*)&py3__Py_NoneStruct},
|
||||
{"_Py_FalseStruct", (PYTHON_PROC*)&py3__Py_FalseStruct},
|
||||
{"_Py_TrueStruct", (PYTHON_PROC*)&py3__Py_TrueStruct},
|
||||
{"PyErr_Clear", (PYTHON_PROC*)&py3_PyErr_Clear},
|
||||
{"PyObject_Init", (PYTHON_PROC*)&py3__PyObject_Init},
|
||||
{"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject},
|
||||
{"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab},
|
||||
#if PY_VERSION_HEX >= 0x030300f0
|
||||
{"PyUnicode_AsUTF8String", (PYTHON_PROC*)&py3_PyUnicode_AsUTF8String},
|
||||
#else
|
||||
{"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString},
|
||||
#endif
|
||||
{"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString},
|
||||
{"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize},
|
||||
{"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString},
|
||||
{"PyFloat_FromDouble", (PYTHON_PROC*)&py3_PyFloat_FromDouble},
|
||||
{"PyFloat_AsDouble", (PYTHON_PROC*)&py3_PyFloat_AsDouble},
|
||||
@@ -386,8 +420,10 @@ static struct
|
||||
{"PyModule_Create2", (PYTHON_PROC*)&py3_PyModule_Create2},
|
||||
{"PyType_GenericAlloc", (PYTHON_PROC*)&py3_PyType_GenericAlloc},
|
||||
{"PyType_GenericNew", (PYTHON_PROC*)&py3_PyType_GenericNew},
|
||||
{"PyType_Type", (PYTHON_PROC*)&py3_PyType_Type},
|
||||
{"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type},
|
||||
{"PyFloat_Type", (PYTHON_PROC*)&py3_PyFloat_Type},
|
||||
{"PyBool_Type", (PYTHON_PROC*)&py3_PyBool_Type},
|
||||
{"PyErr_NewException", (PYTHON_PROC*)&py3_PyErr_NewException},
|
||||
# ifdef Py_DEBUG
|
||||
{"_Py_NegativeRefcount", (PYTHON_PROC*)&py3__Py_NegativeRefcount},
|
||||
@@ -467,6 +503,12 @@ py3_runtime_link_init(char *libname, int verbose)
|
||||
|
||||
/* Load unicode functions separately as only the ucs2 or the ucs4 functions
|
||||
* will be present in the library. */
|
||||
#if PY_VERSION_HEX >= 0x030300f0
|
||||
ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicode_FromString");
|
||||
ucs_decode = symbol_from_dll(hinstPy3, "PyUnicode_Decode");
|
||||
ucs_as_encoded_string = symbol_from_dll(hinstPy3,
|
||||
"PyUnicode_AsEncodedString");
|
||||
#else
|
||||
ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString");
|
||||
ucs_decode = symbol_from_dll(hinstPy3,
|
||||
"PyUnicodeUCS2_Decode");
|
||||
@@ -481,6 +523,7 @@ py3_runtime_link_init(char *libname, int verbose)
|
||||
ucs_as_encoded_string = symbol_from_dll(hinstPy3,
|
||||
"PyUnicodeUCS4_AsEncodedString");
|
||||
}
|
||||
#endif
|
||||
if (ucs_from_string && ucs_decode && ucs_as_encoded_string)
|
||||
{
|
||||
py3_PyUnicode_FromString = ucs_from_string;
|
||||
@@ -544,17 +587,20 @@ static int py3initialised = 0;
|
||||
|
||||
#define PYINITIALISED py3initialised
|
||||
|
||||
/* Add conversion from PyInt? */
|
||||
#define DICTKEY_DECL PyObject *bytes = NULL;
|
||||
|
||||
#define DICTKEY_GET(err) \
|
||||
if (PyBytes_Check(keyObject)) \
|
||||
key = (char_u *) PyBytes_AsString(keyObject); \
|
||||
{ \
|
||||
if (PyString_AsStringAndSize(keyObject, (char **) &key, NULL) == -1) \
|
||||
return err; \
|
||||
} \
|
||||
else if (PyUnicode_Check(keyObject)) \
|
||||
{ \
|
||||
bytes = PyString_AsBytes(keyObject); \
|
||||
if (bytes == NULL) \
|
||||
return err; \
|
||||
key = (char_u *) PyBytes_AsString(bytes); \
|
||||
if (key == NULL) \
|
||||
if (PyString_AsStringAndSize(bytes, (char **) &key, NULL) == -1) \
|
||||
return err; \
|
||||
} \
|
||||
else \
|
||||
@@ -562,17 +608,21 @@ static int py3initialised = 0;
|
||||
PyErr_SetString(PyExc_TypeError, _("only string keys are allowed")); \
|
||||
return err; \
|
||||
}
|
||||
|
||||
#define DICTKEY_UNREF \
|
||||
if (bytes != NULL) \
|
||||
Py_XDECREF(bytes);
|
||||
|
||||
#define DICTKEY_DECL PyObject *bytes = NULL;
|
||||
|
||||
/*
|
||||
* Include the code shared with if_python.c
|
||||
*/
|
||||
#include "if_py_both.h"
|
||||
|
||||
#define GET_ATTR_STRING(name, nameobj) \
|
||||
char *name = ""; \
|
||||
if (PyUnicode_Check(nameobj)) \
|
||||
name = _PyUnicode_AsString(nameobj)
|
||||
|
||||
#define PY3OBJ_DELETED(obj) (obj->ob_base.ob_refcnt<=0)
|
||||
|
||||
static void
|
||||
@@ -674,6 +724,8 @@ Python3_Init(void)
|
||||
Py_SetPythonHome(PYTHON3_HOME);
|
||||
#endif
|
||||
|
||||
PyImport_AppendInittab("vim", Py3Init_vim);
|
||||
|
||||
#if !defined(MACOS) || defined(MACOS_X_UNIX)
|
||||
Py_Initialize();
|
||||
#else
|
||||
@@ -689,8 +741,6 @@ Python3_Init(void)
|
||||
if (PythonIO_Init())
|
||||
goto fail;
|
||||
|
||||
PyImport_AppendInittab("vim", Py3Init_vim);
|
||||
|
||||
globals = PyModule_GetDict(PyImport_AddModule("__main__"));
|
||||
|
||||
/* Remove the element from sys.path that was added because of our
|
||||
@@ -910,9 +960,7 @@ ex_py3file(exarg_T *eap)
|
||||
static PyObject *
|
||||
OutputGetattro(PyObject *self, PyObject *nameobj)
|
||||
{
|
||||
char *name = "";
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (strcmp(name, "softspace") == 0)
|
||||
return PyLong_FromLong(((OutputObject *)(self))->softspace);
|
||||
@@ -923,30 +971,9 @@ OutputGetattro(PyObject *self, PyObject *nameobj)
|
||||
static int
|
||||
OutputSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
char *name = "";
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (val == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_AttributeError, _("can't delete OutputObject attributes"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strcmp(name, "softspace") == 0)
|
||||
{
|
||||
if (!PyLong_Check(val))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, _("softspace must be an integer"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
((OutputObject *)(self))->softspace = PyLong_AsLong(val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyErr_SetString(PyExc_AttributeError, _("invalid attribute"));
|
||||
return -1;
|
||||
return OutputSetattr(self, name, val);
|
||||
}
|
||||
|
||||
/***************/
|
||||
@@ -1078,9 +1105,7 @@ BufferGetattro(PyObject *self, PyObject*nameobj)
|
||||
{
|
||||
BufferObject *this = (BufferObject *)(self);
|
||||
|
||||
char *name = "";
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (CheckBuffer(this))
|
||||
return NULL;
|
||||
@@ -1244,9 +1269,7 @@ RangeDestructor(PyObject *self)
|
||||
static PyObject *
|
||||
RangeGetattro(PyObject *self, PyObject *nameobj)
|
||||
{
|
||||
char *name = "";
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (strcmp(name, "start") == 0)
|
||||
return Py_BuildValue("n", ((RangeObject *)(self))->start - 1);
|
||||
@@ -1417,10 +1440,7 @@ WindowGetattro(PyObject *self, PyObject *nameobj)
|
||||
{
|
||||
WindowObject *this = (WindowObject *)(self);
|
||||
|
||||
char *name = "";
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (CheckWindow(this))
|
||||
return NULL;
|
||||
@@ -1448,10 +1468,7 @@ WindowGetattro(PyObject *self, PyObject *nameobj)
|
||||
static int
|
||||
WindowSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
char *name = "";
|
||||
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
return WindowSetattr(self, name, val);
|
||||
}
|
||||
@@ -1495,9 +1512,7 @@ static PyTypeObject CurrentType;
|
||||
static PyObject *
|
||||
CurrentGetattro(PyObject *self UNUSED, PyObject *nameobj)
|
||||
{
|
||||
char *name = "";
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (strcmp(name, "buffer") == 0)
|
||||
return (PyObject *)BufferNew(curbuf);
|
||||
@@ -1548,6 +1563,28 @@ static PyMappingMethods DictionaryAsMapping = {
|
||||
/* mp_ass_subscript */ (objobjargproc) DictionaryAssItem,
|
||||
};
|
||||
|
||||
static PyObject *
|
||||
DictionaryGetattro(PyObject *self, PyObject *nameobj)
|
||||
{
|
||||
DictionaryObject *this = ((DictionaryObject *) (self));
|
||||
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (strcmp(name, "locked") == 0)
|
||||
return PyLong_FromLong(this->dict->dv_lock);
|
||||
else if (strcmp(name, "scope") == 0)
|
||||
return PyLong_FromLong(this->dict->dv_scope);
|
||||
|
||||
return PyObject_GenericGetAttr(self, nameobj);
|
||||
}
|
||||
|
||||
static int
|
||||
DictionarySetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
return DictionarySetattr((DictionaryObject *) self, name, val);
|
||||
}
|
||||
|
||||
static PyTypeObject DictionaryType;
|
||||
|
||||
static void
|
||||
@@ -1639,6 +1676,24 @@ ListAsSubscript(PyObject *self, PyObject *idxObject, PyObject *obj)
|
||||
}
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
ListGetattro(PyObject *self, PyObject *nameobj)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (strcmp(name, "locked") == 0)
|
||||
return PyLong_FromLong(((ListObject *) (self))->list->lv_lock);
|
||||
|
||||
return PyObject_GenericGetAttr(self, nameobj);
|
||||
}
|
||||
|
||||
static int
|
||||
ListSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
return ListSetattr((ListObject *) self, name, val);
|
||||
}
|
||||
|
||||
static void
|
||||
ListDestructor(PyObject *self)
|
||||
{
|
||||
@@ -1668,9 +1723,8 @@ FunctionDestructor(PyObject *self)
|
||||
FunctionGetattro(PyObject *self, PyObject *nameobj)
|
||||
{
|
||||
FunctionObject *this = (FunctionObject *)(self);
|
||||
char *name = "";
|
||||
if (PyUnicode_Check(nameobj))
|
||||
name = _PyUnicode_AsString(nameobj);
|
||||
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
if (strcmp(name, "name") == 0)
|
||||
return PyUnicode_FromString((char *)(this->name));
|
||||
@@ -1728,6 +1782,7 @@ static struct PyModuleDef vimmodule;
|
||||
PyMODINIT_FUNC Py3Init_vim(void)
|
||||
{
|
||||
PyObject *mod;
|
||||
PyObject *tmp;
|
||||
/* The special value is removed from sys.path in Python3_Init(). */
|
||||
static wchar_t *(argv[2]) = {L"/must>not&exist/foo", NULL};
|
||||
|
||||
@@ -1759,6 +1814,16 @@ PyMODINIT_FUNC Py3Init_vim(void)
|
||||
Py_INCREF((PyObject *)(void *)&TheWindowList);
|
||||
PyModule_AddObject(mod, "windows", (PyObject *)(void *)&TheWindowList);
|
||||
|
||||
#define ADD_INT_CONSTANT(name, value) \
|
||||
tmp = PyLong_FromLong(value); \
|
||||
Py_INCREF(tmp); \
|
||||
PyModule_AddObject(mod, name, tmp)
|
||||
|
||||
ADD_INT_CONSTANT("VAR_LOCKED", VAR_LOCKED);
|
||||
ADD_INT_CONSTANT("VAR_FIXED", VAR_FIXED);
|
||||
ADD_INT_CONSTANT("VAR_SCOPE", VAR_SCOPE);
|
||||
ADD_INT_CONSTANT("VAR_DEF_SCOPE", VAR_DEF_SCOPE);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
|
||||
@@ -1817,6 +1882,10 @@ do_py3eval (char_u *str, typval_T *rettv)
|
||||
case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
|
||||
case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
|
||||
case VAR_FUNC: func_ref(rettv->vval.v_string); break;
|
||||
case VAR_UNKNOWN:
|
||||
rettv->v_type = VAR_NUMBER;
|
||||
rettv->vval.v_number = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1910,6 +1979,8 @@ init_structs(void)
|
||||
vim_memset(&DictionaryType, 0, sizeof(DictionaryType));
|
||||
DictionaryType.tp_name = "vim.dictionary";
|
||||
DictionaryType.tp_basicsize = sizeof(DictionaryObject);
|
||||
DictionaryType.tp_getattro = DictionaryGetattro;
|
||||
DictionaryType.tp_setattro = DictionarySetattro;
|
||||
DictionaryType.tp_dealloc = DictionaryDestructor;
|
||||
DictionaryType.tp_as_mapping = &DictionaryAsMapping;
|
||||
DictionaryType.tp_flags = Py_TPFLAGS_DEFAULT;
|
||||
@@ -1920,6 +1991,8 @@ init_structs(void)
|
||||
ListType.tp_name = "vim.list";
|
||||
ListType.tp_dealloc = ListDestructor;
|
||||
ListType.tp_basicsize = sizeof(ListObject);
|
||||
ListType.tp_getattro = ListGetattro;
|
||||
ListType.tp_setattro = ListSetattro;
|
||||
ListType.tp_as_sequence = &ListAsSeq;
|
||||
ListType.tp_as_mapping = &ListAsMapping;
|
||||
ListType.tp_flags = Py_TPFLAGS_DEFAULT;
|
||||
|
||||
@@ -178,6 +178,11 @@ static void ruby_vim_init(void);
|
||||
#define rb_hash_new dll_rb_hash_new
|
||||
#define rb_inspect dll_rb_inspect
|
||||
#define rb_int2inum dll_rb_int2inum
|
||||
#if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
|
||||
#define rb_fix2int dll_rb_fix2int
|
||||
#define rb_num2int dll_rb_num2int
|
||||
#define rb_num2uint dll_rb_num2uint
|
||||
#endif
|
||||
#define rb_lastline_get dll_rb_lastline_get
|
||||
#define rb_lastline_set dll_rb_lastline_set
|
||||
#define rb_load_protect dll_rb_load_protect
|
||||
@@ -268,7 +273,11 @@ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
|
||||
static VALUE (*dll_rb_hash_new) (void);
|
||||
static VALUE (*dll_rb_inspect) (VALUE);
|
||||
static VALUE (*dll_rb_int2inum) (long);
|
||||
static VALUE (*dll_rb_int2inum) (long);
|
||||
#if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
|
||||
static long (*dll_rb_fix2int) (VALUE);
|
||||
static long (*dll_rb_num2int) (VALUE);
|
||||
static unsigned long (*dll_rb_num2uint) (VALUE);
|
||||
#endif
|
||||
static VALUE (*dll_rb_lastline_get) (void);
|
||||
static void (*dll_rb_lastline_set) (VALUE);
|
||||
static void (*dll_rb_load_protect) (VALUE, int, int*);
|
||||
@@ -377,6 +386,11 @@ static struct
|
||||
{"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
|
||||
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
|
||||
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
|
||||
#if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
|
||||
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
|
||||
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
|
||||
{"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
|
||||
#endif
|
||||
{"rb_lastline_get", (RUBY_PROC*)&dll_rb_lastline_get},
|
||||
{"rb_lastline_set", (RUBY_PROC*)&dll_rb_lastline_set},
|
||||
{"rb_load_protect", (RUBY_PROC*)&dll_rb_load_protect},
|
||||
|
||||
14
src/mbyte.c
14
src/mbyte.c
@@ -3793,13 +3793,15 @@ mb_charlen_len(str, len)
|
||||
mb_unescape(pp)
|
||||
char_u **pp;
|
||||
{
|
||||
static char_u buf[MB_MAXBYTES + 1];
|
||||
int n, m = 0;
|
||||
static char_u buf[6];
|
||||
int n;
|
||||
int m = 0;
|
||||
char_u *str = *pp;
|
||||
|
||||
/* Must translate K_SPECIAL KS_SPECIAL KE_FILLER to K_SPECIAL and CSI
|
||||
* KS_EXTRA KE_CSI to CSI. */
|
||||
for (n = 0; str[n] != NUL && m <= MB_MAXBYTES; ++n)
|
||||
* KS_EXTRA KE_CSI to CSI.
|
||||
* Maximum length of a utf-8 character is 4 bytes. */
|
||||
for (n = 0; str[n] != NUL && m < 4; ++n)
|
||||
{
|
||||
if (str[n] == K_SPECIAL
|
||||
&& str[n + 1] == KS_SPECIAL
|
||||
@@ -3836,6 +3838,10 @@ mb_unescape(pp)
|
||||
*pp = str + n + 1;
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* Bail out quickly for ASCII. */
|
||||
if (buf[0] < 128)
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -780,9 +780,7 @@ ml_open_file(buf)
|
||||
need_wait_return = TRUE; /* call wait_return later */
|
||||
++no_wait_return;
|
||||
(void)EMSG2(_("E303: Unable to open swap file for \"%s\", recovery impossible"),
|
||||
buf_spname(buf) != NULL
|
||||
? (char_u *)buf_spname(buf)
|
||||
: buf->b_fname);
|
||||
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);
|
||||
--no_wait_return;
|
||||
}
|
||||
|
||||
@@ -1315,7 +1313,7 @@ ml_recover()
|
||||
smsg((char_u *)_("Using swap file \"%s\""), NameBuff);
|
||||
|
||||
if (buf_spname(curbuf) != NULL)
|
||||
STRCPY(NameBuff, buf_spname(curbuf));
|
||||
vim_strncpy(NameBuff, buf_spname(curbuf), MAXPATHL - 1);
|
||||
else
|
||||
home_replace(NULL, curbuf->b_ffname, NameBuff, MAXPATHL, TRUE);
|
||||
smsg((char_u *)_("Original file \"%s\""), NameBuff);
|
||||
|
||||
@@ -1623,6 +1623,7 @@ op_delete(oap)
|
||||
#endif
|
||||
linenr_T old_lcount = curbuf->b_ml.ml_line_count;
|
||||
int did_yank = FALSE;
|
||||
int orig_regname = oap->regname;
|
||||
|
||||
if (curbuf->b_ml.ml_flags & ML_EMPTY) /* nothing to do */
|
||||
return OK;
|
||||
@@ -1715,8 +1716,10 @@ op_delete(oap)
|
||||
/*
|
||||
* Put deleted text into register 1 and shift number registers if the
|
||||
* delete contains a line break, or when a regname has been specified.
|
||||
* Use the register name from before adjust_clip_reg() may have
|
||||
* changed it.
|
||||
*/
|
||||
if (oap->regname != 0 || oap->motion_type == MLINE
|
||||
if (orig_regname != 0 || oap->motion_type == MLINE
|
||||
|| oap->line_count > 1 || oap->use_reg_one)
|
||||
{
|
||||
y_current = &y_regs[9];
|
||||
|
||||
@@ -2512,15 +2512,12 @@ mch_FullName(fname, buf, len, force)
|
||||
}
|
||||
|
||||
l = STRLEN(buf);
|
||||
if (l >= len)
|
||||
retval = FAIL;
|
||||
if (l >= len - 1)
|
||||
retval = FAIL; /* no space for trailing "/" */
|
||||
#ifndef VMS
|
||||
else
|
||||
{
|
||||
if (l > 0 && buf[l - 1] != '/' && *fname != NUL
|
||||
else if (l > 0 && buf[l - 1] != '/' && *fname != NUL
|
||||
&& STRCMP(fname, ".") != 0)
|
||||
STRCAT(buf, "/");
|
||||
}
|
||||
STRCAT(buf, "/");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void ex_buffer_all __ARGS((exarg_T *eap));
|
||||
void do_modelines __ARGS((int flags));
|
||||
int read_viminfo_bufferlist __ARGS((vir_T *virp, int writing));
|
||||
void write_viminfo_bufferlist __ARGS((FILE *fp));
|
||||
char *buf_spname __ARGS((buf_T *buf));
|
||||
char_u *buf_spname __ARGS((buf_T *buf));
|
||||
void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
|
||||
linenr_T buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
|
||||
int buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
|
||||
|
||||
@@ -9876,7 +9876,7 @@ get_trans_bufname(buf)
|
||||
buf_T *buf;
|
||||
{
|
||||
if (buf_spname(buf) != NULL)
|
||||
STRCPY(NameBuff, buf_spname(buf));
|
||||
vim_strncpy(NameBuff, buf_spname(buf), MAXPATHL - 1);
|
||||
else
|
||||
home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE);
|
||||
trans_characters(NameBuff, MAXPATHL);
|
||||
|
||||
28
src/search.c
28
src/search.c
@@ -4545,7 +4545,6 @@ current_search(count, forward)
|
||||
int dir;
|
||||
int result; /* result of various function calls */
|
||||
char_u old_p_ws = p_ws;
|
||||
int visual_active = FALSE;
|
||||
int flags = 0;
|
||||
pos_T save_VIsual;
|
||||
int zerowidth = FALSE;
|
||||
@@ -4561,11 +4560,6 @@ current_search(count, forward)
|
||||
{
|
||||
orig_pos = curwin->w_cursor;
|
||||
save_VIsual = VIsual;
|
||||
visual_active = TRUE;
|
||||
|
||||
/* just started visual selection, only one character */
|
||||
if (equalpos(VIsual, curwin->w_cursor))
|
||||
visual_active = FALSE;
|
||||
|
||||
pos = curwin->w_cursor;
|
||||
start_pos = VIsual;
|
||||
@@ -4619,7 +4613,7 @@ current_search(count, forward)
|
||||
p_ws = old_p_ws;
|
||||
return FAIL;
|
||||
}
|
||||
else if (!i && !result && !visual_active)
|
||||
else if (!i && !result)
|
||||
{
|
||||
if (forward) /* try again from start of buffer */
|
||||
{
|
||||
@@ -4656,8 +4650,15 @@ current_search(count, forward)
|
||||
if (VIsual_active)
|
||||
{
|
||||
redraw_curbuf_later(INVERTED); /* update the inversion */
|
||||
if (*p_sel == 'e' && ltoreq(VIsual, curwin->w_cursor))
|
||||
inc_cursor();
|
||||
if (*p_sel == 'e')
|
||||
{
|
||||
/* Correction for exclusive selection depends on the direction. */
|
||||
if (forward && ltoreq(VIsual, curwin->w_cursor))
|
||||
inc_cursor();
|
||||
else if (!forward && ltoreq(curwin->w_cursor, VIsual))
|
||||
inc(&VIsual);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
@@ -4691,7 +4692,8 @@ is_zerowidth(pattern)
|
||||
regmmatch_T regmatch;
|
||||
int nmatched = 0;
|
||||
int result = -1;
|
||||
pos_T pos;
|
||||
pos_T pos;
|
||||
int save_called_emsg = called_emsg;
|
||||
|
||||
if (search_regcomp(pattern, RE_SEARCH, RE_SEARCH,
|
||||
SEARCH_KEEP, ®match) == FAIL)
|
||||
@@ -4704,15 +4706,17 @@ is_zerowidth(pattern)
|
||||
{
|
||||
/* Zero-width pattern should match somewhere, then we can check if
|
||||
* start and end are in the same position. */
|
||||
called_emsg = FALSE;
|
||||
nmatched = vim_regexec_multi(®match, curwin, curbuf,
|
||||
pos.lnum, (colnr_T)0, NULL);
|
||||
|
||||
if (!called_emsg)
|
||||
result = (nmatched != 0
|
||||
&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
|
||||
&& regmatch.startpos[0].col == regmatch.endpos[0].col);
|
||||
&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
|
||||
&& regmatch.startpos[0].col == regmatch.endpos[0].col);
|
||||
}
|
||||
|
||||
called_emsg |= save_called_emsg;
|
||||
vim_free(regmatch.regprog);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1443,6 +1443,8 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname)
|
||||
orgpat.len = p_tl;
|
||||
|
||||
prepare_pats(&orgpat, has_re);
|
||||
if (has_re && orgpat.regmatch.regprog == NULL)
|
||||
goto findtag_end;
|
||||
|
||||
#ifdef FEAT_TAG_BINS
|
||||
/* This is only to avoid a compiler warning for using search_info
|
||||
@@ -1795,7 +1797,7 @@ line_read_in:
|
||||
*/
|
||||
if (state == TS_START)
|
||||
{
|
||||
if (STRNCMP(lbuf, "!_TAG_", 6) <= 0)
|
||||
if (STRNCMP(lbuf, "!_TAG_", 6) == 0)
|
||||
{
|
||||
/*
|
||||
* Read header line.
|
||||
|
||||
@@ -62,6 +62,7 @@ clean:
|
||||
-if exist tiny.vim del tiny.vim
|
||||
-if exist mbyte.vim del mbyte.vim
|
||||
-if exist mzscheme.vim del mzscheme.vim
|
||||
-if exist lua.vim del lua.vim
|
||||
-del X*
|
||||
-if exist viminfo del viminfo
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ clean:
|
||||
-$(DEL) tiny.vim
|
||||
-$(DEL) mbyte.vim
|
||||
-$(DEL) mzscheme.vim
|
||||
-$(DEL) lua.vim
|
||||
-$(DEL) X*
|
||||
-$(DEL) viminfo
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
||||
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
||||
#
|
||||
# Last change: 2012 Apr 05
|
||||
# Last change: 2012 Oct 06
|
||||
#
|
||||
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
|
||||
# Edit the lines in the Configuration section below to select.
|
||||
@@ -184,5 +184,6 @@ clean :
|
||||
-@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.*
|
||||
-@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.*
|
||||
-@ if "''F$SEARCH("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.*
|
||||
-@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.*
|
||||
-@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ report:
|
||||
$(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
|
||||
|
||||
clean:
|
||||
-rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* valgrind.* viminfo
|
||||
-rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok X* valgrind.* viminfo
|
||||
|
||||
test1.out: test1.in
|
||||
-rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo
|
||||
-rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok X* viminfo
|
||||
$(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in
|
||||
@/bin/sh -c "if diff test.out $*.ok; \
|
||||
then mv -f test.out $*.out; \
|
||||
@@ -73,7 +73,7 @@ test1.out: test1.in
|
||||
fi \
|
||||
else echo $* NO OUTPUT >>test.log; \
|
||||
fi"
|
||||
# -rm -rf X* test.ok viminfo
|
||||
-rm -rf X* test.ok viminfo
|
||||
|
||||
test49.out: test49.vim
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ Tests for resetting "secure" flag after GUI has started.
|
||||
For KDE set a font, empty 'guifont' may cause a hang.
|
||||
|
||||
STARTTEST
|
||||
:if $DISPLAY == "" | e! test.ok | wq! test.out | endif
|
||||
:set exrc secure
|
||||
:if has("gui_kde")
|
||||
: set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
|
||||
|
||||
@@ -34,7 +34,17 @@ gncsearchmatch/one\_s*two\_s
|
||||
gnd
|
||||
/[a]bcdx
|
||||
:1
|
||||
2gnd
|
||||
2gnd/join
|
||||
/$
|
||||
0gnd
|
||||
/\>\zs
|
||||
0gnd/^
|
||||
gnd$h/\zs
|
||||
gnd/[u]niquepattern/s
|
||||
vlgnd
|
||||
/mother
|
||||
:set selection=exclusive
|
||||
$cgNmongoose
|
||||
:/^start:/,/^end:/wq! test.out
|
||||
ENDTEST
|
||||
|
||||
@@ -57,4 +67,10 @@ foobar
|
||||
one
|
||||
two
|
||||
abcdx | abcdx | abcdx
|
||||
join
|
||||
lines
|
||||
zero width pattern
|
||||
delete first and last chars
|
||||
uniquepattern uniquepattern
|
||||
my very excellent mother just served us nachos
|
||||
end:
|
||||
|
||||
@@ -21,4 +21,9 @@ a
|
||||
SEARCH:
|
||||
searchmatch
|
||||
abcdx | | abcdx
|
||||
join lines
|
||||
zerowidth pattern
|
||||
elete first and last char
|
||||
uniquepattern
|
||||
my very excellent mongoose just served us nachos
|
||||
end:
|
||||
|
||||
@@ -378,6 +378,16 @@ let l = [0, 1, 2, 3]
|
||||
:unlet dict
|
||||
:call garbagecollect(1)
|
||||
:"
|
||||
:" test for patch 7.3.637
|
||||
:let a = 'No error caught'
|
||||
:try|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
|
||||
o=a
|
||||
:"
|
||||
:lang C
|
||||
:redir => a
|
||||
:try|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
|
||||
:redir END
|
||||
o=a
|
||||
:"
|
||||
:"
|
||||
:/^start:/,$wq! test.out
|
||||
|
||||
@@ -115,3 +115,9 @@ caught a:000[3]
|
||||
{'a': {'b': 'B'}}
|
||||
Vim(call):E737: a
|
||||
{'a': {'b': 'B'}}
|
||||
Vim(foldopen):E490:
|
||||
|
||||
|
||||
Error detected while processing :
|
||||
E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
|
||||
|
||||
|
||||
@@ -176,28 +176,97 @@ STARTTEST
|
||||
:else
|
||||
: $put ='[0.0, 0.0]'
|
||||
:endif
|
||||
:let messages=[]
|
||||
:py <<EOF
|
||||
d=vim.bindeval('{}')
|
||||
m=vim.bindeval('messages')
|
||||
try:
|
||||
d['abc']
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['abc']="\0"
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['abc']=vim
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['a\0b']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d[b'a\0b']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
EOF
|
||||
:$put =messages
|
||||
:unlet messages
|
||||
:" locked and scope attributes
|
||||
:let d={} | let dl={} | lockvar dl
|
||||
:for s in split("d dl v: g:")
|
||||
: let name=tr(s, ':', 's')
|
||||
: execute 'py '.name.'=vim.bindeval("'.s.'")'
|
||||
: let toput=s.' : '.join(map(['locked', 'scope'], 'v:val.":".pyeval(name.".".v:val)'), ';')
|
||||
: $put =toput
|
||||
:endfor
|
||||
:silent! let d.abc=1
|
||||
:silent! let dl.abc=1
|
||||
:py d.locked=True
|
||||
:py dl.locked=False
|
||||
:silent! let d.def=1
|
||||
:silent! let dl.def=1
|
||||
:put ='d:'.string(d)
|
||||
:put ='dl:'.string(dl)
|
||||
:unlet d dl
|
||||
:
|
||||
:let l=[] | let ll=[] | lockvar ll
|
||||
:for s in split("l ll")
|
||||
: let name=tr(s, ':', 's')
|
||||
: execute 'py '.name.'=vim.bindeval("'.s.'")'
|
||||
: let toput=s.' : locked:'.pyeval(name.'.locked')
|
||||
: $put =toput
|
||||
:endfor
|
||||
:silent! call extend(l, [0])
|
||||
:silent! call extend(ll, [0])
|
||||
:py l.locked=True
|
||||
:py ll.locked=False
|
||||
:silent! call extend(l, [1])
|
||||
:silent! call extend(ll, [1])
|
||||
:put ='l:'.string(l)
|
||||
:put ='ll:'.string(ll)
|
||||
:unlet l ll
|
||||
:"
|
||||
:" pyeval()
|
||||
:let l=pyeval('range(3)')
|
||||
:$put =string(l)
|
||||
:let d=pyeval('{"a": "b", "c": 1, "d": ["e"]}')
|
||||
:$put =sort(items(d))
|
||||
:try
|
||||
: let undef=pyeval('undefined_name')
|
||||
:catch
|
||||
: $put =v:exception[:13]
|
||||
:endtry
|
||||
:try
|
||||
: let vim=pyeval('vim')
|
||||
:catch
|
||||
: $put =v:exception[:13]
|
||||
:endtry
|
||||
:if has('float')
|
||||
: let f=pyeval('0.0')
|
||||
: $put =string(f)
|
||||
:else
|
||||
: $put ='0.0'
|
||||
:endif
|
||||
:" Invalid values:
|
||||
:for e in ['"\0"', '{"\0": 1}', 'undefined_name', 'vim']
|
||||
: try
|
||||
: let v=pyeval(e)
|
||||
: catch
|
||||
: let toput=e.":\t".v:exception[:13]
|
||||
: $put =toput
|
||||
: endtry
|
||||
:endfor
|
||||
:endfun
|
||||
:"
|
||||
:call Test()
|
||||
@@ -206,6 +275,7 @@ STARTTEST
|
||||
:call garbagecollect(1)
|
||||
:"
|
||||
:/^start:/,$wq! test.out
|
||||
:call getchar()
|
||||
ENDTEST
|
||||
|
||||
start:
|
||||
|
||||
@@ -38,10 +38,28 @@ Vim(put):E684:
|
||||
Vim(python):E725:
|
||||
Vim(python):E117:
|
||||
[0.0, 0.0]
|
||||
IndexError
|
||||
TypeError
|
||||
TypeError
|
||||
ValueError
|
||||
TypeError
|
||||
TypeError
|
||||
d : locked:0;scope:0
|
||||
dl : locked:1;scope:0
|
||||
v: : locked:2;scope:1
|
||||
g: : locked:0;scope:2
|
||||
d:{'abc': 1}
|
||||
dl:{'def': 1}
|
||||
l : locked:0
|
||||
ll : locked:1
|
||||
l:[0]
|
||||
ll:[1]
|
||||
[0, 1, 2]
|
||||
['a', 'b']
|
||||
['c', 1]
|
||||
['d', ['e']]
|
||||
Vim(let):E858:
|
||||
Vim(let):E859:
|
||||
0.0
|
||||
"\0": Vim(let):E859:
|
||||
{"\0": 1}: Vim(let):E859:
|
||||
undefined_name: Vim(let):E858:
|
||||
vim: Vim(let):E859:
|
||||
|
||||
@@ -176,28 +176,97 @@ STARTTEST
|
||||
:else
|
||||
: $put ='[0.0, 0.0]'
|
||||
:endif
|
||||
:let messages=[]
|
||||
:py3 <<EOF
|
||||
d=vim.bindeval('{}')
|
||||
m=vim.bindeval('messages')
|
||||
try:
|
||||
d['abc']
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['abc']="\0"
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['abc']=vim
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['a\0b']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d[b'a\0b']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
EOF
|
||||
:$put =messages
|
||||
:unlet messages
|
||||
:" locked and scope attributes
|
||||
:let d={} | let dl={} | lockvar dl
|
||||
:for s in split("d dl v: g:")
|
||||
: let name=tr(s, ':', 's')
|
||||
: execute 'py3 '.name.'=vim.bindeval("'.s.'")'
|
||||
: let toput=s.' : '.join(map(['locked', 'scope'], 'v:val.":".py3eval(name.".".v:val)'), ';')
|
||||
: $put =toput
|
||||
:endfor
|
||||
:silent! let d.abc=1
|
||||
:silent! let dl.abc=1
|
||||
:py3 d.locked=True
|
||||
:py3 dl.locked=False
|
||||
:silent! let d.def=1
|
||||
:silent! let dl.def=1
|
||||
:put ='d:'.string(d)
|
||||
:put ='dl:'.string(dl)
|
||||
:unlet d dl
|
||||
:
|
||||
:let l=[] | let ll=[] | lockvar ll
|
||||
:for s in split("l ll")
|
||||
: let name=tr(s, ':', 's')
|
||||
: execute 'py3 '.name.'=vim.bindeval("'.s.'")'
|
||||
: let toput=s.' : locked:'.py3eval(name.'.locked')
|
||||
: $put =toput
|
||||
:endfor
|
||||
:silent! call extend(l, [0])
|
||||
:silent! call extend(ll, [0])
|
||||
:py3 l.locked=True
|
||||
:py3 ll.locked=False
|
||||
:silent! call extend(l, [1])
|
||||
:silent! call extend(ll, [1])
|
||||
:put ='l:'.string(l)
|
||||
:put ='ll:'.string(ll)
|
||||
:unlet l ll
|
||||
:"
|
||||
:" py3eval()
|
||||
:let l=py3eval('[0, 1, 2]')
|
||||
:$put =string(l)
|
||||
:let d=py3eval('{"a": "b", "c": 1, "d": ["e"]}')
|
||||
:$put =sort(items(d))
|
||||
:try
|
||||
: let undef=py3eval('undefined_name')
|
||||
:catch
|
||||
: $put =v:exception[:13]
|
||||
:endtry
|
||||
:try
|
||||
: let vim=py3eval('vim')
|
||||
:catch
|
||||
: $put =v:exception[:13]
|
||||
:endtry
|
||||
:if has('float')
|
||||
: let f=py3eval('0.0')
|
||||
: $put =string(f)
|
||||
:else
|
||||
: $put ='0.0'
|
||||
:endif
|
||||
:" Invalid values:
|
||||
:for e in ['"\0"', '{"\0": 1}', 'undefined_name', 'vim']
|
||||
: try
|
||||
: let v=py3eval(e)
|
||||
: catch
|
||||
: let toput=e.":\t".v:exception[:13]
|
||||
: $put =toput
|
||||
: endtry
|
||||
:endfor
|
||||
:endfun
|
||||
:"
|
||||
:call Test()
|
||||
|
||||
@@ -38,10 +38,28 @@ Vim(put):E684:
|
||||
Vim(py3):E725:
|
||||
Vim(py3):E117:
|
||||
[0.0, 0.0]
|
||||
IndexError
|
||||
TypeError
|
||||
TypeError
|
||||
ValueError
|
||||
TypeError
|
||||
TypeError
|
||||
d : locked:0;scope:0
|
||||
dl : locked:1;scope:0
|
||||
v: : locked:2;scope:1
|
||||
g: : locked:0;scope:2
|
||||
d:{'abc': 1}
|
||||
dl:{'def': 1}
|
||||
l : locked:0
|
||||
ll : locked:1
|
||||
l:[0]
|
||||
ll:[1]
|
||||
[0, 1, 2]
|
||||
['a', 'b']
|
||||
['c', 1]
|
||||
['d', ['e']]
|
||||
Vim(let):E860:
|
||||
Vim(let):E861:
|
||||
0.0
|
||||
"\0": Vim(let):E861:
|
||||
{"\0": 1}: Vim(let):E861:
|
||||
undefined_name: Vim(let):E860:
|
||||
vim: Vim(let):E861:
|
||||
|
||||
@@ -719,6 +719,100 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
690,
|
||||
/**/
|
||||
689,
|
||||
/**/
|
||||
688,
|
||||
/**/
|
||||
687,
|
||||
/**/
|
||||
686,
|
||||
/**/
|
||||
685,
|
||||
/**/
|
||||
684,
|
||||
/**/
|
||||
683,
|
||||
/**/
|
||||
682,
|
||||
/**/
|
||||
681,
|
||||
/**/
|
||||
680,
|
||||
/**/
|
||||
679,
|
||||
/**/
|
||||
678,
|
||||
/**/
|
||||
677,
|
||||
/**/
|
||||
676,
|
||||
/**/
|
||||
675,
|
||||
/**/
|
||||
674,
|
||||
/**/
|
||||
673,
|
||||
/**/
|
||||
672,
|
||||
/**/
|
||||
671,
|
||||
/**/
|
||||
670,
|
||||
/**/
|
||||
669,
|
||||
/**/
|
||||
668,
|
||||
/**/
|
||||
667,
|
||||
/**/
|
||||
666,
|
||||
/**/
|
||||
665,
|
||||
/**/
|
||||
664,
|
||||
/**/
|
||||
663,
|
||||
/**/
|
||||
662,
|
||||
/**/
|
||||
661,
|
||||
/**/
|
||||
660,
|
||||
/**/
|
||||
659,
|
||||
/**/
|
||||
658,
|
||||
/**/
|
||||
657,
|
||||
/**/
|
||||
656,
|
||||
/**/
|
||||
655,
|
||||
/**/
|
||||
654,
|
||||
/**/
|
||||
653,
|
||||
/**/
|
||||
652,
|
||||
/**/
|
||||
651,
|
||||
/**/
|
||||
650,
|
||||
/**/
|
||||
649,
|
||||
/**/
|
||||
648,
|
||||
/**/
|
||||
647,
|
||||
/**/
|
||||
646,
|
||||
/**/
|
||||
645,
|
||||
/**/
|
||||
644,
|
||||
/**/
|
||||
643,
|
||||
/**/
|
||||
|
||||
@@ -10,6 +10,9 @@ nmake -f Make_mvc.mak GUI=yes CSCOPE=yes NETBEANS=yes XPM=e:\hg\xpm\x86
|
||||
MinGW:
|
||||
mingw32-make -f Make_ming.mak GUI=yes CSCOPE=yes XPM=e:/hg/xpm/x86
|
||||
|
||||
MinGW 64 for x64:
|
||||
mingw32-make -f Make_ming.mak GUI=yes ARCH=x86-64 XPM=E:\HG\xpm\x64
|
||||
|
||||
Microsoft Visual C++ on x64 (tested with versions 2008 and 2010):
|
||||
nmake -f Make_mvc.mak GUI=yes CSCOPE=yes XPM=E:\HG\xpm\x64
|
||||
|
||||
|
||||
BIN
src/xpm/x64/lib/libXpm.a
Normal file
BIN
src/xpm/x64/lib/libXpm.a
Normal file
Binary file not shown.
Reference in New Issue
Block a user