diff runtime/doc/eval.txt @ 230:9281a51ca7a2

updated for version 7.0064
author vimboss
date Fri, 25 Mar 2005 21:53:48 +0000
parents da182deebec7
children fca8a9b65afa
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Mar 17
+*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Mar 25
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1452,7 +1452,6 @@ did_filetype()			Number	TRUE if FileType
 diff_filler( {lnum})		Number	diff filler lines about {lnum}
 diff_hlID( {lnum}, {col})	Number	diff highlighting at {lnum}/{col}
 empty( {expr})			Number	TRUE if {expr} is empty
-errorlist()			List	list of quickfix items
 escape( {string}, {chars})	String	escape {chars} in {string} with '\'
 eval( {string})			any	evaluate {string} into its value
 eventhandler( )			Number	TRUE if inside an event handler
@@ -1489,6 +1488,7 @@ getftime( {fname})		Number	last modifica
 getftype( {fname})		String	description of type of file {fname}
 getline( {lnum})		String	line {lnum} of current buffer
 getline( {lnum}, {end})		List	lines {lnum} to {end} of current buffer
+getqflist()			List	list of quickfix items
 getreg( [{regname}])		String	contents of register
 getregtype( [{regname}])	String	type of register
 getwinposx()			Number	X coord in pixels of GUI Vim window
@@ -1574,6 +1574,7 @@ serverlist()			String	get a list of avai
 setbufvar( {expr}, {varname}, {val})	set {varname} in buffer {expr} to {val}
 setcmdpos( {pos})		Number	set cursor position in command-line
 setline( {lnum}, {line})	Number	set line {lnum} to {line}
+setqflist( {list} )		Number	set list of quickfix items using {list}
 setreg( {n}, {v}[, {opt}])	Number	set register to value and type
 setwinvar( {nr}, {varname}, {val})	set {varname} in window {nr} to {val}
 simplify( {filename})		String	simplify filename as much as possible
@@ -2023,28 +2024,6 @@ empty({expr})						*empty()*
 		For a long List this is much faster then comparing the length
 		with zero.
 
-errorlist()						*errorlist()*
-		Returns a list with all the current quickfix errors.  Each
-		list item is a dictionary with these entries:
-			bufnr	number of buffer that has the file name, use
-				bufname() to get the name
-			lnum	line number in the buffer (first line is 1)
-			col	column number (first column is 1)
-			vcol	non-zero: column number is visual column
-				zero: column number is byte index
-			nr	error number
-			text	description of the error
-			type	type of the error, 'E', '1', etc.
-			valid	non-zero: recognized error message
-
-		Useful application: Find pattern matches in multiple files and
-		do something with them: >
-			:vimgrep /theword/jg *.c
-			:for d in errorlist()
-			:   echo bufname(d.bufnr) ':' d.lnum '=' d.text
-			:endfor
-
-
 escape({string}, {chars})				*escape()*
 		Escape the characters in {chars} that occur in {string} with a
 		backslash.  Example: >
@@ -2548,6 +2527,28 @@ getline({lnum} [, {end}])
 			:let lines = getline(start, end)
 
 
+getqflist()						*getqflist()*
+		Returns a list with all the current quickfix errors.  Each
+		list item is a dictionary with these entries:
+			bufnr	number of buffer that has the file name, use
+				bufname() to get the name
+			lnum	line number in the buffer (first line is 1)
+			col	column number (first column is 1)
+			vcol	non-zero: column number is visual column
+				zero: column number is byte index
+			nr	error number
+			text	description of the error
+			type	type of the error, 'E', '1', etc.
+			valid	non-zero: recognized error message
+
+		Useful application: Find pattern matches in multiple files and
+		do something with them: >
+			:vimgrep /theword/jg *.c
+			:for d in getqflist()
+			:   echo bufname(d.bufnr) ':' d.lnum '=' d.text
+			:endfor
+
+
 getreg([{regname}])					*getreg()*
 		The result is a String, which is the contents of register
 		{regname}. Example: >
@@ -3590,6 +3591,34 @@ setline({lnum}, {line})					*setline()*
 			:call setline(5, strftime("%c"))
 <		Note: The '[ and '] marks are not set.
 
+
+setqflist({list})					*setqflist()*
+		Creates a quickfix list using the items in {list}.  Each item
+		in {list} is a dictionary.  Non-dictionary items in {list} are
+		ignored.  Each dictionary item can contain the following
+		entries:
+
+		    filename	name of a file
+		    lnum	line number in the file
+		    col		column number
+		    pattern	search pattern used to locate the error
+		    text	description of the error
+
+		The "col" and "text" entries are optional.  Either "lnum" or
+		"pattern" entry can be used to locate a matching error line.
+		If the "filename" entry is not present or neither the "lnum"
+		or "pattern" entries are present, then the item will not be
+		handled as an error line.
+		If both "pattern" and "lnum" are present then "pattern" will
+		be used.
+
+		Returns zero for success, -1 for failure.
+
+		This function can be used to create a quickfix list
+		independent of the 'errorformat' setting.  Use a command like
+		":cc 1" to jump to the first position.
+
+
 							*setreg()*
 setreg({regname}, {value} [,{options}])
 		Set the register {regname} to {value}.