diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-01-25 22:10:52 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-01-25 22:10:52 +0000 |
commit | d12f5c17be85407b7beb8622828ba6bc5903369e (patch) | |
tree | cb86c7b532ba41cd2f914bd2e2636acc09c99fe1 /runtime | |
parent | 28c258fd24342fe52e85059d68ce69cf9ef5f8cd (diff) |
updated for version 7.0187v7.0187
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/pycomplete.vim | 329 | ||||
-rw-r--r-- | runtime/autoload/xmlcomplete.vim | 61 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 6 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 113 | ||||
-rw-r--r-- | runtime/doc/spell.txt | 10 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 28 | ||||
-rw-r--r-- | runtime/doc/version7.txt | 6 |
7 files changed, 415 insertions, 138 deletions
diff --git a/runtime/autoload/pycomplete.vim b/runtime/autoload/pycomplete.vim index 8cd5a5f6d3..56a6b4e26c 100644 --- a/runtime/autoload/pycomplete.vim +++ b/runtime/autoload/pycomplete.vim @@ -1,10 +1,20 @@ "pycomplete.vim - Omni Completion for python " Maintainer: Aaron Griffin -" Version: 0.2 -" Last Updated: 5 January 2006 +" Version: 0.3 +" Last Updated: 23 January 2006 +" +" v0.3 Changes: +" added top level def parsing +" for safety, call returns are not evaluated +" handful of parsing changes +" trailing ( and . characters +" argument completion on open parens +" stop parsing at current line - ++performance, local var resolution " " TODO -" * local variables *inside* class members +" RExec subclass +" Code cleanup + make class +" use internal dict, not globals() if !has('python') echo "Error: Required vim compiled with +python" @@ -20,10 +30,10 @@ function! pycomplete#Complete(findstart, base) let idx -= 1 let c = line[idx-1] if c =~ '\w' - continue - elseif ! c =~ '\.' + continue + elseif ! c =~ '\.' idx = -1 - break + break else break endif @@ -39,79 +49,222 @@ endfunction function! s:DefPython() python << PYTHONEOF -import vim -import sys +import vim, sys, types import __builtin__ +import tokenize, keyword, cStringIO LOCALDEFS = \ ['LOCALDEFS', 'clean_up','eval_source_code', \ 'get_completions', '__builtin__', '__builtins__', \ - 'dbg', '__name__', 'vim', 'sys'] -#comment/uncomment one line at a time to enable/disable debugging -def dbg(msg): - pass -# print(msg) - -#it seems that by this point, vim has already stripped the base -# matched in the findstart=1 section, so we will create the -# statement from scratch + 'dbg', '__name__', 'vim', 'sys', 'parse_to_end', \ + 'parse_statement', 'tokenize', 'keyword', 'cStringIO', \ + 'debug_level', 'safe_eval', '_ctor', 'get_arguments', \ + 'strip_calls', 'types', 'parse_block'] + +def dbg(level,msg): + debug_level = 1 + try: + debug_level = vim.eval("g:pycomplete_debug_level") + except: + pass + if level <= debug_level: print(msg) + +def strip_calls(stmt): + parsed='' + level = 0 + for c in stmt: + if c in ['[','(']: + level += 1 + elif c in [')',']']: + level -= 1 + elif level == 0: + parsed += c + ##dbg(10,"stripped: %s" % parsed) + return parsed + def get_completions(base): - stmt = vim.eval('expand("<cWORD>")')+base - dbg("parsed statement => %s" % stmt) + stmt = vim.eval('expand("<cWORD>")') + #dbg(1,"statement: %s - %s" % (stmt, base)) + stmt = stmt+base eval_source_code() + try: - dbg("eval: %s" % stmt) - if len(stmt.split('.')) == 1: - all = globals().keys() + dir(__builtin__) + ridx = stmt.rfind('.') + if stmt[-1] == '(': + match = "" + stmt = strip_calls(stmt[:len(stmt)-1]) + all = get_arguments(eval(stmt)) + elif ridx == -1: match = stmt + all = globals() + __builtin__.__dict__ else: - rindex= stmt.rfind('.') - all = dir(eval(stmt[:rindex])) - match = stmt[rindex+1:] + match = stmt[ridx+1:] + stmt = strip_calls(stmt[:ridx]) + all = eval(stmt).__dict__ + #dbg(15,"completions for: %s, match=%s" % (stmt,match)) completions = [] - dbg("match == %s" % match) - for m in all: - #TODO: remove private (_foo) functions? - if m.find('__') != 0 and \ - m.find(match) == 0 and \ - m not in LOCALDEFS: - dbg("matched... %s, %s" % (m, m.find(match))) - completions.append(m) - dbg("all completions: %s" % completions) + if type(all) == types.DictType: + for m in all: + if m.find('_') != 0 and m.find(match) == 0 and \ + m not in LOCALDEFS: + #dbg(25,"matched... %s, %s" % (m, m.find(match))) + typestr = str(all[m]) + if "function" in typestr: m += '(' + elif "method" in typestr: m += '(' + elif "module" in typestr: m += '.' + elif "class" in typestr: m += '(' + completions.append(m) + completions.sort() + else: + completions.append(all) + #dbg(10,"all completions: %s" % completions) vim.command("let g:pycomplete_completions = %s" % completions) except: - dbg("exception: %s" % sys.exc_info()[1]) vim.command("let g:pycomplete_completions = []") + #dbg(1,"exception: %s" % sys.exc_info()[1]) clean_up() -#yes, this is a quasi-functional python lexer +def get_arguments(func_obj): + def _ctor(obj): + try: + return class_ob.__init__.im_func + except AttributeError: + for base in class_ob.__bases__: + rc = _find_constructor(base) + if rc is not None: return rc + return None + + arg_offset = 1 + if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj) + elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func + else: arg_offset = 0 + + #dbg(20,"%s, offset=%s" % (str(func_obj), arg_offset)) + + arg_text = '' + if type(func_obj) in [types.FunctionType, types.LambdaType]: + try: + cd = func_obj.func_code + real_args = cd.co_varnames[arg_offset:cd.co_argcount] + defaults = func_obj.func_defaults or [] + defaults = list(map(lambda name: "=%s" % name, defaults)) + defaults = [""] * (len(real_args)-len(defaults)) + defaults + items = map(lambda a,d: a+d, real_args, defaults) + if func_obj.func_code.co_flags & 0x4: + items.append("...") + if func_obj.func_code.co_flags & 0x8: + items.append("***") + arg_text = ", ".join(items) + ')' + + except: + #dbg(1,"exception: %s" % sys.exc_info()[1]) + pass + if len(arg_text) == 0: + # The doc string sometimes contains the function signature + # this works for alot of C modules that are part of the + # standard library + doc = getattr(func_obj, '__doc__', '') + if doc: + doc = doc.lstrip() + pos = doc.find('\n') + if pos > 0: + sigline = doc[:pos] + lidx = sigline.find('(') + ridx = sigline.find(')') + retidx = sigline.find('->') + ret = sigline[retidx+2:].strip() + if lidx > 0 and ridx > 0: + arg_text = sigline[lidx+1:ridx] + ')' + if len(ret) > 0: arg_text += ' #returns %s' % ret + #dbg(15,"argument completion: %s" % arg_text) + return arg_text + +def parse_to_end(gen): + stmt='' + level = 0 + for type, str, begin, end, line in gen: + if line == vim.eval('getline(\'.\')'): break + elif str == '\\': continue + elif str == ';': + break + elif type == tokenize.NEWLINE and level == 0: + break + elif str in ['[','(']: + level += 1 + elif str in [')',']']: + level -= 1 + elif level == 0: + stmt += str + #dbg(10,"current statement: %s" % stmt) + return stmt + +def parse_block(gen): + lines = [] + level = 0 + for type, str, begin, end, line in gen: + if line.replace('\n','') == vim.eval('getline(\'.\')'): break + elif type == tokenize.INDENT: + level += 1 + elif type == tokenize.DEDENT: + level -= 1 + if level == 0: break; + else: + stmt = parse_statement(gen,str) + if len(stmt) > 0: lines.append(stmt) + return lines + +def parse_statement(gen,curstr=''): + var = curstr + type, str, begin, end, line = gen.next() + if str == '=': + type, str, begin, end, line = gen.next() + if type == tokenize.NEWLINE: + return '' + elif type == tokenize.STRING or str == 'str': + return '%s = str' % var + elif str == '[' or str == 'list': + return '%s= list' % var + elif str == '{' or str == 'dict': + return '%s = dict' % var + elif type == tokenize.NUMBER: + return '%s = 0' % var + elif str == 'Set': + return '%s = Set' % var + elif str == 'open' or str == 'file': + return '%s = file' % var + else: + inst = str + parse_to_end(gen) + if len(inst) > 0: + #dbg(5,"found [%s = %s]" % (var, inst)) + return '%s = %s' % (var, inst) + return '' + def eval_source_code(): - import tokenize - import keyword - import StringIO - s = StringIO.StringIO('\n'.join(vim.current.buffer[:]) + '\n') + LINE=vim.eval('getline(\'.\')') + s = cStringIO.StringIO('\n'.join(vim.current.buffer[:]) + '\n') g = tokenize.generate_tokens(s.readline) stmts = [] lineNo = 0 try: for type, str, begin, end, line in g: - if begin[0] == lineNo: - continue + if line.replace('\n','') == vim.eval('getline(\'.\')'): break + elif begin[0] == lineNo: continue #junk elif type == tokenize.INDENT or \ type == tokenize.DEDENT or \ type == tokenize.ERRORTOKEN or \ type == tokenize.ENDMARKER or \ - type == tokenize.NEWLINE: + type == tokenize.NEWLINE or \ + type == tokenize.COMMENT: continue #import statement elif str == 'import': - for type, str, begin, end, line in g: - if str == ';' or type == tokenize.NEWLINE: break - dbg("found [import %s]" % str) - stmts.append("import %s" % str) + import_stmt=parse_to_end(g) + if len(import_stmt) > 0: + #dbg(5,"found [import %s]" % import_stmt) + stmts.append("import %s" % import_stmt) #import from statement elif str == 'from': type, str, begin, end, line = g.next() @@ -119,87 +272,68 @@ def eval_source_code(): type, str, begin, end, line = g.next() if str != "import": break - mem = '' + from_stmt=parse_to_end(g) + if len(from_stmt) > 0: + #dbg(5,"found [from %s import %s]" % (mod, from_stmt)) + stmts.append("from %s import %s" % (mod, from_stmt)) + #def statement + elif str == 'def': + funcstr = '' for type, str, begin, end, line in g: - if str == ';' or type == tokenize.NEWLINE: break - mem += (str + ',') - if len(mem) > 0: - dbg("found [from %s import %s]" % (mod, mem[:-1])) - stmts.append("from %s import %s" % (mod, mem[:-1])) + if line.replace('\n','') == vim.eval('getline(\'.\')'): break + elif str == ':': + stmts += parse_block(g) + break + funcstr += str + if len(funcstr) > 0: + #dbg(5,"found [def %s]" % funcstr) + stmts.append("def %s:\n pass" % funcstr) #class declaration elif str == 'class': type, str, begin, end, line = g.next() classname = str - dbg("found [class %s]" % classname) + #dbg(5,"found [class %s]" % classname) level = 0 members = [] - #we don't care about the meat of the members, - # only the signatures, so we'll replace the bodies - # with 'pass' for evaluation for type, str, begin, end, line in g: - if type == tokenize.INDENT: + if line.replace('\n','') == vim.eval('getline(\'.\')'): break + elif type == tokenize.INDENT: level += 1 elif type == tokenize.DEDENT: level -= 1 if level == 0: break; elif str == 'def': - #TODO: if name begins with '_', keep private memberstr = '' for type, str, begin, end, line in g: - if str == ':': break + if line.replace('\n','') == vim.eval('getline(\'.\')'): break + elif str == ':': + stmts += parse_block(g) + break memberstr += str - dbg(" member [%s]" % memberstr) + #dbg(5," member [%s]" % memberstr) members.append(memberstr) - #TODO parse self.blah = something lines - #elif str == "self" && next && str == "." ...blah... classstr = 'class %s:' % classname for m in members: classstr += ("\n def %s:\n pass" % m) stmts.append("%s\n" % classstr) elif keyword.iskeyword(str) or str in globals(): - dbg("keyword = %s" % str) + #dbg(5,"keyword = %s" % str) lineNo = begin[0] else: - if line.find("=") == -1: continue - var = str - type, str, begin, end, line = g.next() - dbg('next = %s' % str) - if str != '=': continue - - type, str, begin, end, line = g.next() - if type == tokenize.NEWLINE: - continue - elif type == tokenize.STRING or str == 'str': - stmts.append('%s = str' % var) - elif str == '[' or str == 'list': - stmts.append('%s= list' % var) - elif str == '{' or str == 'dict': - stmts.append('%s = dict' % var) - elif type == tokenize.NUMBER: - continue - elif str == 'Set': - stmts.append('%s = Set' % var) - elif str == 'open' or str == 'file': - stmts.append('%s = file' % var) - else: - inst = str - for type, str, begin, end, line in g: - if type == tokenize.NEWLINE: - break - inst += str - if len(inst) > 0: - dbg("found [%s = %s]" % (var, inst)) - stmts.append('%s = %s' % (var, inst)) - lineNo = begin[0] + assign = parse_statement(g,str) + if len(assign) > 0: stmts.append(assign) + for s in stmts: try: - dbg("evaluating: %s\n" % s) + #dbg(15,"evaluating: %s\n" % s) exec(s) in globals() except: + #dbg(1,"exception: %s" % sys.exc_info()[1]) pass except: - dbg("exception: %s" % sys.exc_info()[1]) + #dbg(1,"exception: %s" % sys.exc_info()[1]) + pass def clean_up(): for o in globals().keys(): @@ -212,5 +346,6 @@ sys.path.extend(['.','..']) PYTHONEOF endfunction +let g:pycomplete_debug_level = 0 call s:DefPython() " vim: set et ts=4: diff --git a/runtime/autoload/xmlcomplete.vim b/runtime/autoload/xmlcomplete.vim index 2d09eff096..fc4ad7844e 100644 --- a/runtime/autoload/xmlcomplete.vim +++ b/runtime/autoload/xmlcomplete.vim @@ -1,7 +1,7 @@ " Vim completion script -" Language: XHTML 1.0 Strict +" Language: XML " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2005 Nov 22 +" Last Change: 2006 Jan 24 " This function will create Dictionary with users namespace strings and values " canonical (system) names of data files. Names should be lowercase, @@ -54,6 +54,7 @@ endfunction function! xmlcomplete#CompleteTags(findstart, base) if a:findstart " locate the start of the word + let curline = line('.') let line = getline('.') let start = col('.') - 1 let compl_begin = col('.') - 2 @@ -69,11 +70,32 @@ function! xmlcomplete#CompleteTags(findstart, base) endif let b:compl_context = getline('.')[0:(compl_begin)] - let b:compl_context = matchstr(b:compl_context, '.*<\zs.*') + 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<.*') " Make sure we will have only current namespace unlet! b:xml_namespace - let b:xml_namespace = matchstr(b:compl_context, '^\k*\ze:') + let b:xml_namespace = matchstr(b:compl_context, '^<\zs\k*\ze:') if b:xml_namespace == '' let b:xml_namespace = 'DEFAULT' endif @@ -89,7 +111,10 @@ function! xmlcomplete#CompleteTags(findstart, base) let res = [] let res2 = [] " a:base is very short - we need context - let context = b:compl_context + if len(b:compl_context) == 0 && !exists("b:entitiescompl") + return [] + endif + let context = matchstr(b:compl_context, '^<\zs.*') unlet! b:compl_context " Make entities completion @@ -111,13 +136,24 @@ function! xmlcomplete#CompleteTags(findstart, base) let values = intent + values endif - for m in values - if m =~ '^'.a:base - call add(res, m.';') - endif - endfor + if len(a:base) == 1 + for m in values + if m =~ '^'.a:base + call add(res, m.';') + endif + endfor + return res + else + for m in values + if m =~? '^'.a:base + call add(res, m.';') + elseif m =~? a:base + call add(res2, m.';') + endif + endfor - return res + return res + res2 + endif endif if context =~ '>' @@ -265,6 +301,9 @@ function! xmlcomplete#CompleteTags(findstart, base) " Deal with tag completion. let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack") let opentag = substitute(opentag, '^\k*:', '', '') + if opentag == '' + return [] + endif let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0] let context = substitute(context, '^\k*:', '', '') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 837ba3cb1f..563e4bbe1e 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 20 +*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3260,7 +3260,7 @@ map({expr}, {string}) *map()* maparg({name}[, {mode}]) *maparg()* Return the rhs of mapping {name} in mode {mode}. When there is no mapping for {name}, an empty String is returned. - These characters can be used for {mode}: + {mode} can be one of these strings: "n" Normal "v" Visual "o" Operator-pending @@ -3268,7 +3268,7 @@ maparg({name}[, {mode}]) *maparg()* "c" Cmd-line "l" langmap |language-mapping| "" Normal, Visual and Operator-pending - When {mode} is omitted, the modes from "" are used. + When {mode} is omitted, the modes for "" are used. The {name} can have special key names, like in the ":map" command. The returned String has special characters translated like in the output of the ":map" command listing. diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index f97e634072..6cd0878450 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -42,6 +42,13 @@ easy way to do this is with the |:make| command (see below). The 'errorformat' option should be set to match the error messages from your compiler (see |errorformat| below). + *location-list* *E776* +A location list is a window-local quickfix list. Each window can have a +separate location list. A location list can be associated with only one +window. When a window with a location list is split, the new window gets a +copy of the location list. When there are no references to a location list, +the location list is destroyed. + The following quickfix commands can be used: *:cc* @@ -56,18 +63,32 @@ The following quickfix commands can be used: The 'switchbuf' settings are respected when jumping to a buffer. + *:ll* +:ll[!] [nr] Same as ":cc", except the location list for the + current window is used instead of the quickfix list. + *:cn* *:cnext* *E553* :[count]cn[ext][!] Display the [count] next error in the list that includes a file name. If there are no file names at all, go to the [count] next error. See |:cc| for [!] and 'switchbuf'. + *:ln* *:lnext* +:[count]ln[ext][!] Same as ":cnext", except the location list for the + current window is used instead of the quickfix list. + :[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext* :[count]cp[revious][!] Display the [count] previous error in the list that includes a file name. If there are no file names at all, go to the [count] previous error. See |:cc| for [!] and 'switchbuf'. + *:lp* *:lprevious* *:lN* *:lNext* +:[count]lN[ext][!] +:[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location + list for the current window is used instead of the + quickfix list. + *:cnf* *:cnfile* :[count]cnf[ile][!] Display the first error in the [count] next file in the list that includes a file name. If there are no @@ -75,6 +96,10 @@ The following quickfix commands can be used: the [count] next error. See |:cc| for [!] and 'switchbuf'. + *:lnf* *:lnfile* +:[count]lnf[ile][!] Same as ":cnfile", except the location list for the + current window is used instead of the quickfix list. + :[count]cNf[ile][!] *:cpf* *:cpfile* *:cNf* *:cNfile* :[count]cpf[ile][!] Display the last error in the [count] previous file in the list that includes a file name. If there are no @@ -82,17 +107,34 @@ The following quickfix commands can be used: the [count] previous error. See |:cc| for [!] and 'switchbuf'. + *:lpf* *:lpfile* *:lNf* *:lNfile* +:[count]lNf[ile][!] +:[count]lpf[ile][!] Same as ":cNfile" and ":cpfile", except the location + list for the current window is used instead of the + quickfix list. + *:crewind* *:cr* :cr[ewind][!] [nr] Display error [nr]. If [nr] is omitted, the FIRST error is displayed. See |:cc|. + *:lrewind* *:lr* +:lr[ewind][!] [nr] Same as ":crewind", except the location list for the + current window is used instead of the quickfix list. + *:cfirst* *:cfir* :cfir[st][!] [nr] Same as ":crewind". + *:lfirst* *:lfir* +:lfir[st][!] [nr] Same as ":lrewind". + *:clast* *:cla* :cla[st][!] [nr] Display error [nr]. If [nr] is omitted, the LAST error is displayed. See |:cc|. + *:llast* *:lla* +:lla[st][!] [nr] Same as ":clast", except the location list for the + current window is used instead of the quickfix list. + *:cq* *:cquit* :cq[uit] Quit Vim with an error code, so that the compiler will not compile the same file again. @@ -105,16 +147,31 @@ The following quickfix commands can be used: name of the errorfile, the 'errorfile' option will be set to [errorfile]. See |:cc| for [!]. + *:lf* *:lfile* +:lf[ile][!] [errorfile] Same as ":cfile", except the location list for the + current window is used instead of the quickfix list. + You can not use the -q command-line option to set + the location list. + *:cg* *:cgetfile* :cg[etfile][!] [errorfile] Read the error file. Just like ":cfile" but don't jump to the first error. + *:lg* *:lgetfile* +:lg[etfile][!] [errorfile] + Same as ":cgetfile", except the location list for the + current window is used instead of the quickfix list. + *:caddf* *:caddfile* :caddf[ile] [errorfile] Read the error file and add the errors from the errorfile to the current quickfix list. If a quickfix list is not present, then a new list is created. + *:laddf* *:laddfile* +:laddf[ile] [errorfile] Same as ":caddfile", except the location list for the + current window is used instead of the quickfix list. + *:cb* *:cbuffer* *E681* :cb[uffer] [bufnr] Read the error list from the current buffer. When [bufnr] is given it must be the number of a @@ -123,6 +180,10 @@ The following quickfix commands can be used: A range can be specified for the lines to be used. Otherwise all lines in the buffer are used. + *:lb* *:lbuffer* +:lb[uffer] [bufnr] Same as ":cbuffer", except the location list for the + current window is used instead of the quickfix list. + *:cex* *:cexpr* *E777* :cex[pr][!] {expr} Create a quickfix list using the result of {expr} and jump to the first error. If {expr} is a String, then @@ -137,6 +198,10 @@ The following quickfix commands can be used: :cexpr system('grep -n xyz *') :cexpr getline(1, '$') < + *:lex* *:lexpr* +:lex[pr][!] {expr} Same as ":cexpr", except the location list for the + current window is used instead of the quickfix list. + *:cad* *:caddexpr* :cad[dexpr][!] {expr} Evaluate {expr} and add the resulting lines to the current quickfix list. If a quickfix list is not @@ -146,6 +211,10 @@ The following quickfix commands can be used: Example: > :g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".") < + *:lad* *:laddexpr* +:lad[dexpr][!] {expr} Same as ":caddexpr", except the location list for the + current window is used instead of the quickfix list. + *:cl* *:clist* :cl[ist] [from] [, [to]] List all errors that are valid |quickfix-valid|. @@ -158,6 +227,15 @@ The following quickfix commands can be used: :cl[ist]! [from] [, [to]] List all errors. + *:lli* *:llist* +:lli[st] [from] [, [to]] + Same as ":clist", except the location list for the + current window is used instead of the quickfix list. + +:lli[st]! [from] [, [to]] + List all the entries in the location list for the + current window. + If you insert or delete lines, mostly the correct error location is still found because hidden marks are used. Sometimes, when the mark has been deleted for some reason, the message "line changed" is shown to warn you that @@ -182,14 +260,28 @@ on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details. the current window. It is not possible to open a second quickfix window. + *:lope* *:lopen* +:lope[n] [height] Open a window to show the location list for the + current window. Works only when the location list for + the current window is present. You can have more than + one location window opened at a time. Otherewise, + same as ":copen". + *:ccl* *:cclose* :ccl[ose] Close the quickfix window. + *:lcl* *:lclose* +:lcl[ose] Close the window showing the location list for the + current window. + *:cw* *:cwindow* :cw[indow] [height] Open the quickfix window when there are recognized errors. If the window is already open and there are no recognized errors, close the window. + *:lw* *:lwindow* +:lw[indow] [height] Same as ":cwindow", except use the window showing the + location list for the current window. Normally the quickfix window is at the bottom of the screen. If there are vertical splits, it's at the bottom of the rightmost column of windows. To @@ -230,6 +322,19 @@ If you really want to do this, you could write the contents of the quickfix window to a file and use ":cfile" to have it parsed and used as the new error list. + *location-list-window* +The location list window displays the entries in a location list. When +opening a location list window, it is created just below the current window +and displays the location list for the current window. The location list +window is similar to the quickfix window, except that you can have more than +one location list window opened at a time. + +When an entry is selected from the location list window, the file is opened in +the window with the corresponding location list. If the window is not found, +but the file is opened in another window, then cursor is moved to that window. +Otherwise a new window is opened. The new window gets a copy of the location +list. + ============================================================================= 3. Using more than one list of errors *quickfix-error-lists* @@ -243,11 +348,19 @@ lists. They set one of the existing error lists as the current one. this [count] times. When already at the oldest error list, an error message is given. + *:lolder* *:lol* +:lol[der] [count] Same as ":colder", except use the location list for + the current window instead of the quickfix list. + *:cnewer* *:cnew* *E381* :cnew[er] [count] Go to newer error list. When [count] is given, do this [count] times. When already at the newest error list, an error message is given. + *:lnewer* *:lnew* +:lnew[er] [count] Same as ":cnewer", except use the location list for + the current window instead of the quickfix list. + When adding a new error list, it becomes the current list. When ":colder" has been used and ":make" or ":grep" is used to add a new error diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index aa9c4e4755..f9559c825f 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.0aa. Last change: 2006 Jan 23 +*spell.txt* For Vim version 7.0aa. Last change: 2006 Jan 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1316,13 +1316,17 @@ efficient if the first letter is ASCII or at least one without accents. .SUG FILE *spell-NOSUGFILE* When soundfolding is specified in the affix file then ":mkspell" will normally -p ~ ~roduce a .sug file next to the .spl file. This used to find suggestions by -their sound-a-like form quickly. At the cost of a lot of memory. +produce a .sug file next to the .spl file. This file is used to find +suggestions by their sound-a-like form quickly. At the cost of a lot of +memory (the amount depends on the number of words, |:mkspell| will display an +estimate when it's done). To avoid producing a .sug file use this item in the affix file: NOSUGFILE ~ +Users can simply omit the .sug file if they don't want to use it. + SOUND-A-LIKE *spell-SAL* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index aa6e2fe3cb..2566b8c640 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 23 +*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,10 +30,7 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -When ":silent" is used mode message is (should) not be displayed. Thus don't -set clear_cmdline to clear it. Use separate flag to remember whether mode is -currently displayed (and needs to be cleared). - +Include location list commands, patch from Yegappan Lakshmanan. ccomplete: - When an option is set: In completion mode and the user types (identifier) @@ -62,7 +59,8 @@ ccomplete: spelling: - Use runtime/cleanadd script to cleanup .add files. When to invoke it? - After deleting a word and some timestamp difference perhaps? + After deleting a word with "zw" and some timestamp difference perhaps? + Store it as spell/cleanadd.vim. - suggestion for "KG" to "kg" when it's keepcase. - Autocommand event for when a spell file is missing. Allows making a plugin that fetches the file over internet. Pattern == language. @@ -400,25 +398,9 @@ Also place vimtutor.bat in %windir%? Add gui_mch_browsedir() for Motif, Mac OS/X. -Add extra list of file locations. A bit like the quickfix list, but there is -one per window. Can be used with: +Implement: :ltag list of matching tags, like :tselect Patch from Yegappan Lakshmanan, Jan 13. -Commands to use the location list: - :lnext next location - :lprevious :lNext previous location - :lnfile location in next file - :lNfile :lpfile location in previous file - :lrewind :lfirst first location - :llast last location - :ll [N] go to location N (current one if N omitted) - :lwindow open window with locations (separate from quickfix window) - :lopen open window with locations - :lclose close window with locations - :llist list locations - :lfile read locations from file using 'errorformat' - :lgetfile idem, don't jump to first one - :lbuffer idem, from current buffer. HTML indenting can be slow, find out why. Any way to do some kind of profiling for Vim script? At least add a function to get the current time in diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 0dcc713c9f..ed929f31a7 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 22 +*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1608,4 +1608,8 @@ value didn't fill the whole screen. (SungHyun Nam) Win32 installer: The generated _vimrc contained an absolute path to diff.exe. After upgrading it becomes invalid. Now use $VIMRUNTIME instead. +The command line was cleared to often when 'showmode' was set and ":silent +normal vy" was used. Don't clear the command l |