forked from aniani/vim
updated for version 7.0187
This commit is contained in:
parent
7df351eb8a
commit
28c258fd24
@ -1,13 +1,14 @@
|
|||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: XHTML 1.0 Strict
|
" Language: XHTML 1.0 Strict
|
||||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||||
" Last Change: 2006 Jan 22
|
" Last Change: 2006 Jan 24
|
||||||
|
|
||||||
function! htmlcomplete#CompleteTags(findstart, base)
|
function! htmlcomplete#CompleteTags(findstart, base)
|
||||||
if a:findstart
|
if a:findstart
|
||||||
" locate the start of the word
|
" locate the start of the word
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
let start = col('.') - 1
|
let start = col('.') - 1
|
||||||
|
let curline = line('.')
|
||||||
let compl_begin = col('.') - 2
|
let compl_begin = col('.') - 2
|
||||||
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
|
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
|
||||||
let start -= 1
|
let start -= 1
|
||||||
@ -20,8 +21,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
|||||||
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
|
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
|
||||||
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
|
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
|
||||||
if stylestart != 0 && styleend != 0
|
if stylestart != 0 && styleend != 0
|
||||||
let curpos = line('.')
|
if stylestart <= curline && styleend >= curline
|
||||||
if stylestart <= curpos && styleend >= curpos
|
|
||||||
let start = col('.') - 1
|
let start = col('.') - 1
|
||||||
let b:csscompl = 1
|
let b:csscompl = 1
|
||||||
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
|
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
|
||||||
@ -31,6 +31,27 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
|||||||
endif
|
endif
|
||||||
if !exists("b:csscompl")
|
if !exists("b:csscompl")
|
||||||
let b:compl_context = getline('.')[0:(compl_begin)]
|
let b:compl_context = getline('.')[0:(compl_begin)]
|
||||||
|
if b:compl_context !~ '<[^>]*$'
|
||||||
|
" Look like we may have broken tag. Check previous lines. Up to
|
||||||
|
" 10?
|
||||||
|
let i = 1
|
||||||
|
while 1
|
||||||
|
let context_line = getline(curline-i)
|
||||||
|
if context_line =~ '<[^>]*$'
|
||||||
|
" Yep, this is this line
|
||||||
|
let context_lines = getline(curline-i, curline)
|
||||||
|
let b:compl_context = join(context_lines, ' ')
|
||||||
|
break
|
||||||
|
elseif context_line =~ '>[^<]*$'
|
||||||
|
" Normal tag line, no need for completion at all
|
||||||
|
let b:compl_context = ''
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let i += 1
|
||||||
|
endwhile
|
||||||
|
" Make sure we don't have counter
|
||||||
|
unlet! i
|
||||||
|
endif
|
||||||
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
|
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
|
||||||
else
|
else
|
||||||
let b:compl_context = getline('.')[0:compl_begin]
|
let b:compl_context = getline('.')[0:compl_begin]
|
||||||
@ -94,7 +115,6 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
|||||||
return []
|
return []
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
"if context !~ '<$'
|
|
||||||
|
|
||||||
" Set attribute groups
|
" Set attribute groups
|
||||||
let coreattrs = ["id", "class", "style", "title"]
|
let coreattrs = ["id", "class", "style", "title"]
|
||||||
|
@ -1213,23 +1213,45 @@ The commands are sorted on the non-optional part of their name.
|
|||||||
|:keepalt| :keepa[lt] following command keeps the alternate file
|
|:keepalt| :keepa[lt] following command keeps the alternate file
|
||||||
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|
||||||
|:keepjumps| :keepj[jumps] following command keeps jumplist and marks
|
|:keepjumps| :keepj[jumps] following command keeps jumplist and marks
|
||||||
|
|:lNext| :lN[ext] go to previous entry in location list
|
||||||
|
|:lNfile| :lNf[ile] go to last entry in previous file
|
||||||
|:list| :l[ist] print lines
|
|:list| :l[ist] print lines
|
||||||
|
|:laddexpr| :lad[dexpr] add locations from expr
|
||||||
|
|:laddfile| :laddf[ile] add locations to current location list
|
||||||
|:last| :la[st] go to the last file in the argument list
|
|:last| :la[st] go to the last file in the argument list
|
||||||
|:language| :lan[guage] set the language (locale)
|
|:language| :lan[guage] set the language (locale)
|
||||||
|
|:lbuffer| :lb[uffer] parse locations and jump to first location
|
||||||
|:lcd| :lc[d] change directory locally
|
|:lcd| :lc[d] change directory locally
|
||||||
|:lchdir| :lch[dir] change directory locally
|
|:lchdir| :lch[dir] change directory locally
|
||||||
|
|:lclose| :lcl[ose] close location window
|
||||||
|:left| :le[ft] left align lines
|
|:left| :le[ft] left align lines
|
||||||
|:leftabove| :lefta[bove] make split window appear left or above
|
|:leftabove| :lefta[bove] make split window appear left or above
|
||||||
|:let| :let assign a value to a variable or option
|
|:let| :let assign a value to a variable or option
|
||||||
|
|:lexpr| :lex[pr] read locations from expr and jump to first
|
||||||
|
|:lfile| :lf[ile] read file with locations and jump to first
|
||||||
|
|:lfirst| :lfir[st] go to the specified location, default first one
|
||||||
|
|:lgetfile| :lg[etfile] read file with locations
|
||||||
|
|:ll| :ll go to specific location
|
||||||
|
|:llast| :lla[st] go to the specified location, default last one
|
||||||
|
|:llist| :lli[st] list all locations
|
||||||
|:lmap| :lm[ap] like ":map!" but includes Lang-Arg mode
|
|:lmap| :lm[ap] like ":map!" but includes Lang-Arg mode
|
||||||
|:lmapclear| :lmapc[lear] like ":mapclear!" but includes Lang-Arg mode
|
|:lmapclear| :lmapc[lear] like ":mapclear!" but includes Lang-Arg mode
|
||||||
|
|:lnext| :ln[ext] go to next location
|
||||||
|
|:lnewer| :lnew[er] go to newer location list
|
||||||
|
|:lnfile| :lnf[ile] go to first location in next file
|
||||||
|:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode
|
|:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode
|
||||||
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|
||||||
|:loadview| :lo[adview] load view for current window from a file
|
|:loadview| :lo[adview] load view for current window from a file
|
||||||
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|
||||||
|:lockvar| :lockv[ar] lock variables
|
|:lockvar| :lockv[ar] lock variables
|
||||||
|
|:lolder| :lol[der] go to older location list
|
||||||
|
|:lopen| :lope[n] open location window
|
||||||
|
|:lprevious| :lp[revious] go to previous location
|
||||||
|
|:lpfile| :lpf[ile] go to last location in previous file
|
||||||
|
|:lrewind| :lr[ewind] go to the specified location, default first one
|
||||||
|:ls| :ls list all buffers
|
|:ls| :ls list all buffers
|
||||||
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|
||||||
|
|:lwindow| :lw[indow] open or close location window
|
||||||
|:move| :m[ove] move lines
|
|:move| :m[ove] move lines
|
||||||
|:mark| :ma[rk] set a mark
|
|:mark| :ma[rk] set a mark
|
||||||
|:make| :mak[e] execute external command 'makeprg' and parse
|
|:make| :mak[e] execute external command 'makeprg' and parse
|
||||||
|
22
runtime/spell/cleanadd.vim
Normal file
22
runtime/spell/cleanadd.vim
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
" Vim script to clean the ll.xxxxx.add files of commented out entries
|
||||||
|
" Author: Antonio Colombo, Bram Moolenaar
|
||||||
|
" Last Update: 2006 Jan 19
|
||||||
|
|
||||||
|
" Time in seconds after last time an ll.xxxxx.add file was updated
|
||||||
|
" Default is one hour.
|
||||||
|
if !exists("g:spell_clean_limit")
|
||||||
|
let g:spell_clean_limit = 60 * 60
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Loop over all the runtime/spell/*.add files.
|
||||||
|
for s:fname in split(globpath(&rtp, "spell/*.add"), "\n")
|
||||||
|
if filewritable(s:fname) && localtime() - getftime(s:fname) > g:spell_clean_limit
|
||||||
|
silent exe "split " . escape(s:fname, ' \')
|
||||||
|
echo "Processing" s:fname
|
||||||
|
silent! g/^#/d
|
||||||
|
silent update
|
||||||
|
close
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
echo "Done"
|
16
src/buffer.c
16
src/buffer.c
@ -4758,7 +4758,21 @@ buf_spname(buf)
|
|||||||
{
|
{
|
||||||
#if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
|
#if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
|
||||||
if (bt_quickfix(buf))
|
if (bt_quickfix(buf))
|
||||||
return _("[Error List]");
|
{
|
||||||
|
win_T *win;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For location list window, w_llist_ref points to the location list.
|
||||||
|
* For quickfix window, w_llist_ref is NULL.
|
||||||
|
*/
|
||||||
|
FOR_ALL_WINDOWS(win)
|
||||||
|
if (win->w_buffer == buf)
|
||||||
|
break;
|
||||||
|
if (win != NULL && win->w_llist_ref != NULL)
|
||||||
|
return _("[Location List]");
|
||||||
|
else
|
||||||
|
return _("[Error List]");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_QUICKFIX
|
#ifdef FEAT_QUICKFIX
|
||||||
/* There is no _file_ when 'buftype' is "nofile", b_sfname
|
/* There is no _file_ when 'buftype' is "nofile", b_sfname
|
||||||
|
@ -2365,7 +2365,7 @@ vgetorpeek(advance)
|
|||||||
colnr_T col = 0, vcol;
|
colnr_T col = 0, vcol;
|
||||||
char_u *ptr;
|
char_u *ptr;
|
||||||
|
|
||||||
if (p_smd && msg_silent == 0)
|
if (mode_displayed)
|
||||||
{
|
{
|
||||||
unshowmode(TRUE);
|
unshowmode(TRUE);
|
||||||
mode_deleted = TRUE;
|
mode_deleted = TRUE;
|
||||||
@ -2643,7 +2643,7 @@ vgetorpeek(advance)
|
|||||||
*/
|
*/
|
||||||
if (advance && p_smd && msg_silent == 0 && (State & INSERT))
|
if (advance && p_smd && msg_silent == 0 && (State & INSERT))
|
||||||
{
|
{
|
||||||
if (c == ESC && !mode_deleted && !no_mapping)
|
if (c == ESC && !mode_deleted && !no_mapping && mode_displayed)
|
||||||
{
|
{
|
||||||
if (typebuf.tb_len && !KeyTyped)
|
if (typebuf.tb_len && !KeyTyped)
|
||||||
redraw_cmdline = TRUE; /* delete mode later */
|
redraw_cmdline = TRUE; /* delete mode later */
|
||||||
|
@ -1004,7 +1004,10 @@ mark_adjust(line1, line2, amount, amount_after)
|
|||||||
|
|
||||||
#ifdef FEAT_QUICKFIX
|
#ifdef FEAT_QUICKFIX
|
||||||
/* quickfix marks */
|
/* quickfix marks */
|
||||||
qf_mark_adjust(line1, line2, amount, amount_after);
|
qf_mark_adjust(NULL, line1, line2, amount, amount_after);
|
||||||
|
/* location lists */
|
||||||
|
FOR_ALL_WINDOWS(win)
|
||||||
|
qf_mark_adjust(win, line1, line2, amount, amount_after);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_SIGNS
|
#ifdef FEAT_SIGNS
|
||||||
|
21
src/normal.c
21
src/normal.c
@ -1714,7 +1714,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
|||||||
setmouse();
|
setmouse();
|
||||||
mouse_dragging = 0;
|
mouse_dragging = 0;
|
||||||
# endif
|
# endif
|
||||||
if (p_smd && msg_silent == 0)
|
if (mode_displayed)
|
||||||
clear_cmdline = TRUE; /* unshow visual mode later */
|
clear_cmdline = TRUE; /* unshow visual mode later */
|
||||||
#ifdef FEAT_CMDL_INFO
|
#ifdef FEAT_CMDL_INFO
|
||||||
else
|
else
|
||||||
@ -2779,7 +2779,10 @@ do_mouse(oap, c, dir, count, fixindent)
|
|||||||
{
|
{
|
||||||
if (State & INSERT)
|
if (State & INSERT)
|
||||||
stuffcharReadbuff(Ctrl_O);
|
stuffcharReadbuff(Ctrl_O);
|
||||||
stuffReadbuff((char_u *)":.cc\n");
|
if (curwin->w_llist_ref == NULL) /* quickfix window */
|
||||||
|
stuffReadbuff((char_u *)":.cc\n");
|
||||||
|
else /* location list window */
|
||||||
|
stuffReadbuff((char_u *)":.ll\n");
|
||||||
got_click = FALSE; /* ignore drag&release now */
|
got_click = FALSE; /* ignore drag&release now */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -2948,8 +2951,9 @@ do_mouse(oap, c, dir, count, fixindent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If Visual mode changed show it later. */
|
/* If Visual mode changed show it later. */
|
||||||
if (p_smd && msg_silent == 0
|
if ((!VIsual_active && old_active && mode_displayed)
|
||||||
&& (VIsual_active != old_active || VIsual_mode != old_mode))
|
|| (VIsual_active && p_smd && msg_silent == 0
|
||||||
|
&& (!old_active || VIsual_mode != old_mode)))
|
||||||
redraw_cmdline = TRUE;
|
redraw_cmdline = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3115,7 +3119,7 @@ end_visual_mode()
|
|||||||
curwin->w_cursor.coladd = 0;
|
curwin->w_cursor.coladd = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (p_smd && msg_silent == 0)
|
if (mode_displayed)
|
||||||
clear_cmdline = TRUE; /* unshow visual mode later */
|
clear_cmdline = TRUE; /* unshow visual mode later */
|
||||||
#ifdef FEAT_CMDL_INFO
|
#ifdef FEAT_CMDL_INFO
|
||||||
else
|
else
|
||||||
@ -5713,7 +5717,10 @@ nv_down(cap)
|
|||||||
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
|
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
|
||||||
/* In a quickfix window a <CR> jumps to the error under the cursor. */
|
/* In a quickfix window a <CR> jumps to the error under the cursor. */
|
||||||
if (bt_quickfix(curbuf) && cap->cmdchar == CAR)
|
if (bt_quickfix(curbuf) && cap->cmdchar == CAR)
|
||||||
do_cmdline_cmd((char_u *)".cc");
|
if (curwin->w_llist_ref == NULL)
|
||||||
|
do_cmdline_cmd((char_u *)".cc"); /* quickfix window */
|
||||||
|
else
|
||||||
|
do_cmdline_cmd((char_u *)".ll"); /* location list window */
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -8282,7 +8289,7 @@ nv_normal(cap)
|
|||||||
if (cap->nchar == Ctrl_N || cap->nchar == Ctrl_G)
|
if (cap->nchar == Ctrl_N || cap->nchar == Ctrl_G)
|
||||||
{
|
{
|
||||||
clearop(cap->oap);
|
clearop(cap->oap);
|
||||||
if (restart_edit != 0 && p_smd && msg_silent == 0)
|
if (restart_edit != 0 && mode_displayed)
|
||||||
clear_cmdline = TRUE; /* unshow mode later */
|
clear_cmdline = TRUE; /* unshow mode later */
|
||||||
restart_edit = 0;
|
restart_edit = 0;
|
||||||
#ifdef FEAT_CMDWIN
|
#ifdef FEAT_CMDWIN
|
||||||
|
12
src/window.c
12
src/window.c
@ -518,8 +518,9 @@ newwindow:
|
|||||||
*/
|
*/
|
||||||
if (bt_quickfix(curbuf))
|
if (bt_quickfix(curbuf))
|
||||||
{
|
{
|
||||||
sprintf((char *)cbuf, "split +%ldcc",
|
sprintf((char *)cbuf, "split +%ld%s",
|
||||||
(long)curwin->w_cursor.lnum);
|
(long)curwin->w_cursor.lnum,
|
||||||
|
(curwin->w_llist_ref == NULL) ? "cc" : "ll");
|
||||||
do_cmdline_cmd(cbuf);
|
do_cmdline_cmd(cbuf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -816,6 +817,9 @@ win_split_ins(size, flags, newwin, dir)
|
|||||||
wp->w_prev_fraction_row = curwin->w_prev_fraction_row;
|
wp->w_prev_fraction_row = curwin->w_prev_fraction_row;
|
||||||
#ifdef FEAT_JUMPLIST
|
#ifdef FEAT_JUMPLIST
|
||||||
copy_jumplist(curwin, wp);
|
copy_jumplist(curwin, wp);
|
||||||
|
#endif
|
||||||
|
#ifdef FEAT_QUICKFIX
|
||||||
|
copy_loclist(curwin, wp);
|
||||||
#endif
|
#endif
|
||||||
if (curwin->w_localdir != NULL)
|
if (curwin->w_localdir != NULL)
|
||||||
wp->w_localdir = vim_strsave(curwin->w_localdir);
|
wp->w_localdir = vim_strsave(curwin->w_localdir);
|
||||||
@ -3182,6 +3186,10 @@ win_free(wp)
|
|||||||
free_jumplist(wp);
|
free_jumplist(wp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FEAT_QUICKFIX
|
||||||
|
qf_free_all(wp);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
if (gui.in_use)
|
if (gui.in_use)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user