mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
updated for version 7.1b
This commit is contained in:
parent
ff1d0d4cf5
commit
2bb8df23dc
@ -1,4 +1,4 @@
|
|||||||
*cmdline.txt* For Vim version 7.1a. Last change: 2006 Jul 18
|
*cmdline.txt* For Vim version 7.1b. Last change: 2006 Jul 18
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*pi_tar.txt* For Vim version 7.1a. Last change: 2006 Sep 29
|
*pi_tar.txt* For Vim version 7.1b. Last change: 2006 Sep 29
|
||||||
|
|
||||||
+====================+
|
+====================+
|
||||||
| Tar File Interface |
|
| Tar File Interface |
|
||||||
|
@ -12,13 +12,27 @@ endif
|
|||||||
|
|
||||||
runtime! indent/ruby.vim
|
runtime! indent/ruby.vim
|
||||||
unlet! b:did_indent
|
unlet! b:did_indent
|
||||||
|
set indentexpr=
|
||||||
|
|
||||||
runtime! indent/html.vim
|
if exists("b:eruby_subtype")
|
||||||
|
exe "runtime! indent/".b:eruby_subtype.".vim"
|
||||||
|
else
|
||||||
|
runtime! indent/html.vim
|
||||||
|
endif
|
||||||
unlet! b:did_indent
|
unlet! b:did_indent
|
||||||
|
|
||||||
|
if &l:indentexpr == ''
|
||||||
|
if &l:cindent
|
||||||
|
let &l:indentexpr = 'cindent(v:lnum)'
|
||||||
|
else
|
||||||
|
let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
let b:eruby_subtype_indentexpr = &l:indentexpr
|
||||||
|
|
||||||
let b:did_indent = 1
|
let b:did_indent = 1
|
||||||
|
|
||||||
setlocal indentexpr=GetErubyIndent(v:lnum)
|
setlocal indentexpr=GetErubyIndent()
|
||||||
setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=else,=elsif,=rescue,=ensure,=when
|
setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=else,=elsif,=rescue,=ensure,=when
|
||||||
|
|
||||||
" Only define the function once.
|
" Only define the function once.
|
||||||
@ -26,19 +40,19 @@ if exists("*GetErubyIndent")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! GetErubyIndent(lnum)
|
function! GetErubyIndent()
|
||||||
let vcol = col('.')
|
let vcol = col('.')
|
||||||
call cursor(a:lnum,1)
|
call cursor(v:lnum,1)
|
||||||
let inruby = searchpair('<%','','%>')
|
let inruby = searchpair('<%','','%>')
|
||||||
call cursor(a:lnum,vcol)
|
call cursor(v:lnum,vcol)
|
||||||
if inruby && getline(a:lnum) !~ '^<%'
|
if inruby && getline(v:lnum) !~ '^<%'
|
||||||
let ind = GetRubyIndent()
|
let ind = GetRubyIndent()
|
||||||
else
|
else
|
||||||
let ind = HtmlIndentGet(a:lnum)
|
exe "let ind = ".b:eruby_subtype_indentexpr
|
||||||
endif
|
endif
|
||||||
let lnum = prevnonblank(a:lnum-1)
|
let lnum = prevnonblank(v:lnum-1)
|
||||||
let line = getline(lnum)
|
let line = getline(lnum)
|
||||||
let cline = getline(a:lnum)
|
let cline = getline(v:lnum)
|
||||||
if cline =~# '<%\s*\%(end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%(-\=%>\|$\)'
|
if cline =~# '<%\s*\%(end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%(-\=%>\|$\)'
|
||||||
let ind = ind - &sw
|
let ind = ind - &sw
|
||||||
endif
|
endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Makefile
|
" Language: Makefile
|
||||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Latest Revision: 2006-04-26
|
" Latest Revision: 2007-05-07
|
||||||
|
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
finish
|
finish
|
||||||
@ -9,159 +9,108 @@ endif
|
|||||||
let b:did_indent = 1
|
let b:did_indent = 1
|
||||||
|
|
||||||
setlocal indentexpr=GetMakeIndent()
|
setlocal indentexpr=GetMakeIndent()
|
||||||
setlocal indentkeys=!^F,o,O
|
setlocal indentkeys=!^F,o,O,<:>,=else,=endif
|
||||||
setlocal nosmartindent
|
setlocal nosmartindent
|
||||||
|
|
||||||
if exists("*GetMakeIndent")
|
if exists("*GetMakeIndent")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let s:comment_rx = '^\s*#'
|
||||||
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
|
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||||
|
let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||||
let s:continuation_rx = '\\$'
|
let s:continuation_rx = '\\$'
|
||||||
let s:assignment_rx = '^\s*\h\w*\s*+\==\s*\zs.*\\$'
|
let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$'
|
||||||
|
let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\=='
|
||||||
|
" TODO: This needs to be a lot more restrictive in what it matches.
|
||||||
|
let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$'
|
||||||
|
let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>'
|
||||||
|
let s:end_conditional_directive_rx = '^\s*\%(else\|endif\)\>'
|
||||||
|
|
||||||
|
function s:remove_continuation(line)
|
||||||
|
return substitute(a:line, s:continuation_rx, "", "")
|
||||||
|
endfunction
|
||||||
|
|
||||||
" TODO: Deal with comments, string, and all kinds of other crap, e.g., defines.
|
|
||||||
" TODO: Unwrap the whole logic of this function into something that requires a
|
|
||||||
" lot less 'return's.
|
|
||||||
function GetMakeIndent()
|
function GetMakeIndent()
|
||||||
let lnum = v:lnum - 1
|
" TODO: Should this perhaps be v:lnum -1?
|
||||||
if lnum == 0
|
" let prev_lnum = prevnonblank(v:lnum - 1)
|
||||||
|
let prev_lnum = v:lnum - 1
|
||||||
|
if prev_lnum == 0
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
let prev_line = getline(prev_lnum)
|
||||||
|
|
||||||
" Figure out if the previous line is part of a rule or not. If it is, then
|
let prev_prev_lnum = prev_lnum - 1
|
||||||
" we more or less just indent by a 'tabstop', the previous' lines indent, or
|
let prev_prev_line = prev_prev_lnum != 0 ? getline(prev_prev_lnum) : ""
|
||||||
" remove all indent if the current line is itself a rule. Also, if the line
|
|
||||||
" in question is part of a continuation-line set constituting the rule line
|
|
||||||
" itself, we indent by either a 'shiftwidth', if the line is the first in the
|
|
||||||
" continuation, or use the indent of the previous line, if not.
|
|
||||||
while lnum > 0
|
|
||||||
let line = getline(lnum)
|
|
||||||
if line[0] != "\t"
|
|
||||||
" We found a non-shell-command line, i.e., one that doesn't have a
|
|
||||||
" leading tab.
|
|
||||||
if line =~ s:rule_rx
|
|
||||||
" The line looks like a rule line, so we must therefore either be inside a
|
|
||||||
" rule or we are a continuation line to that rule line.
|
|
||||||
if line =~ s:continuation_rx
|
|
||||||
" Ah, the rule line was continued, so look up the last continuation
|
|
||||||
" line that's above the current line.
|
|
||||||
while line =~ s:continuation_rx && lnum < v:lnum
|
|
||||||
let lnum += 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
endwhile
|
|
||||||
let lnum -= 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
endif
|
|
||||||
|
|
||||||
" If the line that we've found is right above the current line, deal
|
" TODO: Deal with comments. In comments, continuations aren't interesting.
|
||||||
" with it specifically.
|
if prev_line =~ s:continuation_rx
|
||||||
if lnum == v:lnum - 1
|
if prev_prev_line =~ s:continuation_rx
|
||||||
" If it was continued, indent the current line by a shiftwidth, as it
|
return indent(prev_lnum)
|
||||||
" is the first to follow it. Otherwise, depending on if the current
|
elseif prev_line =~ s:rule_rx
|
||||||
" line is a rule line, i.e, a rule line following another rule line,
|
return &sw
|
||||||
" then indent to the left margin. Otherwise, the current line is the
|
elseif prev_line =~ s:assignment_rx
|
||||||
" first shell-command line in the rule, so indent by a 'tabstop'
|
call cursor(prev_lnum, 1)
|
||||||
if line =~ s:continuation_rx
|
|
||||||
return &sw
|
|
||||||
else
|
|
||||||
return getline(v:lnum) =~ s:rule_rx ? 0 : &ts
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
" If the previous line was a continuation line, then unless it was
|
|
||||||
" itself a part of a continuation line, add a 'shiftwidth''s worth of
|
|
||||||
" indent. Otherwise, just use the indent of the previous line.
|
|
||||||
" Otherwise, if the previous line wasn't a continuation line, check
|
|
||||||
" if the one above it was. If it was then indent to whatever level
|
|
||||||
" the 'owning' line had. Otherwise, indent to the previous line's
|
|
||||||
" level.
|
|
||||||
let lnum = v:lnum - 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
if line =~ s:continuation_rx
|
|
||||||
let pnum = v:lnum - 2
|
|
||||||
let pine = getline(pnum)
|
|
||||||
if pine =~ s:continuation_rx
|
|
||||||
return indent(lnum)
|
|
||||||
else
|
|
||||||
return indent(lnum) + &sw
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let lnum = v:lnum - 2
|
|
||||||
let line = getline(lnum)
|
|
||||||
if line =~ s:continuation_rx
|
|
||||||
while lnum > 0
|
|
||||||
if line !~ s:continuation_rx
|
|
||||||
let lnum += 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let lnum -= 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
endwhile
|
|
||||||
" We've found the owning line. Indent to it's level.
|
|
||||||
return indent(lnum)
|
|
||||||
else
|
|
||||||
return indent(v:lnum - 1)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" The line wasn't a rule line, so the current line is part of a series
|
|
||||||
" of tab-indented lines that don't belong to any rule.
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let lnum -= 1
|
|
||||||
endwhile
|
|
||||||
|
|
||||||
" If the line before the one we are currently indenting ended with a
|
|
||||||
" continuation, then try to figure out what 'owns' that line and indent
|
|
||||||
" appropriately.
|
|
||||||
let lnum = v:lnum - 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
if line =~ s:continuation_rx
|
|
||||||
let indent = indent(lnum)
|
|
||||||
if line =~ s:assignment_rx
|
|
||||||
" The previous line is a continuation line that begins a variable-
|
|
||||||
" assignment expression, so set the indent to just beyond the whitespace
|
|
||||||
" following the assignment operator ('=').
|
|
||||||
call cursor(lnum, 1)
|
|
||||||
if search(s:assignment_rx, 'W') != 0
|
if search(s:assignment_rx, 'W') != 0
|
||||||
let indent = virtcol('.') - 1
|
return virtcol('.') - 1
|
||||||
|
else
|
||||||
|
" TODO: ?
|
||||||
|
return &sw
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
" TODO: OK, this might be a continued shell command, so perhaps indent
|
||||||
|
" properly here? Leave this out for now, but in the next release this
|
||||||
|
" should be using indent/sh.vim somehow.
|
||||||
|
"if prev_line =~ '^\t' " s:rule_command_rx
|
||||||
|
" if prev_line =~ '^\s\+[@-]\%(if\)\>'
|
||||||
|
" return indent(prev_lnum) + 2
|
||||||
|
" endif
|
||||||
|
"endif
|
||||||
|
return indent(prev_lnum) + &sw
|
||||||
endif
|
endif
|
||||||
|
elseif prev_prev_line =~ s:continuation_rx
|
||||||
" The previous line didn't constitute an assignment, so just indent to
|
let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line)
|
||||||
" whatever level it had.
|
let lnum = prev_prev_lnum - 1
|
||||||
return indent
|
let line = getline(lnum)
|
||||||
endif
|
while line =~ s:continuation_rx
|
||||||
|
let folded_line = s:remove_continuation(line) . ' ' . folded_line
|
||||||
" If the line above the line above the current line ended was continued,
|
|
||||||
" then the line above the current line was part of a continued line. Find
|
|
||||||
" the 'owning' line and indent to its level.
|
|
||||||
let lnum = v:lnum - 2
|
|
||||||
let line = getline(lnum)
|
|
||||||
if line =~ s:continuation_rx
|
|
||||||
while lnum > 0
|
|
||||||
if line !~ s:continuation_rx
|
|
||||||
let lnum += 1
|
|
||||||
let line = getline(lnum)
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let lnum -= 1
|
let lnum -= 1
|
||||||
let line = getline(lnum)
|
let line = getline(lnum)
|
||||||
endwhile
|
endwhile
|
||||||
" We've found the owning line. Indent to it's level.
|
let folded_lnum = lnum + 1
|
||||||
return indent(lnum)
|
if folded_line =~ s:rule_rx
|
||||||
endif
|
if getline(v:lnum) =~ s:rule_rx
|
||||||
|
return 0
|
||||||
" If nothing else caught on, then check if this line is a rule line. If it
|
else
|
||||||
" is, indent it to the left margin. Otherwise, simply use the indent of the
|
return &ts
|
||||||
" previous line.
|
endif
|
||||||
let line = getline(v:lnum)
|
else
|
||||||
if line =~ s:rule_rx
|
" elseif folded_line =~ s:folded_assignment_rx
|
||||||
return 0
|
if getline(v:lnum) =~ s:rule_rx
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return indent(folded_lnum)
|
||||||
|
endif
|
||||||
|
" else
|
||||||
|
" " TODO: ?
|
||||||
|
" return indent(prev_lnum)
|
||||||
|
endif
|
||||||
|
elseif prev_line =~ s:rule_rx
|
||||||
|
if getline(v:lnum) =~ s:rule_rx
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return &ts
|
||||||
|
endif
|
||||||
|
elseif prev_line =~ s:conditional_directive_rx
|
||||||
|
return &sw
|
||||||
else
|
else
|
||||||
return indent(v:lnum - 1)
|
let line = getline(v:lnum)
|
||||||
|
if line =~ s:just_inserted_rule_rx
|
||||||
|
return 0
|
||||||
|
elseif line =~ s:end_conditional_directive_rx
|
||||||
|
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - &sw
|
||||||
|
else
|
||||||
|
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: gpg(1) configuration file
|
" Language: gpg(1) configuration file
|
||||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Latest Revision: 2006-04-19
|
" Latest Revision: 2007-05-06
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@ -54,7 +54,7 @@ syn keyword gpgOption contained skipwhite nextgroup=gpgArg
|
|||||||
\ personal-digest-preferences photo-viewer
|
\ personal-digest-preferences photo-viewer
|
||||||
\ recipient s2k-cipher-algo s2k-digest-algo s2k-mode
|
\ recipient s2k-cipher-algo s2k-digest-algo s2k-mode
|
||||||
\ secret-keyring set-filename set-policy-url status-fd
|
\ secret-keyring set-filename set-policy-url status-fd
|
||||||
\ trusted-key
|
\ trusted-key verify-options
|
||||||
syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
|
syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
|
||||||
\ allow-freeform-uid allow-non-selfsigned-uid
|
\ allow-freeform-uid allow-non-selfsigned-uid
|
||||||
\ allow-secret-key-import always-trust
|
\ allow-secret-key-import always-trust
|
||||||
|
@ -263,7 +263,7 @@ EXTERN int trylevel INIT(= 0);
|
|||||||
/*
|
/*
|
||||||
* When "force_abort" is TRUE, always skip commands after an error message,
|
* When "force_abort" is TRUE, always skip commands after an error message,
|
||||||
* even after the outermost ":endif", ":endwhile" or ":endfor" or for a
|
* even after the outermost ":endif", ":endwhile" or ":endfor" or for a
|
||||||
* function whithout the "abort" flag. It is set to TRUE when "trylevel" is
|
* function without the "abort" flag. It is set to TRUE when "trylevel" is
|
||||||
* non-zero (and ":silent!" was not used) or an exception is being thrown at
|
* non-zero (and ":silent!" was not used) or an exception is being thrown at
|
||||||
* the time an error is detected. It is set to FALSE when "trylevel" gets
|
* the time an error is detected. It is set to FALSE when "trylevel" gets
|
||||||
* zero again and there was no error or interrupt or throw.
|
* zero again and there was no error or interrupt or throw.
|
||||||
@ -948,7 +948,7 @@ EXTERN typebuf_T typebuf /* typeahead buffer */
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
#ifdef FEAT_EX_EXTRA
|
#ifdef FEAT_EX_EXTRA
|
||||||
EXTERN int ex_normal_busy INIT(= 0); /* recursivenes of ex_normal() */
|
EXTERN int ex_normal_busy INIT(= 0); /* recursiveness of ex_normal() */
|
||||||
EXTERN int ex_normal_lock INIT(= 0); /* forbid use of ex_normal() */
|
EXTERN int ex_normal_lock INIT(= 0); /* forbid use of ex_normal() */
|
||||||
#endif
|
#endif
|
||||||
EXTERN int stop_insert_mode; /* for ":stopinsert" and 'insertmode' */
|
EXTERN int stop_insert_mode; /* for ":stopinsert" and 'insertmode' */
|
||||||
@ -984,7 +984,7 @@ EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */
|
|||||||
#endif
|
#endif
|
||||||
EXTERN int termcap_active INIT(= FALSE); /* set by starttermcap() */
|
EXTERN int termcap_active INIT(= FALSE); /* set by starttermcap() */
|
||||||
EXTERN int cur_tmode INIT(= TMODE_COOK); /* input terminal mode */
|
EXTERN int cur_tmode INIT(= TMODE_COOK); /* input terminal mode */
|
||||||
EXTERN int bangredo INIT(= FALSE); /* set to TRUE whith ! command */
|
EXTERN int bangredo INIT(= FALSE); /* set to TRUE with ! command */
|
||||||
EXTERN int searchcmdlen; /* length of previous search cmd */
|
EXTERN int searchcmdlen; /* length of previous search cmd */
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
EXTERN int reg_do_extmatch INIT(= 0); /* Used when compiling regexp:
|
EXTERN int reg_do_extmatch INIT(= 0); /* Used when compiling regexp:
|
||||||
@ -1304,8 +1304,8 @@ EXTERN linenr_T spell_redraw_lnum INIT(= 0);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALT_X_INPUT
|
#ifdef ALT_X_INPUT
|
||||||
/* we need to be able to go into the displatch loop while processing a command
|
/* we need to be able to go into the dispatch loop while processing a command
|
||||||
* recevied via alternate input. However, we don't want to process another
|
* received via alternate input. However, we don't want to process another
|
||||||
* command until the first is completed.
|
* command until the first is completed.
|
||||||
*/
|
*/
|
||||||
EXTERN int suppress_alternate_input INIT(= FALSE);
|
EXTERN int suppress_alternate_input INIT(= FALSE);
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
/* Define if struct sigcontext is present */
|
/* Define if struct sigcontext is present */
|
||||||
#define HAVE_SIGCONTEXT
|
#define HAVE_SIGCONTEXT
|
||||||
|
|
||||||
/* Define if toupper/tolower only work on lower/upercase characters */
|
/* Define if toupper/tolower only work on lower/uppercase characters */
|
||||||
/* #define BROKEN_TOUPPER */
|
/* #define BROKEN_TOUPPER */
|
||||||
|
|
||||||
/* Define if tgetstr() has a second argument that is (char *) */
|
/* Define if tgetstr() has a second argument that is (char *) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user