recent.vim plugin
Hi all! I'm trying to make recent.vim plguin working with vim-7.0 There is some kind of problem with mapping keys inside plugin: function! OptionFiles() "let file = bufname("%") if bufname("")=="recent_files" map gf set number set noswapfile else set nonumber set swapfile if hasmapto('gf') unmap gf endif endif endfunction command Recent edit ~/.vim/recent_files autocmd BufEnter * :call OptionFiles() I wonder why this function doesn't map Enter key to "gf" combination, when I start vim... There is succesfully created "recent_files" buffer... But keybinding doesn't work :( Can anybody help me with this question -- God bless you! Ilia 2.6.18-gentoo-r4 AMD Athlon(tm) XP 2600+ mailto: [EMAIL PROTECTED] icq: 198233378 VegaTrek Developer: http://wcuniverse.sourceforge.net/vegatrek/ VegaTrek Forum Moderator: http://vegastrike.sourceforge.net/forums/viewforum.php?f=13 You know you're using the computer too much when: you are trying to fetch the cup of coffee on your desk with the mouse pointer. -- jwj $gpg --keyserver cryptonomicon.mit.edu --search-keys tillias
Re: patch 7.0.182
Ali Akcaagac wrote: > may you tell us, when you plan to release VIM 7.1 ? I don't know. I still have quite a few bugs to fix. -- hundred-and-one symptoms of being an internet addict: 15. Your heart races faster and beats irregularly each time you see a new WWW site address in print or on TV, even though you've never had heart problems before. /// 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: patch 7.0.182
Hi Bram, may you tell us, when you plan to release VIM 7.1 ? mfg, Ali Akcaagac On Tue, 2007-01-09 at 20:30 +0100, Bram Moolenaar wrote: > Patch 7.0.182 > Problem:When using a mix of undo and "g-" it may no longer be possible to > go to every point in the undo tree. (Andy Wokula) > Solution: Correctly update pointers in the undo tree. > Files:src/undo.c > > > *** ../vim-7.0.181/src/undo.c Tue Aug 29 17:28:56 2006 > --- src/undo.cTue Jan 9 20:18:27 2007 > *** > *** 341,351 > uhp->uh_alt_next = old_curhead; > if (old_curhead != NULL) > { > old_curhead->uh_alt_prev = uhp; > if (curbuf->b_u_oldhead == old_curhead) > curbuf->b_u_oldhead = uhp; > } > ! uhp->uh_alt_prev = NULL; > if (curbuf->b_u_newhead != NULL) > curbuf->b_u_newhead->uh_prev = uhp; > > --- 341,355 > uhp->uh_alt_next = old_curhead; > if (old_curhead != NULL) > { > + uhp->uh_alt_prev = old_curhead->uh_alt_prev; > + if (uhp->uh_alt_prev != NULL) > + uhp->uh_alt_prev->uh_alt_next = uhp; > old_curhead->uh_alt_prev = uhp; > if (curbuf->b_u_oldhead == old_curhead) > curbuf->b_u_oldhead = uhp; > } > ! else > ! uhp->uh_alt_prev = NULL; > if (curbuf->b_u_newhead != NULL) > curbuf->b_u_newhead->uh_prev = uhp; > > *** > *** 856,861 > --- 860,870 > uhp = curbuf->b_u_curhead; > while (uhp != NULL) > { > + /* Go back to the first branch with a mark. */ > + while (uhp->uh_alt_prev != NULL > + && uhp->uh_alt_prev->uh_walk == mark) > + uhp = uhp->uh_alt_prev; > + > /* Find the last branch with a mark, that's the one. */ > last = uhp; > while (last->uh_alt_next != NULL > *** > *** 865,870 > --- 874,881 > { > /* Make the used branch the first entry in the list of >* alternatives to make "u" and CTRL-R take this branch. */ > + while (uhp->uh_alt_prev != NULL) > + uhp = uhp->uh_alt_prev; > if (last->uh_alt_next != NULL) > last->uh_alt_next->uh_alt_prev = last->uh_alt_prev; > last->uh_alt_prev->uh_alt_next = last->uh_alt_next; > *** ../vim-7.0.181/src/version.c Tue Jan 9 15:43:39 2007 > --- src/version.c Tue Jan 9 20:26:47 2007 > *** > *** 668,669 > --- 668,671 > { /* Add new patch number below this line */ > + /**/ > + 182, > /**/ >
patch 7.0.182
Patch 7.0.182 Problem:When using a mix of undo and "g-" it may no longer be possible to go to every point in the undo tree. (Andy Wokula) Solution: Correctly update pointers in the undo tree. Files: src/undo.c *** ../vim-7.0.181/src/undo.c Tue Aug 29 17:28:56 2006 --- src/undo.c Tue Jan 9 20:18:27 2007 *** *** 341,351 uhp->uh_alt_next = old_curhead; if (old_curhead != NULL) { old_curhead->uh_alt_prev = uhp; if (curbuf->b_u_oldhead == old_curhead) curbuf->b_u_oldhead = uhp; } ! uhp->uh_alt_prev = NULL; if (curbuf->b_u_newhead != NULL) curbuf->b_u_newhead->uh_prev = uhp; --- 341,355 uhp->uh_alt_next = old_curhead; if (old_curhead != NULL) { + uhp->uh_alt_prev = old_curhead->uh_alt_prev; + if (uhp->uh_alt_prev != NULL) + uhp->uh_alt_prev->uh_alt_next = uhp; old_curhead->uh_alt_prev = uhp; if (curbuf->b_u_oldhead == old_curhead) curbuf->b_u_oldhead = uhp; } ! else ! uhp->uh_alt_prev = NULL; if (curbuf->b_u_newhead != NULL) curbuf->b_u_newhead->uh_prev = uhp; *** *** 856,861 --- 860,870 uhp = curbuf->b_u_curhead; while (uhp != NULL) { + /* Go back to the first branch with a mark. */ + while (uhp->uh_alt_prev != NULL + && uhp->uh_alt_prev->uh_walk == mark) + uhp = uhp->uh_alt_prev; + /* Find the last branch with a mark, that's the one. */ last = uhp; while (last->uh_alt_next != NULL *** *** 865,870 --- 874,881 { /* Make the used branch the first entry in the list of * alternatives to make "u" and CTRL-R take this branch. */ + while (uhp->uh_alt_prev != NULL) + uhp = uhp->uh_alt_prev; if (last->uh_alt_next != NULL) last->uh_alt_next->uh_alt_prev = last->uh_alt_prev; last->uh_alt_prev->uh_alt_next = last->uh_alt_next; *** ../vim-7.0.181/src/version.cTue Jan 9 15:43:39 2007 --- src/version.c Tue Jan 9 20:26:47 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 182, /**/ -- hundred-and-one symptoms of being an internet addict: 13. You refer to going to the bathroom as downloading. /// 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.181
Patch 7.0.181 Problem:When reloading a file that starts with an empty line, the reloaded buffer has an extra empty line at the end. (Motty Lentzitzky) Solution: Delete all lines, don't use bufempty(). Files: src/fileio.c *** ../vim-7.0.180/src/fileio.c Thu Oct 12 21:15:04 2006 --- src/fileio.cTue Jan 9 15:38:13 2007 *** *** 6178,6185 if (retval != FAIL) { curbuf = frombuf; ! while (!bufempty()) ! if (ml_delete(curbuf->b_ml.ml_line_count, FALSE) == FAIL) { /* Oops! We could try putting back the saved lines, but that * might fail again... */ --- 6179,6186 if (retval != FAIL) { curbuf = frombuf; ! for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum) ! if (ml_delete(lnum, FALSE) == FAIL) { /* Oops! We could try putting back the saved lines, but that * might fail again... */ *** ../vim-7.0.180/src/version.cTue Jan 9 15:15:36 2007 --- src/version.c Tue Jan 9 15:41:55 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 181, /**/ -- hundred-and-one symptoms of being an internet addict: 11. You find yourself typing "com" after every period when using a word processor.com /// 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.180 (extra)
Patch 7.0.180 (extra, after 7.0.171) Problem:VMS: build failed. Problem with swapfiles. Solution: Add "compiled_arch". Always expand path and pass it to buf_modname(). (Zoltan Arpadffy) Files: src/globals.h, src/memline.c, src/os_unix.c, runtime/menu.vim *** ../vim-7.0.179/src/globals.hSat Oct 14 14:33:21 2006 --- src/globals.h Tue Jan 9 14:26:51 2007 *** *** 1092,1097 --- 1092,1098 extern char_u *all_lflags; # ifdef VMS extern char_u *compiler_version; + extern char_u *compiled_arch; # endif extern char_u *compiled_user; extern char_u *compiled_sys; *** ../vim-7.0.179/src/memline.cTue Jan 9 14:37:10 2007 --- src/memline.c Tue Jan 9 14:33:44 2007 *** *** 3572,3579 #else (buf->b_p_sn || buf->b_shortname), #endif ! #ifdef RISCOS ! /* Avoid problems if fname has special chars, eg */ ffname, #else # ifdef HAVE_READLINK --- 3572,3580 #else (buf->b_p_sn || buf->b_shortname), #endif ! #if defined(VMS) || defined(RISCOS) ! /* Avoid problems if fname has special chars, eg . !* For VMS always use full path for swapfile. */ ffname, #else # ifdef HAVE_READLINK *** ../vim-7.0.179/src/os_unix.cTue Nov 28 17:44:51 2006 --- src/os_unix.c Tue Jan 9 14:31:08 2007 *** *** 2221,2227 * behaviour should be avoided for the existing files and we need to find * the exact path of the edited file. */ - if (force || !mch_isFullName(fname)) { char_u *fixed_fname = vms_fixfilename(fname); int fd = mch_open((char *)fixed_fname, O_RDONLY | O_EXTRA, 0); --- 2221,2226 *** ../vim-7.0.179/runtime/menu.vim Thu Sep 14 13:35:17 2006 --- runtime/menu.vimTue Jan 9 14:31:40 2007 *** *** 384,390 " Programming menu if !exists("g:ctags_command") if has("vms") ! let g:ctags_command = "mc vim:ctags ." else let g:ctags_command = "ctags -R ." endif --- 384,390 " Programming menu if !exists("g:ctags_command") if has("vms") ! let g:ctags_command = "mc vim:ctags *.*" else let g:ctags_command = "ctags -R ." endif *** ../vim-7.0.179/src/version.cTue Jan 9 14:37:10 2007 --- src/version.c Tue Jan 9 15:00:57 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 180, /**/ -- The Feynman problem solving Algorithm: 1) Write down the problem 2) Think real hard 3) Write down the answer /// 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.179
Patch 7.0.179 Problem:Using ":recover" or "vim -r" without a swapfile crashes Vim. Solution: Check for "buf" to be unequal NULL. (Yukihiro Nakadaira) Files: src/memline.c *** ../vim-7.0.178/src/memline.cTue Nov 21 20:57:21 2006 --- src/memline.c Tue Jan 9 14:33:44 2007 *** *** 1329,1336 mf_put(mfp, hp, FALSE, FALSE); mf_close(mfp, FALSE); /* will also vim_free(mfp->mf_fname) */ } ! vim_free(buf->b_ml.ml_stack); ! vim_free(buf); if (serious_error && called_from_main) ml_close(curbuf, TRUE); #ifdef FEAT_AUTOCMD --- 1329,1339 mf_put(mfp, hp, FALSE, FALSE); mf_close(mfp, FALSE); /* will also vim_free(mfp->mf_fname) */ } ! if (buf != NULL) ! { ! vim_free(buf->b_ml.ml_stack); ! vim_free(buf); ! } if (serious_error && called_from_main) ml_close(curbuf, TRUE); #ifdef FEAT_AUTOCMD *** ../vim-7.0.178/src/version.cTue Dec 5 22:09:02 2006 --- src/version.c Tue Jan 9 14:35:59 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 179, /**/ -- hundred-and-one symptoms of being an internet addict: 10. And even your night dreams are in HTML. /// 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: compile vim7 with different or without local prefix /usr/local
Michael Haubenwallner wrote: > > > maybe I've overlooked something in configure.in, but to me it seems that > > > it is impossible to compile vim7 without searching /usr/local/include > > > and /usr/local/lib. > > > > > > Thing is, on solaris fex, if iconv.h is found in /usr/local/include, > > > /usr/local/lib/libiconv.so get linked too. > > > But the rpath for libiconv.so.3 does not get encoded into the binary, > > > and I really don't want to set LD_LIBRARY_PATH (hmm, maybe this should > > > be in system loader path). > > > > > > Additionally, I also want to be able to compile completely independent > > > of /usr/local, with a gcc built --with-local-prefix=/another/prefix, and > > > with libiconv and others from that prefix. > > > > > > So I have two new requirements for the /usr/local search: > > > > > > 1) Of course, I want to keep the default as is. > > > 2) completely disable adding /usr/local/include and /usr/local/lib > > > 3) set a different path to be used instead of /usr/local > > > > > > Attached is a patch for src/configure.in to accept "--with-local-prefix" > > > flag, which solves above requirements: > > > > > > 1) default: do not pass any --with-local-prefix argument. > > > 2) disable: use --without-local-prefix or even --with-local-prefix=no > > > 3) change: use --with-local-prefix=/another/prefix > > > > It make sense to support using another directory than > > /usr/local/[lib|include]. > > > > It appears that after your patch have_local_include and have_local_lib > > are set to "yes" without checking gcc. The test for gcc with "grep" > > should also use ${local_prefix} instead of /usr/local. > > Well, they are set to "yes" in the "--without-local-prefix" or > "--with-local-prefix=no" case only to avoid appending to CPPFLAGS/ > LDFLAGS lateron (they are not used any more in configure script). > > The grep-test on gcc only applies if there is no "--with-local-prefix" > argument on configure line at all, to use the defaults. > > Well, if one explicitly specifies "--with-local-prefix" on configure- > cmdline, I'm unsure if the compiler should be checked if it already > searches that path. > > Hmm, thinking more of it, it makes sense, as the compiler could be > confused when explicitly passing its builtin search dirs... I thought the idea of this configure argument was that you specify another place than /usr/local, one that the compiler might already look in. Anyway, I think the behavior shouldn't change, only the path used. > > I'm missing documentation, especially for the "no" value. > > I don't know how to type two lines of documentation into the autoconf- > macro to keep some good alignment in the help-output, but maybe this > text could appear: > --with-local-prefix=/prefix build against /prefix instead of /usr/local > --without-local-prefix do not build against any additional prefix Unusual configure options should be documented in src/INSTALL, in the Unix section. -- hundred-and-one symptoms of being an internet addict: 2. You kiss your girlfriend's home page. /// 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///