mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
updated for version 7.0187
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
" Vim completion script
|
||||
" Language: XHTML 1.0 Strict
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Jan 22
|
||||
" Last Change: 2006 Jan 24
|
||||
|
||||
function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let curline = line('.')
|
||||
let compl_begin = col('.') - 2
|
||||
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
|
||||
let start -= 1
|
||||
@@ -20,8 +21,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
|
||||
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
|
||||
if stylestart != 0 && styleend != 0
|
||||
let curpos = line('.')
|
||||
if stylestart <= curpos && styleend >= curpos
|
||||
if stylestart <= curline && styleend >= curline
|
||||
let start = col('.') - 1
|
||||
let b:csscompl = 1
|
||||
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
|
||||
@@ -31,6 +31,27 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
endif
|
||||
if !exists("b:csscompl")
|
||||
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<.*')
|
||||
else
|
||||
let b:compl_context = getline('.')[0:compl_begin]
|
||||
@@ -94,7 +115,6 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
"if context !~ '<$'
|
||||
|
||||
" Set attribute groups
|
||||
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
|
||||
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|
||||
|: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
|
||||
|: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
|
||||
|:language| :lan[guage] set the language (locale)
|
||||
|:lbuffer| :lb[uffer] parse locations and jump to first location
|
||||
|:lcd| :lc[d] change directory locally
|
||||
|:lchdir| :lch[dir] change directory locally
|
||||
|:lclose| :lcl[ose] close location window
|
||||
|:left| :le[ft] left align lines
|
||||
|:leftabove| :lefta[bove] make split window appear left or above
|
||||
|: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
|
||||
|: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
|
||||
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|
||||
|:loadview| :lo[adview] load view for current window from a file
|
||||
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|
||||
|: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
|
||||
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|
||||
|:lwindow| :lw[indow] open or close location window
|
||||
|:move| :m[ove] move lines
|
||||
|:mark| :ma[rk] set a mark
|
||||
|: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"
|
Reference in New Issue
Block a user