patch 7.0.184
Patch 7.0.184 Problem:When the cscope program is called mlcscope the Cscope interface doesn't work. Solution: Accept \S*cscope: instead of cscope:. (Frodak D. Baksik) Files: src/if_cscope.c *** ../vim-7.0.183/src/if_cscope.c Tue Nov 21 11:43:49 2006 --- src/if_cscope.c Fri Jan 12 20:02:37 2007 *** *** 627,636 * If the database is out of date, or there's some other problem, * cscope will output error messages before the number-of-lines output. * Display/discard any output that doesn't match what we want. */ if ((stok = strtok(buf, (const char *) )) == NULL) continue; ! if (strcmp((const char *)stok, cscope:)) continue; if ((stok = strtok(NULL, (const char *) )) == NULL) --- 627,637 * If the database is out of date, or there's some other problem, * cscope will output error messages before the number-of-lines output. * Display/discard any output that doesn't match what we want. +* Accept \S*cscope: X lines, also matches mlcscope. */ if ((stok = strtok(buf, (const char *) )) == NULL) continue; ! if (strstr((const char *)stok, cscope:) == NULL) continue; if ((stok = strtok(NULL, (const char *) )) == NULL) *** ../vim-7.0.183/src/version.cSun Jan 14 15:27:05 2007 --- src/version.c Tue Jan 16 15:16:41 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 184, /**/ -- The technology involved in making anything invisible is so infinitely complex that nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine times out of a trillion it is much simpler and more effective just to take the thing away and do without it. -- 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.185
Patch 7.0.185 Problem:Multi-byte characters in a message are displayed with attributes from what comes before it. Solution: Don't use the attributes for a multi-byte character. Do use attributes for special characters. (Yukihiro Nakadaira) Files: src/message.c *** ../vim-7.0.184/src/message.cSat Oct 14 14:33:21 2006 --- src/message.c Sat Jan 13 17:27:31 2007 *** *** 1556,1562 int c_extra = 0; char_u*p_extra = NULL;/* init to make SASC shut up */ int n; ! int attr= 0; char_u*trail = NULL; #ifdef FEAT_MBYTE int l; --- 1556,1562 int c_extra = 0; char_u*p_extra = NULL;/* init to make SASC shut up */ int n; ! int attr = 0; char_u*trail = NULL; #ifdef FEAT_MBYTE int l; *** *** 1581,1587 while (!got_int) { ! if (n_extra) { --n_extra; if (c_extra) --- 1581,1587 while (!got_int) { ! if (n_extra 0) { --n_extra; if (c_extra) *** *** 1595,1601 col += (*mb_ptr2cells)(s); mch_memmove(buf, s, (size_t)l); buf[l] = NUL; ! msg_puts_attr(buf, attr); s += l; continue; } --- 1595,1601 col += (*mb_ptr2cells)(s); mch_memmove(buf, s, (size_t)l); buf[l] = NUL; ! msg_puts(buf); s += l; continue; } *** *** 1635,1640 --- 1635,1643 p_extra = transchar_byte(c); c_extra = NUL; c = *p_extra++; + /* Use special coloring to be able to distinguish hex from +* the same in plain text. */ + attr = hl_attr(HLF_8); } else if (c == ' ' trail != NULL s trail) { *** ../vim-7.0.184/src/version.cTue Jan 16 15:17:43 2007 --- src/version.c Tue Jan 16 15:43:37 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 185, /**/ -- This planet has -- or rather had -- a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movements of small green pieces of paper, which is odd because on the whole it wasn't the small green pieces of paper that were unhappy. -- 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.186
Patch 7.0.186 Problem:Get an ml_get error when 'encoding' is utf-8 and searching for /\_s*/e in an empty buffer. (Andrew Maykov) Solution: Don't try getting the line just below the last line. Files: src/search.c *** ../vim-7.0.185/src/search.c Sat Oct 14 14:33:21 2006 --- src/search.cTue Jan 16 15:31:28 2007 *** *** 812,818 #ifdef FEAT_MBYTE if (has_mbyte) { ! ptr = ml_get_buf(buf, pos-lnum, FALSE); pos-col -= (*mb_head_off)(ptr, ptr + pos-col); } #endif --- 812,822 #ifdef FEAT_MBYTE if (has_mbyte) { ! /* 'e' offset may put us just below the last line */ ! if (pos-lnum buf-b_ml.ml_line_count) ! ptr = ; ! else ! ptr = ml_get_buf(buf, pos-lnum, FALSE); pos-col -= (*mb_head_off)(ptr, ptr + pos-col); } #endif *** ../vim-7.0.185/src/version.cTue Jan 16 15:44:59 2007 --- src/version.c Tue Jan 16 15:59:37 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 186, /**/ -- Time is an illusion. Lunchtime doubly so. -- Ford Prefect, in 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///
Re: vim on cygwin using win32 clipboard
Frodak wrote: Building a binary with both os_unix.c and os_mswin.c sounds like a bad idea. The big #ifdefs are quite a hack. On the other hand, moving this to a generic file, such as ui.c, also doesn't seem a good plan. How about moving this code to a new file, e.g., winclip.c? It was pretty ugly wasn't it. I've moved it to winclip.c. I've updated all of the make and prototype files. I ran make -f Make_cyg.mak, didn't have any issues with compiling. Including windows.h in os_unix.c looks like a mistake. There should not be windows code in a Unix-specific file. You probably have to move some code elsewhere. Probably the same winclip.c file. Done, it's in winclip.c. There is a single function called win_clip_init. I've also used this in the os_win32.c file as well. Instead of: #if defined (WIN3264) Please use: #if defined(WIN3264) Perhaps FEAT_CYGWIN_WIN32_CLIPBOARD can be defined automatically when building a non-GUI version with Cygwin? This is now part of the configuration scripts. I've tested them and they detect if compiling upon in the cygwin environment and if you are including X11 or GUI. If you are on cygwin and have the X11 packages then you need to run configure with: --without-x --enable-gui=no. About calling clip_init(FALSE): see the call in os_win32.c. The one in term.c is for xterm. Instead of copying this code with the magic names it should be in a common place. Hmm, it appears it has already been duplicated... Ok, I'm still a bit confused about when clipboard should be turned on or off. I don't understand why the clip_board would become unavailable at this point in term.c depending if FEAT_MOUSE is active. However, I DO know that I don't want it turned off when setting the termname with this patch, the clipboard is not terminal dependent, but is OS dependent in CYGWIN + WIN32 environment. Attached is a brand new patch for these changes. Thanks for updating the patch. I'll have another look at it later. -- You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young! Why, what did she tell you? I don't know, I didn't listen! -- Arthur Dent and Ford Prefect in 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.187
Patch 7.0.187 Problem:Can't source a remote script properly. Solution: Add the SourceCmd event. (Charles Campbell) Files: runtime/doc/autocmd.txt, src/ex_cmds2.c, src/fileio.c, src/vim.h *** ../vim-7.0.186/runtime/doc/autocmd.txt Sun May 7 17:07:33 2006 --- runtime/doc/autocmd.txt Tue Jan 16 21:29:14 2007 *** *** 1,4 ! *autocmd.txt* For Vim version 7.0. Last change: 2006 May 06 VIM REFERENCE MANUALby Bram Moolenaar --- 1,4 ! *autocmd.txt* For Vim version 7.0. Last change: 2007 Jan 16 VIM REFERENCE MANUALby Bram Moolenaar *** *** 279,284 --- 279,285 |FuncUndefined| a user function is used but it isn't defined |SpellFileMissing|a spell file is used but it can't be found |SourcePre| before sourcing a Vim script + |SourceCmd| before sourcing a Vim script |Cmd-event| |VimResized| after the Vim window size changed |FocusGained| Vim got input focus *** *** 690,699 Can be used to check for any changed files. *SourcePre* SourcePre Before sourcing a Vim script. |:source| *SpellFileMissing* SpellFileMissing When trying to load a spell checking file and ! it can't be found. amatch is the language, ! 'encoding' also matters. See |spell-SpellFileMissing|. *StdinReadPost* StdinReadPost After reading from the stdin into the buffer, --- 701,717 Can be used to check for any changed files. *SourcePre* SourcePre Before sourcing a Vim script. |:source| + afile is the name of the file being sourced. + *SourceCmd* + SourceCmd When sourcing a Vim script. |:source| + afile is the name of the file being sourced. + The autocommand must source this file. + |Cmd-event| *SpellFileMissing* SpellFileMissing When trying to load a spell checking file and ! it can't be found. The pattern is matched ! against the language. amatch is the ! language, 'encoding' also matters. See |spell-SpellFileMissing|. *StdinReadPost* StdinReadPost After reading from the stdin into the buffer, *** *** 1219,1226 *Cmd-event* When using one of the *Cmd events, the matching autocommands are expected to ! do the file reading or writing. This can be used when working with a special ! kind of file, for example on a remote system. CAREFUL: If you use these events in a wrong way, it may have the effect of making it impossible to read or write the matching files! Make sure you test your autocommands properly. Best is to use a pattern that will never match a --- 1238,1245 *Cmd-event* When using one of the *Cmd events, the matching autocommands are expected to ! do the file reading, writing or sourcing. This can be used when working with ! a special kind of file, for example on a remote system. CAREFUL: If you use these events in a wrong way, it may have the effect of making it impossible to read or write the matching files! Make sure you test your autocommands properly. Best is to use a pattern that will never match a *** *** 1233,1241 original file isn't needed for recovery. You might want to do this only when you expect the file to be modified. ! The |v:cmdarg| variable holds the ++enc= and ++ff= argument that are ! effective. These should be used for the command that reads/writes the file. ! The |v:cmdbang| variable is one when ! was used, zero otherwise. See the $VIMRUNTIME/plugin/netrw.vim for examples. --- 1252,1261 original file isn't needed for recovery. You might want to do this only when you expect the file to be modified. ! For file read and write commands the |v:cmdarg| variable holds the ++enc= ! and ++ff= argument that are effective. These should be used for the command ! that reads/writes the file. The |v:cmdbang| variable is one when ! was ! used, zero otherwise. See the $VIMRUNTIME/plugin/netrw.vim for examples. ***
patch 7.0.188
Patch 7.0.188 (after 7.0.186) Problem:Warning for wrong pointer type. Solution: Add a type cast. Files: src/search.c *** ../vim-7.0.187/src/search.c Tue Jan 16 16:00:38 2007 --- src/search.cTue Jan 16 21:16:01 2007 *** *** 814,820 { /* 'e' offset may put us just below the last line */ if (pos-lnum buf-b_ml.ml_line_count) ! ptr = ; else ptr = ml_get_buf(buf, pos-lnum, FALSE); pos-col -= (*mb_head_off)(ptr, ptr + pos-col); --- 814,820 { /* 'e' offset may put us just below the last line */ if (pos-lnum buf-b_ml.ml_line_count) ! ptr = (char_u *); else ptr = ml_get_buf(buf, pos-lnum, FALSE); pos-col -= (*mb_head_off)(ptr, ptr + pos-col); *** ../vim-7.0.187/src/version.cTue Jan 16 21:31:38 2007 --- src/version.c Tue Jan 16 21:33:05 2007 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 188, /**/ -- Due knot trussed yore spell chequer two fined awl miss steaks. /// 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: FocusLost and terminal functionality
Mikolaj Machowski wrote: What functionality is required from terminal to support FocusLost/FocusGain autoevent? I'd like to file a wish against Konsole (KDE terminal emulator) but don't know what ask for :) We have to invent a termcap/terminfo code for the escape sequence. Two actually: One to tell the terminal to enable it and one to get the event. It's a bit like enabling window resize events and mouse events. I have asked Thomas Dickey (xterm) about this too. -- hundred-and-one symptoms of being an internet addict: 31. You code your homework in HTML and give your instructor the URL. /// 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: latin1 vs utf8
Hi Bram :) * Bram Moolenaar [EMAIL PROTECTED] dixit: DervishD wrote: After that, I've set up this mappings to switch manually from one encoding to other: noremap silent Leader+ :setlocal fenc=utf8 enc=utf8CR noremap silent Leader- :setlocal fenc=latin1 enc=latin1CR OK, this is not a perfect solution, and it's a bit crappy and can be automated (for example, using file -i) but it works for me and I find it very comfortable to use. Keep in mind that when you change 'encoding' in a running Vim then all text in loaded buffers, registers, variables, etc. will become invalid. It's better to only set 'encoding' when starting up and then leave it alone. Yes, I supposed that something like that would happen, but if I don't set 'encoding' I'm not able to see the characters correctly. I mean, they will be correctly written to the file in utf8 but I won't be able to see them on the screen. I know that this is risky, but the alternative will consider all my US-ASCII files (and any newly created one) as utf8 and I don't want that right now. For me is easier to do the above and take the risk because I seldom edit utf8 files. If I run into trouble, I'll probably use some BufReadPost autocommand to properly set both 'encoding' and 'fileencoding'. Thanks for the information, Bram, and thanks a lot for Vim :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen!
Re: how to NOT save history
Luis A. Florit schrieb: Pals, How I avoid certain commands and/or substitutions NOT to be saved into the history list? For example, I have a sequence of VIM commands that executes on every email quote to properly format it, and I don't want these to appear in the registries and history. Thanks! L. One idea is: - backup (i.e. write) the viminfo file (:help :wv) - do some secret commands - read the viminfo file back in (:help :rv), overwriting the history In theory I thought this would work: :echo public command :wviminfo! :echo secret command one :echo secret command two :rviminfo! But it doesn't (because of my unpatched Vim7?), so I tried: :set history? history=1000 :echo public command :wviminfo! :set history=0 :echo secret command one :echo secret command two :set history=1000 :rviminfo! My 'viminfo' settings (just info :o): :set viminfo? viminfo=!,'30,50,h,rA:,rB: I think the only chars you should be aware of are ':' and '/' (not present here). HTH Andy -- EOF ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Returning perl hashes
Vim 7 WinXP SP2 Is it possible to return a Perl hash as a Vim List or Dictionary? I am pretty new to Perl but need it's features for my extension. I need to return rows and columns of data which is perfect for a Vim List or Dictionary. Thanks, Dave
Re: latin1 vs utf8
Hi Bram :) * Bram Moolenaar [EMAIL PROTECTED] dixit: DervishD wrote: Keep in mind that when you change 'encoding' in a running Vim then all text in loaded buffers, registers, variables, etc. will become invalid. It's better to only set 'encoding' when starting up and then leave it alone. Yes, I supposed that something like that would happen, but if I don't set 'encoding' I'm not able to see the characters correctly. I mean, they will be correctly written to the file in utf8 but I won't be able to see them on the screen. I know that this is risky, but the alternative will consider all my US-ASCII files (and any newly created one) as utf8 and I don't want that right now. For me is easier to do the above and take the risk because I seldom edit utf8 files. If I run into trouble, I'll probably use some BufReadPost autocommand to properly set both 'encoding' and 'fileencoding'. Did you try setting 'termencoding'? My terminal is latin1 and only understands latin1, unfortunately, so changing termencoding to any different of latin1 just causes more harm. BTW, I use vim always on the virtual console, text mode. utf-8 is a superset of latin1, thus using utf-8 for 'encoding' should nearly always work. Except that then I have to encode my 'showbreak' option as utf8 and not latin1 :( I prefer to have it encoded as latin1 (as the rest of my files), until I switch to utf8. So far, the only combination that does what I want is setting 'tenc' to latin1 (which is the correct one for my virtual terminal under Linux), and setting 'enc' by hand, leaving 'fenc' empty so it is in sync with 'encoding'. Of course, this is dangerous because changing 'encoding' is never a good idea, and I shouldn't been changing it, buf if I only change 'fenc', I still see 'á' instead of 'á'. If I change 'enc', I see 'á', correctly. What I don't understand is that if I set 'fencs' and let 'fenc' take the value from it, the translation is done correctly because vim converts the characters. Once the file is loaded, this doesn't happen and setting 'enc' by hand seems the only choice. Am I doing anything wrong? Thanks again for your help :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen!
Re: latin1 vs utf8
Klaus Ethgen wrote: I answer you this way as I am not subscribed to the list and everytime subscribing before sending a mail and unsubscribing afterwards is a bit painful. It's very useful for these message to go to the mailing list. Just subscribe to the mailing list until the thread ends. Am Di den 16. Jan 2007 um 15:04 schrieb Bram Moolenaar: Did you try setting 'termencoding'? No. My termencoding is correct. (iso-8859-1) If it's not empty then you probably set it somewhere. Is it still at that value when 'encoding' has been set to utf-8? utf-8 is a superset of latin1, thus using utf-8 for 'encoding' should nearly always work. You can set 'fileencodings' to No, this is completely wrong! Take the german umlauts. ä is in latin1 0xe4 and in utf-8 0xc3a4. The charsets are only compatible in the range below 0x80 but latin1 has many think above it. It's still the same character, it's only represented differently. The character sets latin1 and utf-8 are completely compatible for the first 256 characters. Vim will do the conversion to write and read the file with 'fileencoding'. ucs-bom,latin1 to avoid ASCII files being recognized as utf-8. That work for most of my files but if I have a utf-8 file without bomb mark I get only wast. Then do :e ++enc=utf-8 filename. Make a user command for this if used more than a few times. -- Tips for aliens in New York: Land anywhere. Central Park, anywhere. No one will care or indeed even notice. -- 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///
Re: enclosing a visual block with quotes
Bram Kuijper wrote: anybody a solution to easily enclose parts of text using visual mode? You can get the latest vis.vim from http://mysite.verizon.net/astronaut/vim/index.html#VIS or a more stable version from: http://vim.sourceforge.net/scripts/script.php?script_id=1195 and use it as follows: v (move) :B s/\_.*\ze\n// That'll put double quotes around the character-oriented visual selection. Regards, Chip Campbell
vim 7.0, Edit with Vim, and x64 WinXP
Hello. I've been using Vim since the 4.0 days and loving it. I've just installed 7.0 on an x64 system for the first time. It works, but is missing the edit with vim popup menu entries. I re-ran the install.exe program and had it recreate the menu entries, but nothing changed. I've followed the instructions under :help install-registry and added the keys there; only some of them had been previously created by install.exe, so I created the missing ones (very carefully). Still no luck. 7.0 is running fine on all my other systems, it's only this 64-bit XP box that doesn't see the new menu entries. I can't even get an Edit with... entry to appear; that seems to be gone or restricted or moved or.
Re: how to NOT save history
Luis A. Florit schrieb: Pals, How I avoid certain commands and/or substitutions NOT to be saved into the history list? For example, I have a sequence of VIM commands that executes on every email quote to properly format it, and I don't want these to appear in the registries and history. Thanks! L. Think I completely misunderstood you (because of the subject), in case please forget my previous post. Commands: A :SomeCommand will not be added to the history, if you map it to a normal mode key (including the cr), for example: :map f2 :Command1cr:Command2barCommand3cr Registers: You could write data into variables to not touch registers. You will need some knowledge about vim script. :h eval Search history: The search history is always overwritten, although you can backup and restore the last search pattern: :let sav_search = @/ /some search/ :let @/ = sav_search :unlet sav_searchno need within :function ... Do you use filetype plugins? ... Wonder if this has more to do with what you had in mind. Andy -- EOF ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: latin1 vs utf8
DervishD wrote: Did you try setting 'termencoding'? My terminal is latin1 and only understands latin1, unfortunately, so changing termencoding to any different of latin1 just causes more harm. BTW, I use vim always on the virtual console, text mode. If your terminal always is in latin1 then you should indeed set 'termencoding' to latin1. utf-8 is a superset of latin1, thus using utf-8 for 'encoding' should nearly always work. Except that then I have to encode my 'showbreak' option as utf8 and not latin1 :( I prefer to have it encoded as latin1 (as the rest of my files), until I switch to utf8. Yeah, there are small things like this. You might want to put this in your .vimrc: scriptencoding latin1 So far, the only combination that does what I want is setting 'tenc' to latin1 (which is the correct one for my virtual terminal under Linux), and setting 'enc' by hand, leaving 'fenc' empty so it is in sync with 'encoding'. Of course, this is dangerous because changing 'encoding' is never a good idea, and I shouldn't been changing it, buf if I only change 'fenc', I still see 'á' instead of 'á'. Of course, changing 'fenc' doesn't have any immediate effect. It only changes the encoding that Vim will write the file with. If I change 'enc', I see 'á', correctly. You should do :edit ++enc=utf-8 filename or include utf-8 in 'fileencodings' before editing the file. Then it will work no matter what 'encoding' is set to. What I don't understand is that if I set 'fencs' and let 'fenc' take the value from it, the translation is done correctly because vim converts the characters. Once the file is loaded, this doesn't happen and setting 'enc' by hand seems the only choice. Am I doing anything wrong? Yes. 'fenc' is set by Vim when it reads the file. Setting it to another value doesn't cause the file to be reread or conversion to be done. -- What a wonderfully exciting cough! Do you mind if I join you? -- 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///
Re: omni complete for php is really slooow
On wtorek 16 styczeń 2007, vim users list wrote: The mail subject says it all:omni complete for php in vim7 in my PC (P4 D, 1GB Ram) is really slooow. How about omni complete for php in vim7 in in your PC? Fast or Slow??? How can I make it faster? Only for price in functionality. You can just comment various levels of completion logic. On my Sempron2200, 512MB RAM it may be not very fast but IMO is acceptable. Looks like something is wrong with your setup. Do you use tags files? m.
Re: how to NOT save history
* El 16/01/07 a las 18:22, Andy Wokula chamullaba: Luis A. Florit schrieb: Pals, How I avoid certain commands and/or substitutions NOT to be saved into the history list? For example, I have a sequence of VIM commands that executes on every email quote to properly format it, and I don't want these to appear in the registries and history. Thanks! L. Think I completely misunderstood you (because of the subject), in case please forget my previous post. In fact, your previous post is closer to what I want. Commands: A :SomeCommand will not be added to the history, if you map it to a normal mode key (including the cr), for example: :map f2 :Command1cr:Command2barCommand3cr Registers: You could write data into variables to not touch registers. You will need some knowledge about vim script. :h eval Search history: The search history is always overwritten, although you can backup and restore the last search pattern: :let sav_search = @/ /some search/ :let @/ = sav_search :unlet sav_searchno need within :function ... Do you use filetype plugins? ... Wonder if this has more to do with what you had in mind. Sorry if I wasn't clear enough... Let me try again. First, I have is an autocommand to execute a function for, say, every email I open: au FileType mail call MyMutt() Then, my function called MyMutt() executes a bunch of commands, among them, a perl script to clean adds, signatures, etc. These work of course by searching for strings and making substitutions. So, every time I edit an email, these search strings and commands are stored... Very annoying, and keeps filling my 'good' history with trash. So, I want to avoid this. I don't want to store specifically these commands/searches/substitutions of MyMutt() function into my history. Hence, I want a don't-store-the-following-until-I-tell-you command. I tried adding a 'rv!' at the end of the MyMutt() function (tried also with 'wv!' in the beginning, and setting 'history=0' as you suggested with same result). It works in a strange way... It keeps cycling between 2 viminfo files, have no idea why. I mean: I open an email for writting, and I have some search patterns A,B,C... already stored in the history. I close vim. I open vim in a mail again, and I have old patterns D,E,F... in history. I close the email, and open another. Then, I have again the previous patterns A,B,C... At least, with 'rv!' it forgets the patterns from the MyMutt() function, as I wanted. Any clues? Thanks! L.
Re: Upgrading or enabling features in vim
Erin Spiceland wrote: On Mon, 2007-01-15 at 15:39 -0800, Gary Johnson wrote: On 2007-01-15, Erin Spiceland [EMAIL PROTECTED] wrote: On Mon, 2007-01-15 at 14:55 -0800, Gary Johnson wrote: On 2007-01-15, Erin Spiceland [EMAIL PROTECTED] wrote: I just got a new server and vim wasn't installed. I installed 7.0 from scratch, but there are some problems with missing features or features not working: 1. syntax highlighting doesn't work. It is turned on in vimrc but I haven't checked anything else. 2. using the arrows on the keyboard in insert mode puts A, B, C, or D and newline into the file instead of moving up, down, left, or right. 3. doesn't remember my command history 4. doesn't remember where I was in the file when I closed it. 5. only remembers 1 change, so I can't use the u command to undo more than 1 change. What can I do to fix these problems or enable these features? #5 indicates that, as Tim said, you have 'cp' set. But vim sets 'nocp' automatically when it detects and sources an initialization file named .vimrc or _vimrc. Therefore, it appears that your vimrc file is not being sourced, which would explain #1. Executing :version will show you where your vim is looking for its initialization files and :scriptnames will show you the initialization files vim actually sourced. Reading :help initialization will also help you understand what should be happening when you start vim and may help you track down the root problem. system vimrc file: $VIM/vimrc $VIM is set to /usr/local/share/vim but /usr/local/share/vim/vimrc doesn't exist, and a vimrc does exist in /etc. How can I change it to use /etc? There is something wrong with your installation. If vim had never before been installed on that server, then the only way for /etc/vimrc to have appeared was for your installation process to have created it. But if you configured vim to look for vimrc in /usr/local/share/vim, then that's where your installation process should have put it. The right place to put it depends on your system and where you want to put stuff and, if you are not the system administrator, where you are allowed to put stuff. You'll have to give us more details of your system and how you configured vim for us to sort this out properly. You wrote originally that there were some features missing or not working in this installation. That implies that you have used them before where they did work. How did you get them to work then? Did you have your own ~/.vimrc or just a system vimrc? If you had just a system vimrc and that is the file now in /etc, I would just move that file to /usr/local/share/vim. On the Unix systems where I have installed vim, I don't even have a system vimrc--I just use ~/.vimrc. There are also ways to set environment variables to get vim to look in other places for initialization files, but since you built this vim from scratch, it would be better for you to reconfigure and rebuild it to get it right, or at least self-consistent. The preferred replying style in the vim list is to put the quoted text on top and your reply underneath, so I have reformatted your reply to that style. Also, don't forget to reply to the list rather than to just the author of the message to which you are replying, so that everyone in the list can follow the discussion and help in solving the problem, or see that it has been solved. Regards, Gary Thanks for the tips. This server was supposedly a fresh install of RHE. I say that vim was not installed only because I tried to use it and got the bash command not found message. I downloaded the source from vim.org and did ./configure; make; make install. The machines I have used vim on before were always preinstalled with vim. I use FC6 at home and RHE on my other 4 servers. I've never worked with a vimrc or .viminfo before, except very minimally. The five things I listed in my original email were things that always just worked. I was very surprised to find vim was not installed this time. rpm -qa | grep vim shows that vim 6.3 minimal is also installed, but that isn't the one my system is using, because vim --version shows 7.0. Are there any configure options that I can use or is there an enhanced version that I might be used to? Should I reinstall? from source or rpm? Thanks, Erin To have Vim use a system vimrc located in /etc when compiled to use /usr/share/vim as the default location, just create a soft link from one to the other, as follows (in the shell): cd /usr/share/vim ln -sv /etc/vimrc Or you may want to disregard that /etc/vimrc totally. I suggest you create a .vimrc in your $HOME directory. As its initial contents, the line runtime vimrc_example.vim will do. (Then you may view $VIMRUNTIME/vimrc_example.vim at your leisure, to see what it does.) If and when you decide to tweak your Vim settings, you will add additional lines below this :runtime command, except that if
RE: omni complete for php is really slooow
On my Sempron2200, 512MB RAM it may be not very fast but IMO is acceptable. Looks like something is wrong with your setup. Do you use tags files? You mean ctags? Yes. I'm using it Anyway thanks for your response. I will recheck my config. -Original Message- From: Mikolaj Machowski [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 3:33 AM To: vim@vim.org Subject: Re: omni complete for php is really slooow On wtorek 16 styczeń 2007, vim users list wrote: The mail subject says it all:omni complete for php in vim7 in my PC (P4 D, 1GB Ram) is really slooow. How about omni complete for php in vim7 in in your PC? Fast or Slow??? How can I make it faster? Only for price in functionality. You can just comment various levels of completion logic. On my Sempron2200, 512MB RAM it may be not very fast but IMO is acceptable. Looks like something is wrong with your setup. Do you use tags files? m.
Re: Mac Questions
Alan, I recently figured out how to compile Vim on a Mac from source, so here is the method I used. I too am fairly new at this, so if any Mac users can improve on my instructions, feel free to do so. I obtained the Vim sources through Subversion (I keep my source code downloads in ~/Source). You may need to install a Subversion client on your system to get this to work. Open Terminal and enter the following commands (assuming ~/Source already exists): cd ~/Source svn co https://svn.sourceforge.net/svnroot/vim/vim7 You may get prompted to accept the certificate after the second command ... I usually hit 't' to accept it temporarily. If all goes well, you should end up with a new vim7 directory in ~/Source. I build Vim with Python and Ruby support and the huge feature set. You need to have both languages installed on your system to build Vim this way. This is what I would enter next: cd vim7/src ./configure --enable-pythoninterp --enable-rubyinterp --with-features=huge make make test If you don't need support for Python and Ruby, just omit those options from the ./configure line above. If you need support for other languages like Perl, see the Makefile in the vim7/src directory for additional options. If all goes well at this point, you can enter the following command to install Vim in the /Applications folder: make install This should move Vim.app to /Applications, and you can launch it from there. When new patches come out, I just do the following to update my copy of Vim: cd ~/Source/vim7 svn update cd src make make test make install Hope this helps! Trev Alan G Isaac wrote: Would you mind outlining the steps you took for someone who is making the same transition but is not used to compiling their own apps? (I have XCode installed.) Thank you, Alan Isaac -- View this message in context: http://www.nabble.com/Mac-Questions-tf2937782.html#a8402869 Sent from the Vim - General mailing list archive at Nabble.com.
Perl debugger
Please send some pointers about how to point vim to one of my perl installations (activeperl and cygwin ). Any vimrc setup required (or viminfo)? Thanks, Marc
RE: How can I do to always opening files into a tab ?
-Original Message- From: Eddine [mailto:[EMAIL PROTECTED] Sent: Sunday, January 14, 2007 5:06 PM To: Vim Mailing List Subject: How can I do to always opening files into a tab ? Hello Vimmers ! I got few questions for vim under win32 (XP) - How can I do to _always_ open files into its own tab ? -- Also is there a way to set an option so this tip also runs with the Edit with Vim context menu. - Is there an option so when a file is vertically splitted, scrolling down and up, keeps both left and right panel on the same line, in a way is there a mean to synchronize the up and down scrolling of both views ? Hope I have been clear enough with my questions. Many thanks and regards ! Eddine. Hi, This is what I do to open files in their own tabs - 1. I browse my working directory with the :Vexplore feature of Vim. When I come across the file I want to open all I do is type gf when I am over it. The following line in my vimrc file is the one that does the trick - nmap gf c :tabe cfileCR 2. go to ur SendTo folder most likely to be at C:\Documents and Settings\your login name\SendTo and by default this folder is hidden. Once u are there right click and create a new shortcut. When it asks for location type this - C:\Program Files\Vim\vim70\gvim.exe --servername GVIM --remote-tab-silent (maybe the location of ur gvim is different) and then give it a name u like; and voila u can right click on any file and send it to it's own tab in gvim. Regards, Sibin DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.