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
+getloclist({nr}) List list of location list items
getqflist() List list of quickfix items
getreg( [{regname} [, 1]]) String contents of register
getregtype( [{regname}]) String type of register
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}[, {action}]) Number set list of quickfix items using {list}
+setloclist( {nr}, {list}[, {action}])
+ Number modify location list using {list}
+setqflist( {list}[, {action}]) Number modify quickfix list 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
:let end = search("^$") - 1
:let lines = getline(start, end)
+getloclist({nr}) *getloclist()*
+ Returns a list with all the entries in the location list for
+ window {nr}. When {nr} is zero the current window is used.
+ For a location list window, the displayed location list is
+ returned. Otherwise, same as getqflist().
getqflist() *getqflist()*
Returns a list with all the current quickfix errors. Each
:endfor
< Note: The '[ and '] marks are not set.
+setloclist({nr}, {list} [, {action}]) *setloclist()*
+ Create or replace or add to the location list for window {nr}.
+ When {nr} is zero the current window is used. For a location
+ list window, the displayed location list is modified.
+ Otherwise, same as setqflist().
setqflist({list} [, {action}]) *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:
+ Create or replace or add to the 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
-*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 13
+*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
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
+ *:lne* *:lnext*
+:[count]lne[xt][!] 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*
all, go to the [count] previous error. See |:cc| for
[!] and 'switchbuf'.
- *:lp* *:lprevious* *:lN* *:lNext*
-:[count]lN[ext][!]
+
+:[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext*
:[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
list for the current window is used instead of the
quickfix list.
the [count] previous error. See |:cc| for [!] and
'switchbuf'.
- *:lpf* *:lpfile* *:lNf* *:lNfile*
-:[count]lNf[ile][!]
+
+:[count]lNf[ile][!] *:lpf* *:lpfile* *:lNf* *:lNfile*
:[count]lpf[ile][!] Same as ":cNfile" and ":cpfile", 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]
+
+:cg[etfile][!] [errorfile] *:cg* *:cgetfile*
Read the error file. Just like ":cfile" but don't
jump to the first error.
- *:lg* *:lgetfile*
-:lg[etfile][!] [errorfile]
+
+:lg[etfile][!] [errorfile] *:lg* *:lgetfile*
Same as ":cgetfile", except the location list for the
current window is used instead of the quickfix list.
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
+ *:lop* *:lopen*
+:lop[en] [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".
+ the current window is present. You can have more than
+ one location window opened at a time. Otherwise, it
+ acts the same same as ":copen".
*:ccl* *:cclose*
:ccl[ose] Close the quickfix window.
:keepjumps motion.txt /*:keepjumps*
:keepmarks motion.txt /*:keepmarks*
:l various.txt /*:l*
+:lN quickfix.txt /*:lN*
+:lNext quickfix.txt /*:lNext*
+:lNf quickfix.txt /*:lNf*
+:lNfile quickfix.txt /*:lNfile*
:la editing.txt /*:la*
+:lad quickfix.txt /*:lad*
+:laddexpr quickfix.txt /*:laddexpr*
+:laddf quickfix.txt /*:laddf*
+:laddfile quickfix.txt /*:laddfile*
:lan mlang.txt /*:lan*
:lang mlang.txt /*:lang*
:language mlang.txt /*:language*
:last editing.txt /*:last*
+:lb quickfix.txt /*:lb*
+:lbuffer quickfix.txt /*:lbuffer*
:lc editing.txt /*:lc*
:lcd editing.txt /*:lcd*
:lch editing.txt /*:lch*
:lchdir editing.txt /*:lchdir*
+:lcl quickfix.txt /*:lcl*
+:lclose quickfix.txt /*:lclose*
:le change.txt /*:le*
:left change.txt /*:left*
:lefta windows.txt /*:lefta*
:let-star eval.txt /*:let-star*
:let-unpack eval.txt /*:let-unpack*
:let.= eval.txt /*:let.=*
+:lex quickfix.txt /*:lex*
+:lexpr quickfix.txt /*:lexpr*
+:lf quickfix.txt /*:lf*
+:lfile quickfix.txt /*:lfile*
+:lfir quickfix.txt /*:lfir*
+:lfirst quickfix.txt /*:lfirst*
+:lg quickfix.txt /*:lg*
+:lgetfile quickfix.txt /*:lgetfile*
:list various.txt /*:list*
+:ll quickfix.txt /*:ll*
+:lla quickfix.txt /*:lla*
+:llast quickfix.txt /*:llast*
+:lli quickfix.txt /*:lli*
+:llist quickfix.txt /*:llist*
:lm map.txt /*:lm*
:lmap map.txt /*:lmap*
:lmap_l map.txt /*:lmap_l*
:lmapc map.txt /*:lmapc*
:lmapclear map.txt /*:lmapclear*
:ln map.txt /*:ln*
+:lne quickfix.txt /*:lne*
+:lnew quickfix.txt /*:lnew*
+:lnewer quickfix.txt /*:lnewer*
+:lnext quickfix.txt /*:lnext*
+:lnf quickfix.txt /*:lnf*
+:lnfile quickfix.txt /*:lnfile*
:lnoremap map.txt /*:lnoremap*
:lo starting.txt /*:lo*
:loadk mbyte.txt /*:loadk*
:lockmarks motion.txt /*:lockmarks*
:lockv eval.txt /*:lockv*
:lockvar eval.txt /*:lockvar*
+:lol quickfix.txt /*:lol*
+:lolder quickfix.txt /*:lolder*
+:lop quickfix.txt /*:lop*
+:lopen quickfix.txt /*:lopen*
+:lp quickfix.txt /*:lp*
+:lpf quickfix.txt /*:lpf*
+:lpfile quickfix.txt /*:lpfile*
+:lprevious quickfix.txt /*:lprevious*
+:lr quickfix.txt /*:lr*
+:lrewind quickfix.txt /*:lrewind*
:ls windows.txt /*:ls*
:lu map.txt /*:lu*
:lunmap map.txt /*:lunmap*
+:lw quickfix.txt /*:lw*
+:lwindow quickfix.txt /*:lwindow*
:m change.txt /*:m*
:ma motion.txt /*:ma*
:mak quickfix.txt /*:mak*
E773 recover.txt /*E773*
E774 map.txt /*E774*
E775 map.txt /*E775*
+E776 quickfix.txt /*E776*
E777 quickfix.txt /*E777*
E778 spell.txt /*E778*
E779 spell.txt /*E779*
getftime() eval.txt /*getftime()*
getftype() eval.txt /*getftype()*
getline() eval.txt /*getline()*
+getloclist() eval.txt /*getloclist()*
getqflist() eval.txt /*getqflist()*
getreg() eval.txt /*getreg()*
getregtype() eval.txt /*getregtype()*
locale mbyte.txt /*locale*
locale-name mbyte.txt /*locale-name*
localtime() eval.txt /*localtime()*
+location-list quickfix.txt /*location-list*
+location-list-window quickfix.txt /*location-list-window*
long-lines version5.txt /*long-lines*
lowercase change.txt /*lowercase*
lpc.vim syntax.txt /*lpc.vim*
new-items-6 version6.txt /*new-items-6*
new-items-7 version7.txt /*new-items-7*
new-line-continuation version5.txt /*new-line-continuation*
+new-location-list version7.txt /*new-location-list*
new-manpage-trans version7.txt /*new-manpage-trans*
new-multi-byte version5.txt /*new-multi-byte*
new-multi-lang version6.txt /*new-multi-lang*
setbufvar() eval.txt /*setbufvar()*
setcmdpos() eval.txt /*setcmdpos()*
setline() eval.txt /*setline()*
+setloclist() eval.txt /*setloclist()*
setqflist() eval.txt /*setqflist()*
setreg() eval.txt /*setreg()*
setting-guifont gui.txt /*setting-guifont*
-*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 25
+*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Include location list commands, patch from Yegappan Lakshmanan.
-
-ccomplete:
+ccomplete / omnicomplete:
- When an option is set: In completion mode and the user types (identifier)
characters, advance to the first match instead of removing the popup menu.
If there is no match remove the selection. (Yegappan Lakshmanan)
Can't reproduce it right now...
spelling:
+- Also use the spelling dictionary for dictionary completion.
- Use runtime/cleanadd script to cleanup .add files. When to invoke it?
After deleting a word with "zw" and some timestamp difference perhaps?
Store it as spell/cleanadd.vim.
obtain). But new Myspell wordlist will come (Hagen)
- Finding suggestions with sound folding is slow. Somehow store the
sound-folded words and link to the words it comes from?
-- Also use the spelling dictionary for dictionary completion.
- Have "zg" and "zw" report the file that was modified. (Marvin Renich)
- Add a command like "zg" that selects one of the files 'spellfile'.
- Add a "zug" command that undoes "zg"? Deletes the good word instead of
exists() check if a variable, function, etc. exists
has() check if a feature is supported in Vim
getqflist() list of quickfix errors
+ getloclist() list of location list items
cscope_connection() check if a cscope connection exists
did_filetype() check if a FileType autocommand was used
eventhandler() check if invoked by an event handler
libcallnr() idem, returning a number
getreg() get contents of a register
getregtype() get type of a register
- setqflist() create a quickfix list
+ setqflist() modify a quickfix list
+ setloclist() modify a location list
setreg() set contents and type of a register
taglist() get list of matching tags
-*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 25
+*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
Debugger support |new-debug-support|
Remote file explorer |new-netrw-explore|
Define an operator |new-define-operator|
+Location list |new-location-list|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
See |:map-operator| for the explanation and an example.
+Location list *new-location-list*
+-------------
+
+The support for a per-window quickfix list (location list) is added. The
+location list can be displayed in a location window (similar to the quickfix
+window). You can open more than one location list window. A set of commands
+similar to the quickfix commands are added to browse the location list.
Various new items *new-items-7*
-----------------
|count()| count nr of times a value is in a List or Dictionary
|deepcopy()| make a full copy of a List or Dictionary
|empty()| check if List or Dictionary is empty
+|getloclist()| list of location list items (Yegappan Lakshmanan)
|getqflist()| list of quickfix errors (Yegappan Lakshmanan)
|extend()| append one List to another or add items from one
Dictionary to another
|repeat()| repeat "expr" "count" times (Christophe Poucet)
|reverse()| reverse the order of a List
|searchdecl()| search for declaration of variable
-|setqflist()| create a quickfix list (Yegappan Lakshmanan)
+|setloclist()| modify a location list (Yegappan Lakshmanan)
+|setqflist()| modify a quickfix list (Yegappan Lakshmanan)
|sort()| sort a List
|soundfold()| get the sound-a-like equivalent of a word
|split()| split a String into a List
Implemented b:undo_indent to undo indent settings when setting 'filetype' to a
different value.
+VHDL indent file (Gerald Lai)
+
New Keymaps: ~
static void f_getftime __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getftype __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getline __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_getloclist __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getregtype __ARGS((typval_T *argvars, typval_T *rettv));
static void f_setbufvar __ARGS((typval_T *argvars, typval_T *rettv));
static void f_setcmdpos __ARGS((typval_T *argvars, typval_T *rettv));
static void f_setline __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_setloclist __ARGS((typval_T *argvars, typval_T *rettv));
static void f_setqflist __ARGS((typval_T *argvars, typval_T *rettv));
static void f_setreg __ARGS((typval_T *argvars, typval_T *rettv));
static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv));
static void func_ref __ARGS((char_u *name));
static void call_user_func __ARGS((ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, linenr_T firstline, linenr_T lastline, dict_T *selfdict));
static void add_nr_var __ARGS((dict_T *dp, dictitem_T *v, char *name, varnumber_T nr));
+static win_T *find_win_by_nr __ARGS((typval_T *vp));
/* Character used as separated in autoload function/variable names. */
#define AUTOLOAD_CHAR '#'
{"getftime", 1, 1, f_getftime},
{"getftype", 1, 1, f_getftype},
{"getline", 1, 2, f_getline},
+ {"getloclist", 1, 1, f_getloclist},
{"getqflist", 0, 0, f_getqflist},
{"getreg", 0, 2, f_getreg},
{"getregtype", 0, 1, f_getregtype},
{"setbufvar", 3, 3, f_setbufvar},
{"setcmdpos", 1, 1, f_setcmdpos},
{"setline", 2, 2, f_setline},
+ {"setloclist", 2, 3, f_setloclist},
{"setqflist", 1, 2, f_setqflist},
{"setreg", 2, 3, f_setreg},
{"setwinvar", 3, 3, f_setwinvar},
get_buffer_lines(curbuf, lnum, end, retlist, rettv);
}
+static void get_qf_ll_ist __ARGS((win_T *wp, typval_T *rettv));
+
/*
- * "getqflist()" function
+ * Shared by getqflist() and getloclist() functions
*/
-/*ARGSUSED*/
static void
-f_getqflist(argvars, rettv)
- typval_T *argvars;
+get_qf_ll_ist(wp, rettv)
+ win_T *wp;
typval_T *rettv;
{
#ifdef FEAT_QUICKFIX
rettv->vval.v_list = l;
rettv->v_type = VAR_LIST;
++l->lv_refcount;
- (void)get_errorlist(l);
+ (void)get_errorlist(wp, l);
}
#endif
+
+}
+
+/*
+ * "getloclist()" function
+ */
+/*ARGSUSED*/
+ static void
+f_getloclist(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+{
+ win_T *win;
+
+ rettv->vval.v_number = FALSE;
+
+ win = find_win_by_nr(&argvars[0]);
+ if (win != NULL)
+ get_qf_ll_ist(win, rettv);
+}
+
+/*
+ * "getqflist()" function
+ */
+/*ARGSUSED*/
+ static void
+f_getqflist(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+{
+ get_qf_ll_ist(NULL, rettv);
}
/*
#endif
}
-static win_T *find_win_by_nr __ARGS((typval_T *vp));
-
static win_T *
find_win_by_nr(vp)
typval_T *vp;
}
/*
- * "setqflist()" function
+ * Used by "setqflist()" and "setloclist()" functions
*/
/*ARGSUSED*/
static void
-f_setqflist(argvars, rettv)
- typval_T *argvars;
+set_qf_ll_list(wp, list_arg, action_arg, rettv)
+ win_T *wp;
+ typval_T *list_arg;
+ typval_T *action_arg;
typval_T *rettv;
{
#ifdef FEAT_QUICKFIX
rettv->vval.v_number = -1;
#ifdef FEAT_QUICKFIX
- if (argvars[0].v_type != VAR_LIST)
+ if (list_arg->v_type != VAR_LIST)
EMSG(_(e_listreq));
else
{
- list_T *l = argvars[0].vval.v_list;
+ list_T *l = list_arg->vval.v_list;
- if (argvars[1].v_type == VAR_STRING)
+ if (action_arg->v_type == VAR_STRING)
{
- act = get_tv_string_chk(&argvars[1]);
+ act = get_tv_string_chk(action_arg);
if (act == NULL)
return; /* type error; errmsg already given */
if (*act == 'a' || *act == 'r')
action = *act;
}
- if (l != NULL && set_errorlist(l, action) == OK)
+ if (l != NULL && set_errorlist(wp, l, action) == OK)
rettv->vval.v_number = 0;
}
#endif
}
+/*
+ * "setloclist()" function
+ */
+/*ARGSUSED*/
+ static void
+f_setloclist(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+{
+ win_T *win;
+
+ rettv->vval.v_number = -1;
+
+ win = find_win_by_nr(&argvars[0]);
+ if (win != NULL)
+ set_qf_ll_list(win, &argvars[1], &argvars[2], rettv);
+}
+
+/*
+ * "setqflist()" function
+ */
+/*ARGSUSED*/
+ static void
+f_setqflist(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+{
+ set_qf_ll_list(NULL, &argvars[0], &argvars[1], rettv);
+}
+
/*
* "setreg()" function
*/
void ex_cfile __ARGS((exarg_T *eap));
void ex_vimgrep __ARGS((exarg_T *eap));
char_u *skip_vimgrep_pat __ARGS((char_u *p, char_u **s, int *flags));
-int get_errorlist __ARGS((list_T *list));
-int set_errorlist __ARGS((list_T *list, int action));
+int get_errorlist __ARGS((win_T *wp, list_T *list));
+int set_errorlist __ARGS((win_T *wp, list_T *list, int action));
void ex_cbuffer __ARGS((exarg_T *eap));
void ex_cexpr __ARGS((exarg_T *eap));
void ex_helpgrep __ARGS((exarg_T *eap));
* Add each quickfix error to list "list" as a dictionary.
*/
int
-get_errorlist(list)
+get_errorlist(wp, list)
+ win_T *wp;
list_T *list;
{
qf_info_T *qi = &ql_info;
qfline_T *qfp;
int i;
+ if (wp != NULL)
+ {
+ qi = GET_LOC_LIST(wp);
+ if (qi == NULL)
+ return FAIL;
+ }
+
if (qi->qf_curlist >= qi->qf_listcount
|| qi->qf_lists[qi->qf_curlist].qf_count == 0)
return FAIL;
* of dictionaries.
*/
int
-set_errorlist(list, action)
+set_errorlist(wp, list, action)
+ win_T *wp;
list_T *list;
int action;
{
int retval = OK;
qf_info_T *qi = &ql_info;
+ if (wp != NULL)
+ {
+ qi = ll_get_or_alloc_list(curwin);
+ if (qi == NULL)
+ return FAIL;
+ }
+
if (action == ' ' || qi->qf_curlist == qi->qf_listcount)
/* make place for a new list */
qf_new_list(qi);
if (State & INSERT)
{
if (showing_insert_mode != TRUE)
- out_str(T_CSI); /* disable cursor */
+ out_str(T_CSI); /* Insert mode cursor */
showing_insert_mode = TRUE;
}
else
{
if (showing_insert_mode != FALSE)
- out_str(T_CEI); /* disable cursor */
+ out_str(T_CEI); /* non-Insert mode cursor */
showing_insert_mode = FALSE;
}
}
#else
"-cscope",
#endif
+#ifdef CURSOR_SHAPE
+ "+cursorshape",
+#else
+ "-cursorshape",
+#endif
#if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG)
"+dialog_con_gui",
#else
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 25)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 25, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 26)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 26, compiled "