Patch 7.0.124
Patch 7.0.124 Problem:getwinvar() obtains a dictionary with window-local variables, but it's always for the current window. Solution: Get the variables of the specified window. (Geoff Reedy) Files: src/eval.c *** ../vim-7.0.123/src/eval.c Tue Oct 3 14:43:31 2006 --- src/eval.c Fri Oct 6 21:08:57 2006 *** *** 10432,10451 if (win != NULL varname != NULL) { ! if (*varname == '')/* window-local-option */ ! { ! /* Set curwin to be our win, temporarily. Also set curbuf, so !* that we can get buffer-local options. */ ! oldcurwin = curwin; ! curwin = win; ! curbuf = win-w_buffer; get_option_tv(varname, rettv, 1); - - /* restore previous notion of curwin */ - curwin = oldcurwin; - curbuf = curwin-w_buffer; - } else { if (*varname == NUL) --- 10432,10445 if (win != NULL varname != NULL) { ! /* Set curwin to be our win, temporarily. Also set curbuf, so !* that we can get buffer-local options. */ ! oldcurwin = curwin; ! curwin = win; ! curbuf = win-w_buffer; + if (*varname == '')/* window-local-option */ get_option_tv(varname, rettv, 1); else { if (*varname == NUL) *** *** 10458,10463 --- 10452,10461 if (v != NULL) copy_tv(v-di_tv, rettv); } + + /* restore previous notion of curwin */ + curwin = oldcurwin; + curbuf = curwin-w_buffer; } --emsg_off; *** ../vim-7.0.123/src/version.cTue Oct 10 11:41:44 2006 --- src/version.c Tue Oct 10 12:53:15 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 124, /**/ -- How To Keep A Healthy Level Of Insanity: 14. Put mosquito netting around your work area. Play a tape of jungle sounds all day. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Patch 7.0.125
Patch 7.0.125 Problem:When autoselect is in the 'clipboard' option then the ' and ' marks are set while Visual mode is still active. Solution: Don't set the ' and ' marks when yanking the selected area for the clipboard. Files: src/normal.c *** ../vim-7.0.124/src/normal.c Tue Aug 29 17:28:56 2006 --- src/normal.cSat Oct 7 14:11:26 2006 *** *** 1477,1490 } else if (VIsual_active) { ! /* Save the current VIsual area for ' and ' marks, and gv */ ! curbuf-b_visual.vi_start = VIsual; ! curbuf-b_visual.vi_end = curwin-w_cursor; ! curbuf-b_visual.vi_mode = VIsual_mode; ! curbuf-b_visual.vi_curswant = curwin-w_curswant; # ifdef FEAT_EVAL ! curbuf-b_visual_mode_eval = VIsual_mode; # endif /* In Select mode, a linewise selection is operated upon like a * characterwise selection. */ --- 1477,1493 } else if (VIsual_active) { ! if (!gui_yank) ! { ! /* Save the current VIsual area for ' and ' marks, and gv */ ! curbuf-b_visual.vi_start = VIsual; ! curbuf-b_visual.vi_end = curwin-w_cursor; ! curbuf-b_visual.vi_mode = VIsual_mode; ! curbuf-b_visual.vi_curswant = curwin-w_curswant; # ifdef FEAT_EVAL ! curbuf-b_visual_mode_eval = VIsual_mode; # endif + } /* In Select mode, a linewise selection is operated upon like a * characterwise selection. */ *** ../vim-7.0.124/src/version.cTue Oct 10 12:56:09 2006 --- src/version.c Tue Oct 10 13:25:27 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 125, /**/ -- How To Keep A Healthy Level Of Insanity: 15. Five days in advance, tell your friends you can't attend their party because you're not in the mood. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Convert2HTML Again
On 01/10/06, Edd Barrett [EMAIL PROTECTED] wrote: Hope your enjoying your weekend. As promised i have ammended the patch. Hi Guys, I havent recieved any feedback on this patch yet, did anyone get a chance to look at it? Sorry to be a bore. Best Regards Edd
Patch 7.0.126
Patch 7.0.126 Problem:When 'formatexpr' uses setline() and later internal formatting is used undo information is not correct. (Jiri Cerny, Benji Fisher) Solution: Set ins_need_undo after using 'formatexpr'. Files: src/edit.c *** ../vim-7.0.125/src/edit.c Fri Oct 6 20:39:58 2006 --- src/edit.c Tue Oct 10 12:46:04 2006 *** *** 5333,5340 /* Format with 'formatexpr' when it's set. Use internal formatting * when 'formatexpr' isn't set or it returns non-zero. */ #if defined(FEAT_EVAL) ! if (*curbuf-b_p_fex == NUL !|| fex_format(curwin-w_cursor.lnum, 1L, c) != 0) #endif internal_format(textwidth, second_indent, flags, c == NUL); } --- 5333,5348 /* Format with 'formatexpr' when it's set. Use internal formatting * when 'formatexpr' isn't set or it returns non-zero. */ #if defined(FEAT_EVAL) ! int do_internal = TRUE; ! ! if (*curbuf-b_p_fex != NUL) ! { ! do_internal = (fex_format(curwin-w_cursor.lnum, 1L, c) != 0); ! /* It may be required to save for undo again, e.g. when setline() !* was called. */ ! ins_need_undo = TRUE; ! } ! if (do_internal) #endif internal_format(textwidth, second_indent, flags, c == NUL); } *** ../vim-7.0.125/src/version.cTue Oct 10 13:27:30 2006 --- src/version.c Tue Oct 10 15:47:20 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 126, /**/ -- How To Keep A Healthy Level Of Insanity: 16. Have your coworkers address you by your wrestling name, Rock Hard Kim. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Patch 7.0.127
Patch 7.0.127 Problem:Crash when swap files has invalid timestamp. Solution: Check return value of ctime() for being NULL. Files: src/memline.c *** ../vim-7.0.126/src/memline.cTue Aug 29 17:28:56 2006 --- src/memline.c Tue Oct 10 16:19:56 2006 *** *** 1633,1638 --- 1633,1639 int fd; struct block0 b0; time_tx = (time_t)0; + char *p; #ifdef UNIX char_uuname[B0_UNAME_SIZE]; #endif *** *** 1652,1659 #endif MSG_PUTS(_( dated: )); x = st.st_mtime;/* Manx C can't do st.st_mtime */ ! MSG_PUTS(ctime(x));/* includes '\n' */ ! } /* --- 1653,1663 #endif MSG_PUTS(_( dated: )); x = st.st_mtime;/* Manx C can't do st.st_mtime */ ! p = ctime(x); /* includes '\n' */ ! if (p == NULL) ! MSG_PUTS((invalid)\n); ! else ! MSG_PUTS(p); } /* *** *** 3652,3657 --- 3656,3662 { struct stat st; time_tx, sx; + char *p; ++no_wait_return; (void)EMSG(_(E325: ATTENTION)); *** *** 3666,3672 { MSG_PUTS(_( dated: )); x = st.st_mtime;/* Manx C can't do st.st_mtime */ ! MSG_PUTS(ctime(x)); if (sx != 0 x sx) MSG_PUTS(_( NEWER than swap file!\n)); } --- 3671,3681 { MSG_PUTS(_( dated: )); x = st.st_mtime;/* Manx C can't do st.st_mtime */ ! p = ctime(x); /* includes '\n' */ ! if (p == NULL) ! MSG_PUTS((invalid)\n); ! else ! MSG_PUTS(p); if (sx != 0 x sx) MSG_PUTS(_( NEWER than swap file!\n)); } *** ../vim-7.0.126/src/version.cTue Oct 10 15:49:41 2006 --- src/version.c Tue Oct 10 16:18:51 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 127, /**/ -- How To Keep A Healthy Level Of Insanity: 17. When the money comes out the ATM, scream I won!, I won! 3rd time this week! /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Problems with configure after patch 123
At patchlevel 125 (123-124-125 newly patched), make reconfig and make distclean both fail as follows (beware of mailer beautification: all lines from GUI_INC_LOC= (included) to --enable-mzschemeinterp (excluded) end in a backslash): Starting make in the src directory. If there are problems, cd to the src directory and run make there cd src make distclean make[1]: Entering directory `/root/.build/vim/vim70/src' GUI_INC_LOC=-DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include -I/usr/X11R6/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -DORBIT2=1 -pthread -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/libart-2.0 -I/usr/include/libxml2 -I/opt/gnome/include/libgnomeui-2.0 -I/opt/gnome/include/libgnome-2.0 -I/opt/gnome/include/libgnomecanvas-2.0 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/include/gconf/2 -I/opt/gnome/include/libbonoboui-2.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -I/opt/gnome/include/orbit-2.0 -I/opt/gnome/include/libbonobo-2.0 -I/opt/gnome/include/gnome-vfs-2.0 -I/opt/gnome/lib/gnome-vfs-2.0/include -I/opt/gnome/include/bonobo-activation-2.0 -I/opt/gnome/include/pango-1.0 -I/usr/include/freetype2 -I/opt/gnome/lib/gtk-2.0/include -I/usr/X11R6/include -I/opt/gnome/include/atk-1.0 -I/usr/include/freetype2/config GUI_LIB_LOC=-L/opt/gnome/lib \ CC=gcc CPPFLAGS= CFLAGS=-O2 -fno-strength-reduce -Wall \ LDFLAGS=-rdynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE -L/usr/local/lin srcdir=. \ ./configure --enable-gnome-check \ --enable-perlinterp --enable-pythoninterp --enable-tclinterp --with-tcl=tclsh8.4 --enable-rubyinterp \ --enable-cscope --enable-multibyte \ --enable-fontset \ --with-features=huge \ [EMAIL PROTECTED]\ --enable-mzschemeinterp configure: loading cache auto/config.cache configure: error: `CC' has changed since the previous run: configure: former value: configure: current value: gcc configure: error: `CFLAGS' has changed since the previous run: configure: former value: configure: current value: -O2 -fno-strength-reduce -Wall configure: error: `LDFLAGS' has changed since the previous run: configure: former value: configure: current value: -rdynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE -L/usr/local/lib configure: error: changes in the environment can compromise the build configure: error: run `make distclean' and/or `rm auto/config.cache' and start over make[1]: *** [auto/config.mk] Error 1 make[1]: Leaving directory `/root/.build/vim/vim70/src' make: *** [distclean] Error 2 After manually deleting src/auto/config.cache, make distclean runs configure first, then proceeds to remove (among others) configure's output (!!!) as follows: [...] checking for setjmp.h... yes checking for GCC 3 or later... yes updating cache auto/config.cache configure: creating auto/config.status config.status: creating auto/config.mk config.status: creating auto/config.h config.status: auto/config.h is unchanged make[1]: Leaving directory `/root/.build/vim/vim70/src' make[1]: Entering directory `/root/.build/vim/vim70/src' [...] rm -f auto/config.status auto/config.cache config.log auto/config.log rm -f auto/config.h auto/link.log auto/link.sed auto/config.mk touch auto/config.h cp config.mk.dist auto/config.mk rm -f tags make[1]: Leaving directory `/root/.build/vim/vim70/src' *Then* I can run make config config.log 21 and make make.log 21, producing an executable which is capable of (at least) showing the intro screen and executing :version and :q. Best regards, Tony.
Patch 7.0.128
Patch 7.0.128 Problem:GUI: when closing gvim is cancelled because there is a changed buffer the screen isn't updated to show the changed buffer in the current window. (Krzysztof Kacprzak) Solution: Redraw when closing gvim is cancelled. Files: src/gui.c *** ../vim-7.0.127/src/gui.cSun Oct 8 13:56:53 2006 --- src/gui.c Tue Oct 10 13:45:13 2006 *** *** 637,642 --- 637,643 #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO) + # define NEED_GUI_UPDATE_SCREEN 1 /* * Called when the GUI shell is closed by the user. If there are no changed * files Vim exits, otherwise there will be a dialog to ask the user what to *** *** 665,672 exiting = FALSE; cmdmod = save_cmdmod; ! setcursor(); /* position cursor */ ! out_flush(); } #endif --- 666,672 exiting = FALSE; cmdmod = save_cmdmod; ! gui_update_screen(); /* redraw, window may show changed buffer */ } #endif *** *** 4823,4828 --- 4823,4829 #endif #if defined(FIND_REPLACE_DIALOG) || defined(FEAT_SUN_WORKSHOP) \ + || defined(NEED_GUI_UPDATE_SCREEN) \ || defined(PROTO) /* * Update the current window and the screen. *** ../vim-7.0.127/src/version.cTue Oct 10 16:20:51 2006 --- src/version.c Tue Oct 10 17:35:42 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 128, /**/ -- How To Keep A Healthy Level Of Insanity: 18. When leaving the zoo, start running towards the parking lot, yelling run for your lives, they're loose!! /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Problems with configure after patch 123
Bram Moolenaar wrote: Tony Mechelynck wrote: At patchlevel 125 (123-124-125 newly patched), make reconfig and make distclean both fail as follows (beware of mailer beautification: all lines from GUI_INC_LOC= (included) to --enable-mzschemeinterp (excluded) end in a backslash): Starting make in the src directory. If there are problems, cd to the src directory and run make there I don't know how you start this, but you apparently didn't do make distclean in the src directory. I invoked it in the top directory, and the only rule it executed there was cd src $(MAKE) $@ No variables set at that point. It's possible that when the timestamp of src/auto/configure changes the scripts get confused a bit. The current autoconf implementation isn't very user friendly when it comes to patching. I don't think I can do anything to avoid this. make distclean works fine for me and doesn't run configure first. It works fine for me too, _except_ when the configure source files have just been patched (as by patch 7.0.123) and the configure output files are older. I suspect the configure run happens because make distclean is trying to make the auto/config.mk which is to be included at line 289 of src/Makefile (note: make is a two-pass process). I suggest the distclean target rules (at least) be moved to the top Makefile in order to avoid including config.mk when making that target. The place of the include should not matter. The Makefile is first read completely before dependencies are followed. distclean does not depend on auto/config.mk. Perhaps your make program implies this dependency when including a file? I would call that a bug (some might call it a feature...). I'm using GNU make, version 3.80. From info make, under Include, I read the following (about two-thirds of the way down): [...] Once it has finished reading makefiles, `make' will try to remake any that are out of date or don't exist. *Note How Makefiles Are Remade: Remaking Makefiles. Only after it has tried to find a way to remake a makefile and failed, will `make' diagnose the missing makefile as a fatal error. [...] In this case, since there is a rule to make auto/config.mk, with auto/configure, config.mk.in and config.h.in as prerequisites, and one or more of the latter are newer than the included file config.mk, the latter is an out-of-date makefile and make tries to remake it -- by running configure. IOW this is a documented feature of GNU make. Since the include is in src/Makefile and not in vim70/Makefile, by placing the distclean rule in the latter (explicitly, not as a call to src/Makefile) we would avoid the include altogether, and thus the check on whether the included makefile is out of date. Best regards, Tony.
Re: Problems with configure after patch 123
Tony Mechelynck wrote: The place of the include should not matter. The Makefile is first read completely before dependencies are followed. distclean does not depend on auto/config.mk. Perhaps your make program implies this dependency when including a file? I would call that a bug (some might call it a feature...). I'm using GNU make, version 3.80. From info make, under Include, I read the following (about two-thirds of the way down): [...] Once it has finished reading makefiles, `make' will try to remake any that are out of date or don't exist. *Note How Makefiles Are Remade: Remaking Makefiles. Only after it has tried to find a way to remake a makefile and failed, will `make' diagnose the missing makefile as a fatal error. [...] In this case, since there is a rule to make auto/config.mk, with auto/configure, config.mk.in and config.h.in as prerequisites, and one or more of the latter are newer than the included file config.mk, the latter is an out-of-date makefile and make tries to remake it -- by running configure. IOW this is a documented feature of GNU make. But I don't want to update auto/config.mk. I can understand that it's build when it does not exist, otherwise the only alternative is giving an error message and die. But when it exists it should be used as-is. I would rather call this a bug than a feature, I didn't specify the file should be updated. Isn't there a way to disable this feature? Since the include is in src/Makefile and not in vim70/Makefile, by placing the distclean rule in the latter (explicitly, not as a call to src/Makefile) we would avoid the include altogether, and thus the check on whether the included makefile is out of date. make distclean should work in the src directory, like everything else. -- The startling truth finally became apparent, and it was this: Numbers written on restaurant checks within the confines of restaurants do not follow the same mathematical laws as numbers written on any other pieces of paper in any other parts of the Universe. This single statement took the scientific world by storm. So many mathematical conferences got held in such good restaurants that many of the finest minds of a generation died of obesity and heart failure, and the science of mathematics was put back by years. -- Douglas Adams, The Hitchhiker's Guide to the Galaxy /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Patch 7.0.131
Patch 7.0.131 Problem:Win32: vim -r does not list all the swap files. Solution: Also check for swap files starting with a dot. Files: src/memline.c *** ../vim-7.0.130/src/memline.cTue Oct 10 16:20:51 2006 --- src/memline.c Tue Oct 10 21:54:21 2006 *** *** 1400,1407 names[0] = vim_strsave((char_u *)*.sw?); # endif #endif ! #ifdef UNIX ! /* for Unix names starting with a dot are special */ names[1] = vim_strsave((char_u *).*.sw?); names[2] = vim_strsave((char_u *).sw?); num_names = 3; --- 1400,1408 names[0] = vim_strsave((char_u *)*.sw?); # endif #endif ! #if defined(UNIX) || defined(WIN3264) ! /* For Unix names starting with a dot are special. MS-Windows !* supports this too, on some file systems. */ names[1] = vim_strsave((char_u *).*.sw?); names[2] = vim_strsave((char_u *).sw?); num_names = 3; *** *** 1430,1437 names[0] = concat_fnames(dir_name, (char_u *)*.sw?, TRUE); # endif #endif ! #ifdef UNIX ! /* for Unix names starting with a dot are special */ names[1] = concat_fnames(dir_name, (char_u *).*.sw?, TRUE); names[2] = concat_fnames(dir_name, (char_u *).sw?, TRUE); num_names = 3; --- 1431,1439 names[0] = concat_fnames(dir_name, (char_u *)*.sw?, TRUE); # endif #endif ! #if defined(UNIX) || defined(WIN3264) ! /* For Unix names starting with a dot are special. MS-Windows !* supports this too, on some file systems. */ names[1] = concat_fnames(dir_name, (char_u *).*.sw?, TRUE); names[2] = concat_fnames(dir_name, (char_u *).sw?, TRUE); num_names = 3; *** ../vim-7.0.130/src/version.cTue Oct 10 18:43:50 2006 --- src/version.c Tue Oct 10 21:55:02 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 131, /**/ -- Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Cha-Chu. But I think it's Colin. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Problems with configure after patch 123
Bram Moolenaar wrote: Tony Mechelynck wrote: The place of the include should not matter. The Makefile is first read completely before dependencies are followed. distclean does not depend on auto/config.mk. Perhaps your make program implies this dependency when including a file? I would call that a bug (some might call it a feature...). I'm using GNU make, version 3.80. From info make, under Include, I read the following (about two-thirds of the way down): [...] Once it has finished reading makefiles, `make' will try to remake any that are out of date or don't exist. *Note How Makefiles Are Remade: Remaking Makefiles. Only after it has tried to find a way to remake a makefile and failed, will `make' diagnose the missing makefile as a fatal error. [...] In this case, since there is a rule to make auto/config.mk, with auto/configure, config.mk.in and config.h.in as prerequisites, and one or more of the latter are newer than the included file config.mk, the latter is an out-of-date makefile and make tries to remake it -- by running configure. IOW this is a documented feature of GNU make. But I don't want to update auto/config.mk. I can understand that it's build when it does not exist, otherwise the only alternative is giving an error message and die. But when it exists it should be used as-is. I would rather call this a bug than a feature, I didn't specify the file should be updated. Isn't there a way to disable this feature? [...] Apparently the make philosophy is that one wants to use the most up-to-date makefiles possible. I'm not sure I understand fully from the make info text if and how you can avoid to remake an existing makefile if it's present but out-of-date. One method would of course be to drop the make rules for config.mk -- but what would happen when doing make the first time without a target? Another possibility would be to touch the config.mk file to make it newer than the rest -- but is it possible to do that other than manually? It says in the info text for make that a makefile target with two colons and no prerequisites will never be remade to avoid an endless loop (unlike a non-makefile target with two colons and no prerequisites, which is remade unconditionally IIUC). But double-colon rules are somewhat esoteric and I'm not sure whether this property is usable. Best regards, Tony.
Re: Replacing '%' in a text file
--- Tim Chase [EMAIL PROTECTED] wrote: I have to replace every occurrence of % in a file with % |. I have been effectively replacing text using the following construct: :%s/\text\/replacement/g However when I try to do the following: :%s/\%\/% |/g I am greeted by an error message. Obviously, the % character needs to be treated differently for being replaced. Escap sequence? The error message returned should give a clue regarding the problem (E486: Pattern not found: \%\). Your pattern \text\ works well for words, ensuring that you don't find them as a sub-portion of some other word (such as finding the foo in food, snafoo, or confoosion). However, the \ and \ tokens require a transition from a non-word-character to a word-character (or vice-versa). The % character, by default, is not a key-word character (though this can be altered by changing the 'iskeyword' setting). Unless there is some context in which you *don't* want to replace a % with % |, you can just use :%s/%/% |/g without the \ and \ markers. You can read more about the problematic operators at :help /\ or making them part of the set of characters that constitute a keyword, by reading at :help 'iskeyword' HTH, -tim Thanks. The problem is now resolved. -- Muhammad Farooq-i-Azam __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Bug in :(un)lockvar
Hari Krishna Dara wrote: I need to create a doubly linked list and since this will cause problem with lockvar, I will just comment the lock/unlockvar commands. I am wondering if you have any plans to fix this issue. The lockvar is a great way to prevent accidental changes (and it already helped me once) so I would rather not comment it. Fixing lockvar for recursive references is in the todo list. -- If Pacman had affected us as kids we'd be running around in dark rooms, munching pills and listening to repetitive music. -- Marcus Brigstocke /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
diffoff
The :diffoff command resets the relevant options to their default value. This may be different from what the values were before diff mode was started, the old values are not remembered. Is it on the to-do list to make diffoff restore from previous values rather than default ones, or is there already an option somewhere that toggles the behaviour? -- .
Re: Setting up netrw
Suresh Govindachar wrote: Close ... From inside gvim, I tried both of the following: :Nread scp://111.11.11.111/home/suresh/examples/mcf/vmul/manager/manager_vmul.c and :sf scp://111.11.11.111/home/suresh/examples/mcf/vmul/manager/manager_vmul.c But the system command they each resulted in was: c:/opt/putty/pscp.exe -l user -pw password -q -batch '111.11.11.111:home/suresh/examples/mcf/vmul/manager/manager_vmul.c' VID62.tmp.c The preceding system command doesn't work. Two changes need to be made to make it work: 1) Remove the single quotes '' [unknown host with ''] 2) Add a / after the : in :home/suresh [file does not exist without /] I downloaded all sources and built gvim yesterday. Try using the latest netrw, which is currently up to v107b. Its been a bit smarter about quoting; and its quoting can be overridden by specifying g:netrw_shq in one's .vimrc. Regards, Chip Campbell
vim | editing pdf files with vim
Hi all, is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. Thanks, Nikos
Shading alternating patterns.
I've been swapping my subscribed addresses, so I apologize if this got posted more than once. My question is casual, but I wasn't able to find anything on the FAQs or Google, so I hope someone here can tell me if I'm nuts or not. In my ideal world (which, so far, Vim has done an excellent job creating for me), CSS definitions would be lightly, alternatingly shaded. Here at work, we format our CSS files like so: .selector { property: value; property: value; property: value; } .selector { property: value; } .selector { property: value; property: value; property: value; property: value; } You can see immediately that it is easy enough to scan down the left column to find the selector you're interested in, but it's a bit more difficult to see where one definition's property list starts and another's ends (especially with syntax highlighting in there). Is there some way, perhaps through a syntax rule, or rules, to have Vim shade the background of *alternating* CSS definitions, assuming this file format? I'm handy with regex but I don't know if Vim's syntax system is even up to the task. A function that ran against the buffer would be fine, too. Thanks! -- Aaron
Re: Shading alternating patterns.
Is there some way, perhaps through a syntax rule, or rules, to have Vim shade the background of *alternating* CSS definitions, assuming this file format? While I'm not sure the below will solve it, I've pasted in some dialog from Benji Fisher and Tony Mechelynck (from back in February of this year, which I saved as I thought it was a nifty stunt) regarding the highlighting of alternate *lines*. One might be able to use this as a foundation for doing alternate CSS-rule-blocks: BF I have not used syntax much either, but I decided to test BF this. I think what you want is (two :hi lines and) BF something like this: BF BF :syn match Oddlines ^.*$ contains=ALL nextgroup=Evenlines skipnl BF :syn match Evenlines ^.*$ contains=ALL nextgroup=Oddlines skipnl BF BF In other words, drop transparent and add skipnl. I BF tested it with BF BF :syn clear BF BF first; I am not sure how well it will work without that. AM AM I agree about skipnl. AM AM Got it to work on text files, as follows (on W32) AM AM ~/vimfiles/after/syntax/text.vim AM hi default Oddlines ctermbg=grey guibg=#808080 AM hi default Evenlines cterm=NONE gui=NONE AM AM syn match Oddlines ^.*$ contains=ALL nextgroup=Evenlines skipnl AM syn match Evenlines ^.*$ contains=ALL nextgroup=Oddlines skipnl AM AM $VIM/vimfiles/after/filetype.vim AM augroup filetypedetect AM au BufRead,BufNewFile *.txt setf text AM augroup END AM AM ~/vimfiles/colors/almost-default.vim AM [...] AM hi Oddlines ctermbg=yellow guibg=#99 AM hi Evenlines ctermbg=magenta guibg=#FFCCFF AM [...] AM AM Notes: AM 1. filetype.vim in an after-directory and with :setf AM to avoid overriding already-detected special .txt files. AM 2. With default before the highlight name in the syntax AM file (but not without it) the colors from the colorscheme AM (invoked from the vimrc) are used. (Without a colorscheme, AM the default colors from the syntax file are still used.) AM 3. Haven't succeeded (but haven't much tried) to make it AM work for a more complex filetype with an already defined AM syntax like HTML AM 4. After entering the above changes, Vim must be restarted AM for them to take effect. Hope it helps give you some grounds from which to find a solution (even if I think Tony's a tad messed-in-the-head for choosing yellow/magenta for alternating colors ;-) -tim
Re: Shading alternating patterns.
Aaron wrote: I've been swapping my subscribed addresses, so I apologize if this got posted more than once. My question is casual, but I wasn't able to find anything on the FAQs or Google, so I hope someone here can tell me if I'm nuts or not. In my ideal world (which, so far, Vim has done an excellent job creating for me), CSS definitions would be lightly, alternatingly shaded. Here at work, we format our CSS files like so: .selector { property: value; property: value; property: value; } .selector { property: value; } .selector { property: value; property: value; property: value; property: value; } You can see immediately that it is easy enough to scan down the left column to find the selector you're interested in, but it's a bit more difficult to see where one definition's property list starts and another's ends (especially with syntax highlighting in there). Is there some way, perhaps through a syntax rule, or rules, to have Vim shade the background of *alternating* CSS definitions, assuming this file format? I'm handy with regex but I don't know if Vim's syntax system is even up to the task. A function that ran against the buffer would be fine, too. Thanks! I don't know, but there is an easy way to find where one particular definition starts and ends: 1. Place the cursor on the opening brace (e.g. with /{ ) 2. Hit V (i.e. shift-v) to enter linewise Visual mode 3. Hit % to move the cursor to the closing brace. The whole selector and property list is now highlighted. You can even hit Esc to quit Visual mode and go back to it later with gv Best regards, Tony.
Re: Shading alternating patterns.
Tim Chase wrote: Is there some way, perhaps through a syntax rule, or rules, to have Vim shade the background of *alternating* CSS definitions, assuming this file format? While I'm not sure the below will solve it, I've pasted in some dialog from Benji Fisher and Tony Mechelynck (from back in February of this year, which I saved as I thought it was a nifty stunt) regarding the highlighting of alternate *lines*. One might be able to use this as a foundation for doing alternate CSS-rule-blocks: BF I have not used syntax much either, but I decided to test BF this. I think what you want is (two :hi lines and) BF something like this: BF BF :syn match Oddlines ^.*$ contains=ALL nextgroup=Evenlines skipnl BF :syn match Evenlines ^.*$ contains=ALL nextgroup=Oddlines skipnl BF BF In other words, drop transparent and add skipnl. I BF tested it with BF BF :syn clear BF BF first; I am not sure how well it will work without that. AM AM I agree about skipnl. AM AM Got it to work on text files, as follows (on W32) AM AM ~/vimfiles/after/syntax/text.vim AM hi default Oddlines ctermbg=grey guibg=#808080 AM hi default Evenlines cterm=NONE gui=NONE AM AM syn match Oddlines ^.*$ contains=ALL nextgroup=Evenlines skipnl AM syn match Evenlines ^.*$ contains=ALL nextgroup=Oddlines skipnl AM AM $VIM/vimfiles/after/filetype.vim AM augroup filetypedetect AM au BufRead,BufNewFile *.txt setf text AM augroup END AM AM ~/vimfiles/colors/almost-default.vim AM [...] AM hi Oddlines ctermbg=yellow guibg=#99 AM hi Evenlines ctermbg=magenta guibg=#FFCCFF AM [...] AM AM Notes: AM 1. filetype.vim in an after-directory and with :setf AM to avoid overriding already-detected special .txt files. AM 2. With default before the highlight name in the syntax AM file (but not without it) the colors from the colorscheme AM (invoked from the vimrc) are used. (Without a colorscheme, AM the default colors from the syntax file are still used.) AM 3. Haven't succeeded (but haven't much tried) to make it AM work for a more complex filetype with an already defined AM syntax like HTML AM 4. After entering the above changes, Vim must be restarted AM for them to take effect. Hope it helps give you some grounds from which to find a solution (even if I think Tony's a tad messed-in-the-head for choosing yellow/magenta for alternating colors ;-) -tim Thanks much, Tim, I will experiment with some of this and see what happens! Thanks also to Tony and Benji for coming up with this in the first place. -- Aaron The Dude abides.
Re: Setting up netrw
Suresh Govindachar wrote: The version of netrw in the vim sources, on vim.org and on your web-site all differ. Since netrw is part of the vim runtime- sources, could you please coordinate your releases with Bram? They are already quite coordinated. Development version appears at my website, an interim release appears at vim.sf.net, and the interim release is also sent on to Bram. Also, there is a note on your web-site about needing to update vimball. Is vimball part of vim runtime-sources? Yes, although it, too, undergoes the same development process. If you would prefer people use netrw under vimfiles/ rather than under the main vim directory, please have Bram remove netrw from the runtime-distribution. I have no such preference. However, the runtime-distribution release will interfere with the development release. This problem will be addressed whenever the next vim 7.1 appears. If you don't wish to use the development version of netrw (or vimball), then feel free not to.
Re: vim | editing pdf files with vim
Nikolaos A. Patsopoulos did utter on 10/10/2006 14:58: Hi all, is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. In general trying to edit PDF or PostScript files is a non-starter, unless you have a lot of knowledge about how the files were constructed. In particular, text depends on the font encoding used. It will be much easier to go back to the original application that generated the PDF/PS and edit the document there. TTFN Mike -- Free the bound periodicals!
Re: vim | editing pdf files with vim
Mike Williams wrote: Nikolaos A. Patsopoulos did utter on 10/10/2006 14:58: Hi all, is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. In general trying to edit PDF or PostScript files is a non-starter, unless you have a lot of knowledge about how the files were constructed. In particular, text depends on the font encoding used. It will be much easier to go back to the original application that generated the PDF/PS and edit the document there. TTFN Mike You are 100% right. But what if you cannot access the original file? Lets say you want to edit a pdf you downloaded from internet. Isn't there a way to do this with vim? I haven't tried emacs or sed but probably they will fail too. I was just wondering if there some way out there. Nikos
RE: vim | editing pdf files with vim
PDF files need to be edited with a specific editor, because they contain non-human readable structure and encodings. Your request is similar to asking if you could edit a JPEG with vim. If it is just a PDF of a text file then you should simply be able to copy/paste the text into your favourite text editor (vim!), and edit it there, but if you want to edit the PDF file then you will need to search for a PDF editor. I don't know of any off-hand, but I'm sure a quick Google search will turn one up. Max -Original Message- From: Nikolaos A. Patsopoulos [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 10, 2006 9:20 AM To: [EMAIL PROTECTED]; vim@vim.org Subject: Re: vim | editing pdf files with vim Mike Williams wrote: Nikolaos A. Patsopoulos did utter on 10/10/2006 14:58: Hi all, is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. In general trying to edit PDF or PostScript files is a non-starter, unless you have a lot of knowledge about how the files were constructed. In particular, text depends on the font encoding used. It will be much easier to go back to the original application that generated the PDF/PS and edit the document there. TTFN Mike You are 100% right. But what if you cannot access the original file? Lets say you want to edit a pdf you downloaded from internet. Isn't there a way to do this with vim? I haven't tried emacs or sed but probably they will fail too. I was just wondering if there some way out there. Nikos
Re: vim | editing pdf files with vim
Nikolaos A. Patsopoulos wrote: Hi all, is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. Thanks, Nikos Vim is a text editor. PDF files contain both text data and binary data. I woudn't try editing them with Vim: too much risk of f...ouling it all up by not knowing what I'm doing. If you want to see what PDF looks like when printed, use Acrobat Reader. If you want to edit it, I guess you'll have to buy some PDF editor from Adobe. PostScript can, IIUC, be viewed in Vim, and even with syntax highlighting -- but as PostScript code, not as WYSIWYG rendered text. That's great if you want to program in PostScript. Best regards, Tony.
Re: vim | editing pdf files with vim
Nikolaos A. Patsopoulos wrote: is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. Not really. But you can use a program called pdftk that will help you along those lines. http://www.accesspdf.com/pdftk/
Re: vim | editing pdf files with vim
Nikolaos A. Patsopoulos wrote: is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. Woops ... just found this by accident: http://www.pdfhacks.com/pdftk/#vim_plugin From the description: Vim users can also install my plug-in for easily editing PDF code. When you open a PDF in Vim, the plug-in calls pdftk to uncompress the page streams, so they are editable. When you save the PDF, the plug-in uses pdftk to repair and re-compress the PDF. Don't know how well it works.
Re: vim | editing pdf files with vim
Nikolaos A. Patsopoulos wrote:, is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. For purposes of visualization, using netrw's browser and, with the cursor on the pdf file, pressing x will (usually) bring up a tool to visualize the pdf file. For editing (as in changing file contents), I'm afraid I don't know. Regards, Chip Campbell
Re: Folding between #ifdef _DEBUG and #endif
On Tue, 10 Oct 2006 at 12:14pm, Kamil Kisiel wrote: I've got some C++ source code that I'd like to fold away. Basically I want vim to have folds only between #ifdef _DEBUG and the corresponding #endif statement, and nowhere else. My vimfu is a bit weak in this respect so I'm not quite sure how I would go about doing this. Using foldexpr, changing the marker type? Previously I was just manually creating folds, but as you can imagine it gets fairly tedious and it would be great if I could automate it. Your help is much appreciated. If the ifdefs that you want to fold are not nested, you can use my foldutil plugin from here: http://www.vim.org/scripts/script.php?script_id=158 You would use something like: :FoldMatching #ifdef\ _DEBUG #endif 0 The last parameter is a context, so you might like 1 better than 0 (allows you to see what you are folding). Alternatively, you can also configure the foldtext (see plugin page or the header in the file for information) If you want this to be automatically done everytime you open the file, then you need to create an autocommand e.g.,(untested): au FileType c FoldMatching #ifdef\ _DEBUG #endif 0 -- HTH, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: bugs in vim scripting highlighting
Mikolaj Machowski wrote: Noticed two bugs in vim script highlighting: 1. xnoremap and snoremap are not fully recognized. Compare highlighting of those three lines: inoremap buffer silent expr C-C SIDCtrlC() xnoremap buffer silent expr C-C SIDCtrlC() snoremap buffer silent expr C-C SIDCtrlC() Arguments of xnoremap and snoremap aren't highlighted 2. Function element addButton is highlighted as error: function! forms#form.addButton(fname, flabel, fvalue, hotkey, listener) But it works (as in forms.vim). the same apply to call call. Problem 1 has been addressed in the latest syntax/vim.vim -- please try it out. I think problem 2 was addressed previously. syntax/vim.vim is now up to v7.0-55, and you can get it from http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax You can then select vim.vim syntax. Regards, Chip Campbell
Re: vim | editing pdf files with vim
On 10/10/06, Nikolaos A. Patsopoulos [EMAIL PROTECTED] wrote: is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. Try to find pdf-to-word conversion tool (openoffice can edit word files), or pdf-to-rtf conversion tool. Then you edit word file or rtf fle, then openoffice can export file into pdf format back again. Yakov
Re: bugs in vim scripting highlighting
On Tue, 10 Oct 2006 at 3:29pm, Charles E Campbell Jr wrote: Problem 1 has been addressed in the latest syntax/vim.vim -- please try it out. I think problem 2 was addressed previously. syntax/vim.vim is now up to v7.0-55, and you can get it from http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax You can then select vim.vim syntax. Regards, Chip Campbell I faced a problem, though it is with netrw, not with vim syntax file. I tried to open the download link from Vim, and got the below error: Error detected while processing function netrw#NetRead: line 275: http://mysite.verizon.net/astronaut/vim/syntax/vim.vim.gz; E212: Can't open file for writing VIG3A4.tmp.gz [+][Not edited] --No lines in buffer-- Error detected while processing function netrw#NetRead..SNR115_NetGetFile: line 42: E37: No write since last change (add ! to override) http://mysite.verizon.net/astronaut/vim/syntax/vim.vim.gz; [+][Not edited] --No lines in buffer-- Error detected while processing function gzip#read: line 31: Error: Could not read uncompressed file VIJ3A7.tmp.gz [Not edited] --No lines in buffer-- I got an empty buffer, and when I reloaded the buffer, it worked fine. I am on windows. VIM - Vi IMproved 7.0 (2006 May 7, compiled Sep 10 2006 20:44:39) MS-Windows 32 bit GUI version with OLE support Included patches: 1-99 Compiled by [EMAIL PROTECTED] Huge version with GUI. Features included (+) or not (-): -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Shading alternating patterns.
Peter Hodge wrote: Hello Aaron, You could do something like this: syn match Sel1 /^\.selector/ nextgroup=Items1 skipwhite syn region Items1 start=/{/ end=/}/ contained keepend \ nextgroup=Sel2 skipwhite skipempty hi Sel1 guibg=#44 hi Items1 guibg=#44 syn match Sel2 /^\.selector/ contained nextgroup=Items2 skipwhite syn region Items2 start=/{/ end=/}/ contained keepend hi Sel2 guibg=#004400 hi Items2 guibg=#004400 That will get you started. regards, Peter Black on dark blue, or black on dark green, won't be very visible. I'm throwing no bird names around though; if Aaron doesn't like the colours, he can change them. See also :help :hi-default: Highlight colours defined in a syntax script should have the default keyword, otherwise they will override anything a colorscheme might already have set for those same groups. Best regards, Tony.
Problem in dos runtime on Vim FTP
Hello Vim List, Since yesterday, 4 files in the dos/autoload directory cannot be downloaded - it doesn't appear to matter which FTP client is used. The four problem files are: netrw.vim tar.vim vimball.vim zip.vim The URL for the directory of these files is: ftp://ftp.home.vim.org/pub/vim/runtime/dos/autoload -- Best regards, Bill
Re: Problem in dos runtime on Vim FTP
Bill McCarthy wrote: Hello Vim List, Since yesterday, 4 files in the dos/autoload directory cannot be downloaded - it doesn't appear to matter which FTP client is used. The four problem files are: netrw.vim tar.vim vimball.vim zip.vim The URL for the directory of these files is: ftp://ftp.home.vim.org/pub/vim/runtime/dos/autoload Those files have been recently updated. If your download problem isn't yet fixed by now, try the corresponding files in ftp://ftp.vim.org/pub/vim/runtime/autoload/ . They will have LF-only ends-of files (which makes them slightly shorter and not Notepad-compatible) but Vim should have no problem using them (if your 'fileformats' includes unix, which is the default). Best regards, Tony.
vim7: uninstalling vimball installed scripts
How does one uninstall the various pieces installed via a vimball? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: vim7: uninstalling vimball installed scripts
David Thompson wrote: How does one uninstall the various pieces installed via a vimball? see :help vimball-rmvimball Best regards, Tony.
Re: Folding between #ifdef _DEBUG and #endif
On 10/11/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: On Tue, 10 Oct 2006 at 12:14pm, Kamil Kisiel wrote: I've got some C++ source code that I'd like to fold away. Basically I want vim to have folds only between #ifdef _DEBUG and the corresponding #endif statement, and nowhere else. My vimfu is a bit weak in this respect so I'm not quite sure how I would go about doing this. Using foldexpr, changing the marker type? Previously I was just manually creating folds, but as you can imagine it gets fairly tedious and it would be great if I could automate it. Your help is much appreciated. If the ifdefs that you want to fold are not nested, you can use my foldutil plugin from here: http://www.vim.org/scripts/script.php?script_id=158 You would use something like: :FoldMatching #ifdef\ _DEBUG #endif 0 The last parameter is a context, so you might like 1 better than 0 (allows you to see what you are folding). Alternatively, you can also configure the foldtext (see plugin page or the header in the file for information) If you want this to be automatically done everytime you open the file, then you need to create an autocommand e.g.,(untested): au FileType c FoldMatching #ifdef\ _DEBUG #endif 0 Hari, Perfect. That's exactly what I wanted, and I'm sure your script will be useful in many other ways as well Good to find out about it, and thanks for your work. -- Kamil Kisiel [EMAIL PROTECTED]
Re: Problem in dos runtime on Vim FTP
On Tue 10-Oct-06 9:26pm -0600, A.J.Mechelynck wrote: Bill McCarthy wrote: Hello Vim List, Since yesterday, 4 files in the dos/autoload directory cannot be downloaded - it doesn't appear to matter which FTP client is used. The four problem files are: netrw.vim tar.vim vimball.vim zip.vim The URL for the directory of these files is: ftp://ftp.home.vim.org/pub/vim/runtime/dos/autoload Those files have been recently updated. If your download problem isn't yet fixed by now, try the corresponding files in ftp://ftp.vim.org/pub/vim/runtime/autoload/ . They will have LF-only ends-of files (which makes them slightly shorter and not Notepad-compatible) but Vim should have no problem using them (if your 'fileformats' includes unix, which is the default). I copied the that directory to an empty local directory. The copy worked fine except for 4 files - the ones mentioned above. The files that did copy had unix CRs. -- Best regards, Bill
Re: Problem in dos runtime on Vim FTP
Bill McCarthy wrote: On Tue 10-Oct-06 9:26pm -0600, A.J.Mechelynck wrote: Bill McCarthy wrote: Hello Vim List, Since yesterday, 4 files in the dos/autoload directory cannot be downloaded - it doesn't appear to matter which FTP client is used. The four problem files are: netrw.vim tar.vim vimball.vim zip.vim The URL for the directory of these files is: ftp://ftp.home.vim.org/pub/vim/runtime/dos/autoload Those files have been recently updated. If your download problem isn't yet fixed by now, try the corresponding files in ftp://ftp.vim.org/pub/vim/runtime/autoload/ . They will have LF-only ends-of files (which makes them slightly shorter and not Notepad-compatible) but Vim should have no problem using them (if your 'fileformats' includes unix, which is the default). I copied the that directory to an empty local directory. The copy worked fine except for 4 files - the ones mentioned above. The files that did copy had unix CRs. We-e-ell, that's strange. Something must have gone wrong on the FTP servers. I updated my runtime files a few hours ago from the rsync server; but from a long directory listing, I notice that the four files above (which are dated 14-Aug-2006) plus netrwSettings.vim (dated 9-Oct-2006) have permissions -rwr-- : i.e., they are apparently readable by everyone except members of the owning group (which is a weird set of permissions). I guess the maintainer of the files, or the owner of the servers, should run chmod 644 on them. (IIUC, the maintainer of all those files is Dr. Chip so I add him on the Cc: list.) If you have a version of rsync you may try using that: it worked for me. The command I use (which was mentioned in a recent post in a different thread, and which I repeat here) is cd ~/.build/vim/vim70 rsync -avzcP --delete --exclude=/dos/ ftp.nluug.nl::Vim/runtime/ ./runtime I suppose a trivial modification would be enough to make it fit your setup. On my system, the above lists files deleted or downloaded. rsync --version gives: rsync version 2.6.3 protocol version 28 Copyright (C) 1996-2004 by Andrew Tridgell and others http://rsync.samba.org/ Capabilities: 64-bit files, socketpairs, hard links, acls, symlinks, batchfiles, inplace, IPv6, 64-bit system inums, 64-bit internal inums, SLP rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details. Best regards, Tony.
Re: Folding between #ifdef _DEBUG and #endif
[EMAIL PROTECTED] 写于 2006-10-11 12:27:33: :FoldMatching #ifdef\ _DEBUG #endif 0 The last parameter is a context, so you might like 1 better than 0 (allows you to see what you are folding). Alternatively, you can also configure the foldtext (see plugin page or the header in the file for information) If you want this to be automatically done everytime you open the file, then you need to create an autocommand e.g.,(untested): au FileType c FoldMatching #ifdef\ _DEBUG #endif 0 Hari, Perfect. That's exactly what I wanted, and I'm sure your script will be useful in many other ways as well Good to find out about it, and thanks for your work. -- Kamil Kisiel [EMAIL PROTECTED] I don't know how it works, but it seems that cannot cope with statements like the following: #ifdef _DEBUG /* only things here should be folded */ #else /* these lines should NOT be folded */ #endif or the following: #ifndef _DEBUG /* these lines should NOT be folded */ #else /* only things here should be folded */ #endif What should I do, if the #if statements may contain #else? especially for the latter one, the #ifndef has #else? -- Sincerely, Pan, Shi Zhu. ext: 2606