Patch 7.0.046
Patch 7.0.046 Problem:The matchparen plugin ignores parens in strings, but not in single quotes, often marked with character. Solution: Also ignore parens in syntax items matching character. Files: runtime/plugin/matchparen.vim *** ../vim-7.0.045/runtime/plugin/matchparen.vimSat May 13 14:52:02 2006 --- runtime/plugin/matchparen.vim Mon Jun 26 10:53:35 2006 *** *** 1,6 Vim plugin for showing matching parens Maintainer: Bram Moolenaar [EMAIL PROTECTED] ! Last Change: 2006 May 11 Exit quickly when: - this plugin was already loaded (or disabled) --- 1,6 Vim plugin for showing matching parens Maintainer: Bram Moolenaar [EMAIL PROTECTED] ! Last Change: 2006 Jun 26 Exit quickly when: - this plugin was already loaded (or disabled) *** *** 96,102 When not in a string or comment ignore matches inside them. let s_skip ='synIDattr(synID(line(.), col(.), 0), name) ' . ! \ '=~? string\\|comment' execute 'if' s_skip '| let s_skip = 0 | endif' let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) --- 96,102 When not in a string or comment ignore matches inside them. let s_skip ='synIDattr(synID(line(.), col(.), 0), name) ' . ! \ '=~? string\\|character\\|singlequote\\|comment' execute 'if' s_skip '| let s_skip = 0 | endif' let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) *** ../vim-7.0.045/src/version.cTue Aug 8 17:06:21 2006 --- src/version.c Tue Aug 8 18:07:37 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 46, /**/ -- I AM THANKFUL... ...for the taxes that I pay because it means that I am employed. /// 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.047
Patch 7.0.047 Problem:When running configure the exit status is wrong. Solution: Handle the exit status properly. (Matthew Woehlke) Files: configure, src/configure *** ../vim-7.0.046/configureSun Jun 13 21:32:42 2004 --- configure Mon Jul 10 20:26:26 2006 *** *** 3,6 # This is just a stub for the Unix configure script, to provide support for # doing ./configure in the top Vim directory. ! cd src ./configure $@ --- 3,6 # This is just a stub for the Unix configure script, to provide support for # doing ./configure in the top Vim directory. ! cd src exec ./configure $@ *** ../vim-7.0.046/src/configureThu Dec 22 23:38:38 2005 --- src/configure Mon Jul 10 20:26:53 2006 *** *** 2,6 --- 2,10 # run the automatically generated configure script CONFIG_STATUS=auto/config.status \ auto/configure $@ --srcdir=${srcdir:-.} --cache-file=auto/config.cache + result=$? + # Stupid autoconf 2.5x causes this file to be left behind. if test -f configure.lineno; then rm -f configure.lineno; fi + + exit $result *** ../vim-7.0.046/src/version.cTue Aug 8 18:08:54 2006 --- src/version.c Tue Aug 8 19:09:54 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 47, /**/ -- The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change. -- FORTRAN manual for Xerox Computers /// 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.047
Bram Moolenaar wrote: Patch 7.0.047 Problem:When running configure the exit status is wrong. Solution: Handle the exit status properly. (Matthew Woehlke) Files: configure, src/configure [snip] Thanks, Bram! -- Matthew I blame the hippo.
Re: Patch 7.0.048
On Tue, Aug 08, 2006 at 08:48:31PM +0200, Bram Moolenaar wrote: --- 127,135 let nmt = s:tempname(nm) if rename(nm, nmt) == 0 if exists(b:gzip_comp_arg) ! call system(a:cmd . . b:gzip_comp_arg . ' . nmt . ') else ! call system(a:cmd . ' . nmt . ') If the filename itself has single quotes, this will prematurely end the quoting. escape(nmt, ') should probably be used as well. James -- GPG Key: 1024D/61326D40 2003-09-02 James Vega [EMAIL PROTECTED] signature.asc Description: Digital signature
Re: Patch 7.0.044
Dear Bram Patch 7.0.044 Problem: Perl: setting a buffer line in another buffer may result in changing the current buffer. Solution: Properly change to the buffer to be changed. Files:src/if_perl.xs [...] Alas, if I want to compile this, I get the following output ---%--- C:\Program Files\ActivePerl\Bin\perl C:\Program Files\ActivePerl\lib\ExtUtils\xsubpp -prototypes -typemap C:\Program Files\ActivePerl\lib\ExtUtils\typemap -typemap typemap if_perl.xs if_perl.c cl -c /W3 /nologo -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_SNIFF -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 /Fo.\ObjGOL/ /Ox -DNDEBUG /G6 -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DGLOBAL_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -DFEAT_HUGE /Zi /Fd.\ObjGOL/ /I C:\Program Files\ActivePerl\Lib\Core if_perl.c cl : Command line warning D9002 : ignoring unknown option '/G6' if_perl.c if_perl.xs(1075) : error C2275: 'buf_T' : illegal use of this type as an expression c:\software\vim\vim70\src\structs.h(1133) : see declaration of 'buf_T' if_perl.xs(1075) : error C2065: 'save_curbuf' : undeclared identifier if_perl.xs(1088) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' if_perl.xs(1089) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' if_perl.xs(1187) : error C2275: 'buf_T' : illegal use of this type as an expression c:\software\vim\vim70\src\structs.h(1133) : see declaration of 'buf_T' if_perl.xs(1200) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' if_perl.xs(1201) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. ---%--- I inspected if_perl.xs and if_perl.c and saw that xsubpp simply removed preprocessor directives such as ! #ifdef FEAT_AUTOCMD out of the code without really make a decision between the #if or #else: Both parts were left. I then found http://perldoc.perl.org/perlxs.html#Inserting-POD%2c-Comments-and-C-Preprocessor-Directives I will make my patch to get this working With kind regards Mathias
Re: Patch 7.0.048
James Vega wrote: On Tue, Aug 08, 2006 at 08:48:31PM +0200, Bram Moolenaar wrote: --- 127,135 let nmt =3D s:tempname(nm) if rename(nm, nmt) =3D=3D 0 if exists(b:gzip_comp_arg) ! call system(a:cmd . . b:gzip_comp_arg . ' . nmt . ') else ! call system(a:cmd . ' . nmt . ') If the filename itself has single quotes, this will prematurely end the quoting. escape(nmt, ') should probably be used as well. Escaping the single quotes probably doesn't work. You end up with backslashes in the file name. I tried editing the file t't.gz and that worked. This may depend on the shell used. -- From know your smileys: :-| :-| Deja' vu! /// 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 (unofficial): if_perl.xs is converted to an invalid if_perl.c file
Patch (after 7.0.44) Problem:xsubpp simply removes the newly added directives form if_perl.xs when converting it into if_perl.c Solution: See http://perldoc.perl.org/perlxs.html#Inserting-POD%2c-Comments-and-C-Preprocessor-Directives *** ..\vim-7.0.044\src\if_perl.xs 2006-08-08 20:02:34.440876800 +0200 --- src\if_perl.xs 2006-08-08 21:07:26.287076800 +0200 *** *** 1048,1053 --- 1048,1054 } } + #ifdef FEAT_AUTOCMD void Set(vimbuf, ...) VIBUF vimbuf; *** *** 1068,1102 line = SvPV(ST(i),PL_na); if (lnum 0 lnum = vimbuf-b_ml.ml_line_count line != NULL) { - #ifdef FEAT_AUTOCMD aco_save_T aco; /* set curwin/curbuf for vimbuf and save some things */ aucmd_prepbuf(aco, vimbuf); ! #else buf_T *save_curbuf = curbuf; curbuf = vimbuf; curwin-w_buffer = vimbuf; - #endif if (u_savesub(lnum) == OK) { ml_replace(lnum, (char_u *)line, TRUE); changed_bytes(lnum, 0); } - #ifdef FEAT_AUTOCMD - /* restore curwin/curbuf and a few other things */ - aucmd_restbuf(aco); - /* Careful: autocommands may have made vimbuf invalid! */ - #else curwin-w_buffer = save_curbuf; curbuf = save_curbuf; - #endif } } } void Delete(vimbuf, ...) VIBUF vimbuf; --- 1069,1131 line = SvPV(ST(i),PL_na); if (lnum 0 lnum = vimbuf-b_ml.ml_line_count line != NULL) { aco_save_T aco; /* set curwin/curbuf for vimbuf and save some things */ aucmd_prepbuf(aco, vimbuf); ! if (u_savesub(lnum) == OK) ! { ! ml_replace(lnum, (char_u *)line, TRUE); ! changed_bytes(lnum, 0); ! } ! ! /* restore curwin/curbuf and a few other things */ ! aucmd_restbuf(aco); ! /* Careful: autocommands may have made vimbuf invalid! */ ! } ! } ! } ! ! #else ! void ! Set(vimbuf, ...) ! VIBUF vimbuf; ! ! PREINIT: ! int i; ! long lnum; ! char *line; ! PPCODE: ! if (buf_valid(vimbuf)) ! { ! if (items 3) ! croak(Usage: VIBUF::Set(vimbuf, lnum, @lines)); ! ! lnum = SvIV(ST(1)); ! for(i = 2; i items; i++, lnum++) ! { ! line = SvPV(ST(i),PL_na); ! if (lnum 0 lnum = vimbuf-b_ml.ml_line_count line != NULL) ! { buf_T *save_curbuf = curbuf; curbuf = vimbuf; curwin-w_buffer = vimbuf; if (u_savesub(lnum) == OK) { ml_replace(lnum, (char_u *)line, TRUE); changed_bytes(lnum, 0); } curwin-w_buffer = save_curbuf; curbuf = save_curbuf; } } } + #endif + + #ifdef FEAT_AUTOCMD void Delete(vimbuf, ...) VIBUF vimbuf; *** *** 1130,1144 if (lnum 0 lnum = vimbuf-b_ml.ml_line_count) { buf_T *save_curbuf = curbuf; - #ifdef FEAT_AUTOCMD aco_save_T aco; /* set curwin/curbuf for vimbuf and save some things */ aucmd_prepbuf(aco, vimbuf); - #else - curbuf = vimbuf; - curwin-w_buffer = vimbuf; - #endif if (u_savedel(lnum, 1) == OK) { ml_delete(lnum, 0); --- 1159,1168 *** *** 1146,1165 if (save_curbuf == curbuf) check_cursor(); } - #ifdef FEAT_AUTOCMD /* restore curwin/curbuf and a few other things */ aucmd_restbuf(aco); /* Careful: autocommands may have made vimbuf invalid! */ ! #else curwin-w_buffer = save_curbuf; curbuf = save_curbuf; - #endif update_curbuf(VALID); } } } } void Append(vimbuf, ...) VIBUF vimbuf; --- 1170,1238 if (save_curbuf == curbuf) check_cursor(); } /* restore curwin/curbuf and a few other things */ aucmd_restbuf(aco); /* Careful: autocommands may have made vimbuf invalid! */ ! update_curbuf(VALID); ! } ! } ! } ! } ! ! #else ! void ! Delete(vimbuf, ...) ! VIBUF vimbuf; ! ! PREINIT: ! long
Controlling @Spell/@NoSpell
In my syntax/context.vim I include a bunch of other syntaxes. All work fine except for the xml one, as spell-checking stops working when it's included. It seems to be due to the fact that there are items in the xml syntax that are marked to contain @Spell. This seems to set off the default of having everything be spell-checked. The context syntax does have a bunch of @NoSpell, however, and other syntaxes included, such as those for c and ruby, include @Spell containments as well. I don't quite understand why this is happening, so perhaps someone with better knowledge of the @Spell/@NoSpell rules could help me out. Also, is there a way to say that spell-checking should be on everywhere, even though @Spell has been set for some definitions? Thanks. nikolai
Copy a line of text without the LF
Hi, I am using vim 7.0.42 on a Linux system. I want copy a complete line of text *without+ the final LF at the end, so it is possible to insert it elsewhere in the midth of text. With Shift-V I get the line *with* the LF at the end -- so I can not use that. With y/last character of the lineRET I get the line without the LF but the last character is also missing. With y/$RET I get the line without the LF but the last character is missing again. :set selectionRET gives me the default (inclusive). What did I wrong ? Kind regards, mcc
howto set magic=very?
I couldn't figure out what flag to use to turn on the very magic flag by default. Could someone maybe tell me where I should have looked to find it? :-) Thanks, Linda
Re: Copy a line of text without the LF
Hi, Meino Christian Cramer schrieb: I am using vim 7.0.42 on a Linux system. I want copy a complete line of text *without+ the final LF at the end, so it is possible to insert it elsewhere in the midth of text. [snip] just use y$ Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: howto set magic=very?
Hi, Linda W wrote: I couldn't figure out what flag to use to turn on the very magic flag by default. Could someone maybe tell me where I should have looked to find it? :-) there is no such flag. Everytime you want to use a very magic pattern you have include \v inside the pattern. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: Copy a line of text without the LF
From: Jürgen Krämer [EMAIL PROTECTED] Subject: Re: Copy a line of text without the LF Date: Tue, 08 Aug 2006 10:56:24 +0200 Hi, Meino Christian Cramer schrieb: I am using vim 7.0.42 on a Linux system. I want copy a complete line of text *without+ the final LF at the end, so it is possible to insert it elsewhere in the midth of text. [snip] just use y$ Regards, Jürgen Hi Jürgen, nice to now, that there is just another extra command... :) BUT: For what hopefully logical reason y/$ does not work? And more important: What is executed instead of one would extrapolate from knowing y/something other than $. Or -- exaggerated to the limit -- do I need another extra command to search/yank for example a m at line's end ??? I miss some consistency at some place of the commands. (*NO* critism against YOU, Jürgen !!! EXCLAMATION MARKS!!!) Keep hacking! mcc -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
editexisting.vim
Hi I am using gvim 7 and the plugin editexisting.vim on WinXP. I have several problems with this plugin and I'm hoping you can help me. 1. When I'm opening a file with the command line option '+312', the file will be opened with the cursor at line 312. But when the file is already opened, the cursor just stays where it is and does not move to line 312. 2. When the file is already opened in a background-tab, the correct gvim-instance gets active. But it does not switch to the correct tab, it splits the current window... thanks for your help cu boesi -- seasons82 was ist rl? seasons82 und muss man das wissen? ...der moment wo einem klar wird, dass man zuviel chattet...
Re: Copy a line of text without the LF
From: Georg Dahn [EMAIL PROTECTED] Subject: Re: Copy a line of text without the LF Date: Tue, 8 Aug 2006 10:05:45 +0100 (BST) Hi Georg, thanks a lot for your reply! :) Good to know, that there are special commands to just copy a line completly without the LF. But why I do need a specialised command ? Why does y/$ (despite the settings of the selection option) not work ? Why do I have to leave / off and have to use y$ instead, as Jürgen said ??? And why does yany other character does not work? Is this inconsistency needed? Keep hacking! mcc Hi! I would position the cursor on the line you want to copy and do 0v$y 0: move the cursor to the beginning of the line v: start visual mode $: move the cursor to the end of the line y: yank the selection Best wishes, Georg --- Meino Christian Cramer [EMAIL PROTECTED] wrote: Hi, I am using vim 7.0.42 on a Linux system. I want copy a complete line of text *without+ the final LF at the end, so it is possible to insert it elsewhere in the midth of text. With Shift-V I get the line *with* the LF at the end -- so I can not use that. With y/last character of the lineRET I get the line without the LF but the last character is also missing. With y/$RET I get the line without the LF but the last character is missing again. :set selectionRET gives me the default (inclusive). What did I wrong ? Kind regards, mcc ___ All new Yahoo! Mail The new Interface is stunning in its simplicity and ease of use. - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html
Re: Viewing CVS diff with vim
Bob Hiestand wrote: Use: :VCSVimDiff 1.2 Great :-) Thank you very much. Ciao, Fabio
Re: Copy a line of text without the LF
Hi! But why I do need a specialised command ? That's no specialised command, but the syntax of y. You type y and then a motion. $ moves to the end of the line. Why does y/$ y/[pattern] moves to the first occurance of the pattern. The cursor is positioned on the first character of the pattern, but this character is never yanked (which is exactly what one expects normally). (despite the settings of the selection option) The selection option is not relevant here, because you don't select anything here. Why do I have to leave / off and have to use y$ The syntax of y in Normal mode is y followed by a motion. And why does yany other character does not work? If any other character is no motion, then this must not work. Is this inconsistency needed? This is no inconsistency. Just read: :h motion.txt :h copy-move BTW, my suggestion has the advantage of using Visual mode. Sometimes you have to type one character more, but this has the big advantage, that you can see, what you are going to yank. Best wishes, Georg ___ All new Yahoo! Mail The new Interface is stunning in its simplicity and ease of use. - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html
Re: Copy a line of text without the LF
Hi, Meino Christian Cramer wrote: From: Jürgen Krämer [EMAIL PROTECTED] Subject: Re: Copy a line of text without the LF Date: Tue, 08 Aug 2006 10:56:24 +0200 Meino Christian Cramer schrieb: I am using vim 7.0.42 on a Linux system. I want copy a complete line of text *without+ the final LF at the end, so it is possible to insert it elsewhere in the midth of text. [snip] just use y$ nice to now, that there is just another extra command... :) it's not a command, it's a combination of a command (yank) and a motion (to the end of line). BUT: For what hopefully logical reason y/$ does not work? /$ is a different motion than $ -- in general, / as a motion puts the cursor before the start of the matched text. As $ is a zero-width anchor and the cursor can't be positioned after the last character on a line VIM uses the character before the match as start of matched text. Exception: With :set virtualedit=all the cursor can be placed beyond the end of line and your command would have worked as expected. And more important: What is executed instead of one would extrapolate from knowing y/something other than $. Here again the cursor is put before the start of the matched text, e.g., y/a would yank up to but not including the next a. If you want to include the a you will have to use offsets, i.e. in this special case y/a/e or more generally y/amore text/s+1 would include the a. Have a look at :help search-offset for more information on offsets in searches. Or -- exaggerated to the limit -- do I need another extra command to search/yank for example a m at line's end ??? y/m/e Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: Spell checking does not work with context
On 8/8/06, Aditya Mahajan [EMAIL PROTECTED] wrote: Hi, I am using vim 7.0 on windows and spell checking does not work with context files. (syntax file dated 2006-04-19) Here is a quick test. 1. start vim with gvim -u NONE -U NONE 2. set the following options syntax on set syntax=context set spell 3. Type the following \starttext This is a mistaake in typinng \stoptext The spell errors are not highlighted. If I change the syntax to plaintex set syntax=plaintex then syntax highlighting works. Any idea what is wrong with context syntax files? File $VIMRUNTIME/syntax/context.vim contains many [EMAIL PROTECTED] arguments. This is what causes spelling to ignore certain regions. You can either (1) email the maintainder of the $VIMRUNTIME/syntax/context.vim file , or (2) edit your copy of $VIMRUNTIME/syntax/context.vim removing '[EMAIL PROTECTED]' parts where appropriate. Yakov
Saveing of a recorded macro
Hi, is it possible and if true then how() endif to save a recorded macro to a file ? Kind regards, mcc
Re: Saveing of a recorded macro
is it possible and if true yes. :) then how() Well, by default, vim supports saving the contents of registers via the viminfo file/settings :help 'viminfo' Since macros are recorded to registers, this would save any macros you have, up to a given size (either in lines or in bytes, depending on the setting of 'viminfo'). It's often handy, if you have an action that you want to repeat, to store it in a mapping instead. You can paste the source of your macro just as you would paste any other register: ap (assuming you recorded to register a) which should give you a pretty good indicator of what should be done in the mapping. You don't detail the particulars of your macro, so I can't offer suggestions on making a mapping. however, if it's something common that you want to do regularly, you can then put the mapping in your vimrc file and it will be available every time you start vim. -tim
Re: editexisting.vim
Alexander 'boesi' Bösecke wrote: I am using gvim 7 and the plugin editexisting.vim on WinXP. I have several problems with this plugin and I'm hoping you can help me. 1. When I'm opening a file with the command line option '+312', the file will be opened with the cursor at line 312. But when the file is already opened, the cursor just stays where it is and does not move to line 312. 2. When the file is already opened in a background-tab, the correct gvim-instance gets active. But it does not switch to the correct tab, it splits the current window... Why not send email to the author of the plugin? You're more likely to catch his/her eye that way... Chip Campbell
fast file locating plugin (like ido.el in emacs)
Hi, Does anyone ever used ido.el in emacs? (www.cua.dk/ido.el) The plugin could considerably speedup file accessing performance, especially when I'm maintaining a large wiki docbase. So I really want to know - if vim have equivalent plugin like ido.el - if not, is there any simple way to achieve the same effect in vim? (don't want to explicitly edit directory and locate file) Thanks Eddy BTW, for those who never used ido.el. Below is the description of its functionality snipped from ido.el ;; Substring matching (The default method) ;; ;; As you type in a substring, the list of buffers or files currently ;; matching the substring are displayed as you type. The list is ;; ordered so that the most recent buffers or files visited come at ;; the start of the list. ;; The buffer or file at the start of the list will be the one visited ;; when you press return. By typing more of the substring, the list is ;; narrowed down so that gradually the buffer or file you want will be ;; at the top of the list. ;; ;; If I have two buffers called 123456 and 123, with 123456 the ;; most recent, when I use ido-switch-buffer, I first of all get ;; presented with the list of all the buffers ;; ;; Buffer: {123456,123} ;; ;; If I then press 2: ;; Buffer: 2[3]{123456,123} ;; ;; The list in {} are the matching buffers, most recent first (buffers ;; visible in the current frame are put at the end of the list by ;; default). At any time I can select the item at the head of the ;; list by pressing RET. I can also bring the put the first element ;; at the end of the list by pressing C-s or [right], or put the last ;; element at the head of the list by pressing C-r or [left]. ;; The item in [] indicates what can be added to my input by pressing TAB. ;; In this case, I will get 3 added to my input. So, press TAB: ;; Buffer: 23{123456,123} ;; ;; At this point, I still have two matching buffers. ;; If I want the first buffer in the list, I simply press RET. If I ;; wanted the second in the list, I could press C-s to move it to the ;; top of the list and then RET to select it. ;; ;; However, If I type 4, I only have one match left: ;; Buffer: 234[123456] [Matched] ;; ;; Since there is only one matching buffer left, it is given in [] and we ;; see the text [Matched] afterwards. I can now press TAB or RET to go ;; to that buffer.
vtreeexplorer problem
Hi, I'm trying vtreeexplorer plugin, it works great. But one problem prevents me adopting it as the replacement for explorer plugin. The problem looks like below - cut a line from file_a - open vtreeexplorer - open file_b from vtreeexplorer - paste the line cut before, but find the line pasted is not the line from file_a (but something from vtreeexplorer's treeview) Does anyone know how to solve the problem ? Thanks Eddy
Re: fast file locating plugin (like ido.el in emacs)
On 8/8/06, Eddy Zhao [EMAIL PROTECTED] wrote: Hi, Does anyone ever used ido.el in emacs? (www.cua.dk/ido.el) The plugin could considerably speedup file accessing performance, especially when I'm maintaining a large wiki docbase. So I really want to know - if vim have equivalent plugin like ido.el This question was raised on the list ~1/2 years ago, and Hari created the file-selection plugin in response: http://www.vim.org/scripts/script.php?script_id=1581 lookupfile : Lookup files using filename completion There are several plugins dealing with recently-used files, on vim.org. Vim mappings and functions can be used to open often-used files quickly. gf command is helpful, too. NB that vim has built-in recursive filename completion (**/xyztab) as well as simple filename completion (tab). Yakov
Re: vtreeexplorer problem
On 8/8/06, Eddy Zhao [EMAIL PROTECTED] wrote: Hi, I'm trying vtreeexplorer plugin, it works great. But one problem prevents me adopting it as the replacement for explorer plugin. The problem looks like below - cut a line from file_a - open vtreeexplorer - open file_b from vtreeexplorer - paste the line cut before, but find the line pasted is not the line from file_a (but something from vtreeexplorer's treeview) Maybe use named register, until the plugin's bug is fixed ? Apparently vtreeexplorer trashes unnamed register, which is a bug, and must be hopefully fixed by the plugin author. Yakov
Display the current character
Hey everyone, Is there a way to dispaly the current cursor position? e.g,, character 23. thanks! Ben
Re: Display the current character
Hi, Ben lemasurier wrote: Is there a way to dispaly the current cursor position? e.g,, character 23. :set ruler Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: Display the current character
Is there a way to dispaly the current cursor position? e.g,, character 23. use ga which will display the hex/decimal/octal values of the character under the cursor. I remember it as _g_et _a_scii [value] :help ga There's also g8 for a UTF-8 character under the cursor. Additionally, if you want to see it on a regular basis (and not just when you ask for it), you can tweak your 'ruler'/'rulerformat' settings to include the value %b or %B (depending on whether you want decimal or hex) :set ruler rulerformat=%b/0x%02B There are all sorts of other goodies you can toss in your 'rulerformat' setting. :help 'ruler' :help 'rulerformat' :help 'statusline' should give you all sorts of interesting reading. :) -tim
RE: Saveing of a recorded macro
-Original Message- From: Meino Christian Cramer [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 6:27 AM To: vim@vim.org Subject: Saveing of a recorded macro Hi, is it possible and if true then how() endif to save a recorded macro to a file ? I have done this in the past as follows: 1. Record your macro into the a register 2. Open your vimrc 3. Create a new line with: autocmd FileType sql let @a=' 4. Pressing (in insert mode) C-Ra, this will paste your recorded macro into your vimrc, then add a final single quote. 5. The problem with step 4 is newlines and escapes are lost. So to fix this, you can: - For each newline (or carriage return you want in your macro) erase the new line and then (still in insert mode) press C-VC-M (that is control V followed by control M). - For each escape you need in your macro, add a C-VC-[ 6. So you will end up with something like this: autocmd FileType sql let @a='/sys^Mcwbob^[nn.^M' This means, each time I edit a file with a filetype of sql, the a register will automatically have your macro recorded, so you can re-execute the macro (in normal mode) pressing @a. 7. This macro does: autocmd FileType sql let @a='/sys^Mcwbob^[nn.^M' - /sys^M - find sys (and the user had to have pressed enter) - cwbob^[ - change word to bob and press escape to get out of insert mode - Skip one find - .^M - repeat my last cw command 8. Obviously you are going to make lots of mistakes as you do this. It is very easy to test you macro, fix it, and test again. - You can move your cursor to after the first single quote. - Press v (to start linewise visual mode) - Move your cursor to the end of your macro - Press ay - which yanks your visually selected text into the a register - Re-execute the macro pressing @a Hope that helps you. It is a bit figity, but it works and does what you need. Other people may have suggestions on how to replace the newline (or carriage returns) with the ^M and add the escapes where necessary. Dave
Re: editexisting.vim
Hi Am 08.08.2006 15:35:09 schrieb Charles E Campbell Jr: Why not send email to the author of the plugin? You're more likely to catch his/her eye that way... Well that's a good point. But editexisting.vim ist shipped with ViM. So I thought I've just missed some option or something like that. ... I've just realized that Bram himself is the maintainer of the plugin. So where should I send the bug report to? Is vim-dev a good place? cu boesi -- THammY- und meine hände ham bisher immer nur das gemacht was ich will /THammY
Re: fast file locating plugin (like ido.el in emacs)
Hi Yakov, Thanks for the prompt help. I tried the lookupfile plugin, looks great at first glance, can you throw light on the below problems I encountered - do I always have to generate tagfile for every directory i visited? if so, I feel its a big burden that prevent me using the plugin frequently and globally. is there any way to eliminate this burden? - It seems that I can't locate file named aaabbb thru directly typing bbb, do I always have to locate file begin with the first letter of the filename? Thanks Eddy 2006/8/8, Yakov Lerner [EMAIL PROTECTED]: On 8/8/06, Eddy Zhao [EMAIL PROTECTED] wrote: Hi, Does anyone ever used ido.el in emacs? (www.cua.dk/ido.el) The plugin could considerably speedup file accessing performance, especially when I'm maintaining a large wiki docbase. So I really want to know - if vim have equivalent plugin like ido.el This question was raised on the list ~1/2 years ago, and Hari created the file-selection plugin in response: http://www.vim.org/scripts/script.php?script_id=1581 lookupfile : Lookup files using filename completion There are several plugins dealing with recently-used files, on vim.org. Vim mappings and functions can be used to open often-used files quickly. gf command is helpful, too. NB that vim has built-in recursive filename completion (**/xyztab) as well as simple filename completion (tab). Yakov
Re: editexisting.vim
Alexander Boesi wrote: Am 08.08.2006 15:35:09 schrieb Charles E Campbell Jr: Why not send email to the author of the plugin? You're more likely to catch his/her eye that way... Well that's a good point. But editexisting.vim ist shipped with ViM. So I thought I've just missed some option or something like that. ... I've just realized that Bram himself is the maintainer of the plugin. So where should I send the bug report to? Is vim-dev a good place? I've already seen it. I'll add remarks in the todo list for this. -- I AM THANKFUL... ...for a lawn that needs mowing, windows that need cleaning and gutters that need fixing because it means I have a home. /// 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///
have to switch back and forth between different language input method problem
Hi, Very often, I write file in vim using my native language (not english), Problem occurs like this - edit file in insert mode using my native language input method - Esc - using Ctrl-space to change to english input method (*) - hjkl - i - using Ctrl-space to revert back to my native language input method (*) So, every time I switch between insert mode and normal mode (eg. when moving edit point or issue edit command), I always have to change back and forth between differnet language input method, which is really a big burden. So - Is there a way to automaticlly change the input method to english input method , when Esc - Further, is there a way to automatically change back to the original input method, after return back to insert mode (from normal mode) Thanks Eddy
window split from tag?
When following a tag through to the file where it's defined, is there any way to get vim to keep the existing window open, and simply open (vertically and/or horizontally) a new window as opposed to replacing the existing one? Also, somewhat related - I'm using the TagList plugin, and I'd like to have all windows but the tag list (which I'd like to keep narrow) at a specific width - rtfm pointers appreciated ;) thanks! -lev
Re: Display the current character
On Tue, 2006-08-08 at 10:00:59 -0500, Ben lemasurier sent: Is there a way to dispaly the current cursor position? e.g,, character 23. In addition to Jürgen and Tim's suggestions, I offer you C-G, which will display the cursor position. Of course all of this information is available in the ruler, but if you don't want the ruler displayed all of the time, then this is an alternative. See :help CTRL-G Hope this helps; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Free phonecallshttp://johnsy.com/20060803011538 Irn Bru Spotted in ...http://johnsy.com/albums/flickr/206931188 pgpWEN5MKtnai.pgp Description: PGP signature
Re: window split from tag?
Lev Lvovsky wrote: When following a tag through to the file where it's defined, is there any way to get vim to keep the existing window open, and simply open (vertically and/or horizontally) a new window as opposed to replacing the existing one? With cursor atop the word: ctrl-w ] From command line: :sta word Regards, Chip Campbell
Re: Copy a line of text without the LF
Jürgen Krämer wrote: Meino Christian Cramer schrieb: I am using vim 7.0.42 on a Linux system. I want copy a complete line of text *without+ the final LF at the end, so it is possible to insert it elsewhere in the midth of text. [snip] just use y$ For the entire line, try 0y$ (this variant is immune to cursor placement in the line) Regards, Chip Campbell
Re: window split from tag?
On Aug 8, 2006, at 1:04 PM, Charles E Campbell Jr wrote: Lev Lvovsky wrote: When following a tag through to the file where it's defined, is there any way to get vim to keep the existing window open, and simply open (vertically and/or horizontally) a new window as opposed to replacing the existing one? With cursor atop the word: ctrl-w ] From command line: :sta word Does this only work horizontally? Seems that there is limited ctrl-w vertical functionality. thanks, -lev
How to delete unicode multi-byte characters?
I'm trying to edit a utf-8 document in Vim in a vt-102 terminal (in other words, not Gvim). There are a few multi-byte unicode characters in the text that behave erraticly when I cursor over them. I don't need these multi-byte characters, so I'm happy to just delete them rather than try to edit them in gvim. How can I search for and delete utf-8 multi-byte character sequences? I have both two-byte and three-byte utf-8 characters to consider. I'm using vim7. Yours, Noah
buffer history
can vim keep track of each file's undo history, so that when switching between two or more files, the undo history is reloaded, or does one need to write the history to a file before switching? thanks! -lev
Re: PCRE? Perl Compatible Regular Expressions?
Hi David, If you begin your pattern with '\v', then every character except [_a-z0-9] becomes 'special'. This allows you to use tokens like '?', '(' and '+' without a backslash. Unfortunately, you can't use '(?:' and friends. Maybe there should be a modifier like '\v' which makes the pattern compatible with PCRE. '\!' hasn't been taken yet, i.e., :s/\!(?:foo|bar)/---/ But this could potentially cause some headaches, because PCRE does not support any of the Vim-only goodness such as \x\o\h\a\l\u\i\k etc (not to mention \%# and \%c etc), and some items such as '\f' are ambigous? Vim treats it as any file name character (from 'isfname') but PCRE treats it as the form-feed character (\x0B I think). And then there is the question of where you want to put the PCRE after-delimiter modifiers. regards, Peter --- David Conrad [EMAIL PROTECTED] wrote: The regular expression syntax that Vim uses is, I'm sure, compatible with Vi. There were always a number of different regex dialects to choose from: grep, egrep, sed. But in the last few years, pcre's have become popular, and virtually standard across a lot of different languages, from Perl to Python to Ruby to JavaScript to C# to Java. Is there any way to use them in Vim? I've learned to used the Vim-style regex's in my s///'s, but if I could use one regex syntax across everything I work with, it would free up a few more brain cells for more constructive purposes. Any advice is appreciated. Thanks, David Conrad Send instant messages to your online friends http://au.messenger.yahoo.com
Re: fast file locating plugin (like ido.el in emacs)
Hello, * On Tue, Aug 08, 2006 at 09:46:28PM +0800, Eddy Zhao [EMAIL PROTECTED] wrote: The plugin could considerably speedup file accessing performance, especially when I'm maintaining a large wiki docbase. So I really want to know - if vim have equivalent plugin like ido.el - if not, is there any simple way to achieve the same effect in vim? (don't want to explicitly edit directory and locate file) I'm not sure this is what you are looking for, but just in case... I'm maintaining a plugin [1] that provides facilities (commands actually) to apply commands (Ex commands) on files found in various lists of directories ($PATH, runtimepath, path, or anything specified). Amongs the commands I provide, there are two that look for a file in path, and split-open (horizontally or vertically) a new window with the file found. If several files match (a glob pattern is expected), a dialog box asks for the file to open. If the file is already opened in a window, the window gains the focus. Command completion is supported for the filenames. HTH, [1] searchInRuntime.vim. It should be the plugin #229 on SF. -- Luc Hermitte http://hermitte.free.fr/vim/
Re: fast file locating plugin (like ido.el in emacs)
* On Wed, Aug 09, 2006 at 01:02:54AM +0800, Eddy Zhao [EMAIL PROTECTED] wrote: - It seems that I can't locate file named aaabbb thru directly typing bbb, do I always have to locate file begin with the first letter of the filename? If, as I guess, its implementation relies on the same functions than searchInRuntime.vim, try *bbb for your filename. HTH, -- Luc Hermitte http://hermitte.free.fr/vim/
Re: Copy a line of text without the LF
Meino Christian Cramer wrote: Hi, I am using vim 7.0.42 on a Linux system. I want copy a complete line of text *without+ the final LF at the end, so it is possible to insert it elsewhere in the midth of text. With Shift-V I get the line *with* the LF at the end -- so I can not use that. With y/last character of the lineRET I get the line without the LF but the last character is also missing. With y/$RET I get the line without the LF but the last character is missing again. :set selectionRET gives me the default (inclusive). What did I wrong ? Kind regards, mcc IIRC, in addition to all the suggestions made so far, to change a register from linewise (with NL or null at the end) to characterwise (without it) you can use (for instance with the default register): :call setreg('', @, 'c') or even if setreg('', @, 'c') echoerr 'Couldn''t set @ to characterwise' endif (the function return zero for success). Use setreg('x', @x, 'c') to use register x instead. Best regards, Tony.
Re: Display the current character
Ben lemasurier wrote: Hey everyone, Is there a way to dispaly the current cursor position? e.g,, character 23. thanks! Ben With 'ruler' on, or with the status line displayed (i.e., 'laststatus' set to 2 for always, or to 1 in split-window mode) it is displayed near the right end of the status line or command-line (a little to the left of 'Top' 'All' 'Bot' or percentage), in the form 681,7 meaning line 681 column 7; or 19,18-29 meaning line 19, 18th byte, screen column 19. When byte and column numbers are identical only one column is shown. They can differ in the following cases: - with hard tabs, which are one byte each but occupy between 1 and 8 screen columns; - depending on the 'encoding', with multibyte characters (such as anything above 127 if enc == utf-8) which are several bytes, but occupy only 1 screen column (or 2 for CJK wide glyphs). - depending on the 'encoding', when using composing characters (e.g. Semitic short vowel marks) which are 1 or more bytes but occupy no screen column of their own (they are overprinted on the preceding spacing character). - partly depending on the settings of 'list' and 'listchars', when there are characters represented, usually in blue, as ^M (two screen columns, one byte) or 8F (four screen columns, one byte), etc. Best regards, Tony.
Re: have to switch back and forth between different language input method problem
Eddy Zhao wrote: Hi, Very often, I write file in vim using my native language (not english), Problem occurs like this - edit file in insert mode using my native language input method - Esc - using Ctrl-space to change to english input method (*) - hjkl - i - using Ctrl-space to revert back to my native language input method (*) So, every time I switch between insert mode and normal mode (eg. when moving edit point or issue edit command), I always have to change back and forth between differnet language input method, which is really a big burden. So - Is there a way to automaticlly change the input method to english input method , when Esc - Further, is there a way to automatically change back to the original input method, after return back to insert mode (from normal mode) Thanks Eddy For Windows, see help mbyte-IME. For X11, see help mbyte-XIM The status of the IM is remembered in option 'iminsert' when switching between Normal and Insert/Replace modes (0 = type ASCII, 2 = use IM). You need (see output of :version): - not console Vim, but a GUI version, and run as gvim, not in an xterm - for Windows, compiled with +multi_byte_ime or +multi_byte_ime/dyn - for X11, compiled with +xim - for full control of the XIM under X11, it must be a GTK (or GTK2) GUI. Best regards, Tony.
Re: How to delete unicode multi-byte characters?
Noah Spurrier wrote: I'm trying to edit a utf-8 document in Vim in a vt-102 terminal (in other words, not Gvim). There are a few multi-byte unicode characters in the text that behave erraticly when I cursor over them. I don't need these multi-byte characters, so I'm happy to just delete them rather than try to edit them in gvim. How can I search for and delete utf-8 multi-byte character sequences? I have both two-byte and three-byte utf-8 characters to consider. I'm using vim7. Yours, Noah 1. You must have 'encoding' set to UTF-8. Note that this will change three things: (a) how Vim understands the contents of the file, (b) how it displays it, (c) how it understands your keypresses. (c) is also governed by 'termencoding' but in Console Vim (not gvim) this governs (b) too. If 'encoding' is not set to UTF-8 when entering Vim (and before any vimrc commands) you may need to set 'termencoding' to the old value of 'encoding' before changing 'encoding'. But in console Vim the display (which is controlled by the terminal, not directly by Vim) may or may not be garbled. Using gvim is easier -- unless you are on a Unix/Linux system with no X server running. 2. To delete a composing character while leaving the underlying spacing character unchanged, make sure 'delcombine' is TRUE and use backspace in Insert mode. This deletes one combining character at a time; in some cases, the same character may be combining or spacing depending on context: e.g., Vim (with +arabic, and 'arabic' set) treats Arabic alif as combining when it immediately follows laam, as spacing in other cases. 3. To delete the spacing character together with any combining characters it may have, use (for instance) x in Normal mode 4. Multi-byte characters in UTF-8 are anything greater than 127. You can search for codepoints between U+0080 and U+00FF by searching on /[\x80-\xFF] IIUC, there's no way to search for a _range_ of characters higher than U+00FF. Or maybe you can trick the system by searching on /[^\x00-\x7F] but I haven't tested it. WARNING: Any Latin accented characters, even à é ç etc., are multi-byte in UTF-8. Also the degree sign etc. So I guess if you want to do it using the :s[ubstitute] command you had better set the c flag. Best regards, Tony.