summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2004-12-29 21:03:02 +0000
committervimboss <devnull@localhost>2004-12-29 21:03:02 +0000
commit02e696e560024ab0919030e86286979d9ff6063b (patch)
treebe2f34900b08a4a8c1dcb404e59452c72ea77a30
parentecb4be8fbbdf9e1e50669a8c81e9f45a8b050ea5 (diff)
downloadvim-02e696e560024ab0919030e86286979d9ff6063b.tar.gz
updated for version 7.0026v7.0026v7-0026
-rw-r--r--runtime/doc/quickfix.txt32
-rw-r--r--runtime/doc/starting.txt6
-rw-r--r--runtime/doc/todo.txt66
-rw-r--r--runtime/doc/usr_05.txt11
-rw-r--r--runtime/doc/usr_12.txt4
-rw-r--r--runtime/doc/version7.txt13
-rw-r--r--src/eval.c15
-rw-r--r--src/main.c16
-rw-r--r--src/memline.c8
-rw-r--r--src/proto/quickfix.pro2
10 files changed, 93 insertions, 80 deletions
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 23a71466..4aeafdd0 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1,4 +1,4 @@
-*quickfix.txt* For Vim version 7.0aa. Last change: 2004 Dec 27
+*quickfix.txt* For Vim version 7.0aa. Last change: 2004 Dec 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -281,10 +281,13 @@ advantage of the internal grep is that it works on all systems and uses the
powerful Vim search patterns. An external grep program can be used when the
Vim grep does not do what you want.
-The internal method may be a bit slower, because files are read into memory.
-The advantage is that line separators and encoding are automatically
-recognized, as if a file is being edited. And multi-line patterns can be
-used.
+The internal method will be slower, because files are read into memory. The
+advantages are:
+- Line separators and encoding are automatically recognized, as if a file is
+ being edited.
+- Uses Vim search patterns. Multi-line patterns can be used.
+- When plugins are enabled: compressed and remote files can be searched.
+ |gzip| |netrw|
5.1 using Vim's internal grep
@@ -294,11 +297,22 @@ used.
Search for {pattern} in the files {file} ... and set
the error list to the matches.
{pattern} if a Vim search pattern. Instead of
- enclosing it in / any character can be used, so long
- as it does not appear in {pattern}.
-
+ enclosing it in / any non-ID character |'isident'|
+ can be used, so long as it does not appear in
+ {pattern}.
+ Examples: >
+ :vimgrep /an error/ *.c
+ :vimgrep /\<FileName\>/ *.h include/*
+
+:vim[grep][!] {pattern} {file} ...
+ Like above, but instead of enclosing the pattern in a
+ non-ID character use a white-separated pattern. The
+ pattern must start with an ID character.
+ Example: >
+ :vimgrep Error *.c
+<
*:vimgrepa* *:vimgrepadd*
-:vimgrepa[dd][!] /{pattern}/ {file} ...
+:vimgrepa[dd][!] [/]{pattern}[/] {file} ...
Just like ":vimgrep", but instead of making a new list
of errors the matches are appended to the current
list.
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 5f3f9e97..cc6abf63 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt* For Vim version 7.0aa. Last change: 2004 Jul 13
+*starting.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -423,8 +423,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-U* *E230*
-U {gvimrc} The file "gvimrc" is read for initializations when the GUI
starts. Other GUI initializations are skipped. When {gvimrc}
- is equal to "NONE", no file is read for initializations at
- all.
+ is equal to "NONE", no file is read for GUI initializations at
+ all. |gui-init|
Exception: Reading the system-wide menu file is always done.
{not in Vi}
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 7abbd5bd..abc1db47 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2004 Dec 27
+*todo.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,48 +30,37 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Python 2.4 breaks uploading with rsync, 2.3 is OK.
-
-- Use a builtin grep command for ":grep"? Makes it possible to add the
- column number.
- Patch from Yegappan Lakshmanan, Nov 4.
-Don't expand wildcards in pattern (first arg)
-completion for all files after first arg.
-Use a buffer to load the file, so that gzip files can be searched and long
-lines work.
-
-Patch for mch_FullName() also in Vim 6.3? os_mswin.c
-
-Win32: "gvim -V100" should use dialog with scrollbar. Using
-gui_mch_dialog() would be good, but need to move display_errors() to after
-creating the window, so that s_hwnd is valid.
-How to add a scrollbar to the dialog?
-
-Win32: tearoff menu window should have a scrollbar when it's taller than the
-screen.
+Go through patches from Martin Dalecki. /tmp/dalecki/README
+
+Awaiting response:
+- Patch for mch_FullName() also in Vim 6.3? os_mswin.c
+- Win32: "gvim -V100" should use dialog with scrollbar. Using
+ gui_mch_dialog() would be good, but need to move display_errors() to after
+ creating the window, so that s_hwnd is valid.
+ How to add a scrollbar to the dialog?
+- Win32: tearoff menu window should have a scrollbar when it's taller than
+ the screen.
+- Included NetBeans patches (Gordon Prieur, Oct 20)
+ See two messages for list of changed files. Additionally:
+ doc/eval.txt
+ Docs for message E680.
+ Docs for ":nbkey".
+ Asked Gordon to send the differences again, some parts apparently are
+ missing.
+- Browsefilter support for KDE. (Dan Sharp, 2004 July)
+- Better configure check for KDE include files from Dan Sharp.
-Included NetBeans patches (Gordon Prieur, Oct 20)
- See two messages for list of changed files. Additionally:
- doc/eval.txt
- Docs for message E680.
- Docs for ":nbkey".
- Asked Gordon to send the differences again, some parts apparently are
- missing.
PLANNED FOR VERSION 7.0:
-- Drop the kvim support? There is no maintenance and "yzis" is supposed to
- replace it.
-- In the kvim/KDE source files fix the formatting.
-- KDE version is called "kvim". Make it "gvim", like the others?
-- Better configure check for KDE include files from Dan Sharp.
-- KDE GUI Input method patch. (Yasuhiro Matsumoto) (upd. Oct 25 2004)
-
-After including patches:
- For string variables, use length instead of NUL termination?
+ can include NUL characters
- setline() will have problems with NL vs NUL.
-- new DATA TYPES: lists, dictionaries and function references.
+- new DATA TYPES:
+ - None? (or use empty string?)
+ - list
+ - dictionary
+ - function reference
Check old patch from Robert Webb for array support.
Add type checking? See ~/vim/ideas.txt.
- Add SPELLCHECKER, with easy to add support for many languages.
@@ -427,8 +416,9 @@ GTK+ GUI known bugs:
7 DND doesn't work with KDE (also with GTK 1).
KDE GUI known bugs:
-- The default font is ugly. bold text isn't displayed correctly.
- (bold characters are half the width of normal characters)
+- There is no active maintenance and "yzis" is supposed to replace it.
+- With the default 'guifont' value bold text differs in size from normal
+ text, causing the display to be messed up.
- Error messages when starting up. The "tip of the day" box is empty.
- Encoding of menu items needs to be converted. (Yasuhiro Matsumoto)
diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt
index 42346f22..2aa2b92b 100644
--- a/runtime/doc/usr_05.txt
+++ b/runtime/doc/usr_05.txt
@@ -1,4 +1,4 @@
-*usr_05.txt* For Vim version 7.0aa. Last change: 2004 Aug 27
+*usr_05.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM USER MANUAL - by Bram Moolenaar
@@ -150,12 +150,11 @@ it worked before Vim 5.0. Otherwise the "Q" command starts Ex mode, but you
will not need it.
>
- vnoremap p <Esc>:let current_reg = @"<CR>gvs<C-R>=current_reg<CR><Esc>
+ vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR>
-This is a complicated mapping. It will not be explained how it works here.
-What it does is to make "p" in Visual mode overwrite the selected text with
-the previously yanked text. You can see that mappings can be used to do quite
-complicated things. Still, it is just a sequence of commands that are
+This mapping yanks the visually selected text and searches for it in C files.
+This is a complicated mapping. You can see that mappings can be used to do
+quite complicated things. Still, it is just a sequence of commands that are
executed like you typed them.
>
diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt
index 6abf2465..24d6101e 100644
--- a/runtime/doc/usr_12.txt
+++ b/runtime/doc/usr_12.txt
@@ -1,4 +1,4 @@
-*usr_12.txt* For Vim version 7.0aa. Last change: 2004 May 01
+*usr_12.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM USER MANUAL - by Bram Moolenaar
@@ -345,7 +345,7 @@ program files, for example, enter the following command: >
This causes Vim to search for the string "error_string" in all the specified
files (*.c). The editor will now open the first file where a match is found
and position the cursor on the first matching line. To go to the next
-matching line (no matter in what it is file), use the ":cnext" command. To go
+matching line (no matter in what file it is), use the ":cnext" command. To go
to the previous match, use the ":cprev" command. Use ":clist" to see all the
matches and where they are.
The ":grep" command uses the external commands grep (on Unix) or findstr
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 39d09465..cb76e937 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2004 Dec 24
+*version7.txt* For Vim version 7.0aa. Last change: 2004 Dec 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -20,6 +20,7 @@ NEW FEATURES |new-7|
New data types |new-data-types|
KDE support |new-KDE|
Translated manual pages |new-manpage-trans|
+Internal grep |new-vimgrep|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
@@ -133,6 +134,16 @@ Italian (translated by Antonio Colombo). More languages will follow.
The Unix Makefile installs the Italian manual pages in .../man/it/man1/.
+Internal grep *new-vimgrep*
+-------------
+
+The ":vimgrep" command can be used to search for a pattern in a list of files.
+This is like the ":grep" command, but no external program is used. Besides
+better portability, handling of different file encodings and using multi-line
+patterns, this also allows grepping in compressed and remote files.
+|:vimgrep|.
+
+
Various new items *new-items-7*
-----------------
diff --git a/src/eval.c b/src/eval.c
index dcd86e51..13a5b1bf 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3427,25 +3427,12 @@ find_buffer(avar)
VAR avar;
{
buf_T *buf = NULL;
- char_u *name;
if (avar->var_type == VAR_NUMBER)
buf = buflist_findnr((int)avar->var_val.var_number);
else if (avar->var_val.var_string != NULL)
{
- /* First make the name into a full path name */
- name = FullName_save(avar->var_val.var_string,
-#ifdef UNIX
- TRUE /* force expansion, get rid of symbolic links */
-#else
- FALSE
-#endif
- );
- if (name != NULL)
- {
- buf = buflist_findname(name);
- vim_free(name);
- }
+ buf = buflist_findname_exp(avar->var_val.var_string);
if (buf == NULL)
{
/* No full path name match, try a match with a URL or a "nofile"
diff --git a/src/main.c b/src/main.c
index d71ef605..78639a2c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -141,7 +141,8 @@ main
int full_path = FALSE;
#endif
#ifdef FEAT_CLIENTSERVER
- char_u *serverStr = NULL;
+ char_u *serverStr = NULL; /* remote server command */
+ char_u *serverStrEnc = NULL; /* encoding of serverStr */
char_u *serverName_arg = NULL; /* cmdline arg for server name */
int serverArg = FALSE; /* TRUE when argument for a server */
char_u *servername = NULL; /* allocated name for our server */
@@ -378,10 +379,16 @@ main
/*
* When a command server argument was found, execute it. This may
- * exit Vim when it was successful.
+ * exit Vim when it was successful. Otherwise it's executed further
+ * on. Remember the encoding used here in "serverStrEnc".
*/
if (serverArg)
+ {
cmdsrv_main(&argc, argv, serverName_arg, &serverStr);
+# ifdef FEAT_MBYTE
+ serverStrEnc = vim_strsave(p_enc);
+# endif
+ }
/* If we're still running, get the name to register ourselves.
* On Win32 can register right now, for X11 need to setup the
@@ -1662,7 +1669,10 @@ scripterror:
* else we would have exited above).
*/
if (serverStr != NULL)
- server_to_input_buf(serverStr);
+ {
+ server_to_input_buf(serverConvert(serverStrEnc, serverStr, &p));
+ vim_free(p);
+ }
#endif
/*
diff --git a/src/memline.c b/src/memline.c
index 13f35c2a..e18b8954 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -425,7 +425,8 @@ ml_setname(buf)
{
if (*dirp == NUL) /* tried all directories, fail */
break;
- fname = findswapname(buf, &dirp, mfp->mf_fname); /* alloc's fname */
+ fname = findswapname(buf, &dirp, mfp->mf_fname);
+ /* alloc's fname */
if (fname == NULL) /* no file name found for this dir */
continue;
@@ -529,7 +530,7 @@ ml_open_file(buf)
/* There is a small chance that between chosing the swap file name and
* creating it, another Vim creates the file. In that case the
* creation will fail and we will use another directory. */
- fname = findswapname(buf, &dirp, NULL); /* allocates fname */
+ fname = findswapname(buf, &dirp, NULL); /* allocates fname */
if (fname == NULL)
continue;
if (mf_open_file(mfp, fname) == OK) /* consumes fname! */
@@ -3731,7 +3732,8 @@ findswapname(buf, dirp, old_fname)
* viewing a help file or when the path of the file is different
* (happens when all .swp files are in one directory).
*/
- if (!recoverymode && buf->b_fname != NULL && !buf->b_help)
+ if (!recoverymode && buf->b_fname != NULL
+ && !buf->b_help && !(buf->b_flags & BF_DUMMY))
{
int fd;
struct block0 b0;
diff --git a/src/proto/quickfix.pro b/src/proto/quickfix.pro
index adec72f0..dbdca5f0 100644
--- a/src/proto/quickfix.pro
+++ b/src/proto/quickfix.pro
@@ -13,7 +13,7 @@ int bt_nofile __ARGS((buf_T *buf));
int bt_dontwrite __ARGS((buf_T *buf));
int bt_dontwrite_msg __ARGS((buf_T *buf));
int buf_hide __ARGS((buf_T *buf));
-int grep_internal __ARGS((exarg_T *eap));
+int grep_internal __ARGS((cmdidx_T cmdidx));
void ex_make __ARGS((exarg_T *eap));
void ex_cc __ARGS((exarg_T *eap));
void ex_cnext __ARGS((exarg_T *eap));