Merge branch 'vim'

Conflicts:
	runtime/doc/tags
	src/gui.c
	src/option.c
This commit is contained in:
Bjorn Winckler
2013-02-07 20:09:24 +01:00
93 changed files with 3089 additions and 1048 deletions
+52
View File
@@ -2091,3 +2091,55 @@ d149f18b289fdf19363214e7805a0637307bd264 v7-3-751
ed936effb1f374004db15f092b8c8ab87631fdd4 v7-3-752
c83cd3d01128204d6926550cbe1064daaf8dee8c v7-3-753
beceb0a18c79b5b1bda4822b34cb2d62b2967d27 v7-3-754
d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755
706c87d16d40ecdf9c6fba45bc47b911d8e140cc v7-3-756
65ef7c96d65fb2fbf660797608809f0ac5d0c4b7 v7-3-757
9eb0d30510f7b02aa5f55f400bfab08d847ab447 v7-3-758
25ea15fdfa5c7d5894a06814fe9411b75050ebff v7-3-759
8e54a32bcd56226647cfd3d8c5e142e3a98c0ca7 v7-3-760
6834d6aeae099d6bfdff5151aa2174cafc22647f v7-3-761
699f8d8f096d4627f97e8d3bcf64b8634a484c26 v7-3-762
b6148e4a9c397b5dd1716cdac2f96730bd0f353d v7-3-763
b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764
915fb3d2dd8ffc322a5cc9e294d9bb7dfa8c5a83 v7-3-765
b5103b7d9e1284ef9ffbc7d1170d9105c0769c4d v7-3-766
be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767
9ea81cd9b1f50054629547ce2eccfac1fa00d096 v7-3-768
d179a8eff9d7b0adc561f4a4dcfb0b7612c1f301 v7-3-769
da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770
3bd2c055319e086665af5e449498a4d5bf40f25e v7-3-771
d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772
3db9aee957f7eea6729e5bfd294e3a24d41c79e4 v7-3-773
a8f5876e498125f4916c5f7168823885c27dad8c v7-3-774
a6e60677aea727622dde15d1306c61588b805500 v7-3-775
80b041b994d156360992666110964e74f7473d3e v7-3-776
9a1a4c486e6bb367c639c29c6120d5fb1fadcc38 v7-3-777
562bbee33aa4f9896cb23ed6de8fbf60cac323e0 v7-3-778
2067ed78d37c331685ef8f293d6a23c372ca4b78 v7-3-779
42edc5dac33c92876d93f00f8ab8c1f6bb25d3fc v7-3-780
29f29e86602e4a7f83d4572d2fe75b9b0de2752f v7-3-781
0de969850c0687d2018e025f31e5cef9e9ce1444 v7-3-782
a80af62d5e3b3614ff9e058f42647c99bffe7481 v7-3-783
fbadf0f6987790d98c3b3fd935fea0494743830a v7-3-784
be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785
8b3e88bab70215a18768fca5a90c6f07ac1aa5eb v7-3-786
e1b98967a985f4d1ad889c8e69b822d9126411ab v7-3-787
386fc822dd002958fdade4329845013cbfaa3dab v7-3-788
43c15135926fb95fa82b01424677a9c37f4d0e46 v7-3-789
8819ea6dcb72dcf61fd0d20f8ea1904a7546917f v7-3-790
16e8a09e8ab08d2226dc84b12b7e434bda6b4fa9 v7-3-791
7061704c2014e4563efa032672264a47b4b7b0d9 v7-3-792
fdbded463fdcc861630b3ea61b9654374847231a v7-3-793
9867f92c9b9fb082ee6daca816f859b53ed8e58b v7-3-794
17a312ba38a0b606cfd64d82ed2ebc844828085f v7-3-795
2c12c4e2fae8db60fbdf58b34c8b73eacdc32665 v7-3-796
0cbea05f19c73c01dbd0f04378a65ab7de6719e7 v7-3-797
cdaa688e3dddc442c1d39780b6ac0b5ac98c253e v7-3-798
5e9730de25e9b4fc2abe14b8d6b0968a9e59983a v7-3-799
c0cc0e0620dd935956a472e5b23369d1d78f5fb9 v7-3-800
48b54c590dc83b705f2e19f9aea1e9a69fe09720 v7-3-801
cd5145d2408bb52217417af654f5664af269e19e v7-3-802
77fa4dee43fcd1c0bacad9dc85b3deb39e0ba487 v7-3-803
2eb4b9ed2d42312eff32e845336aab748f7fe311 v7-3-804
dc30c01f995623e65ee6651a46b12ff062df8860 v7-3-805
f7e3f87ac9928df0079741258a3c6034ecc48806 v7-3-806
File diff suppressed because one or more lines are too long
+7 -2
View File
@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.3. Last change: 2012 Oct 11
*cmdline.txt* For Vim version 7.3. Last change: 2013 Jan 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -714,10 +714,15 @@ three lines: >
Visual Mode and Range *v_:*
{Visual}: Starts a command-line with the Visual selected lines as a
range. The code ":'<,'>" is used for this range, which makes
range. The code `:'<,'>` is used for this range, which makes
it possible to select a similar line from the command-line
history for repeating a command on different Visually selected
lines.
When Visual mode was already ended, a short way to use the
Visual area for a range is `:*`. This requires that "*" does
not appear in 'cpo', see |cpo-star|. Otherwise you will have
to type `:'<,'>`
==============================================================================
5. Ex command-line flags *ex-flags*
+1 -1
View File
@@ -220,7 +220,7 @@ The diffs are highlighted with these groups:
that parts in the middle that are still the
same are highlighted anyway. Only "iwhite" of
'diffopt' is used here.
|hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines,
|hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines,
because they don't really exist in this
buffer.
+16 -11
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.3. Last change: 2012 Dec 05
*eval.txt* For Vim version 7.3. Last change: 2013 Jan 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1716,7 +1716,7 @@ call( {func}, {arglist} [, {dict}])
any call {func} with arguments {arglist}
ceil( {expr}) Float round {expr} up
changenr() Number current change number
char2nr( {expr}) Number ASCII value of first char in {expr}
char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
cindent( {lnum}) Number C indent for line {lnum}
clearmatches() none clear all matches
col( {expr}) Number column nr of cursor or mark
@@ -1873,7 +1873,7 @@ mkdir( {name} [, {path} [, {prot}]])
mode( [expr]) String current editing mode
mzeval( {expr}) any evaluate |MzScheme| expression
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
nr2char( {expr}) String single char with ASCII value {expr}
nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
or( {expr}, {expr}) Number bitwise OR
pathshorten( {expr}) String shorten directory names in a path
pow( {x}, {y}) Float {x} to the power of {y}
@@ -2294,14 +2294,16 @@ changenr() *changenr()*
redo it is the number of the redone change. After undo it is
one less than the number of the undone change.
char2nr({expr}) *char2nr()*
char2nr({expr}[, {utf8}]) *char2nr()*
Return number value of the first char in {expr}. Examples: >
char2nr(" ") returns 32
char2nr("ABC") returns 65
< The current 'encoding' is used. Example for "utf-8": >
< When {utf8} is omitted or zero, the current 'encoding' is used.
Example for "utf-8": >
char2nr("á") returns 225
char2nr("á"[0]) returns 195
< A combining character is a separate character.
< With {utf8} set to 1, always treat as utf-8 characters.
A combining character is a separate character.
|nr2char()| does the opposite.
cindent({lnum}) *cindent()*
@@ -4371,14 +4373,16 @@ nextnonblank({lnum}) *nextnonblank()*
below it, zero is returned.
See also |prevnonblank()|.
nr2char({expr}) *nr2char()*
nr2char({expr}[, {utf8}]) *nr2char()*
Return a string with a single character, which has the number
value {expr}. Examples: >
nr2char(64) returns "@"
nr2char(32) returns " "
< The current 'encoding' is used. Example for "utf-8": >
< When {utf8} is omitted or zero, the current 'encoding' is used.
Example for "utf-8": >
nr2char(300) returns I with bow character
< Note that a NUL character in the file is specified with
< With {utf8} set to 1, always return utf-8 characters.
Note that a NUL character in the file is specified with
nr2char(10), because NULs are represented with newline
characters. nr2char(0) is a real NUL and terminates the
string, thus results in an empty string.
@@ -5939,8 +5943,9 @@ taglist({expr}) *taglist()*
If there are no matching tags, then an empty list is returned.
To get an exact tag match, the anchors '^' and '$' should be
used in {expr}. Refer to |tag-regexp| for more information
about the tag search regular expression pattern.
used in {expr}. This also make the function work faster.
Refer to |tag-regexp| for more information about the tag
search regular expression pattern.
Refer to |'tags'| for information about how the tags file is
located by Vim. Refer to |tags-file-format| for the format of
+1 -1
View File
@@ -16,7 +16,7 @@ Vim's Graphical User Interface *gui-w16* *win16-gui*
Other relevant documentation:
|gui.txt| For generic items of the GUI.
|os_msdos.txt| For items common to DOS and Windows.
|os_msdos.txt| For items common to DOS and Windows.
|gui_w32.txt| Some items here are also applicable to the Win16 version.
{Vi does not have a Windows GUI}
+1 -1
View File
@@ -17,7 +17,7 @@ Vim's Win32 Graphical User Interface *gui-w32* *win32-gui*
Other relevant documentation:
|gui.txt| For generic items of the GUI.
|os_win32.txt| For Win32 specific items.
|os_win32.txt| For Win32 specific items.
{Vi does not have a Windows GUI}
+6 -6
View File
@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.3. Last change: 2010 Jul 20
*help.txt* For Vim version 7.3. Last change: 2012 Dec 06
VIM - main help file
k
@@ -196,12 +196,12 @@ Remarks about specific systems ~
*standard-plugin-list*
Standard plugins ~
|pi_getscript.txt| Downloading latest version of Vim scripts
|pi_gzip.txt| Reading and writing compressed files
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens
|pi_tar.txt| Tar file explorer
|pi_gzip.txt| Reading and writing compressed files
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens
|pi_tar.txt| Tar file explorer
|pi_vimball.txt| Create a self-installing Vim script
|pi_zip.txt| Zip archive explorer
|pi_zip.txt| Zip archive explorer
LOCAL ADDITIONS: *local-additions*
+35 -8
View File
@@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.3. Last change: 2010 Feb 11
*if_mzsch.txt* For Vim version 7.3. Last change: 2012 Dec 17
VIM REFERENCE MANUAL by Sergey Khorev
@@ -11,7 +11,8 @@ The MzScheme Interface to Vim *mzscheme* *MzScheme*
3. Threads |mzscheme-threads|
4. Vim access from MzScheme |mzscheme-vim|
5. mzeval() Vim function |mzscheme-mzeval|
6. Dynamic loading |mzscheme-dynamic|
6. Using Function references |mzscheme-funcref|
7. Dynamic loading |mzscheme-dynamic|
{Vi does not have any of these commands}
@@ -21,10 +22,17 @@ The MzScheme interface is available only if Vim was compiled with the
Based on the work of Brent Fulgham.
Dynamic loading added by Sergey Khorev
For downloading MzScheme and other info:
http://www.plt-scheme.org/software/mzscheme/
MzScheme and PLT Scheme names have been rebranded as Racket. For more
information please check http://racket-lang.org
Note: On FreeBSD you should use the "drscheme" port.
Futures and places of Racket version 5.x up to and including 5.3.1 do not
work correctly with processes created by Vim.
The simplest solution is to build Racket on your own with these features
disabled: >
./configure --disable-futures --disable-places --prefix=your-install-prefix
To speed up the process, you might also want to use --disable-gracket and
--disable-docs
==============================================================================
1. Commands *mzscheme-commands*
@@ -155,8 +163,11 @@ Common
(eval {expr-string}) Evaluate the vim expression into
respective MzScheme object: |Lists| are
represented as Scheme lists,
|Dictionaries| as hash tables.
NOTE the name clashes with MzScheme eval
|Dictionaries| as hash tables,
|Funcref|s as functions (see also
|mzscheme-funcref|)
NOTE the name clashes with MzScheme eval,
use module qualifiers to overcome this.
(range-start) Start/End of the range passed with
(range-end) the Scheme command.
(beep) beep
@@ -237,7 +248,23 @@ To facilitate bi-directional interface, you can use |mzeval()| function to
evaluate MzScheme expressions and pass their values to VimL.
==============================================================================
6. Dynamic loading *mzscheme-dynamic* *E815*
6. Using Function references *mzscheme-funcref*
MzScheme interface allows use of |Funcref|s so you can call Vim functions
directly from Scheme. For instance: >
function! MyAdd2(arg)
return a:arg + 2
endfunction
mz (define f2 (vim-eval "function(\"MyAdd2\")"))
mz (f2 7)
< or : >
:mz (define indent (vim-eval "function('indent')"))
" return Vim indent for line 12
:mz (indent 12)
<
==============================================================================
7. Dynamic loading *mzscheme-dynamic* *E815*
On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
output then includes |+mzscheme/dyn|.
+4 -4
View File
@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.3. Last change: 2012 Sep 23
*if_pyth.txt* For Vim version 7.3. Last change: 2013 Feb 03
VIM REFERENCE MANUAL by Paul Moore
@@ -54,8 +54,8 @@ Example: >
EOF
endfunction
<
Note: Python is very sensitive to the indenting. Also make sure the "class"
line and "EOF" do not have any indent.
Note: Python is very sensitive to the indenting. Make sure the "class" line
and "EOF" do not have any indent.
*:pyfile* *:pyf*
:[range]pyf[ile] {file}
@@ -385,7 +385,7 @@ sure edit "gvim.exe" and search for "python\d*.dll\c".
*:py3* *:python3*
The |:py3| and |:python3| commands work similar to |:python|. A simple check
if the `:py3` command is wrong: >
if the `:py3` command is working: >
:py3 print("Hello")
< *:py3file*
The |:py3file| command works similar to |:pyfile|.
+100
View File
@@ -577,6 +577,106 @@ $VIMRUNTIME/indent directory for examples.
REMARKS ABOUT SPECIFIC INDENT FILES ~
CLOJURE *ft-clojure-indent* *clojure-indent*
Clojure indentation differs somewhat from traditional Lisps, due in part to
the use of square and curly brackets, and otherwise by community convention.
These conventions are not always universally followed, so the Clojure indent
script offers a few configurable options, listed below.
If the current vim does not include searchpairpos(), the indent script falls
back to normal 'lisp' indenting, and the following options are ignored.
*g:clojure_maxlines*
Set maximum scan distance of searchpairpos(). Larger values trade performance
for correctness when dealing with very long forms. A value of 0 will scan
without limits.
>
" Default
let g:clojure_maxlines = 100
<
*g:clojure_fuzzy_indent*
*g:clojure_fuzzy_indent_patterns*
*g:clojure_fuzzy_indent_blacklist*
The 'lispwords' option is a list of comma-separated words that mark special
forms whose subforms must be indented with two spaces.
For example:
>
(defn bad []
"Incorrect indentation")
(defn good []
"Correct indentation")
<
If you would like to specify 'lispwords' with a |pattern| instead, you can use
the fuzzy indent feature:
>
" Default
let g:clojure_fuzzy_indent = 1
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
let g:clojure_fuzzy_indent_blacklist =
\ ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
" Legacy comma-delimited string version; the list format above is
" recommended. Note that patterns are implicitly anchored with ^ and $
let g:clojure_fuzzy_indent_patterns = 'with.*,def.*,let.*'
<
|g:clojure_fuzzy_indent_patterns| and |g:clojure_fuzzy_indent_blacklist| are
|Lists| of patterns that will be matched against the unquoted, unqualified
symbol at the head of a list. This means that a pattern like "^foo" will match
all these candidates: "foobar", "my.ns/foobar", and "#'foobar".
Each candidate word is tested for special treatment in this order:
1. Return true if word is literally in 'lispwords'
2. Return false if word matches a pattern in
|g:clojure_fuzzy_indent_blacklist|
3. Return true if word matches a pattern in
|g:clojure_fuzzy_indent_patterns|
4. Return false and indent normally otherwise
*g:clojure_special_indent_words*
Some forms in Clojure are indented so that every subform is indented only two
spaces, regardless of 'lispwords'. If you have a custom construct that should
be indented in this idiosyncratic fashion, you can add your symbols to the
default list below.
>
" Default
let g:clojure_special_indent_words =
\ 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn'
<
*g:clojure_align_multiline_strings*
Align subsequent lines in multiline strings to the column after the opening
quote, instead of the same column.
For example:
>
(def default
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.")
(def aligned
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.")
<
This option is off by default.
>
" Default
let g:clojure_align_multiline_strings = 0
<
FORTRAN *ft-fortran-indent*
Block if, select case, where, and forall constructs are indented. So are
+10 -10
View File
@@ -94,8 +94,8 @@ tag char action in Insert mode ~
|i_CTRL-Z| CTRL-Z when 'insertmode' set: suspend Vim
|i_<Esc>| <Esc> end insert mode (unless 'insertmode' set)
|i_CTRL-[| CTRL-[ same as <Esc>
|i_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode
|i_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
|i_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode
|i_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
CTRL-\ a - z reserved for extensions
CTRL-\ others not used
|i_CTRL-]| CTRL-] trigger abbreviation
@@ -141,7 +141,7 @@ tag char action in Insert mode ~
|i_<ScrollWheelUp>| <ScrollWheelUp> move window three lines up
|i_<S-ScrollWheelUp>| <S-ScrollWheelUp> move window one page up
|i_<ScrollWheelLeft>| <ScrollWheelLeft> move window six columns left
|i_<S-ScrollWheelLeft>| <S-ScrollWheelLeft> move window one page left
|i_<S-ScrollWheelLeft>| <S-ScrollWheelLeft> move window one page left
|i_<ScrollWheelRight>| <ScrollWheelRight> move window six columns right
|i_<S-ScrollWheelRight>| <S-ScrollWheelRight> move window one page right
@@ -212,8 +212,8 @@ tag char note action in Normal mode ~
|CTRL-Y| CTRL-Y scroll N lines downwards
|CTRL-Z| CTRL-Z suspend program (or start new shell)
CTRL-[ <Esc> not used
|CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode (no-op)
|CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
|CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode (no-op)
|CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
CTRL-\ a - z reserved for extensions
CTRL-\ others not used
|CTRL-]| CTRL-] :ta to ident under cursor
@@ -431,7 +431,7 @@ tag char note action in Normal mode ~
|<Insert>| <Insert> 2 same as "i"
|<Left>| <Left> 1 same as "h"
|<LeftMouse>| <LeftMouse> 1 move cursor to the mouse click position
|<MiddleMouse>| <MiddleMouse> 2 same as "gP" at the mouse click position
|<MiddleMouse>| <MiddleMouse> 2 same as "gP" at the mouse click position
|<PageDown>| <PageDown> same as CTRL-F
|<PageUp>| <PageUp> same as CTRL-B
|<Right>| <Right> 1 same as "l"
@@ -640,7 +640,7 @@ tag char note action in Normal mode ~
|[s| [s 1 move to the previous misspelled word
|[z| [z 1 move to start of open fold
|[{| [{ 1 cursor N times back to unmatched '{'
|[<MiddleMouse> [<MiddleMouse> 2 same as "[p"
|[<MiddleMouse>| [<MiddleMouse> 2 same as "[p"
|]_CTRL-D| ] CTRL-D jump to first #define found in current and
included files matching the word under the
@@ -680,7 +680,7 @@ tag char note action in Normal mode ~
|]s| ]s 1 move to next misspelled word
|]z| ]z 1 move to end of open fold
|]}| ]} 1 cursor N times forward to unmatched '}'
|]<MiddleMouse> ]<MiddleMouse> 2 same as "]p"
|]<MiddleMouse>| ]<MiddleMouse> 2 same as "]p"
==============================================================================
2.4 Commands starting with 'g' *g*
@@ -1011,8 +1011,8 @@ tag command action in Command-line editing mode ~
CTRL-Z not used (reserved for suspend)
|c_<Esc>| <Esc> abandon command-line without executing it
|c_<Esc>| CTRL-[ same as <Esc>
|c_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode, abandon command-line
|c_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode',
|c_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode, abandon command-line
|c_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode',
abandon command-line
CTRL-\ a - d reserved for extensions
|c_CTRL-\_e| CTRL-\ e {expr} replace the command line with the result of
+4 -2
View File
@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.3. Last change: 2012 Jul 10
*insert.txt* For Vim version 7.3. Last change: 2013 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -380,7 +380,9 @@ The CTRL-O command sometimes has a side effect: If the cursor was beyond the
end of the line, it will be put on the last character in the line. In
mappings it's often better to use <Esc> (first put an "x" in the text, <Esc>
will then always put the cursor on it). Or use CTRL-\ CTRL-O, but then
beware of the cursor possibly being beyond the end of the line.
beware of the cursor possibly being beyond the end of the line. Note that the
command following CTRL-\ CTRL-O can still move the cursor, it is not restored
to its original position.
The CTRL-O command takes you to Normal mode. If you then use a command enter
Insert mode again it normally doesn't nest. Thus when typing "a<C-O>a" and
+11 -4
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.3. Last change: 2012 Oct 21
*options.txt* For Vim version 7.3. Last change: 2013 Jan 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3659,6 +3659,10 @@ A jump table for the options with a short description can be found at |Q_op|.
to set 'guifontwide' at all unless you want to override the choice
made by Pango/Xft.
Windows +multibyte only: *guifontwide_win_mbyte*
If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
*'guiheadroom'* *'ghr'*
'guiheadroom' 'ghr' number (default 50)
global
@@ -3921,7 +3925,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|hl-LineNr| n line number for ":number" and ":#" commands, and
when 'number' or 'relativenumber' option is set.
|hl-CursorLineNr| N like n for when 'cursorline' is set.
|hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is
set.
|hl-Question| r |hit-enter| prompt and yes/no questions
|hl-StatusLine| s status line of current window |status-line|
|hl-StatusLineNC| S status lines of not-current windows
@@ -4828,8 +4833,10 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer
{not in Vi}
Characters that form pairs. The |%| command jumps from one to the
other. Currently only single byte character pairs are allowed, and
they must be different. The characters must be separated by a colon.
other.
Only character pairs are allowed that are different, thus you cannot
jump between two double quotes.
The characters must be separated by a colon.
The pairs must be separated by a comma. Example for including '<' and
'>' (HTML): >
:set mps+=<:>
+3 -1
View File
@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.3. Last change: 2012 May 18
*pattern.txt* For Vim version 7.3. Last change: 2013 Jan 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -993,6 +993,8 @@ x A single character, with no special meaning, matches itself
[xyz] any 'x', 'y' or 'z'
[a-zA-Z]$ any alphabetic character at the end of a line
\c[a-z]$ same
[А-яЁё] Russian alphabet (with utf-8 and cp1251)
*/[\n]*
With "\_" prepended the collection also includes the end-of-line.
The same can be done by including "\n" in the collection. The
+6 -5
View File
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.3. Last change: 2012 Nov 28
*syntax.txt* For Vim version 7.3. Last change: 2013 Jan 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3903,9 +3903,9 @@ External matches *:syn-ext-match*
These extra regular expression items are available in region patterns:
*/\z(* */\z(\)* *E50* *E52*
\z(\) Marks the sub-expression as "external", meaning that it is can
be accessed from another pattern match. Currently only usable
in defining a syntax region start pattern.
\z(\) Marks the sub-expression as "external", meaning that it can be
accessed from another pattern match. Currently only usable in
defining a syntax region start pattern.
*/\z1* */\z2* */\z3* */\z4* */\z5*
\z1 ... \z9 */\z6* */\z7* */\z8* */\z9* *E66* *E67*
@@ -4592,7 +4592,8 @@ IncSearch 'incsearch' highlighting; also used for the text replaced with
LineNr Line number for ":number" and ":#" commands, and when 'number'
or 'relativenumber' option is set.
*hl-CursorLineNr*
CursorLineNr Like LineNr when 'cursorline' is set for the cursor line.
CursorLineNr Like LineNr when 'cursorline' or 'relativenumber' is set for
the cursor line.
*hl-MatchParen*
MatchParen The character under the cursor or just before it, if it
is a paired bracket, and its match. |pi_paren.txt|
+10
View File
@@ -5082,6 +5082,7 @@ clipboard-exclude options.txt /*clipboard-exclude*
clipboard-html options.txt /*clipboard-html*
clipboard-unnamed options.txt /*clipboard-unnamed*
clipboard-unnamedplus options.txt /*clipboard-unnamedplus*
clojure-indent indent.txt /*clojure-indent*
cmd-key gui_mac.txt /*cmd-key*
cmd-movement gui_mac.txt /*cmd-movement*
cmd-shortcuts gui_mac.txt /*cmd-shortcuts*
@@ -5707,6 +5708,7 @@ ft-ch-syntax syntax.txt /*ft-ch-syntax*
ft-changelog-plugin filetype.txt /*ft-changelog-plugin*
ft-changelog-syntax syntax.txt /*ft-changelog-syntax*
ft-chill-syntax syntax.txt /*ft-chill-syntax*
ft-clojure-indent indent.txt /*ft-clojure-indent*
ft-cobol-syntax syntax.txt /*ft-cobol-syntax*
ft-coldfusion-syntax syntax.txt /*ft-coldfusion-syntax*
ft-csh-syntax syntax.txt /*ft-csh-syntax*
@@ -5871,6 +5873,12 @@ g:ada_space_errors ft_ada.txt /*g:ada_space_errors*
g:ada_standard_types ft_ada.txt /*g:ada_standard_types*
g:ada_with_gnat_project_files ft_ada.txt /*g:ada_with_gnat_project_files*
g:ada_withuse_ordinary ft_ada.txt /*g:ada_withuse_ordinary*
g:clojure_align_multiline_strings indent.txt /*g:clojure_align_multiline_strings*
g:clojure_fuzzy_indent indent.txt /*g:clojure_fuzzy_indent*
g:clojure_fuzzy_indent_blacklist indent.txt /*g:clojure_fuzzy_indent_blacklist*
g:clojure_fuzzy_indent_patterns indent.txt /*g:clojure_fuzzy_indent_patterns*
g:clojure_maxlines indent.txt /*g:clojure_maxlines*
g:clojure_special_indent_words indent.txt /*g:clojure_special_indent_words*
g:colors_name options.txt /*g:colors_name*
g:decada ft_ada.txt /*g:decada*
g:decada.Error_Format ft_ada.txt /*g:decada.Error_Format*
@@ -6207,6 +6215,7 @@ gui_w32.txt gui_w32.txt /*gui_w32.txt*
gui_x11.txt gui_x11.txt /*gui_x11.txt*
guifontwide_gtk2 options.txt /*guifontwide_gtk2*
guifontwide_macvim options.txt /*guifontwide_macvim*
guifontwide_win_mbyte options.txt /*guifontwide_win_mbyte*
guioptions_a options.txt /*guioptions_a*
guu change.txt /*guu*
gv visual.txt /*gv*
@@ -6886,6 +6895,7 @@ mzscheme-buffer if_mzsch.txt /*mzscheme-buffer*
mzscheme-commands if_mzsch.txt /*mzscheme-commands*
mzscheme-dynamic if_mzsch.txt /*mzscheme-dynamic*
mzscheme-examples if_mzsch.txt /*mzscheme-examples*
mzscheme-funcref if_mzsch.txt /*mzscheme-funcref*
mzscheme-mzeval if_mzsch.txt /*mzscheme-mzeval*
mzscheme-sandbox if_mzsch.txt /*mzscheme-sandbox*
mzscheme-threads if_mzsch.txt /*mzscheme-threads*
+88 -46
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.3. Last change: 2012 Dec 05
*todo.txt* For Vim version 7.3. Last change: 2013 Feb 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,9 +34,14 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
On external command get the message:
SIGCHLD handler called (some thread has SIGCHLD unblocked)
From MzScheme
Substitute with confirmation and then "q" does not replace anything.
(John McGowan)
Download counter for scripts no longer incremented?
Looks like it.
Several syntax file match "^\s*" which may get underlined if that's in the
highlight group. Add a "\zs" after it?
Go through more coverity reports.
@@ -44,68 +49,79 @@ Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
Checking runtime scripts: Thilo Six, 2012 Jun 6.
Patch for doc indenting. (Ken Takata, Feb 4)
GTK: problem with 'L' in 'guioptions' changing the window width.
(Aaron Cornelius, 2012 Feb 6)
Configure change to detect Lua 5.2. (lilydjwg, 2013 Jan 31)
Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3.
Patch to avoid warnings in Perl code. (Christian Brabandt, 2013 Jan 30)
The " mark is not updated for lines inserted above it. (Roland Eggner, 2013
Feb 5)
Look into patch to add 'linenumber' option. (Nazri Ramliy, 2013 Feb 4)
Another patch for Python threads, 2 and 3. (Ken Takata, 2013 Jan 31)
Does this really work?
Patch for 'relativenumber' being reset unexpectedly. (Christian Brabandt, 2013
Feb 1) Tests Feb 2.
Patch to avoid useless compare. (Hayaki Saito, 2013 Feb 2)
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.
Patch for matchit.vim. (Mike Morearty, 2012 Nov 28)
Patch to fix that the QuitPre autocommand clears the quitmore flag. (Techlive
Zheng, 2012 Nov 28)
":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)
Also remove the "rc" variable.
Patch to make "- register not always used. (Christian Brabandt, 2012 Nov 28)
Crash with vimdiff. (Don Cruickshank, 2012 Sep 23)
Patch to support subdirectories for help files. (Charles Campbell, 2012 Nov
21)
Patch for mzscheme. (Sergey Khorev, 2012 Nov 19)
What about ignoring SEGV?
Win32: use 'guifontwide' for IME composition. (Taro Muraoka, 2012 Sep 30)
Update Oct 2.
Patch to fix :s command with confirm and typing "a". (Christian Brabandt, 2012
Oct 28)
/[^\n] does match at a line break. Expected to do the same as /.
Patch by Christian Brabandt, 2012 Dec 1.
Test files in archive in another message.
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.
Patch for building with Ruby and Cygwin. (Ken Takata, 2013 Jan 9)
Patch to make 'relativenumber' show the current lnum instead of zero.
(Nazri Ramliy, 2013 Jan 29)
It's possible to define an input() function that overrides the built-in one.
(ZyX, 2012 Sep 28)
Patch to add sha256() function. (Tyru, 2013 Jan 8)
Test by Higashi, 2013 Feb 2.
All together (tyru, 2013 Feb 5)
Patch to make pyeval() print error messages. (ZyX, 2013 Jan 12)
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 for Win32 clipboard under Cygwin. (Frodak Baksik, Feb 15)
Sutcliffe says it works well.
Update 2007 May 22 for Vim 7.1
Update 2008 Dec 2008 for Vim 7.2.xx (Sharonov)
Update by Ken Takata (2012 Dec 31, 2013 Jan 4, 2013 Jan 26)
Problem parsing expression with function(). (Andy Wokula, 2012 Nov 22)
Patch by Christian Brabandt, Nov 22. Tests in another patch, Nov 23.
Patch to add default value to getbufvar() et al. (Shougo Matsushita, Hirohito
Higashi, 2013 Jan 1)
Problem caused by patch 7.3.638: window->open does not update window
correctly. Issue 91.
Patch to fix compiler warnings for MingW 4.5.3. (Ken Takata, 2013 Jan 26)
Do allow real tags above the !_TAG entries. Undo older patch. Issue 90.
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
28) With tests: Oct 9.
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
Patch for IME handling, adds 'imactivatefunc' and 'imstatusfunc' option.
(Yukihiro Nakadaira, 2012 Aug 16)
Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18)
@@ -136,6 +152,8 @@ MS-Windows: Crash opening very long file name starting with "\\".
It's probably a good idea to make a negative value for 'sts' use the value of
'sw'. Patch by So8res, Oct 3 2012
patch to add "combine" flag to syntax commands. (so8res, 2012 Dec 6)
Syntax update problem in one buffer opened in two windows, bottom window is
not correctly updated. (Paul Harris, 2012 Feb 27)
@@ -145,9 +163,22 @@ 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 make confirm() display colors. (Christian Brabandt, 2012 Nov 9)
Patch to add functions for signs. (Christian Brabandt,, 2013 Jan 27)
Patch to use directX to draw text on Windows. Adds the 'directx' option.
(Taro Muraoka, 2013 Jan 25)
b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan
7)
Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers,
2012 Aug 4)
Patch to improve equivalence classes in regexp patterns.
(Christian Brabandt, 2013 Jan 16, update Jan 17)
Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24)
But use Gnome instead of GTK?
@@ -160,6 +191,7 @@ Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott,
MS-Windows ACL support doesn't work well. Patch from Ken Takata, 2012 Aug 29.
Update Aug 31.
Another patch for MingW, 2012 Dec 29.
MS-Windows resizing problems:
- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun
@@ -260,7 +292,7 @@ Update Jun 2.
Patch to add ":py3do". (Lilydjwg, 2012 Apr 7)
`[ moves to character after insert, instead of the last inserted character.
`] moves to character after insert, instead of the last inserted character.
(Yukihiro Nakadaira, 2011 Dec 9)
Plugin for Modeleasy. (Massimiliano Tripoli, 2011 Nov 29)
@@ -388,6 +420,12 @@ string() can't parse back "inf" and "nan". Fix documentation or fix code?
Make 'formatprg' global-local. (Sung Pae)
When a buffer-local mapping is used, but a global mapping starts with the same
characters, Vim currently waits for the next typed character to find out if
the global mapping matches. It is probably better to let the local mapping
win and not wait. (discussion with Andy Wokula, 2013 Jan 30)
Patch by Michael Henry, 2013 Jan 30.
When doing "redir => s:foo" in a script and then "redir END" somewhere else
(e.g. in a function) it can't find s:foo.
@@ -516,6 +554,9 @@ names, shell commands and the like. (Kikuchan, 2010 Oct 14)
Assume the system converts between the actual encoding of the filesystem to
the system encoding (usually utf-8).
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
26)
Problem producing tags file when hebrew.frx is present. It has a BOM.
Results in E670. (Tony Mechelynck, 2010 May 2)
@@ -714,7 +755,7 @@ to avoid changing 'eventignore'?
Patch for displaying 0x200c and 0x200d. (Ali Gholami Rudi, 2009 May 6)
Probably needs a bit of work.
List of encoding aliases. (Takao Fujiware, 2009 Jul 18)
List of encoding aliases. (Takao Fujiwara, 2009 Jul 18)
Are they all OK? Update Jul 22.
Win32: Improved Makefile for MSVC. (Leonardo Valeri Manera, 2010 Aug 18)
@@ -744,7 +785,7 @@ Problem with <script> mappings (Andy Wokula, 2009 Mar 8)
When starting Vim with "gvim -f -u non_existent_file > foo.txt" there are a
few control characters in the output. (Dale Wiles, 2009 May 28)
'cmdwinheight is only used in last window when 'winheight' is a large value.
'cmdwinheight' is only used in last window when 'winheight' is a large value.
(Tony Mechelynck, 2009 Apr 15)
Status line containing winnr() isn't updated when splitting the window (Clark
@@ -1245,11 +1286,6 @@ makes his own wrapper). Add a magic string with the version number to the
Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
2007 Feb 8)
Patch for Win32 clipboard under Cygwin. (Frodak Baksik, Feb 15)
Sutcliffe says it works well.
Update 2007 May 22 for Vim 7.1
Update 2008 Dec 2008 for Vim 7.2.xx (Sharonov)
Win32: Can't complete shell command names. Why is setting xp_context in
set_one_cmd_context() inside #ifndef BACKSLASH_IN_FILENAME?
@@ -1664,7 +1700,8 @@ Patch to support horizontal scroll wheel in GTK. Untested. (Bjorn Winckler,
2010 Jun 30)
At next release:
At next release 7.4:
- Build a huge version by default.
- Rename src/Makefile and create a new one like toplevel Makefile that
creates auto/config.mk when it's not there? (Ben Schmidt, 2011 Feb 11)
- Improve plugin handling: Automatic updates, handle dependencies?
@@ -4297,6 +4334,7 @@ Incsearch:
Searching:
9 Should have an option for :vimgrep to find lines without a match.
8 Add "g/" and "gb" to search for a pattern in the Visually selected text?
"g?" is already used for rot13.
The vis.vim script has a ":S" command that does something like this.
@@ -4428,6 +4466,9 @@ Searching:
Undo:
9 ":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.
9 After undo/redo, in the message show whether the buffer is modified or
not.
8 Use timestamps for undo, so that a version a certain time ago can be found
@@ -4612,6 +4653,7 @@ Options:
7 There is 'titleold', why is there no 'iconold'? (Chazelas)
7 Make 'scrolloff' a global-local option, so that it can be different in the
quickfix window, for example. (Gary Holloway)
Also do 'sidescrolloff'.
External commands:
+1 -1
View File
@@ -248,7 +248,7 @@ Subjects that can be read independently.
|28.7| Folding by syntax
|28.8| Folding by expression
|28.9| Folding unchanged lines
|28.10| Which fold method to use?
|28.10| Which fold method to use?
|usr_29.txt| Moving through programs
|29.1| Using tags
+14 -4
View File
@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.3. Last change: 2012 Dec 05
*various.txt* For Vim version 7.3. Last change: 2012 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -174,27 +174,37 @@ g8 Print the hex values of the bytes used in the
the command-line. {commands} are executed like they
are typed. For undo all commands are undone together.
Execution stops when an error is encountered.
If the [!] is given, mappings will not be used.
Without it, when this command is called from a
non-remappable mapping (|:noremap|), the argument can
be mapped anyway.
{commands} should be a complete command. If
{commands} does not finish a command, the last one
will be aborted as if <Esc> or <C-C> was typed.
The display isn't updated while ":normal" is busy.
This implies that an insert command must be completed
(to start Insert mode, see |:startinsert|). A ":"
command must be completed as well. And you can't use
"Q" or "gQ" to start Ex mode.
The display is not updated while ":normal" is busy.
{commands} cannot start with a space. Put a count of
1 (one) before it, "1 " is one space.
The 'insertmode' option is ignored for {commands}.
This command cannot be followed by another command,
since any '|' is considered part of the command.
This command can be used recursively, but the depth is
limited by 'maxmapdepth'.
When this command is called from a non-remappable
mapping |:noremap|, the argument can be mapped anyway.
An alternative is to use |:execute|, which uses an
expression as argument. This allows the use of
printable characters to represent special characters.
Example: >
:exe "normal \<c-w>\<c-w>"
< {not in Vi, of course}
+5 -1
View File
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Nov 28
" Last Change: 2013 Jan 31
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -489,6 +489,9 @@ au BufNewFile,BufRead *.prg
\ setf clipper |
\ endif
" Clojure
au BufNewFile,BufRead *.clj,*.cljs setf clojure
" Cmake
au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake
@@ -744,6 +747,7 @@ au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
" Git
au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
au BufNewFile,BufRead *.git/modules/**/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/modules/**/config setf gitconfig
+79
View File
@@ -0,0 +1,79 @@
" Vim filetype plugin file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
"
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 30 January 2013
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin = 'setlocal define< formatoptions< comments< commentstring<'
" There will be false positives, but this is better than missing the whole set
" of user-defined def* definitions.
setlocal define=\\v[(/]def(ault)@!\\S*
" Remove 't' from 'formatoptions' to avoid auto-wrapping code. The '+=croql'
" is standard ftplugin boilerplate, although it is arguably intrusive.
setlocal formatoptions-=t formatoptions+=croql
" Lisp comments are routinely nested (e.g. ;;; SECTION HEADING)
setlocal comments=n:;
setlocal commentstring=;\ %s
" Provide insert mode completions for special forms and clojure.core. As
" 'omnifunc' is set by popular Clojure REPL client plugins, we also set
" 'completefunc' so that the user has some form of completion available when
" 'omnifunc' is set and no REPL connection exists.
for s:setting in ['omnifunc', 'completefunc']
if exists('&' . s:setting) && empty(eval('&' . s:setting))
execute 'setlocal ' . s:setting . '=clojurecomplete#Complete'
let b:undo_ftplugin .= ' | setlocal ' . s:setting . '<'
endif
endfor
" Take all directories of the CLOJURE_SOURCE_DIRS environment variable
" and add them to the path option.
"
" This is a legacy option for VimClojure users.
if exists('$CLOJURE_SOURCE_DIRS')
for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':')
let s:dir = fnameescape(s:dir)
" Whitespace escaping for Windows
let s:dir = substitute(s:dir, '\', '\\\\', 'g')
let s:dir = substitute(s:dir, '\ ', '\\ ', 'g')
execute "setlocal path+=" . s:dir . "/**"
endfor
let b:undo_ftplugin .= ' | setlocal path<'
endif
" Skip brackets in ignored syntax regions when using the % command
if exists('loaded_matchit')
let b:match_words = &matchpairs
let b:match_skip = 's:comment\|string\|regex\|character'
let b:undo_ftplugin .= ' | unlet! b:match_words b:match_skip'
endif
" Win32 can filter files in the browse dialog
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
\ "Java Source Files (*.java)\t*.java\n" .
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif
let &cpo = s:cpo_save
unlet! s:cpo_save s:setting s:dir
" vim:sts=4 sw=4 et:
+398
View File
@@ -0,0 +1,398 @@
" Vim indent file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
" URL: http://kotka.de/projects/clojure/vimclojure.html
"
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 30 January 2013
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
let s:save_cpo = &cpo
set cpo&vim
let b:undo_indent = 'setlocal autoindent< smartindent< lispwords< expandtab< softtabstop< shiftwidth< indentexpr< indentkeys<'
setlocal noautoindent nosmartindent
setlocal softtabstop=2 shiftwidth=2 expandtab
setlocal indentkeys=!,o,O
if exists("*searchpairpos")
if !exists('g:clojure_maxlines')
let g:clojure_maxlines = 100
endif
if !exists('g:clojure_fuzzy_indent')
let g:clojure_fuzzy_indent = 1
endif
if !exists('g:clojure_fuzzy_indent_patterns')
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
endif
if !exists('g:clojure_fuzzy_indent_blacklist')
let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
endif
if !exists('g:clojure_special_indent_words')
let g:clojure_special_indent_words = 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn'
endif
if !exists('g:clojure_align_multiline_strings')
let g:clojure_align_multiline_strings = 0
endif
function! s:SynIdName()
return synIDattr(synID(line("."), col("."), 0), "name")
endfunction
function! s:CurrentChar()
return getline('.')[col('.')-1]
endfunction
function! s:CurrentWord()
return getline('.')[col('.')-1 : searchpos('\v>', 'n', line('.'))[1]-2]
endfunction
function! s:IsParen()
return s:CurrentChar() =~ '\v[\(\)\[\]\{\}]' &&
\ s:SynIdName() !~? '\vstring|comment'
endfunction
" Returns 1 if string matches a pattern in 'patterns', which may be a
" list of patterns, or a comma-delimited string of implicitly anchored
" patterns.
function! s:MatchesOne(patterns, string)
let list = type(a:patterns) == type([])
\ ? a:patterns
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
for pat in list
if a:string =~ pat | return 1 | endif
endfor
endfunction
function! s:SavePosition()
let [ _b, l, c, _o ] = getpos(".")
let b = bufnr("%")
return [b, l, c]
endfunction
function! s:RestorePosition(value)
let [b, l, c] = a:value
if bufnr("%") != b
execute b "buffer!"
endif
call setpos(".", [0, l, c, 0])
endfunction
function! s:MatchPairs(open, close, stopat)
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
" comments.
if a:stopat == 0
let stopat = max([line(".") - g:clojure_maxlines, 0])
else
let stopat = a:stopat
endif
let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:IsParen()", stopat)
return [pos[0], virtcol(pos)]
endfunction
function! s:ClojureCheckForStringWorker()
" Check whether there is the last character of the previous line is
" highlighted as a string. If so, we check whether it's a ". In this
" case we have to check also the previous character. The " might be the
" closing one. In case the we are still in the string, we search for the
" opening ". If this is not found we take the indent of the line.
let nb = prevnonblank(v:lnum - 1)
if nb == 0
return -1
endif
call cursor(nb, 0)
call cursor(0, col("$") - 1)
if s:SynIdName() !~? "string"
return -1
endif
" This will not work for a " in the first column...
if s:CurrentChar() == '"'
call cursor(0, col("$") - 2)
if s:SynIdName() !~? "string"
return -1
endif
if s:CurrentChar() != '\\'
return -1
endif
call cursor(0, col("$") - 1)
endif
let p = searchpos('\(^\|[^\\]\)\zs"', 'bW')
if p != [0, 0]
return p[1] - 1
endif
return indent(".")
endfunction
function! s:CheckForString()
let pos = s:SavePosition()
try
let val = s:ClojureCheckForStringWorker()
finally
call s:RestorePosition(pos)
endtry
return val
endfunction
function! s:ClojureIsMethodSpecialCaseWorker(position)
" Find the next enclosing form.
call search('\S', 'Wb')
" Special case: we are at a '(('.
if s:CurrentChar() == '('
return 0
endif
call cursor(a:position)
let nextParen = s:MatchPairs('(', ')', 0)
" Special case: we are now at toplevel.
if nextParen == [0, 0]
return 0
endif
call cursor(nextParen)
call search('\S', 'W')
if g:clojure_special_indent_words =~ '\<' . s:CurrentWord() . '\>'
return 1
endif
return 0
endfunction
function! s:IsMethodSpecialCase(position)
let pos = s:SavePosition()
try
let val = s:ClojureIsMethodSpecialCaseWorker(a:position)
finally
call s:RestorePosition(pos)
endtry
return val
endfunction
function! GetClojureIndent()
" Get rid of special case.
if line(".") == 1
return 0
endif
" We have to apply some heuristics here to figure out, whether to use
" normal lisp indenting or not.
let i = s:CheckForString()
if i > -1
return i + !!g:clojure_align_multiline_strings
endif
call cursor(0, 1)
" Find the next enclosing [ or {. We can limit the second search
" to the line, where the [ was found. If no [ was there this is
" zero and we search for an enclosing {.
let paren = s:MatchPairs('(', ')', 0)
let bracket = s:MatchPairs('\[', '\]', paren[0])
let curly = s:MatchPairs('{', '}', bracket[0])
" In case the curly brace is on a line later then the [ or - in
" case they are on the same line - in a higher column, we take the
" curly indent.
if curly[0] > bracket[0] || curly[1] > bracket[1]
if curly[0] > paren[0] || curly[1] > paren[1]
return curly[1]
endif
endif
" If the curly was not chosen, we take the bracket indent - if
" there was one.
if bracket[0] > paren[0] || bracket[1] > paren[1]
return bracket[1]
endif
" There are neither { nor [ nor (, ie. we are at the toplevel.
if paren == [0, 0]
return 0
endif
" Now we have to reimplement lispindent. This is surprisingly easy, as
" soon as one has access to syntax items.
"
" - Check whether we are in a special position after a word in
" g:clojure_special_indent_words. These are special cases.
" - Get the next keyword after the (.
" - If its first character is also a (, we have another sexp and align
" one column to the right of the unmatched (.
" - In case it is in lispwords, we indent the next line to the column of
" the ( + sw.
" - If not, we check whether it is last word in the line. In that case
" we again use ( + sw for indent.
" - In any other case we use the column of the end of the word + 2.
call cursor(paren)
if s:IsMethodSpecialCase(paren)
return paren[1] + &shiftwidth - 1
endif
" In case we are at the last character, we use the paren position.
if col("$") - 1 == paren[1]
return paren[1]
endif
" In case after the paren is a whitespace, we search for the next word.
normal! l
if s:CurrentChar() == ' '
normal! w
endif
" If we moved to another line, there is no word after the (. We
" use the ( position for indent.
if line(".") > paren[0]
return paren[1]
endif
" We still have to check, whether the keyword starts with a (, [ or {.
" In that case we use the ( position for indent.
let w = s:CurrentWord()
if stridx('([{', w[0]) > -1
return paren[1]
endif
" Test words without namespace qualifiers and leading reader macro
" metacharacters.
"
" e.g. clojure.core/defn and #'defn should both indent like defn.
let ww = substitute(w, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '')
if &lispwords =~ '\V\<' . ww . '\>'
return paren[1] + &shiftwidth - 1
endif
if g:clojure_fuzzy_indent
\ && !s:MatchesOne(g:clojure_fuzzy_indent_blacklist, ww)
\ && s:MatchesOne(g:clojure_fuzzy_indent_patterns, ww)
return paren[1] + &shiftwidth - 1
endif
normal! W
if paren[0] < line(".")
return paren[1] + &shiftwidth - 1
endif
normal! ge
return virtcol(".") + 1
endfunction
setlocal indentexpr=GetClojureIndent()
else
" In case we have searchpairpos not available we fall back to
" normal lisp indenting.
setlocal indentexpr=
setlocal lisp
let b:undo_indent .= '| setlocal lisp<'
endif
" Specially indented symbols from clojure.core and clojure.test.
"
" Clojure symbols are indented in the defn style when they:
"
" * Define vars and anonymous functions
" * Create new lexical scopes or scopes with altered environments
" * Create conditional branches from a predicate function or value
"
" The arglists for these functions are generally in the form of [x & body];
" Functions that accept a flat list of forms do not treat the first argument
" specially and hence are not indented specially.
" Definitions
setlocal lispwords=
setlocal lispwords+=bound-fn
setlocal lispwords+=def
setlocal lispwords+=definline
setlocal lispwords+=definterface
setlocal lispwords+=defmacro
setlocal lispwords+=defmethod
setlocal lispwords+=defmulti
setlocal lispwords+=defn
setlocal lispwords+=defn-
setlocal lispwords+=defonce
setlocal lispwords+=defprotocol
setlocal lispwords+=defrecord
setlocal lispwords+=defstruct
setlocal lispwords+=deftest " clojure.test
setlocal lispwords+=deftest- " clojure.test
setlocal lispwords+=deftype
setlocal lispwords+=extend
setlocal lispwords+=extend-protocol
setlocal lispwords+=extend-type
setlocal lispwords+=fn
setlocal lispwords+=ns
setlocal lispwords+=proxy
setlocal lispwords+=reify
setlocal lispwords+=set-test " clojure.test
" Binding forms
setlocal lispwords+=as->
setlocal lispwords+=binding
setlocal lispwords+=doall
setlocal lispwords+=dorun
setlocal lispwords+=doseq
setlocal lispwords+=dotimes
setlocal lispwords+=doto
setlocal lispwords+=for
setlocal lispwords+=if-let
setlocal lispwords+=let
setlocal lispwords+=letfn
setlocal lispwords+=locking
setlocal lispwords+=loop
setlocal lispwords+=testing " clojure.test
setlocal lispwords+=when-first
setlocal lispwords+=when-let
setlocal lispwords+=with-bindings
setlocal lispwords+=with-in-str
setlocal lispwords+=with-local-vars
setlocal lispwords+=with-open
setlocal lispwords+=with-precision
setlocal lispwords+=with-redefs
setlocal lispwords+=with-redefs-fn
setlocal lispwords+=with-test " clojure.test
" Conditional branching
setlocal lispwords+=case
setlocal lispwords+=cond->
setlocal lispwords+=cond->>
setlocal lispwords+=condp
setlocal lispwords+=if
setlocal lispwords+=if-not
setlocal lispwords+=when
setlocal lispwords+=when-not
setlocal lispwords+=while
" Exception handling
setlocal lispwords+=catch
setlocal lispwords+=try " For aesthetics when enclosing single line
let &cpo = s:save_cpo
unlet! s:save_cpo
" vim:sts=4 sw=4 et:
+8 -3
View File
@@ -1,7 +1,7 @@
" Vim indent file
" Language: SQL
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2012 Dec 05
" Last Change: 2012 Dec 06
" Version: 3.0
" Download: http://vim.sourceforge.net/script.php?script_id=495
@@ -36,8 +36,6 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
let b:current_indent = "sqlanywhere"
let s:keepcpo= &cpo
set cpo&vim
setlocal indentkeys-=0{
setlocal indentkeys-=0}
@@ -57,6 +55,13 @@ setlocal indentkeys+==~end,=~else,=~elseif,=~elsif,0=~when,0=)
" in the indentkeys is typed
setlocal indentexpr=GetSQLIndent()
" Only define the functions once.
if exists("*GetSQLIndent")
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" List of all the statements that start a new block.
" These are typically words that start a line.
" IS is excluded, since it is difficult to determine when the
+2 -2
View File
@@ -131,7 +131,7 @@ function! s:Match_wrapper(word, forward, mode) range
" let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
" \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
\ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" s:all = pattern with all the keywords
let match_words = match_words . (strlen(match_words) ? "," : "") . default
if match_words !~ s:notslash . '\\\d'
@@ -649,7 +649,7 @@ fun! s:MultiMatch(spflag, mode)
" s:all regexp based on s:pat and the default groups
" This part is copied and slightly modified from s:Match_wrapper().
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
\ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" Allow b:match_words = "GetVimMatchWords()" .
if b:match_words =~ ":"
let match_words = b:match_words
+2 -2
View File
@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Oct 21
" Last Change: 2012 Dec 06
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -170,7 +170,7 @@ if !has("gui_macvim")
endif
func! <SID>SelectAll()
exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
exe "norm! gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
endfunc
func! s:FnameEscape(fname)
+5 -5
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 May 03
" Last Change: 2012 Dec 14
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -93,16 +93,16 @@ endif
" This should be before cErrInParen to avoid problems with #define ({ xxx })
if exists("c_curly_error")
syntax match cCurlyError "}"
syntax region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold
syn match cCurlyError "}"
syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold
else
syntax region cBlock start="{" end="}" transparent fold
syn region cBlock start="{" end="}" transparent fold
endif
"catch errors caused by wrong parenthesis and brackets
" also accept <% for {, %> for }, <: for [ and :> for ] (C99)
" But avoid matching <::.
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
if exists("c_no_curly_error")
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
+2 -2
View File
@@ -17,9 +17,9 @@ elseif exists("b:current_syntax")
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
File diff suppressed because one or more lines are too long
+6 -3
View File
@@ -25,10 +25,12 @@ else
syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar
endif
if has("conceal")
syn match helpBar contained "[|`]" conceal
syn match helpBar contained "|" conceal
syn match helpBacktick contained "`" conceal
syn match helpStar contained "\*" conceal
else
syn match helpBar contained "[|`]"
syn match helpBar contained "|"
syn match helpBacktick contained "`"
syn match helpStar contained "\*"
endif
syn match helpNormal "|.*====*|"
@@ -38,7 +40,7 @@ syn match helpVim "Vim version [0-9.a-z]\+"
syn match helpVim "VIM REFERENCE.*"
syn match helpOption "'[a-z]\{2,\}'"
syn match helpOption "'t_..'"
syn match helpCommand "`[^` ]*`"hs=s+1,he=e-1 contains=helpBar
syn match helpCommand "`[^` ]*`"hs=s+1,he=e-1 contains=helpBacktick
syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore
if has("conceal")
@@ -150,6 +152,7 @@ syn sync minlines=40
hi def link helpIgnore Ignore
hi def link helpHyperTextJump Subtitle
hi def link helpBar Ignore
hi def link helpBacktick Ignore
hi def link helpStar Ignore
hi def link helpHyperTextEntry String
hi def link helpHeadline Statement
+2 -1
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
" Last Change: Oct 20, 2011
" Last Change: Dec 11, 2012
" URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
@@ -182,6 +182,7 @@ syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var
syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained
syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained
syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained
syn keyword phpFunctions json_decode json_encode json_last_error contained
syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained
syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained
syn keyword phpFunctions ezmlm_hash mail contained
+3
View File
@@ -600,6 +600,9 @@ $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
$(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL)
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
+6
View File
@@ -384,6 +384,9 @@ CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME
ifeq (yes, $(DYNAMIC_MZSCHEME))
CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
endif
ifeq (yes, "$(MZSCHEME_DEBUG)")
CFLAGS += -DMZSCHEME_FORCE_GC
endif
endif
ifdef RUBY
@@ -731,6 +734,9 @@ $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
$(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL)
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
+1 -1
View File
@@ -1096,7 +1096,7 @@ $(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
$(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(INCL) $(MZSCHEME_EXTRA_DEP)
$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c if_mzsch.h $(INCL) $(MZSCHEME_EXTRA_DEP)
$(CC) $(CFLAGS) if_mzsch.c \
-DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
mzscheme_base.c:
+3 -1
View File
@@ -1361,6 +1361,8 @@ LINT_EXTRA = -DUSE_SNIFF -DHANGUL_INPUT -D"__attribute__(x)="
DEPEND_CFLAGS = -DPROTO -DDEPEND -DFEAT_GUI $(LINT_CFLAGS)
# Note: MZSCHEME_LIBS must come before LIBS, because LIBS adds -lm which is
# needed by racket.
ALL_LIB_DIRS = $(GUI_LIBS_DIR) $(X_LIBS_DIR)
ALL_LIBS = \
$(GUI_LIBS1) \
@@ -1369,10 +1371,10 @@ ALL_LIBS = \
$(X_PRE_LIBS) \
$(X_LIBS) \
$(X_EXTRA_LIBS) \
$(MZSCHEME_LIBS) \
$(LIBS) \
$(EXTRA_LIBS) \
$(LUA_LIBS) \
$(MZSCHEME_LIBS) \
$(PERL_LIBS) \
$(PYTHON_LIBS) \
$(PYTHON3_LIBS) \
+28 -11
View File
@@ -4785,13 +4785,15 @@ $as_echo "no" >&6; }
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
for LUA_SOVER in "${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do
for i in 0 1 2 3 4 5 6 7 8 9; do
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${LUA_SOVER}.$i"; then
LUA_SONAME=".$i"
break
fi
done
vi_cv_dll_name_lua="liblua${LUA_SOVER}$LUA_SONAME"
done
vi_cv_dll_name_lua="liblua${vi_cv_version_lua}.so$LUA_SONAME"
fi
$as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
@@ -4975,7 +4977,8 @@ $as_echo "no" >&6; }
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
if test "x$MACOSX" = "xyes"; then
MZSCHEME_LIBS="-framework PLT_MzScheme"
MZSCHEME_LIBS="-framework Racket"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
@@ -5016,6 +5019,10 @@ $as_echo_n "checking for racket collects directory... " >&6; }
else
if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
else
if test -d $vi_cv_path_mzscheme_pfx/collects; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
fi
fi
fi
fi
@@ -5269,8 +5276,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
$as_echo "$enable_pythoninterp" >&6; }
if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
# Extract the first word of "python", so it can be a program name with args.
set dummy python; ac_word=$2
for ac_prog in python2 python
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_vi_cv_path_python+:} false; then :
@@ -5309,6 +5318,9 @@ $as_echo "no" >&6; }
fi
test -n "$vi_cv_path_python" && break
done
if test "X$vi_cv_path_python" != "X"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
@@ -5571,8 +5583,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
$as_echo "$enable_python3interp" >&6; }
if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
# Extract the first word of "python3", so it can be a program name with args.
set dummy python3; ac_word=$2
for ac_prog in python3 python
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_vi_cv_path_python3+:} false; then :
@@ -5611,6 +5625,9 @@ $as_echo "no" >&6; }
fi
test -n "$vi_cv_path_python3" && break
done
if test "X$vi_cv_path_python3" != "X"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
+6
View File
@@ -1445,6 +1445,10 @@ set_curbuf(buf, action)
enter_buffer(buf)
buf_T *buf;
{
#ifdef FEAT_SYN_HL
long old_tw = curbuf->b_p_tw;
#endif
/* Copy buffer and window local option values. Not for a help buffer. */
buf_copy_options(buf, BCO_ENTER | BCO_NOHELP);
if (!buf->b_help)
@@ -1468,6 +1472,8 @@ enter_buffer(buf)
#ifdef FEAT_SYN_HL
curwin->w_s = &(buf->b_s);
if (old_tw != buf->b_p_tw)
check_colorcolumn(curwin);
#endif
/* Cursor on first line by default. */
+17 -6
View File
@@ -284,7 +284,12 @@ buf_init_chartab(buf, global)
}
++c;
}
c = *p;
p = skip_to_option_part(p);
if (c == ',' && *p == NUL)
/* Trailing comma is not allowed. */
return FAIL;
}
}
chartab_initialized = TRUE;
@@ -904,6 +909,14 @@ vim_isIDc(c)
int
vim_iswordc(c)
int c;
{
return vim_iswordc_buf(c, curbuf);
}
int
vim_iswordc_buf(c, buf)
int c;
buf_T *buf;
{
#ifdef FEAT_MBYTE
if (c >= 0x100)
@@ -914,7 +927,7 @@ vim_iswordc(c)
return utf_class(c) >= 2;
}
#endif
return (c > 0 && c < 0x100 && GET_CHARTAB(curbuf, c) != 0);
return (c > 0 && c < 0x100 && GET_CHARTAB(buf, c) != 0);
}
/*
@@ -931,19 +944,17 @@ vim_iswordp(p)
return GET_CHARTAB(curbuf, *p) != 0;
}
#if defined(FEAT_SYN_HL) || defined(PROTO)
int
vim_iswordc_buf(p, buf)
vim_iswordp_buf(p, buf)
char_u *p;
buf_T *buf;
{
# ifdef FEAT_MBYTE
#ifdef FEAT_MBYTE
if (has_mbyte && MB_BYTE2LEN(*p) > 1)
return mb_get_class(p) >= 2;
# endif
#endif
return (GET_CHARTAB(buf, *p) != 0);
}
#endif
/*
* return TRUE if 'c' is a valid file-name character
+16 -9
View File
@@ -510,13 +510,15 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
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
for LUA_SOVER in "${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do
for i in 0 1 2 3 4 5 6 7 8 9; do
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${LUA_SOVER}.$i"; then
LUA_SONAME=".$i"
break
fi
done
vi_cv_dll_name_lua="liblua${LUA_SOVER}$LUA_SONAME"
done
vi_cv_dll_name_lua="liblua${vi_cv_version_lua}.so$LUA_SONAME"
fi
AC_DEFINE(DYNAMIC_LUA)
LUA_LIBS=""
@@ -631,7 +633,8 @@ if test "$enable_mzschemeinterp" = "yes"; then
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
if test "x$MACOSX" = "xyes"; then
MZSCHEME_LIBS="-framework PLT_MzScheme"
MZSCHEME_LIBS="-framework Racket"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
@@ -674,6 +677,10 @@ if test "$enable_mzschemeinterp" = "yes"; then
else
if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
else
if test -d $vi_cv_path_mzscheme_pfx/collects; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
fi
fi
fi
fi
@@ -862,7 +869,7 @@ AC_ARG_ENABLE(pythoninterp,
AC_MSG_RESULT($enable_pythoninterp)
if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
dnl -- find the python executable
AC_PATH_PROG(vi_cv_path_python, python)
AC_PATH_PROGS(vi_cv_path_python, python2 python)
if test "X$vi_cv_path_python" != "X"; then
dnl -- get its version number
@@ -1062,7 +1069,7 @@ AC_ARG_ENABLE(python3interp,
AC_MSG_RESULT($enable_python3interp)
if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
dnl -- find the python3 executable
AC_PATH_PROG(vi_cv_path_python3, python3)
AC_PATH_PROGS(vi_cv_path_python3, python3 python)
if test "X$vi_cv_path_python3" != "X"; then
dnl -- get its version number
+15
View File
@@ -372,6 +372,8 @@ edit(cmdchar, startln, count)
*/
if (cmdchar != 'r' && cmdchar != 'v')
{
pos_T save_cursor = curwin->w_cursor;
# ifdef FEAT_EVAL
if (cmdchar == 'R')
ptr = (char_u *)"r";
@@ -382,6 +384,19 @@ edit(cmdchar, startln, count)
set_vim_var_string(VV_INSERTMODE, ptr, 1);
# endif
apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
/* Since Insert mode was not started yet a call to check_cursor_col()
* may have moved the cursor, especially with the "A" command. */
if (curwin->w_cursor.col != save_cursor.col
&& curwin->w_cursor.lnum == save_cursor.lnum)
{
int save_state = State;
curwin->w_cursor = save_cursor;
State = INSERT;
check_cursor_col();
State = save_state;
}
}
#endif
+40 -5
View File
@@ -7855,7 +7855,7 @@ static struct fst
{"ceil", 1, 1, f_ceil},
#endif
{"changenr", 0, 0, f_changenr},
{"char2nr", 1, 1, f_char2nr},
{"char2nr", 1, 2, f_char2nr},
{"cindent", 1, 1, f_cindent},
{"clearmatches", 0, 0, f_clearmatches},
{"col", 1, 1, f_col},
@@ -8004,7 +8004,7 @@ static struct fst
{"mzeval", 1, 1, f_mzeval},
#endif
{"nextnonblank", 1, 1, f_nextnonblank},
{"nr2char", 1, 1, f_nr2char},
{"nr2char", 1, 2, f_nr2char},
{"or", 2, 2, f_or},
{"pathshorten", 1, 1, f_pathshorten},
#ifdef FEAT_FLOAT
@@ -9304,7 +9304,17 @@ f_char2nr(argvars, rettv)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
rettv->vval.v_number = (*mb_ptr2char)(get_tv_string(&argvars[0]));
{
int utf8 = 0;
if (argvars[1].v_type != VAR_UNKNOWN)
utf8 = get_tv_number_chk(&argvars[1], NULL);
if (utf8)
rettv->vval.v_number = (*utf_ptr2char)(get_tv_string(&argvars[0]));
else
rettv->vval.v_number = (*mb_ptr2char)(get_tv_string(&argvars[0]));
}
else
#endif
rettv->vval.v_number = get_tv_string(&argvars[0])[0];
@@ -14343,6 +14353,22 @@ f_mzeval(argvars, rettv)
str = get_tv_string_buf(&argvars[0], buf);
do_mzeval(str, rettv);
}
void
mzscheme_call_vim(name, args, rettv)
char_u *name;
typval_T *args;
typval_T *rettv;
{
typval_T argvars[3];
argvars[0].v_type = VAR_STRING;
argvars[0].vval.v_string = name;
copy_tv(args, &argvars[1]);
argvars[2].v_type = VAR_UNKNOWN;
f_call(argvars, rettv);
clear_tv(&argvars[1]);
}
#endif
/*
@@ -14380,7 +14406,16 @@ f_nr2char(argvars, rettv)
#ifdef FEAT_MBYTE
if (has_mbyte)
buf[(*mb_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL;
{
int utf8 = 0;
if (argvars[1].v_type != VAR_UNKNOWN)
utf8 = get_tv_number_chk(&argvars[1], NULL);
if (utf8)
buf[(*utf_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL;
else
buf[(*mb_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL;
}
else
#endif
{
@@ -18912,7 +18947,7 @@ var2fpos(varp, dollar_lnum, fnum)
#endif
if (name[0] == '\'') /* mark */
{
pp = getmark_fnum(name[1], FALSE, fnum);
pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum);
if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0)
return NULL;
return pp;
+50 -8
View File
@@ -4727,6 +4727,8 @@ do_sub(eap)
}
else
{
char_u *orig_line = NULL;
int len_change = 0;
#ifdef FEAT_FOLDING
int save_p_fen = curwin->w_p_fen;
@@ -4737,9 +4739,43 @@ do_sub(eap)
temp = RedrawingDisabled;
RedrawingDisabled = 0;
if (new_start != NULL)
{
/* There already was a substitution, we would
* like to show this to the user. We cannot
* really update the line, it would change
* what matches. Temporarily replace the line
* and change it back afterwards. */
orig_line = vim_strsave(ml_get(lnum));
if (orig_line != NULL)
{
char_u *new_line = concat_str(new_start,
sub_firstline + copycol);
if (new_line == NULL)
{
vim_free(orig_line);
orig_line = NULL;
}
else
{
/* Position the cursor relative to the
* end of the line, the previous
* substitute may have inserted or
* deleted characters before the
* cursor. */
len_change = (int)STRLEN(new_line)
- (int)STRLEN(orig_line);
curwin->w_cursor.col += len_change;
ml_replace(lnum, new_line, FALSE);
}
}
}
search_match_lines = regmatch.endpos[0].lnum
- regmatch.startpos[0].lnum;
search_match_endcol = regmatch.endpos[0].col;
search_match_endcol = regmatch.endpos[0].col
+ len_change;
highlight_match = TRUE;
update_topline();
@@ -4781,6 +4817,10 @@ do_sub(eap)
msg_didout = FALSE; /* don't scroll up */
msg_col = 0;
gotocmdline(TRUE);
/* restore the line */
if (orig_line != NULL)
ml_replace(lnum, orig_line, FALSE);
}
need_wait_return = FALSE; /* no hit-return prompt */
@@ -4838,7 +4878,7 @@ do_sub(eap)
goto skip;
}
if (got_quit)
break;
goto skip;
}
/* Move the cursor to the start of the match, so that we can
@@ -5045,14 +5085,10 @@ skip:
* The check for nmatch_tl is needed for when multi-line
* matching must replace the lines before trying to do another
* match, otherwise "\@<=" won't work.
* When asking the user we like to show the already replaced
* text, but don't do it when "\<@=" or "\<@!" is used, it
* changes what matches.
* When the match starts below where we start searching also
* need to replace the line first (using \zs after \n).
*/
if (lastone
|| (do_ask && !re_lookbehind(regmatch.regprog))
|| nmatch_tl > 0
|| (nmatch = vim_regexec_multi(&regmatch, curwin,
curbuf, sub_firstlnum,
@@ -5200,6 +5236,12 @@ outofmem:
EMSG2(_(e_patnotf2), get_search_pat());
}
#ifdef FEAT_FOLDING
if (do_ask && hasAnyFolding(curwin))
/* Cursor position may require updating */
changed_window_setting();
#endif
vim_free(regmatch.regprog);
}
@@ -5849,14 +5891,14 @@ find_help_tags(arg, num_matches, matches, keep_lang)
int i;
static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
"/*", "/\\*", "\"*", "**",
"/\\(\\)",
"cpo-*", "/\\(\\)",
"?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
"/\\?", "/\\z(\\)", "\\=", ":s\\=",
"[count]", "[quotex]", "[range]",
"[pattern]", "\\|", "\\%$"};
static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
"/star", "/\\\\star", "quotestar", "starstar",
"/\\\\(\\\\)",
"cpo-star", "/\\\\(\\\\)",
"?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
"/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
"\\[count]", "\\[quotex]", "\\[range]",
+12
View File
@@ -797,6 +797,15 @@
# endif
#endif
/*
* On some systems, when we compile with the GUI, we always use it. On Mac
* there is no terminal version, and on Windows we can't figure out how to
* fork one off with :gui.
*/
#if defined(FEAT_GUI_MSWIN) || (defined(FEAT_GUI_MAC) && !defined(MACOS_X_UNIX))
# define ALWAYS_USE_GUI
#endif
/*
* +dialog_gui Use GUI dialog.
* +dialog_con May use Console dialog.
@@ -828,6 +837,9 @@
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_MACVIM))
# define FEAT_GUI_TEXTDIALOG
# ifndef ALWAYS_USE_GUI
# define FEAT_CON_DIALOG
# endif
#endif
/* Mac specific thing: Codewarrior interface. */
+3
View File
@@ -7281,6 +7281,9 @@ buf_reload(buf, orig_mode)
* reset it, might have had a read error. */
if (orig_mode == curbuf->b_orig_mode)
curbuf->b_p_ro |= old_ro;
/* Modelines must override settings done by autocommands. */
do_modelines(0);
}
/* restore curwin/curbuf and a few other things */
+35 -28
View File
@@ -1017,6 +1017,9 @@ gui_get_wide_font()
else
#endif
gui.wide_font = font;
#ifdef FEAT_GUI_MSWIN
gui_mch_wide_font_changed();
#endif
return OK;
}
#endif
@@ -2405,7 +2408,9 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
int cl; /* byte length of current char */
int comping; /* current char is composing */
int scol = col; /* screen column */
int dowide; /* use 'guifontwide' */
int curr_wide; /* use 'guifontwide' */
int prev_wide = FALSE;
int wide_changed;
/* Break the string at a composing character, it has to be drawn on
* top of the previous character. */
@@ -2415,6 +2420,18 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
{
c = utf_ptr2char(s + i);
cn = utf_char2cells(c);
# ifdef FEAT_GUI_MACVIM
curr_wide = (cn > 1);
# else
if (cn > 1
# ifdef FEAT_XFONTSET
&& fontset == NOFONTSET
# endif
&& gui.wide_font != NOFONT)
curr_wide = TRUE;
else
curr_wide = FALSE;
# endif
comping = utf_iscomposing(c);
if (!comping) /* count cells from non-composing chars */
cells += cn;
@@ -2422,22 +2439,11 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
if (cl == 0) /* hit end of string */
len = i + cl; /* len must be wrong "cannot happen" */
# ifdef FEAT_GUI_MACVIM
dowide = (cn > 1);
# else
if (cn > 1
# ifdef FEAT_XFONTSET
&& fontset == NOFONTSET
# endif
&& gui.wide_font != NOFONT)
dowide = TRUE;
else
dowide = FALSE;
# endif
wide_changed = curr_wide != prev_wide;
/* print the string so far if it's the last character or there is
/* Print the string so far if it's the last character or there is
* a composing character. */
if (i + cl >= len || (comping && i > start) || dowide
if (i + cl >= len || (comping && i > start) || wide_changed
# if defined(FEAT_GUI_X11)
|| (cn > 1
# ifdef FEAT_XFONTSET
@@ -2449,31 +2455,31 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
# endif
)
{
if (comping || dowide)
if (comping || wide_changed)
thislen = i - start;
else
thislen = i - start + cl;
if (thislen > 0)
{
if (prev_wide)
gui_mch_set_font(gui.wide_font);
gui_mch_draw_string(gui.row, scol, s + start, thislen,
# ifdef FEAT_GUI_MACVIM
cells,
cells,
# endif
draw_flags);
draw_flags);
if (prev_wide)
gui_mch_set_font(font);
start += thislen;
}
scol += cells;
cells = 0;
if (dowide)
/* Adjust to not draw a character which width is changed
* against with last one. */
if (wide_changed && !comping)
{
gui_mch_set_font(gui.wide_font);
gui_mch_draw_string(gui.row, scol - cn, s + start, cl,
# ifdef FEAT_GUI_MACVIM
cn,
# endif
draw_flags | DRAW_WIDE);
gui_mch_set_font(font);
start += cl;
scol -= cn;
cl = 0;
}
# if defined(FEAT_GUI_X11)
@@ -2483,7 +2489,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
# ifdef FEAT_XFONTSET
&& fontset == NOFONTSET
# endif
&& !dowide)
&& !wide_changed)
gui_mch_draw_string(gui.row, scol - 1, (char_u *)" ",
1, draw_flags);
# endif
@@ -2505,6 +2511,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
# endif
start = i + cl;
}
prev_wide = curr_wide;
}
/* The stuff below assumes "len" is the length in screen columns. */
len = scol - col;
-9
View File
@@ -58,15 +58,6 @@
# include "photon/PxProto.h"
#endif
/*
* On some systems, when we compile with the GUI, we always use it. On Mac
* there is no terminal version, and on Windows we can't figure out how to
* fork one off with :gui.
*/
#if defined(FEAT_GUI_MSWIN) || (defined(FEAT_GUI_MAC) && !defined(MACOS_X_UNIX))
# define ALWAYS_USE_GUI
#endif
/*
* On some systems scrolling needs to be done right away instead of in the
* main loop.
+8
View File
@@ -3130,8 +3130,16 @@ gui_mch_init(void)
* exits on failure, but that's a non-issue because we already called
* gtk_init_check() in gui_mch_init_check(). */
if (using_gnome)
{
gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT,
LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL);
# if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
/* Make sure strtod() uses a decimal point, not a comma. Gnome init
* may change it. */
if (setlocale(LC_NUMERIC, NULL) != (char *) "C")
setlocale(LC_NUMERIC, "C");
# endif
}
#endif
vim_free(gui_argv);
gui_argv = NULL;
+51 -4
View File
@@ -323,10 +323,15 @@ static void TrackUserActivity __ARGS((UINT uMsg));
/*
* For control IME.
*
* These LOGFONT used for IME.
*/
#ifdef FEAT_MBYTE
# ifdef USE_IM_CONTROL
/* holds LOGFONT for 'guifontwide' if available, otherwise 'guifont' */
static LOGFONT norm_logfont;
/* holds LOGFONT for 'guifont' always. */
static LOGFONT sub_logfont;
# endif
#endif
@@ -2452,7 +2457,6 @@ gui_mch_update_tabline(void)
TCITEM tie;
int nr = 0;
int curtabidx = 0;
RECT rc;
#ifdef FEAT_MBYTE
static int use_unicode = FALSE;
int uu;
@@ -2479,13 +2483,16 @@ gui_mch_update_tabline(void)
tie.mask = TCIF_TEXT;
tie.iImage = -1;
/* Disable redraw for tab updates to eliminate O(N^2) draws. */
SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)FALSE, 0);
/* Add a label for each tab page. They all contain the same text area. */
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next, ++nr)
{
if (tp == curtab)
curtabidx = nr;
if (!TabCtrl_GetItemRect(s_tabhwnd, nr, &rc))
if (nr >= TabCtrl_GetItemCount(s_tabhwnd))
{
/* Add the tab */
tie.pszText = "-Empty-";
@@ -2519,11 +2526,16 @@ gui_mch_update_tabline(void)
}
/* Remove any old labels. */
while (TabCtrl_GetItemRect(s_tabhwnd, nr, &rc))
while (nr < TabCtrl_GetItemCount(s_tabhwnd))
TabCtrl_DeleteItem(s_tabhwnd, nr);
if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
/* Re-enable redraw and redraw. */
SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0);
RedrawWindow(s_tabhwnd, NULL, NULL,
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
}
/*
@@ -3083,6 +3095,40 @@ logfont2name(LOGFONT lf)
return res;
}
#ifdef FEAT_MBYTE_IME
/*
* Set correct LOGFONT to IME. Use 'guifontwide' if available, otherwise use
* 'guifont'
*/
static void
update_im_font()
{
LOGFONT lf_wide;
if (p_guifontwide != NULL && *p_guifontwide != NUL
&& gui.wide_font != NOFONT
&& GetObject((HFONT)gui.wide_font, sizeof(lf_wide), &lf_wide))
norm_logfont = lf_wide;
else
norm_logfont = sub_logfont;
im_set_font(&norm_logfont);
}
#endif
#ifdef FEAT_MBYTE
/*
* Handler of gui.wide_font (p_guifontwide) changed notification.
*/
void
gui_mch_wide_font_changed()
{
# ifdef FEAT_MBYTE_IME
update_im_font();
# endif
}
#endif
/*
* Initialise vim to use the font with the given name.
* Return FAIL if the font could not be loaded, OK otherwise.
@@ -3105,9 +3151,10 @@ gui_mch_init_font(char_u *font_name, int fontset)
font_name = lf.lfFaceName;
#if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
norm_logfont = lf;
sub_logfont = lf;
#endif
#ifdef FEAT_MBYTE_IME
im_set_font(&lf);
update_im_font();
#endif
gui_mch_free_font(gui.norm_font);
gui.norm_font = font;
+426 -142
View File
File diff suppressed because it is too large Load Diff
+15 -21
View File
@@ -7,6 +7,7 @@
#ifdef __MINGW32__
/* Hack to engage Cygwin-specific settings */
# define __CYGWIN32__
# include <stdint.h>
#endif
/* #ifdef needed for "make depend" */
@@ -20,31 +21,24 @@
#endif
#if MZSCHEME_VERSION_MAJOR >= 299
/* macros to be compatible with 20x versions */
# define scheme_config scheme_current_config()
# define scheme_make_string scheme_make_byte_string
# define scheme_make_string_output_port scheme_make_byte_string_output_port
# define scheme_get_sized_string_output scheme_get_sized_byte_string_output
# define scheme_write_string scheme_write_byte_string
# define scheme_make_sized_string scheme_make_sized_byte_string
# define SCHEME_STRINGP(obj) (SCHEME_BYTE_STRINGP(obj) || SCHEME_CHAR_STRINGP(obj))
# define SCHEME_STR_VAL(obj) SCHEME_BYTE_STR_VAL( \
(SCHEME_BYTE_STRINGP(obj) ? obj : scheme_char_string_to_byte_string(obj)))
# define GUARANTEE_STRING(fname, argnum) GUARANTEE_TYPE(fname, argnum, SCHEME_STRINGP, "string")
# ifdef scheme_format
# undef scheme_format
# endif
# define scheme_format scheme_format_utf8
# define SCHEME_GET_BYTE_STRING(obj) (SCHEME_BYTE_STRINGP(obj) ? obj : \
scheme_char_string_to_byte_string(obj))
# define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_BYTE_STR_VAL(obj))
#else
# define SCHEME_GET_BYTE_STRING(obj) (obj)
/* macros for compatibility with older versions */
# define scheme_current_config() scheme_config
# define scheme_make_sized_byte_string scheme_make_sized_string
# define scheme_format_utf8 scheme_format
# ifndef DYNAMIC_MZSCHEME
/* for dynamic MzScheme there will be separate definitions in if_mzsch.c */
# define scheme_get_sized_byte_string_output scheme_get_sized_string_output
# define scheme_make_byte_string scheme_make_string
# define scheme_make_byte_string_output_port scheme_make_string_output_port
# endif
# define SCHEME_BYTE_STRLEN_VAL SCHEME_STRLEN_VAL
# define SCHEME_BYTE_STR_VAL SCHEME_STR_VAL
# define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_STR_VAL(obj))
# define scheme_byte_string_to_char_string(obj) (obj)
# define SCHEME_BYTE_STRINGP SCHEME_STRINGP
#endif
/* Precise GC macros */
+10 -10
View File
@@ -1048,7 +1048,7 @@ Buffers(...)
{
SV *sv = ST(i);
if (SvIOK(sv))
b = SvIV(ST(i));
b = (int) SvIV(ST(i));
else
{
char_u *pat;
@@ -1091,7 +1091,7 @@ Windows(...)
{
for (i = 0; i < items; i++)
{
w = SvIV(ST(i));
w = (int) SvIV(ST(i));
vimwin = win_find_nr(w);
if (vimwin)
XPUSHs(newWINrv(newSV(0), vimwin));
@@ -1154,8 +1154,8 @@ Cursor(win, ...)
if (!win_valid(win))
win = curwin;
lnum = SvIV(ST(1));
col = SvIV(ST(2));
lnum = (int) SvIV(ST(1));
col = (int) SvIV(ST(2));
win->w_cursor.lnum = lnum;
win->w_cursor.col = col;
check_cursor(); /* put cursor on an existing line */
@@ -1216,7 +1216,7 @@ Get(vimbuf, ...)
{
for (i = 1; i < items; i++)
{
lnum = SvIV(ST(i));
lnum = (long) SvIV(ST(i));
if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count)
{
line = ml_get_buf(vimbuf, lnum, FALSE);
@@ -1239,7 +1239,7 @@ Set(vimbuf, ...)
if (items < 3)
croak("Usage: VIBUF::Set(vimbuf, lnum, @lines)");
lnum = SvIV(ST(1));
lnum = (long) SvIV(ST(1));
for(i = 2; i < items; i++, lnum++)
{
line = SvPV(ST(i),PL_na);
@@ -1274,13 +1274,13 @@ Delete(vimbuf, ...)
{
if (items == 2)
{
lnum = SvIV(ST(1));
lnum = (long) SvIV(ST(1));
count = 1;
}
else if (items == 3)
{
lnum = SvIV(ST(1));
count = 1 + SvIV(ST(2)) - lnum;
lnum = (long) SvIV(ST(1));
count = (long) 1 + SvIV(ST(2)) - lnum;
if (count == 0)
count = 1;
if (count < 0)
@@ -1331,7 +1331,7 @@ Append(vimbuf, ...)
if (items < 3)
croak("Usage: VIBUF::Append(vimbuf, lnum, @lines)");
lnum = SvIV(ST(1));
lnum = (long) SvIV(ST(1));
for (i = 2; i < items; i++, lnum++)
{
line = SvPV(ST(i),PL_na);
+9 -7
View File
@@ -745,12 +745,11 @@ Python_Init(void)
#else
PyMac_Initialize();
#endif
/* Initialise threads, and save the state using PyGILState_Ensure.
* Without the call to PyGILState_Ensure, thread specific state (such
* as the system trace hook), will be lost between invocations of
* Python code. */
/* Initialise threads, and below save the state using
* PyGILState_Ensure. Without the call to PyGILState_Ensure, thread
* specific state (such as the system trace hook), will be lost
* between invocations of Python code. */
PyEval_InitThreads();
pygilstate = PyGILState_Ensure();
#ifdef DYNAMIC_PYTHON
get_exceptions();
#endif
@@ -761,6 +760,10 @@ Python_Init(void)
if (PythonMod_Init())
goto fail;
/* The first python thread is vim's, release the lock. */
Python_SaveThread();
pygilstate = PyGILState_Ensure();
globals = PyModule_GetDict(PyImport_AddModule("__main__"));
/* Remove the element from sys.path that was added because of our
@@ -769,8 +772,7 @@ Python_Init(void)
* the current directory in sys.path. */
PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)");
/* the first python thread is vim's, release the lock */
Python_SaveThread();
PyGILState_Release(pygilstate);
initialised = 1;
}
+3
View File
@@ -1456,6 +1456,9 @@ getout(exitval)
for (wp = (tp == curtab)
? firstwin : tp->tp_firstwin; wp != NULL; wp = wp->w_next)
{
if (wp->w_buffer == NULL)
/* Autocmd must have close the buffer already, skip. */
continue;
buf = wp->w_buffer;
if (buf->b_changedtick != -1)
{
+29 -13
View File
@@ -304,7 +304,7 @@ movechangelist(count)
#endif
/*
* Find mark "c".
* Find mark "c" in buffer pointed to by "buf".
* If "changefile" is TRUE it's allowed to edit another file for '0, 'A, etc.
* If "fnum" is not NULL store the fnum there for '0, 'A etc., don't edit
* another file.
@@ -314,16 +314,26 @@ movechangelist(count)
* - NULL if there is no mark called 'c'.
* - -1 if mark is in other file and jumped there (only if changefile is TRUE)
*/
pos_T *
getmark_buf(buf, c, changefile)
buf_T *buf;
int c;
int changefile;
{
return getmark_buf_fnum(buf, c, changefile, NULL);
}
pos_T *
getmark(c, changefile)
int c;
int changefile;
{
return getmark_fnum(c, changefile, NULL);
return getmark_buf_fnum(curbuf, c, changefile, NULL);
}
pos_T *
getmark_fnum(c, changefile, fnum)
getmark_buf_fnum(buf, c, changefile, fnum)
buf_T *buf;
int c;
int changefile;
int *fnum;
@@ -351,15 +361,15 @@ getmark_fnum(c, changefile, fnum)
posp = &pos_copy; /* w_pcmark may be changed soon */
}
else if (c == '"') /* to pos when leaving buffer */
posp = &(curbuf->b_last_cursor);
posp = &(buf->b_last_cursor);
else if (c == '^') /* to where Insert mode stopped */
posp = &(curbuf->b_last_insert);
posp = &(buf->b_last_insert);
else if (c == '.') /* to where last change was made */
posp = &(curbuf->b_last_change);
posp = &(buf->b_last_change);
else if (c == '[') /* to start of previous operator */
posp = &(curbuf->b_op_start);
posp = &(buf->b_op_start);
else if (c == ']') /* to end of previous operator */
posp = &(curbuf->b_op_end);
posp = &(buf->b_op_end);
else if (c == '{' || c == '}') /* to previous/next paragraph */
{
pos_T pos;
@@ -395,8 +405,8 @@ getmark_fnum(c, changefile, fnum)
#ifdef FEAT_VISUAL
else if (c == '<' || c == '>') /* start/end of visual area */
{
startp = &curbuf->b_visual.vi_start;
endp = &curbuf->b_visual.vi_end;
startp = &buf->b_visual.vi_start;
endp = &buf->b_visual.vi_end;
if ((c == '<') == lt(*startp, *endp))
posp = startp;
else
@@ -404,7 +414,7 @@ getmark_fnum(c, changefile, fnum)
/*
* For Visual line mode, set mark at begin or end of line
*/
if (curbuf->b_visual.vi_mode == 'V')
if (buf->b_visual.vi_mode == 'V')
{
pos_copy = *posp;
posp = &pos_copy;
@@ -420,7 +430,7 @@ getmark_fnum(c, changefile, fnum)
#endif
else if (ASCII_ISLOWER(c)) /* normal named mark */
{
posp = &(curbuf->b_namedm[c - 'a']);
posp = &(buf->b_namedm[c - 'a']);
}
else if (ASCII_ISUPPER(c) || VIM_ISDIGIT(c)) /* named file mark */
{
@@ -435,7 +445,7 @@ getmark_fnum(c, changefile, fnum)
if (fnum != NULL)
*fnum = namedfm[c].fmark.fnum;
else if (namedfm[c].fmark.fnum != curbuf->b_fnum)
else if (namedfm[c].fmark.fnum != buf->b_fnum)
{
/* mark is in another file */
posp = &pos_copy;
@@ -1037,6 +1047,7 @@ mark_adjust(line1, line2, amount, amount_after)
#ifdef FEAT_WINDOWS
tabpage_T *tab;
#endif
static pos_T initpos = INIT_POS_T(1, 0, 0);
if (line2 < line1 && amount_after == 0L) /* nothing to do */
return;
@@ -1062,6 +1073,11 @@ mark_adjust(line1, line2, amount, amount_after)
/* last change position */
one_adjust(&(curbuf->b_last_change.lnum));
/* last cursor position, if it was set */
if (!equalpos(curbuf->b_last_cursor, initpos))
one_adjust(&(curbuf->b_last_cursor.lnum));
#ifdef FEAT_JUMPLIST
/* list of change positions */
for (i = 0; i < curbuf->b_changelistlen; ++i)
+54 -3
View File
@@ -868,12 +868,20 @@ remove_bom(s)
int
mb_get_class(p)
char_u *p;
{
return mb_get_class_buf(p, curbuf);
}
int
mb_get_class_buf(p, buf)
char_u *p;
buf_T *buf;
{
if (MB_BYTE2LEN(p[0]) == 1)
{
if (p[0] == NUL || vim_iswhite(p[0]))
return 0;
if (vim_iswordc(p[0]))
if (vim_iswordc_buf(p[0], buf))
return 2;
return 1;
}
@@ -3242,7 +3250,7 @@ utf_strnicmp(s1, s2, n1, n2)
/*
* Version of strnicmp() that handles multi-byte characters.
* Needed for Big5, Sjift-JIS and UTF-8 encoding. Other DBCS encodings can
* Needed for Big5, Shift-JIS and UTF-8 encoding. Other DBCS encodings can
* probably use strnicmp(), because there are no ASCII characters in the
* second byte.
* Returns zero if s1 and s2 are equal (ignoring case), the difference between
@@ -4293,6 +4301,47 @@ static HINSTANCE hMsvcrtDLL = 0;
# define DYNAMIC_MSVCRT_DLL "msvcrt.dll"
# endif
/*
* Get the address of 'funcname' which is imported by 'hInst' DLL.
*/
static void *
get_iconv_import_func(HINSTANCE hInst, const char *funcname)
{
PBYTE pImage = (PBYTE)hInst;
PIMAGE_DOS_HEADER pDOS = (PIMAGE_DOS_HEADER)hInst;
PIMAGE_NT_HEADERS pPE;
PIMAGE_IMPORT_DESCRIPTOR pImpDesc;
PIMAGE_THUNK_DATA pIAT; /* Import Address Table */
PIMAGE_THUNK_DATA pINT; /* Import Name Table */
PIMAGE_IMPORT_BY_NAME pImpName;
if (pDOS->e_magic != IMAGE_DOS_SIGNATURE)
return NULL;
pPE = (PIMAGE_NT_HEADERS)(pImage + pDOS->e_lfanew);
if (pPE->Signature != IMAGE_NT_SIGNATURE)
return NULL;
pImpDesc = (PIMAGE_IMPORT_DESCRIPTOR)(pImage
+ pPE->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]
.VirtualAddress);
for (; pImpDesc->FirstThunk; ++pImpDesc)
{
if (!pImpDesc->OriginalFirstThunk)
continue;
pIAT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->FirstThunk);
pINT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->OriginalFirstThunk);
for (; pIAT->u1.Function; ++pIAT, ++pINT)
{
if (IMAGE_SNAP_BY_ORDINAL(pINT->u1.Ordinal))
continue;
pImpName = (PIMAGE_IMPORT_BY_NAME)(pImage
+ (UINT_PTR)(pINT->u1.AddressOfData));
if (strcmp(pImpName->Name, funcname) == 0)
return (void *)pIAT->u1.Function;
}
}
return NULL;
}
/*
* Try opening the iconv.dll and return TRUE if iconv() can be used.
*/
@@ -4326,7 +4375,9 @@ iconv_enabled(verbose)
iconv_open = (void *)GetProcAddress(hIconvDLL, "libiconv_open");
iconv_close = (void *)GetProcAddress(hIconvDLL, "libiconv_close");
iconvctl = (void *)GetProcAddress(hIconvDLL, "libiconvctl");
iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno");
iconv_errno = get_iconv_import_func(hIconvDLL, "_errno");
if (iconv_errno == NULL)
iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno");
if (iconv == NULL || iconv_open == NULL || iconv_close == NULL
|| iconvctl == NULL || iconv_errno == NULL)
{
+8 -4
View File
@@ -2288,14 +2288,18 @@ ins_char_bytes(buf, charlen)
*/
if (p_sm && (State & INSERT)
&& msg_silent == 0
#ifdef FEAT_MBYTE
&& charlen == 1
#endif
#ifdef FEAT_INS_EXPAND
&& !ins_compl_active()
#endif
)
showmatch(c);
{
#ifdef FEAT_MBYTE
if (has_mbyte)
showmatch(mb_ptr2char(buf));
else
#endif
showmatch(c);
}
#ifdef FEAT_RIGHTLEFT
if (!p_ri || (State & REPLACE_FLAG))
+9 -5
View File
@@ -7557,7 +7557,7 @@ nv_gomark(cap)
pos_T *pos;
int c;
#ifdef FEAT_FOLDING
linenr_T lnum = curwin->w_cursor.lnum;
pos_T old_cursor = curwin->w_cursor;
int old_KeyTyped = KeyTyped; /* getting file may reset it */
#endif
@@ -7586,7 +7586,8 @@ nv_gomark(cap)
#endif
#ifdef FEAT_FOLDING
if (cap->oap->op_type == OP_NOP
&& (pos == (pos_T *)-1 || lnum != curwin->w_cursor.lnum)
&& pos != NULL
&& (pos == (pos_T *)-1 || !equalpos(old_cursor, *pos))
&& (fdo_flags & FDO_MARK)
&& old_KeyTyped)
foldOpenCursor();
@@ -8662,7 +8663,9 @@ nv_lineop(cap)
cap->oap->motion_type = MLINE;
if (cursor_down(cap->count1 - 1L, cap->oap->op_type == OP_NOP) == FAIL)
clearopbeep(cap->oap);
else if ( cap->oap->op_type == OP_DELETE
else if ( (cap->oap->op_type == OP_DELETE /* only with linewise motions */
&& cap->oap->motion_force != 'v'
&& cap->oap->motion_force != Ctrl_V)
|| cap->oap->op_type == OP_LSHIFT
|| cap->oap->op_type == OP_RSHIFT)
beginline(BL_SOL | BL_FIX);
@@ -9444,14 +9447,15 @@ nv_put(cap)
# ifdef FEAT_CLIPBOARD
adjust_clip_reg(&regname);
# endif
if (regname == 0 || regname == '"' || VIM_ISDIGIT(regname)
if (regname == 0 || regname == '"'
|| VIM_ISDIGIT(regname) || regname == '-'
# ifdef FEAT_CLIPBOARD
|| (clip_unnamed && (regname == '*' || regname == '+'))
# endif
)
{
/* the delete is going to overwrite the register we want to
/* The delete is going to overwrite the register we want to
* put, save it first. */
reg1 = get_register(regname, TRUE);
}
+6
View File
@@ -3351,6 +3351,12 @@ do_put(regname, dir, count, flags)
return;
}
#ifdef FEAT_AUTOCMD
/* Autocommands may be executed when saving lines for undo, which may make
* y_array invalid. Start undo now to avoid that. */
u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1);
#endif
if (insert_string != NULL)
{
y_type = MCHAR;
+135 -7
View File
@@ -6225,16 +6225,46 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
/* 'matchpairs' */
else if (gvarp == &p_mps)
{
/* Check for "x:y,x:y" */
for (p = *varp; *p != NUL; p += 4)
#ifdef FEAT_MBYTE
if (has_mbyte)
{
if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ','))
for (p = *varp; *p != NUL; ++p)
{
errmsg = e_invarg;
break;
int x2 = -1;
int x3 = -1;
if (*p != NUL)
p += mb_ptr2len(p);
if (*p != NUL)
x2 = *p++;
if (*p != NUL)
{
x3 = mb_ptr2char(p);
p += mb_ptr2len(p);
}
if (x2 != ':' || x3 == -1 || (*p != NUL && *p != ','))
{
errmsg = e_invarg;
break;
}
if (*p == NUL)
break;
}
}
else
#endif
{
/* Check for "x:y,x:y" */
for (p = *varp; *p != NUL; p += 4)
{
if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ','))
{
errmsg = e_invarg;
break;
}
if (p[3] == NUL)
break;
}
if (p[3] == NUL)
break;
}
}
@@ -11598,6 +11628,104 @@ get_sts_value()
return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts;
}
/*
* Check matchpairs option for "*initc".
* If there is a match set "*initc" to the matching character and "*findc" to
* the opposite character. Set "*backwards" to the direction.
* When "switchit" is TRUE swap the direction.
*/
void
find_mps_values(initc, findc, backwards, switchit)
int *initc;
int *findc;
int *backwards;
int switchit;
{
char_u *ptr;
ptr = curbuf->b_p_mps;
while (*ptr != NUL)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
{
char_u *prev;
if (mb_ptr2char(ptr) == *initc)
{
if (switchit)
{
*findc = *initc;
*initc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1);
*backwards = TRUE;
}
else
{
*findc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1);
*backwards = FALSE;
}
return;
}
prev = ptr;
ptr += mb_ptr2len(ptr) + 1;
if (mb_ptr2char(ptr) == *initc)
{
if (switchit)
{
*findc = *initc;
*initc = mb_ptr2char(prev);
*backwards = FALSE;
}
else
{
*findc = mb_ptr2char(prev);
*backwards = TRUE;
}
return;
}
ptr += mb_ptr2len(ptr);
}
else
#endif
{
if (*ptr == *initc)
{
if (switchit)
{
*backwards = TRUE;
*findc = *initc;
*initc = ptr[2];
}
else
{
*backwards = FALSE;
*findc = ptr[2];
}
return;
}
ptr += 2;
if (*ptr == *initc)
{
if (switchit)
{
*backwards = FALSE;
*findc = *initc;
*initc = ptr[-2];
}
else
{
*backwards = TRUE;
*findc = ptr[-2];
}
return;
}
++ptr;
}
if (*ptr == ',')
++ptr;
}
}
#ifdef FEAT_FULLSCREEN
/*
* Read the 'fuoptions' option, set fuoptions_flags and
+4 -3
View File
@@ -278,7 +278,8 @@ static struct signalinfo
#ifdef SIGBUS
{SIGBUS, "BUS", TRUE},
#endif
#ifdef SIGSEGV
#if defined(SIGSEGV) && !defined(FEAT_MZSCHEME)
/* MzScheme uses SEGV in its garbage collector */
{SIGSEGV, "SEGV", TRUE},
#endif
#ifdef SIGSYS
@@ -3784,7 +3785,7 @@ wait4pid(child, status)
# endif
if (wait_pid == 0)
{
/* Wait for 1/100 sec before trying again. */
/* Wait for 10 msec before trying again. */
mch_delay(10L, TRUE);
continue;
}
@@ -4819,7 +4820,7 @@ finished:
{
/* LINTED avoid "bitwise operation on signed value" */
retval = WEXITSTATUS(status);
if (retval && !emsg_silent)
if (retval != 0 && !emsg_silent)
{
if (retval == EXEC_FAILED)
{
+21 -7
View File
@@ -34,6 +34,16 @@ LANGUAGES = \
zh_TW \
zh_TW.UTF-8
CONVERTED = \
cs.cp1250 \
ja.sjis \
pl.cp1250 \
pl.UTF-8 \
ru.cp1251 \
sk.cp1250 \
uk.cp1251 \
zh_CN.cp936
MOFILES = \
af.mo \
ca.mo \
@@ -64,7 +74,7 @@ MOFILES = \
zh_TW.UTF-8.mo \
zh_TW.mo
CONVERTED = \
MOCONVERTED = \
cs.cp1250.mo \
ja.sjis.mo \
pl.cp1250.mo \
@@ -126,7 +136,7 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
.SUFFIXES:
.SUFFIXES: .po .mo .pot .ck
.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES)
.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED)
.po.mo:
$(MSGFMT) -o $@ $<
@@ -135,13 +145,13 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
$(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
touch $@
all: $(MOFILES)
all: $(MOFILES) $(MOCONVERTED)
check: $(CHECKFILES)
install: $(MOFILES)
install: $(MOFILES) $(MOCONVERTED)
@$(MAKE) prefixcheck
for lang in $(LANGUAGES); do \
for lang in $(LANGUAGES) $(CONVERTED); do \
dir=$(LOCALEDIR)/$$lang/; \
if test ! -x "$$dir"; then \
mkdir $$dir; chmod 755 $$dir; \
@@ -158,13 +168,17 @@ install: $(MOFILES)
uninstall:
@$(MAKE) prefixcheck
for cat in $(MOFILES); do \
for cat in $(MOFILES) $(MOCONVERTED); do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done
converted: $(CONVERTED)
converted: $(MOCONVERTED)
# nl.po was added later, if it does not exist use an empty file.
nl.po:
touch nl.po
# Norwegian/Bokmal: "nb" is an alias for "no".
# Copying the file is not efficient, but I don't know of another way to make
+3 -3
View File
@@ -2754,16 +2754,16 @@ msgid "-Z\t\t\tRestricted mode (like \"rvim\")"
msgstr "-Z\t\t\tEingeschränkter Modus (wie \"rvim\")"
msgid "-m\t\t\tModifications (writing files) not allowed"
msgstr "-m\t\t\tModifikatioen (beim Schreiben von Dateien) sind nicht erlaubt"
msgstr "-m\t\t\tModifikationen (beim Schreiben von Dateien) sind nicht erlaubt"
msgid "-M\t\t\tModifications in text not allowed"
msgstr "-M\t\t\tModifikatioen im Text nicht erlaubt"
msgstr "-M\t\t\tModifikationen im Text nicht erlaubt"
msgid "-b\t\t\tBinary mode"
msgstr "-b\t\t\tBinärmodus"
msgid "-l\t\t\tLisp mode"
msgstr "-l\t\t\tList Modus"
msgstr "-l\t\t\tLisp Modus"
msgid "-C\t\t\tCompatible with Vi: 'compatible'"
msgstr "-C\t\t\tKompatibel zu Vi: 'compatible'"
+356 -252
View File
File diff suppressed because it is too large Load Diff
+356 -252
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -19,8 +19,9 @@ int linetabsize_col __ARGS((int startcol, char_u *s));
int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len));
int vim_isIDc __ARGS((int c));
int vim_iswordc __ARGS((int c));
int vim_iswordc_buf __ARGS((int c, buf_T *buf));
int vim_iswordp __ARGS((char_u *p));
int vim_iswordc_buf __ARGS((char_u *p, buf_T *buf));
int vim_iswordp_buf __ARGS((char_u *p, buf_T *buf));
int vim_isfilec __ARGS((int c));
int vim_isfilec_or_wc __ARGS((int c));
int vim_isprintc __ARGS((int c));
+1
View File
@@ -74,6 +74,7 @@ long get_dict_number __ARGS((dict_T *d, char_u *key));
char_u *get_function_name __ARGS((expand_T *xp, int idx));
char_u *get_expr_name __ARGS((expand_T *xp, int idx));
int func_call __ARGS((char_u *name, typval_T *args, dict_T *selfdict, typval_T *rettv));
void mzscheme_call_vim __ARGS((char_u *name, typval_T *args, typval_T *rettv));
long do_searchpair __ARGS((char_u *spat, char_u *mpat, char_u *epat, int dir, char_u *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit));
void set_vim_var_nr __ARGS((int idx, long val));
long get_vim_var_nr __ARGS((int idx));
+1
View File
@@ -50,6 +50,7 @@ void gui_mch_delete_lines __ARGS((int row, int num_lines));
void gui_mch_insert_lines __ARGS((int row, int num_lines));
void gui_mch_exit __ARGS((int rc));
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
void gui_mch_wide_font_changed __ARGS((void));
int gui_mch_maximized __ARGS((void));
void gui_mch_newfont __ARGS((void));
void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
+1
View File
@@ -50,6 +50,7 @@ void gui_mch_delete_lines __ARGS((int row, int num_lines));
void gui_mch_insert_lines __ARGS((int row, int num_lines));
void gui_mch_exit __ARGS((int rc));
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
void gui_mch_wide_font_changed __ARGS((void));
int gui_mch_maximized __ARGS((void));
void gui_mch_newfont __ARGS((void));
void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
+2 -1
View File
@@ -5,8 +5,9 @@ void setpcmark __ARGS((void));
void checkpcmark __ARGS((void));
pos_T *movemark __ARGS((int count));
pos_T *movechangelist __ARGS((int count));
pos_T *getmark_buf __ARGS((buf_T *buf, int c, int changefile));
pos_T *getmark __ARGS((int c, int changefile));
pos_T *getmark_fnum __ARGS((int c, int changefile, int *fnum));
pos_T *getmark_buf_fnum __ARGS((buf_T *buf, int c, int changefile, int *fnum));
pos_T *getnextmark __ARGS((pos_T *startpos, int dir, int begin_line));
void fmarks_check_names __ARGS((buf_T *buf));
int check_mark __ARGS((pos_T *pos));
+1
View File
@@ -4,6 +4,7 @@ char_u *mb_init __ARGS((void));
int bomb_size __ARGS((void));
void remove_bom __ARGS((char_u *s));
int mb_get_class __ARGS((char_u *p));
int mb_get_class_buf __ARGS((char_u *p, buf_T *buf));
int dbcs_class __ARGS((unsigned lead, unsigned trail));
int latin_char2len __ARGS((int c));
int latin_char2bytes __ARGS((int c, char_u *buf));
+1
View File
@@ -59,4 +59,5 @@ int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
int check_ff_value __ARGS((char_u *p));
long get_sw_value __ARGS((void));
long get_sts_value __ARGS((void));
void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
/* vim: set ft=c : */
+34
View File
@@ -3109,6 +3109,9 @@ ex_vimgrep(eap)
char_u *p;
int fi;
qf_info_T *qi = &ql_info;
#ifdef FEAT_AUTOCMD
qfline_T *cur_qf_start;
#endif
qfline_T *prevp = NULL;
long lnum;
buf_T *buf;
@@ -3218,6 +3221,12 @@ ex_vimgrep(eap)
* ":lcd %:p:h" changes the meaning of short path names. */
mch_dirname(dirname_start, MAXPATHL);
#ifdef FEAT_AUTOCMD
/* Remeber the value of qf_start, so that we can check for autocommands
* changing the current quickfix list. */
cur_qf_start = qi->qf_lists[qi->qf_curlist].qf_start;
#endif
seconds = (time_t)0;
for (fi = 0; fi < fcount && !got_int && tomatch > 0; ++fi)
{
@@ -3273,6 +3282,28 @@ ex_vimgrep(eap)
/* Use existing, loaded buffer. */
using_dummy = FALSE;
#ifdef FEAT_AUTOCMD
if (cur_qf_start != qi->qf_lists[qi->qf_curlist].qf_start)
{
int idx;
/* Autocommands changed the quickfix list. Find the one we were
* using and restore it. */
for (idx = 0; idx < LISTCOUNT; ++idx)
if (cur_qf_start == qi->qf_lists[idx].qf_start)
{
qi->qf_curlist = idx;
break;
}
if (idx == LISTCOUNT)
{
/* List cannot be found, create a new one. */
qf_new_list(qi, *eap->cmdlinep);
cur_qf_start = qi->qf_lists[qi->qf_curlist].qf_start;
}
}
#endif
if (buf == NULL)
{
if (!got_int)
@@ -3324,6 +3355,9 @@ ex_vimgrep(eap)
if (got_int)
break;
}
#ifdef FEAT_AUTOCMD
cur_qf_start = qi->qf_lists[qi->qf_curlist].qf_start;
#endif
if (using_dummy)
{
+24 -21
View File
@@ -2397,13 +2397,15 @@ collection:
/* '\n' in range: also match NL */
if (ret != JUST_CALC_SIZE)
{
if (*ret == ANYBUT)
*ret = ANYBUT + ADD_NL;
else if (*ret == ANYOF)
/* Using \n inside [^] does not change what
* matches. "[^\n]" is the same as ".". */
if (*ret == ANYOF)
{
*ret = ANYOF + ADD_NL;
*flagp |= HASNL;
}
/* else: must have had a \n already */
}
*flagp |= HASNL;
regparse++;
startc = -1;
}
@@ -3413,7 +3415,7 @@ static unsigned reg_tofreelen;
* reg_startpos <invalid> reg_mmatch->startpos
* reg_endpos <invalid> reg_mmatch->endpos
* reg_win NULL window in which to search
* reg_buf <invalid> buffer in which to search
* reg_buf curbuf buffer in which to search
* reg_firstlnum <invalid> first line in which to search
* reg_maxline 0 last line nr
* reg_line_lbr FALSE or TRUE FALSE
@@ -3571,6 +3573,7 @@ vim_regexec(rmp, line, col)
reg_mmatch = NULL;
reg_maxline = 0;
reg_line_lbr = FALSE;
reg_buf = curbuf;
reg_win = NULL;
ireg_ic = rmp->rm_ic;
#ifdef FEAT_MBYTE
@@ -3595,6 +3598,7 @@ vim_regexec_nl(rmp, line, col)
reg_mmatch = NULL;
reg_maxline = 0;
reg_line_lbr = TRUE;
reg_buf = curbuf;
reg_win = NULL;
ireg_ic = rmp->rm_ic;
#ifdef FEAT_MBYTE
@@ -3623,7 +3627,6 @@ vim_regexec_multi(rmp, win, buf, lnum, col, tm)
proftime_T *tm; /* timeout limit or NULL */
{
long r;
buf_T *save_curbuf = curbuf;
reg_match = NULL;
reg_mmatch = rmp;
@@ -3638,10 +3641,7 @@ vim_regexec_multi(rmp, win, buf, lnum, col, tm)
#endif
ireg_maxcol = rmp->rmm_maxcol;
/* Need to switch to buffer "buf" to make vim_iswordc() work. */
curbuf = buf;
r = vim_regexec_both(NULL, col, tm);
curbuf = save_curbuf;
return r;
}
@@ -4015,8 +4015,8 @@ static int reg_prev_class __ARGS((void));
reg_prev_class()
{
if (reginput > regline)
return mb_get_class(reginput - 1
- (*mb_head_off)(regline, reginput - 1));
return mb_get_class_buf(reginput - 1
- (*mb_head_off)(regline, reginput - 1), reg_buf);
return -1;
}
@@ -4185,7 +4185,7 @@ regmatch(scan)
int cmp = OPERAND(scan)[1];
pos_T *pos;
pos = getmark(mark, FALSE);
pos = getmark_buf(reg_buf, mark, FALSE);
if (pos == NULL /* mark doesn't exist */
|| pos->lnum <= 0 /* mark isn't set (in curbuf) */
|| (pos->lnum == reglnum + reg_firstlnum
@@ -4306,7 +4306,7 @@ regmatch(scan)
int this_class;
/* Get class of current and previous char (if it exists). */
this_class = mb_get_class(reginput);
this_class = mb_get_class_buf(reginput, reg_buf);
if (this_class <= 1)
status = RA_NOMATCH; /* not on a word at all */
else if (reg_prev_class() == this_class)
@@ -4315,8 +4315,8 @@ regmatch(scan)
#endif
else
{
if (!vim_iswordc(c)
|| (reginput > regline && vim_iswordc(reginput[-1])))
if (!vim_iswordc_buf(c, reg_buf) || (reginput > regline
&& vim_iswordc_buf(reginput[-1], reg_buf)))
status = RA_NOMATCH;
}
break;
@@ -4330,7 +4330,7 @@ regmatch(scan)
int this_class, prev_class;
/* Get class of current and previous char (if it exists). */
this_class = mb_get_class(reginput);
this_class = mb_get_class_buf(reginput, reg_buf);
prev_class = reg_prev_class();
if (this_class == prev_class
|| prev_class == 0 || prev_class == 1)
@@ -4339,13 +4339,14 @@ regmatch(scan)
#endif
else
{
if (!vim_iswordc(reginput[-1])
|| (reginput[0] != NUL && vim_iswordc(c)))
if (!vim_iswordc_buf(reginput[-1], reg_buf)
|| (reginput[0] != NUL && vim_iswordc_buf(c, reg_buf)))
status = RA_NOMATCH;
}
break; /* Matched with EOW */
case ANY:
/* ANY does not match new lines. */
if (c == NUL)
status = RA_NOMATCH;
else
@@ -4367,14 +4368,14 @@ regmatch(scan)
break;
case KWORD:
if (!vim_iswordp(reginput))
if (!vim_iswordp_buf(reginput, reg_buf))
status = RA_NOMATCH;
else
ADVANCE_REGINPUT();
break;
case SKWORD:
if (VIM_ISDIGIT(*reginput) || !vim_iswordp(reginput))
if (VIM_ISDIGIT(*reginput) || !vim_iswordp_buf(reginput, reg_buf))
status = RA_NOMATCH;
else
ADVANCE_REGINPUT();
@@ -5736,7 +5737,8 @@ regrepeat(p, maxcount)
case SKWORD + ADD_NL:
while (count < maxcount)
{
if (vim_iswordp(scan) && (testval || !VIM_ISDIGIT(*scan)))
if (vim_iswordp_buf(scan, reg_buf)
&& (testval || !VIM_ISDIGIT(*scan)))
{
mb_ptr_adv(scan);
}
@@ -7139,6 +7141,7 @@ vim_regsub(rmp, source, dest, copy, magic, backslash)
reg_match = rmp;
reg_mmatch = NULL;
reg_maxline = 0;
reg_buf = curbuf;
return vim_regsub_both(source, dest, copy, magic, backslash);
}
#endif
+21 -9
View File
@@ -2319,6 +2319,7 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
{
int w = number_width(wp);
long num;
char *fmt = "%*ld ";
if (len > w + 1)
len = w + 1;
@@ -2327,10 +2328,17 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
/* 'number' */
num = (long)lnum;
else
{
/* 'relativenumber', don't use negative numbers */
num = labs((long)get_cursor_rel_lnum(wp, lnum));
if (num == 0)
{
num = lnum;
fmt = "%-*ld ";
}
}
sprintf((char *)buf, "%*ld ", w, num);
sprintf((char *)buf, fmt, w, num);
#ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl)
/* the line number isn't reversed */
@@ -3484,15 +3492,23 @@ win_line(wp, lnum, startrow, endrow, nochange)
)
{
long num;
char *fmt = "%*ld ";
if (wp->w_p_nu)
/* 'number' */
num = (long)lnum;
else
{
/* 'relativenumber', don't use negative numbers */
num = labs((long)get_cursor_rel_lnum(wp, lnum));
if (num == 0)
{
num = lnum;
fmt = "%-*ld ";
}
}
sprintf((char *)extra, "%*ld ",
sprintf((char *)extra, fmt,
number_width(wp), num);
if (wp->w_skipcol > 0)
for (p_extra = extra; *p_extra == ' '; ++p_extra)
@@ -3513,7 +3529,8 @@ win_line(wp, lnum, startrow, endrow, nochange)
* the current line differently.
* TODO: Can we use CursorLine instead of CursorLineNr
* when CursorLineNr isn't set? */
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
if ((wp->w_p_cul || wp->w_p_rnu)
&& lnum == wp->w_cursor.lnum)
char_attr = hl_attr(HLF_CLN);
#endif
}
@@ -10267,12 +10284,7 @@ number_width(wp)
int n;
linenr_T lnum;
if (wp->w_p_nu)
/* 'number' */
lnum = wp->w_buffer->b_ml.ml_line_count;
else
/* 'relativenumber' */
lnum = wp->w_height;
lnum = wp->w_buffer->b_ml.ml_line_count;
if (lnum == wp->w_nrwidth_line_count)
return wp->w_nrwidth_width;
+18 -55
View File
@@ -581,7 +581,8 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
extra_col = 0;
#ifdef FEAT_MBYTE
/* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
else if (has_mbyte && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count
else if (dir != BACKWARD && has_mbyte
&& pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count
&& pos->col < MAXCOL - 2)
{
ptr = ml_get_buf(buf, pos->lnum, FALSE) + pos->col;
@@ -1795,28 +1796,8 @@ findmatchlimit(oap, initc, flags, maxtravel)
}
else if (initc != '#' && initc != NUL)
{
/* 'matchpairs' is "x:y,x:y" */
for (ptr = curbuf->b_p_mps; *ptr; ptr += 2)
{
if (*ptr == initc)
{
findc = initc;
initc = ptr[2];
backwards = TRUE;
break;
}
ptr += 2;
if (*ptr == initc)
{
findc = initc;
initc = ptr[-2];
backwards = FALSE;
break;
}
if (ptr[1] != ',')
break;
}
if (!findc) /* invalid initc! */
find_mps_values(&initc, &findc, &backwards, TRUE);
if (findc == NUL)
return NULL;
}
/*
@@ -1895,36 +1876,14 @@ findmatchlimit(oap, initc, flags, maxtravel)
--pos.col;
for (;;)
{
initc = linep[pos.col];
initc = PTR2CHAR(linep + pos.col);
if (initc == NUL)
break;
for (ptr = curbuf->b_p_mps; *ptr; ++ptr)
{
if (*ptr == initc)
{
findc = ptr[2];
backwards = FALSE;
break;
}
ptr += 2;
if (*ptr == initc)
{
findc = ptr[-2];
backwards = TRUE;
break;
}
if (!*++ptr)
break;
}
find_mps_values(&initc, &findc, &backwards, FALSE);
if (findc)
break;
#ifdef FEAT_MBYTE
if (has_mbyte)
pos.col += (*mb_ptr2len)(linep + pos.col);
else
#endif
++pos.col;
pos.col += MB_PTR2LEN(linep + pos.col);
}
if (!findc)
{
@@ -2269,7 +2228,8 @@ findmatchlimit(oap, initc, flags, maxtravel)
* inquote if the number of quotes in a line is even, unless this
* line or the previous one ends in a '\'. Complicated, isn't it?
*/
switch (c = linep[pos.col])
c = PTR2CHAR(linep + pos.col);
switch (c)
{
case NUL:
/* at end of line without trailing backslash, reset inquote */
@@ -2478,20 +2438,23 @@ showmatch(c)
* Only show match for chars in the 'matchpairs' option.
*/
/* 'matchpairs' is "x:y,x:y" */
for (p = curbuf->b_p_mps; *p != NUL; p += 2)
for (p = curbuf->b_p_mps; *p != NUL; ++p)
{
if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT
if (*p == c && (curwin->w_p_rl ^ p_ri))
break;
&& (curwin->w_p_rl ^ p_ri)
#endif
p += 2;
if (*p == c
)
break;
p += MB_PTR2LEN(p) + 1;
if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT
&& !(curwin->w_p_rl ^ p_ri)
#endif
)
break;
if (p[1] != ',')
p += MB_PTR2LEN(p);
if (*p == NUL)
return;
}
+3 -3
View File
@@ -1954,9 +1954,9 @@ syn_current_attr(syncing, displaying, can_spell, keep_state)
if (do_keywords)
{
line = syn_getcurline();
if (vim_iswordc_buf(line + current_col, syn_buf)
if (vim_iswordp_buf(line + current_col, syn_buf)
&& (current_col == 0
|| !vim_iswordc_buf(line + current_col - 1
|| !vim_iswordp_buf(line + current_col - 1
#ifdef FEAT_MBYTE
- (has_mbyte
? (*mb_head_off)(line, line + current_col - 1)
@@ -3280,7 +3280,7 @@ check_keyword_id(line, startcol, endcolp, flagsp, next_listp, cur_si, ccharp)
#endif
++kwlen;
}
while (vim_iswordc_buf(kwp + kwlen, syn_buf));
while (vim_iswordp_buf(kwp + kwlen, syn_buf));
if (kwlen > MAXKEYWLEN)
return 0;
+5 -1
View File
@@ -1,4 +1,5 @@
Tests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.
Also test that dv_ works correctly
STARTTEST
:so small.vim
@@ -16,7 +17,9 @@ r
:" Test that copyindent works with expandtab set
:set expandtab smartindent copyindent ts=8 sw=8 sts=8
o{
x:?^start?,$w! test.out
x:set nosol
/Second line/
fwdv_:?^start?,$w! test.out
:qa!
ENDTEST
@@ -27,3 +30,4 @@ test text
a cde
f ghi
test text
Second line beginning with whitespace
+1
View File
@@ -7,3 +7,4 @@ test text
test text
{
x
with whitespace
+4
View File
@@ -29,6 +29,9 @@ x/[\U1234abcd\u1234\uabcd]
x/\%d21879b
x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e
x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e
x:" Test backwards search from a multi-byte char
/x
x?.
x:?^1?,$w! test.out
:e! test.out
G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
@@ -57,3 +60,4 @@ f
g a啷bb
h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ
i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ
j 0123❤x
+1
View File
@@ -16,6 +16,7 @@ f z
g abb
h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐ
i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑ
j 012❤
ב
בג
א
+4
View File
@@ -54,8 +54,12 @@ $5lrxa<-- should be 'x'
^O3li4li4li <-- should show the name of a noted text editor
^o4li4li4li <-- and its version number-dd
:"
:" Test for yanking and pasting using the small delete register
gg/^foo
dewve"-p
:wq! test.out
ENDTEST
foo, bar
keyword keyw
all your base are belong to us
1 2 3 4 5 6
+1
View File
@@ -1,3 +1,4 @@
, foo
keyword keyword
all your base
are belong to vim
+10
View File
@@ -1,4 +1,5 @@
Test for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
STARTTEST
:so mbyte.vim
@@ -133,6 +134,15 @@ ENDTEST
}
STARTTEST
/^{/+1
:set mps+=u2018:u2019
d%
ENDTEST
{
two three four
}
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
+4
View File
@@ -140,3 +140,7 @@ a
a
}
{
four
}
+11 -1
View File
@@ -41,9 +41,19 @@ STARTTEST
:if l2[2] == l2
:let res = "OK"
:else
:let res = "FAILED"
:let res = "FAILED: " . l2[2]
:endif
:call setline(search("^3"), "circular test " . res)
:" funcrefs
:mz (define vim:max (vim-eval "function('max')"))
:mz (define m (vim:max '(1 100 8)))
:let m = mzeval('m')
:if m == 100
:let fref_res = "OK"
:else
:let fref_res = "FAILED: " . m
:end
:call append(line('$'), 'funcrefs '. fref_res)
:?^1?,$w! test.out
:qa!
ENDTEST
+1
View File
@@ -3,3 +3,4 @@ scalar test OK
2 line 2
dictionary with list OK
circular test OK
funcrefs OK
Binary file not shown.
Binary file not shown.
+26
View File
@@ -143,6 +143,32 @@ ENDTEST
TEST_8:
STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_8:\"
:$put =',,X'
:s/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'
:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:
ENDTEST
TEST_9:
STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_9:\"
:$put ='xxx'
:s/x/X/gc
yyq/^TEST_10:
ENDTEST
TEST_10:
STARTTEST
:/^Results/,$wq! test.out
ENDTEST
+10
View File
@@ -99,3 +99,13 @@ TEST_7:
A A
B
B
TEST_8:
N,,NX
N,,NY
N,,NZ
TEST_9:
XXx
+104
View File
@@ -740,6 +740,110 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
806,
/**/
805,
/**/
804,
/**/
803,
/**/
802,
/**/
801,
/**/
800,
/**/
799,
/**/
798,
/**/
797,
/**/
796,
/**/
795,
/**/
794,
/**/
793,
/**/
792,
/**/
791,
/**/
790,
/**/
789,
/**/
788,
/**/
787,
/**/
786,
/**/
785,
/**/
784,
/**/
783,
/**/
782,
/**/
781,
/**/
780,
/**/
779,
/**/
778,
/**/
777,
/**/
776,
/**/
775,
/**/
774,
/**/
773,
/**/
772,
/**/
771,
/**/
770,
/**/
769,
/**/
768,
/**/
767,
/**/
766,
/**/
765,
/**/
764,
/**/
763,
/**/
762,
/**/
761,
/**/
760,
/**/
759,
/**/
758,
/**/
757,
/**/
756,
/**/
755,
/**/
754,
/**/
+15 -15
View File
@@ -104,7 +104,7 @@
# endif
#endif
#if defined(MACOS_X) || defined(MACOS_CLASSIC)
# define MACOS
# define MACOS
#endif
#if defined(MACOS_X) && defined(MACOS_CLASSIC)
Error: To compile for both MACOS X and Classic use a Classic Carbon
@@ -491,7 +491,7 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
# include <string.h>
# endif
# if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H)
# include <strings.h>
# include <strings.h>
# endif
# ifdef HAVE_STAT_H
# include <stat.h>
@@ -516,22 +516,22 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
# include <stdarg.h>
#endif
# if defined(HAVE_SYS_SELECT_H) && \
#if defined(HAVE_SYS_SELECT_H) && \
(!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))
# include <sys/select.h>
# endif
# include <sys/select.h>
#endif
# ifndef HAVE_SELECT
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#ifndef HAVE_SELECT
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
# define HAVE_POLL
# else
# ifdef HAVE_POLL_H
# include <poll.h>
# define HAVE_POLL
# else
# ifdef HAVE_POLL_H
# include <poll.h>
# define HAVE_POLL
# endif
# endif
# endif
#endif
/* ================ end of the header file puzzle =============== */
@@ -1880,8 +1880,8 @@ typedef int proftime_T; /* dummy for function prototypes */
/* VIM_ATOM_NAME is the older Vim-specific selection type for X11. Still
* supported for when a mix of Vim versions is used. VIMENC_ATOM_NAME includes
* the encoding to support Vims using different 'encoding' values. */
#define VIM_ATOM_NAME "_VIM_TEXT"
#define VIMENC_ATOM_NAME "_VIMENC_TEXT"
# define VIM_ATOM_NAME "_VIM_TEXT"
# define VIMENC_ATOM_NAME "_VIMENC_TEXT"
/* Selection states for modeless selection */
# define SELECT_CLEARED 0
+12 -4
View File
@@ -2281,9 +2281,15 @@ win_close(win, free_buf)
#endif
}
if (only_one_window() && win_valid(win) && win->w_buffer == NULL
&& (last_window() || curtab != prev_curtab
|| close_last_window_tabpage(win, free_buf, prev_curtab)))
/* Autocommands have close all windows, quit now. */
getout(0);
/* Autocommands may have closed the window already, or closed the only
* other window or moved to another tab page. */
if (!win_valid(win) || last_window() || curtab != prev_curtab
else if (!win_valid(win) || last_window() || curtab != prev_curtab
|| close_last_window_tabpage(win, free_buf, prev_curtab))
return;
@@ -3990,9 +3996,10 @@ win_goto(wp)
#ifdef FEAT_CONCEAL
/* Conceal cursor line in previous window, unconceal in current window. */
if (win_valid(owp))
if (win_valid(owp) && owp->w_p_cole > 0 && !msg_scrolled)
update_single_line(owp, owp->w_cursor.lnum);
update_single_line(curwin, curwin->w_cursor.lnum);
if (curwin->w_p_cole > 0 && !msg_scrolled)
need_cursor_line_redraw = TRUE;
#endif
}
@@ -6292,7 +6299,8 @@ only_one_window()
return FALSE;
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if ((!((wp->w_buffer->b_help && !curbuf->b_help)
if (wp->w_buffer != NULL
&& (!((wp->w_buffer->b_help && !curbuf->b_help)
# ifdef FEAT_QUICKFIX
|| wp->w_p_pvw
# endif