Re: Reannouncing vimplugin: A vim plugin for Eclipse
Am Sonntag, den 01.04.2007, 13:33 -0400 schrieb Silent1: Just a quick question about the overal goal of the project. Would vim just become an editor inside eclipse? Or would we be able to still use vim inside eclipse but still use code completion say from plugins like zends php project for eclipse or phpeclipse or any of the languagle specific plugins? Thanks --Brendon [replying to vim-dev only] [crossposting to vimplugin-devel] The overall goal of the project is to tightly integrate vim into eclipse. That means that the developer should choose what features of what program to use. On a higher level the idea is to treat vim as real editor component but to let other things like compiling, cvs/svn, integration of api-documentation, large scale refactorings, perhaps gui-building to the IDE. So the spirit is Vim is not an IDE. The eclipse core plugin architecture uses so called extension points to define its interfaces. The idea of vimplugin is to map those extension points to vim features where possible/adequate. That means that if phpeclipse and the like work as intended with such interfaces, the integration with vim could work out. Problems will come when there are redundant features: Which one is the better? (e.g. QuickFix, Buffers) But that's still a long way to go. At the moment we are struggling to build a text(terminal)-based vim with netbeans support. From :help netbeans-configure Currently, only gvim is supported in this integration as NetBeans does not have means to supply a terminal emulator for the vim command. Furthermore, there is only GUI support for GTK, GNOME, and Motif. Any idea why it is like that or how one could change it !? Help or suggestions are appreciated. Sebastian.
Googel Summer of Code: Mentor
Hi all, My name is David Terei, I applied for Google SOC with Vim (Eclipse plug-in). I also applied for Mozilla (Thunderbird) and they contacted me, telling me I have also been assigned a mentor by the Vim project and asked me to please put them in contact with that person. No one from Vim has tried to contact me yet so I'm just going off this information, and I'm not sure who to contact regarding SOC (couldn't find info on website and IRC failed as well), so I thought this would be the next best place to ask. Best Regards, David Terei
GSOC - we assigned mentor for the same student
Hi, I tried to contact you about week ago (but I didn't notice, that I must be subscribed to the list to post), and I also sent an e-mail to Bram last week, but I didn't get a reply. Vim and Fityk both assigned mentors to student Diaa. I've contacted Diaa, and he wrote me that he would choose Fityk (I'll be his mentor from Fityk). Is it ok with you? Cheers, Marcin -- Marcin Wojdyr | http://www.unipress.waw.pl/~wojdyr/
Re: invoking yanked register into colon command
Hi! There is an error: The function function MakeSearchString(str) return substitute(escape(@, '\\/.*$^~[]'), '\n', '\\n', 'g') endfunction should be function MakeSearchString(str) return substitute(escape(a:str, '\\/.*$^~[]'), '\n', '\\n', 'g') endfunction I have not seen this error before, because the function did the expected things even with this error. Best regards, Georg
Re: bracket completion
Those are great, thanks alot :) On 4/1/07, Fritz Mehner [EMAIL PROTECTED] wrote: A.J.Mechelynck schrieb: Greg Fitzgerald wrote: Anyone know of a way to achieve bracket completion? For example if your typing a if statement, if (something) { once you type the first bracket the 2nd one is inserted below for you. Scribes and a few other editors have this functionality and was hoping to achieve it with Vim. Another thing that this does, if you were to type $data[' for example. The 2nd ' would be inserted for you after your cursor. Just seems to save time when I played with scribes a few days ago. I was looking through the help, scripts and mailing list archives for something like this but have not hit any matches. Just wondering if people have ideas on how this could be done or maybe know of an existing way. Thanks in advance. --Greg :inoremap { {CR}UpEnd :inoremap [ []Left :inoremap ( ()Left etc. This assumes brace indenting is taken care of (by 'cindent' or 'indentexpr'). IIUC, you can still enter an unpaired brace (or bracket or paren) by prefixing it with Ctrl-V (or with Ctrl-Q if Ctrl-V pastes). Best regards, Tony. In addition I use the following settings vnoremap ( s()EscPRight vnoremap [ s[]EscPRight vnoremap { s{}EscPRight to surround a selection in visual mode. Regards, Fritz -- Panos Laganakos
Re: Esperanto dictionary
On Sat, 31 Mar 2007, Cyril Slobin wrote: Hi all! [...] I have complied my own eo.utf-8.spl from ispell sources by Sergio Pokrovskij found in Debian 3.1 distribution. It understands both real Unicode and surrogate Cxirkaux-style (if you don't speak Esperanto, It might be useful to also support C^irkau^ as well. I'm not sure how often the h form is used given the exception(s?) (flughaveno...) Also isn't your example often written CXirkaux because the CX is (effectively) one character, capitalized? Anyway, nice to see someone working on this stuff. Hugh
Re: Esperanto dictionary
On 4/2/07, Hugh Sasse [EMAIL PROTECTED] wrote: It might be useful to also support C^irkau^ as well. I'm not sure how often the h form is used given the exception(s?) (flughaveno...) For h form you can use my plugin: http://www.vim.org/scripts/script.php?script_id=1761 It converts misc ascii representations to unicode and vice versa. Among others are supported Cxirkaux-style, Zamenhof style with h (and it knows about flughaveno and chashundo!), html/xml entities, tex/latex notation and many more... If you want to spell check text written with h's, you just convert it to unicode, check, and convert back. Plugin is table-driven, and I haven't write tables myself -- I borrowed them from two other open-source projects (UniRed and catdoc). UniRed also has tables for ^Cirka^u, C^irkau^ and C`irkau`, and plugin can use them, but I haven't bundled with plugin. Also isn't your example often written CXirkaux because the CX is (effectively) one character, capitalized? I've newer seen this form, and I believe it is ugly. And in unicode terms, this one character is not capitalized, but title-cased. -- Cyril Slobin [EMAIL PROTECTED] `When I use a word,' Humpty Dumpty said, http://45.free.net/~slobin `it means just what I choose it to mean'
RE: gVim and Cygwin
-Original Message- From: Waters, Bill [mailto:[EMAIL PROTECTED] Sent: Friday, March 30, 2007 18:06 To: vim@vim.org Subject: gVim and Cygwin Does anyone have experience with running gVim and using Cygwin commands (ex. indent)? I would prefer not to run vim in a Cygwin terminal, unless someone has all of the configurations needed (syntax highlighting, etc) to have that act like gVim. I use the UnxUtils package: http://unxutils.sourceforge.net/ It includes all of the commands I need and accepts forward slashes as well as backslashes. I use these commands from the standard precompiled gvim.exe from vim.org. I have cygwin as well, but it is later in my %PATH%. Although technically not an answer to your question, I think this is the best solution to your problem. Best regards, Robert PS: Actually I use the Labrat Toolkit which includes the UnxUtils package, but labrattech.com seems to have issues with php syntax at the moment. When they are up and running again you must check this out.
Re: delete all but first occurence of a pattern
Tobia wrote: I don't think Vim's regular expressions are the best tool for this job. I mean, XML manipulation is much easier done in XSLT: ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=article xsl:copy xsl:copy-of select=@*/ AuthorList CompleteYN=Y Author ValidYN=Y xsl:copy-of select=AuthorList/Author[1]/*/ /Author /AuthorList xsl:copy-of select=node()[not(self::AuthorList)]/ /xsl:copy /xsl:template /xsl:stylesheet This does what you want in your example, assuming the source is a proper XML document (among other things there must be a root tag encompassing all the articles.) Invoke with xsltproc fix-authors.xsl articles.xml or with any other XSLT tool. To get back on-topic, I find these scripts make working with XSLT a bit less painful: xslhelper.vim http://www.vim.org/scripts/script.php?script_id=1364 closetag.vim http://www.vim.org/scripts/script.php?script_id=13 This, on the other hand, is on my list of things to check, but I still haven't got around to checking it out: xml.vim http://www.vim.org/scripts/script.php?script_id=1397 Tobia I'm currently looking for sth that will work with VI (I use vim script files). As last resort I'll try your suggestion though. Thank you for your reply, Nikos
Question about b:did_ftplugin
Hi, When I set a filetype for a buffer the variable b:did_ftplugin is set. The help says: If you are writing a filetype plugin to be used by many people, they need a chance to disable loading it. Put this at the top of the plugin: Only do this when not done yet for this buffer if exists(b:did_ftplugin) finish endif let b:did_ftplugin = 1 Now, when I do set ft=X from the command line, it happens that the ftplugin X doesn't get loaded because it finishes when b:did_ftplugin is set. When is b:did_ftplugin ever unset? What's the rationale of setting b:did_ftplugin and not b:did_ftplugin_X? Regards, Thomas.
Re: problem loading Python dll
On Mon, 2 Apr 2007, Johan du Preez apparently wrote: I have installed Python 2.5, but vim does not appear to see it? How do I solve this one!. :h python-dynamic hth, Alan Isaac
Re: bracket completion
i am finding these usefull too, thanks sk On 4/2/07, Panos Laganakos [EMAIL PROTECTED] wrote: Those are great, thanks alot :) On 4/1/07, Fritz Mehner [EMAIL PROTECTED] wrote: A.J.Mechelynck schrieb: Greg Fitzgerald wrote: Anyone know of a way to achieve bracket completion? For example if your typing a if statement, if (something) { once you type the first bracket the 2nd one is inserted below for you. Scribes and a few other editors have this functionality and was hoping to achieve it with Vim. Another thing that this does, if you were to type $data[' for example. The 2nd ' would be inserted for you after your cursor. Just seems to save time when I played with scribes a few days ago. I was looking through the help, scripts and mailing list archives for something like this but have not hit any matches. Just wondering if people have ideas on how this could be done or maybe know of an existing way. Thanks in advance. --Greg :inoremap { {CR}UpEnd :inoremap [ []Left :inoremap ( ()Left etc. This assumes brace indenting is taken care of (by 'cindent' or 'indentexpr'). IIUC, you can still enter an unpaired brace (or bracket or paren) by prefixing it with Ctrl-V (or with Ctrl-Q if Ctrl-V pastes). Best regards, Tony. In addition I use the following settings vnoremap ( s()EscPRight vnoremap [ s[]EscPRight vnoremap { s{}EscPRight to surround a selection in visual mode. Regards, Fritz -- Panos Laganakos
Re: bracket completion
On Mon, 02 Apr 2007, shawn bright wrote: i am finding these usefull too, thanks Check out Luc Hermitte's development of Stephen Riehm's bracketing macros. http://hermitte.free.fr/vim/settings.php#settings -- Greg MathesonI have an elaborate mnemonic for remembering what day it is. It's called the number system. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
repeat replace many time on each line
Hello, I've Xml document with attribute likes: foo=00 12 AF I want to replace with: foo=0x00 0x12 0xAF I try: %s/\%(\%(foo=\\)\@=\%(0x[0-9A-F]\{2\}\s\)*\)\@=\([0-9A-F]\{2\}\)/0x\1/g It works fine for each first occurrence of each line but not on others whatever I've put g option. I have to use repeat manually until change is finish. How can I do repeat? Thanks, Arnaud. -- Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird
what is wrong with my keymap for commenting a block
Hi, i write a simple keymap for commenting C file, map C 0i/*C-EscA*/C-Escj now i want to use the command like 12C to comment a block, however, it does not follow my mind, it does not comment one line then go down comment the next line, it only give a lot of /* in the first line and make mistake, how to implement what i want? Thank you very much. -- View this message in context: http://www.nabble.com/what-is-wrong-with-my-keymap-for-commenting-a-block-tf3506043.html#a9791728 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Question about b:did_ftplugin
Thomas schrieb: Hi, When I set a filetype for a buffer the variable b:did_ftplugin is set. The help says: If you are writing a filetype plugin to be used by many people, they need a chance to disable loading it. Put this at the top of the plugin: Only do this when not done yet for this buffer if exists(b:did_ftplugin) finish endif let b:did_ftplugin = 1 Now, when I do set ft=X from the command line, it happens that the ftplugin X doesn't get loaded because it finishes when b:did_ftplugin is set. When is b:did_ftplugin ever unset? What's the rationale of setting b:did_ftplugin and not b:did_ftplugin_X? Regards, Thomas. ftplugins should define b:undo_ftplugin . :h undo_ftplugin If this var exists and its commands get executed then (only then) also b:did_ftplugin will be unset. Executing b:undo_ftplugin is one of the first things :setf X tries to do. -- Regards, Andy EOM
Re: bracket completion
this looks like exactly what i am after. i am kind of a newbie here, and cant quite get it to work right. i believe that i need a python.vim file in /ftplugin directory. but i dont know how to word it to make this plugin work, could anyone kinda help me here, i can't make out what i should do from the docs on the website that you linked to thanks for any tips sk On 4/2/07, Greg Matheson [EMAIL PROTECTED] wrote: On Mon, 02 Apr 2007, shawn bright wrote: i am finding these usefull too, thanks Check out Luc Hermitte's development of Stephen Riehm's bracketing macros. http://hermitte.free.fr/vim/settings.php#settings -- Greg MathesonI have an elaborate mnemonic for remembering what day it is. It's called the number system. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
ok, new question on search
lo there, when i do a search like /text it highlights all of the matches and i can use n and N to navigate. how do i turn the highlighting off when i am done? thanks sk
RE: invoking yanked register into colon command
after having read the user-manual. For example, I do often want to replace a name in the text with another. What I used to do is selecting it with mouse and type :%s/ctrl-ins/newname/gc Is there a way to do this with the mouse (and without retyping the name) ? What I want is maybe something like 'invoking a yanked register in my colon command' Me, I go to whatever I'm looking for, hit 'v', then use normal motion commands (eg, 3e) to highlight the text in question, instead of using the moose. If a single word, '*' will automagically highlight and search for the word under the cursor. From there, once you highlighted the exact pattern you want, can just use :%s//newname/gc as it remembers what you just looked for. No need to reinsert it for the 's' command.
Re: ok, new question on search
Gene Kwiecinski wrote: when i do a search like /text it highlights all of the matches and i can use n and N to navigate. how do i turn the highlighting off when i am done? Need to keep the pattern in memory? If not, /zzz will do it, assuming you don't have zzz anywhere else in your file, of course. Can fiddle with :set nohls and whatnot, but for me, it's just easier to search for nothing to turn off highlighting of the just-searched-for text. Then, of course, you'd have to :set hls to turn it back on again. Lotta typing, big pain, 'swhy I don't do that, and just search for gibberish instead if I want to unhighlight what I was just looking for. The search register can be overwritten by setting @/ to ''. This then clears your search properly. For my purposes, I have the following mapping in my vimrc: nnoremap silent M-/ :set @/=''CR so pressing alt-/ then clears my search. -- Albie Janse van Rensburg It is only by risking our persons from one hour to another that we live at all. And often enough our faith beforehand in an uncertified result is the only thing that makes the result come true. -- William James
RE: ok, new question on search
Need to keep the pattern in memory? If not, /zzz will do it, assuming you don't have zzz anywhere else in your file, of course. The search register can be overwritten by setting @/ to ''. This then clears your search properly. For my purposes, I have the following mapping in my vimrc: nnoremap silent M-/ :set @/=''CR so pressing alt-/ then clears my search. Yeah, but all those shift- and alt- stretches on the kb make my fingers hurt... :D
RE: ok, new question on search
cool enough, i guess i could map something to :/impossible_to_find_text or something Or, just zzz... or qwqw... or ;;;... etc. shrug/
Re: Esperanto dictionary
Cyril Slobin wrote: On 4/2/07, Hugh Sasse [EMAIL PROTECTED] wrote: It might be useful to also support C^irkau^ as well. I'm not sure how often the h form is used given the exception(s?) (flughaveno...) For h form you can use my plugin: http://www.vim.org/scripts/script.php?script_id=1761 It converts misc ascii representations to unicode and vice versa. Among others are supported Cxirkaux-style, Zamenhof style with h (and it knows about flughaveno and chashundo!), html/xml entities, tex/latex notation and many more... If you want to spell check text written with h's, you just convert it to unicode, check, and convert back. Plugin is table-driven, and I haven't write tables myself -- I borrowed them from two other open-source projects (UniRed and catdoc). UniRed also has tables for ^Cirka^u, C^irkau^ and C`irkau`, and plugin can use them, but I haven't bundled with plugin. Also isn't your example often written CXirkaux because the CX is (effectively) one character, capitalized? I've newer seen this form, and I believe it is ugly. And in unicode terms, this one character is not capitalized, but title-cased. Well, I suppose both uppercase and titlecase should be supported then. Cxu ne? CXU VERE NE? (Kompreneble, ĉiukaze mi preferas verajn ĉapelitajn literojn.) I suppose texts written in «Fundamenta» h-stilo could emphasise the radical break when needed, as in flug-haveno, chas-hundo, danc-halo, ktp. (er, etc.). Anyway, I anticipate that all substitution schemes will become less and less necessary as Unicode generalizes: e.g., my fr_BE keyboard supports consonants with circumflex out of the box in openSUSE Linux 10.2 (thus going back to the universality of the French typewriters of Zamenhof's time ;-) ). Best regards, Tony. -- How can you be in two places at once when you're not anywhere at all?
RE: bracket completion
Can you provide and example of how to do this? Thanks, Bill :inoremap { {CR}UpEnd :inoremap [ []Left :inoremap ( ()Left I'll just add a statment enabling this for certain languages. This has also giving me a couple new ideas to play with. Thanks again. :) --Greg
help file imprecision
In *insert.txt*For Vim version 7.0. Last change: 2006 Dec 06 under :help i_CTRL-_ at lines 222-223, there is: Only if compiled with the |+rightleft| feature (which is not the default). there should be: Only if compiled with the |+rightleft| feature (which means a Big or Huge version of Vim). Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 158. You get a tuner card so you can watch TV while surfing.
how to create tag file in Vim for matlab .m files?
Does anyone know how to do it? Thanks Frank
Re: how to create tag file in Vim for matlab .m files?
frank wang wrote: Does anyone know how to do it? The hdrtag program will do it: http://mysite.verizon.net/astronaut/src/index.html and click on hdrtag. Regards, Chip Campbell
Re: bracket completion
Zarko Coklin wrote: It is hard to expand on Tony's feedback, ever. Still, I found the following works a bit better. Not only that it creates a right brace but it also places a cursor on the right spot (taking into consideration indentation if you set it). :inoremap { {CR}UpCREnd :inoremap [ []Left :inoremap ( ()Left Regards, Zarko Coklin The right spot depends on your C coding style: your mapping might apply for if (condition) { statement; statement; } and void function functionname(void* p) { statement; statement; } though it might be better to place CR _after_ End in the {rhs} to avoid splitting a word in the middle. Mine is better for if (condition) { statement; statement; } and void function functionname(void* p) { statement; statement; } and can still be used for yours, by hitting Enter after the mapped { Best regards, Tony. -- Taxes are going up so fast, the government is likely to price itself out of the market.
Re: problem loading Python dll
Alan G Isaac wrote: On Mon, 2 Apr 2007, Johan du Preez apparently wrote: I have installed Python 2.5, but vim does not appear to see it? How do I solve this one!. :h python-dynamic hth, Alan Isaac Rather than edit the executable as that help item suggests, you can look at the Compilation line in the output of :version; but in the OP's case (where Vim shouts for python25.dll) that oughtn't to be necessary. Best regards, Tony. -- Love's Drug My love is like an iron wand That conks me on the head, My love is like the valium That I take before my bed, My love is like the pint of scotch That I drink when I be dry; And I shall love thee still, my dear, Until my wife is wise.
Re: repeat replace many time on each line
On 4/2/07, Tobia [EMAIL PROTECTED] wrote: Arnaud Bourree wrote: I've Xml document with attribute likes: foo=00 12 AF I want to replace with: foo=0x00 0x12 0xAF %s/\%(\%(foo=\\)\@=\%(0x[0-9A-F]\{2\}\s\)*\)\@=\([0-9A-F]\{2\}\)/0x\1/g this works: %s/\%(\%(foo=\\)\@=\%([0-9A-F]\{2\}\s\)*\)\@=\([0-9A-F]\{2\}\)/0x\1/g In using :s with the /g flag, I take it the potential changes are marked first, and then executed, per line? Somewhat more generally, the pattern above could be: %s/\%(\%(foo=\\)\@=\%(\%(0x\)\?[0-9A-F]\{2\}\s\)*\)\@=\([0-9A-F]\{2\}\)/0x\1/g which works both with and (repeatedly) without the /g flag. I prefer when dealing with that many special characters to use the very-magic form: %s/\v%(%(foo\=)@=%(%(0x)?[0-9A-F]{2}\s)*)@=([0-9A-F]{2})/0x\1/g ... but that's obviously a matter of personal preference. Thank you, bob
Re: Monospaced font problem
Tobia, Man, you're a genius! Your script solved the problem. I ran it and now every program (including gvim, of course) recognizes Pragmata as being monospaced. Thank you very much. -- Pablo -- Forwarded message -- From: Tobia [EMAIL PROTECTED] To: 'Vim mailing list' vim@vim.org Date: Sun, 1 Apr 2007 13:55:46 +0200 Subject: Re: Monospaced font problem Pablo Arantes wrote: I contacted the author of Pragmata to share my concerns but he couldn't help me much in this respect. I explained him the problem but I'm not sure he understood it. I emailed him too. We share our first language, so maybe he will understand me better. I wonder if there is a feasible way to change this specification myself. I had a look at the TTF file format[1] and it's quite easy. I have attached a small Python script that will query, set or clear the monospaced flag on a TTF file. Run it with no arguments to get help. Remember to operate on a copy of the font file and to install/uninstall the font through Windows's Control Panel. That is: make a copy of the font file; set the flag on it; uninstall the currently installed font; install the modified version; profit. Tobia [1] http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6post.html
Re: what is wrong with my keymap for commenting a block
flyfish wrote: Hi, i write a simple keymap for commenting C file, map C 0i/*C-EscA*/C-Escj now i want to use the command like 12C to comment a block, however, it does not follow my mind, it does not comment one line then go down comment the next line, it only give a lot of /* in the first line and make mistake, how to implement what i want? Thank you very much. The way you do it, the 12 in 12C is simply prepended to the mapping, changing it to 120i/*Esc etc., i.e., adding /* ten times the count (120 times here), then */ once at the end of the line. Method I: Put your command in a register, let's say q, and invoke that register with a count: :let @q = 0i/*\eA*/\ej or :let @q = i\Home/*\End*/\Down\e and in either case :map C @q Method II: Use a Visual-mode mapping: :vmap F2 Esc:'-1put ='/* 'CR:'put =' */'CR or :vmap F2 Esc:'-1put ='#if 0'CR:'put ='#endif'CR I recommend the last of the above, which will (if I didn't goof) add #if 0 above your (linewise) visual area and #endif below it, so than any /* */ inside the block won't disturb the compilation. (I'm not sure what you use Ctrl-Esc for: I have no help for i_CTRL-Esc and on my system, the Ctrl-Esc key is preempted by the window manager so that gvim never sees it.) Best regards, Tony. -- The society which scorns excellence in plumbing as a humble activity and tolerates shoddiness in philosophy because it is an exalted activity will have neither good plumbing nor good philosophy ... neither its pipes nor its theories will hold water.
Re: repeat replace many time on each line
Bob Hiestand wrote: Tobia wrote: Arnaud Bourree wrote: I've Xml document with attribute likes: foo=00 12 AF I want to replace with: foo=0x00 0x12 0xAF this works: %s/\%(\%(foo=\\)\@=\%([0-9A-F]\{2\}\s\)*\)\@=\([0-9A-F]\{2\}\)/0x\1/g In using :s with the /g flag, I take it the potential changes are marked first, and then executed, per line? It would seem so. By the way, I would have used a simpler pattern for such a task: %s/\v%(foo\=[^]*)@=(\x\x)/0x\1/g I prefer when dealing with that many special characters to use the very-magic form Me too. I can't stand trying to match \( \) with my eyes, they just don't look right, not to mention \{ \? \+... Egrep and Perl have it right. I wish I could turn very-magic on by default. Tobia
Re: ok, new question on search
Gene Kwiecinski wrote: Need to keep the pattern in memory? If not, /zzz will do it, assuming you don't have zzz anywhere else in your file, of course. The search register can be overwritten by setting @/ to ''. This then clears your search properly. For my purposes, I have the following mapping in my vimrc: nnoremap silent M-/ :set @/=''CR so pressing alt-/ then clears my search. Yeah, but all those shift- and alt- stretches on the kb make my fingers hurt... :D :noh (with no set) clears search highlighting until next search. If the 4 characters are to much for you, map it to a key, e.g. :map F12 :nohCR :imap F12 C-O:nohCR Best regards, Tony. -- What the large print giveth, the small print taketh away.
Re: what is wrong with my keymap for commenting a block
Thank you very much, i got it. A.J.Mechelynck wrote: flyfish wrote: Hi, i write a simple keymap for commenting C file, map C 0i/*C-EscA*/C-Escj now i want to use the command like 12C to comment a block, however, it does not follow my mind, it does not comment one line then go down comment the next line, it only give a lot of /* in the first line and make mistake, how to implement what i want? Thank you very much. The way you do it, the 12 in 12C is simply prepended to the mapping, changing it to 120i/*Esc etc., i.e., adding /* ten times the count (120 times here), then */ once at the end of the line. Method I: Put your command in a register, let's say q, and invoke that register with a count: :let @q = 0i/*\eA*/\ej or :let @q = i\Home/*\End*/\Down\e and in either case :map C @q Method II: Use a Visual-mode mapping: :vmap F2 Esc:'-1put ='/* 'CR:'put =' */'CR or :vmap F2 Esc:'-1put ='#if 0'CR:'put ='#endif'CR I recommend the last of the above, which will (if I didn't goof) add #if 0 above your (linewise) visual area and #endif below it, so than any /* */ inside the block won't disturb the compilation. (I'm not sure what you use Ctrl-Esc for: I have no help for i_CTRL-Esc and on my system, the Ctrl-Esc key is preempted by the window manager so that gvim never sees it.) Best regards, Tony. -- The society which scorns excellence in plumbing as a humble activity and tolerates shoddiness in philosophy because it is an exalted activity will have neither good plumbing nor good philosophy ... neither its pipes nor its theories will hold water. -- View this message in context: http://www.nabble.com/what-is-wrong-with-my-keymap-for-commenting-a-block-tf3506043.html#a9800173 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Unsubscribing...
[EMAIL PROTECTED] wrote: Mr. Mechelynck, I have tried on several occasions to unsubscribe to this mailing list. All efforts have proven futile. Can you tell me a sure-fire method to unsubscribe? Your input would be much appreciated. Regards, Dennis -- I suppose you mean the vim -at- vim.org list, which is one of several lists to which I am subscribed at the address at which you reached me. The official method to unsubscribe from the Vim list is as follows: 1. Send an email to [EMAIL PROTECTED] -- the subject and contents of that email are unimportant (and may be empty) but the From: line *must* be the address-of-record under which the Vim list robot knows you (and at which you receive the list mail). 2. You will get an autoreply to the email you sent at step 1. You must read that autoreply, because it will contain instructions (and a secret code) telling you how to finalize the unsubscription. This step is necessary because it ascertains that the unsubscribe email came from you and was not a (bad) practical joke played on you. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 159. You get excited whenever discussing your hard drive.
Re: bracket completion
Hello, * On Mon, Apr 02, 2007 at 10:38:14AM -0500, shawn bright [EMAIL PROTECTED] wrote: Check out Luc Hermitte's development of Stephen Riehm's bracketing macros. http://hermitte.free.fr/vim/settings.php#settings On 4/2/07, shawn bright [EMAIL PROTECTED] wrote: this looks like exactly what i am after. i am kind of a newbie here, and cant quite get it to work right. i believe that i need a python.vim file in /ftplugin directory. Only if you want to customize the bracketing system for python. but i dont know how to word it to make this plugin work, could anyone kinda help me here, i can't make out what i should do from the docs on the website that you linked to whoa !, nevermind, found an example file on his website, tried it and works,. sorry, my own rftm mistake The doc is a little bit outdated. The plugin used to word standalone. But now there are a lot of inter-dependendies between by plugins -- I'm still in the process of refactoring everything. As a consequence, prefer the tarball archives. lh-map-tools.tar.gz should be enough -- but don't forget to define a ftplugin suited to your needs. If you want a more complete suite, check the CC++ ftplugins suite (which encapsulates/contains map-tools), which is the most complete of all [1]. There are a few other suites, which are not really maintained anymore. [2] If you have any questions feel free to ask. I've tried to write a documentation (the one in the tarball) as complete as I could, but I may have missed a few details. HTH, [1] it contains many mappings to insert control-statements (if, for, ...) in every mode. [2] http://hermitte.free.fr/vim/ressources - *.tar.gz -- Luc Hermitte http://hermitte.free.fr/vim/
Re: bracket completion
One thing that would also be great, was if you were able to tab your way out of it, ie move to the outside of the bracket, once you're done. Now you need to either press right, to move ahead (which is not quite vim-ish), or hit escape and Shift_A, to resume editing. Only possible way I can think of, is to use a snippet system, like snippetsEmu[1] or something. Any other suggestions? [1] http://www.vim.org/scripts/script.php?script_id=1318 On 4/2/07, A.J.Mechelynck [EMAIL PROTECTED] wrote: Zarko Coklin wrote: It is hard to expand on Tony's feedback, ever. Still, I found the following works a bit better. Not only that it creates a right brace but it also places a cursor on the right spot (taking into consideration indentation if you set it). :inoremap { {CR}UpCREnd :inoremap [ []Left :inoremap ( ()Left Regards, Zarko Coklin The right spot depends on your C coding style: your mapping might apply for if (condition) { statement; statement; } and void function functionname(void* p) { statement; statement; } though it might be better to place CR _after_ End in the {rhs} to avoid splitting a word in the middle. Mine is better for if (condition) { statement; statement; } and void function functionname(void* p) { statement; statement; } and can still be used for yours, by hitting Enter after the mapped { Best regards, Tony. -- Taxes are going up so fast, the government is likely to price itself out of the market. -- Panos Laganakos
Re: bracket completion
* On Tue, Apr 03, 2007 at 02:14:59AM +0300, Panos Laganakos [EMAIL PROTECTED] wrote: One thing that would also be great, was if you were able to tab your way out of it, ie move to the outside of the bracket, once you're done. Now you need to either press right, to move ahead (which is not quite vim-ish), or hit escape and Shift_A, to resume editing. Only possible way I can think of, is to use a snippet system, like snippetsEmu[1] or something. Any other suggestions? Well. You can use my bracketing system, or the fork of mu-template I'm maintaining (which relies on the bracketing system) -- see my signature. The marker/placeholder can be easily enable or disabled, cutomized for every language, ... -- Luc Hermitte http://hermitte.free.fr/vim/ressources/
Re: bracket completion
Thanks Luc, i got the main functionality working, pretty much. I only really desire the bracket matching, and so far, i am really pleased. They all work except the [] . So i think maybe there is a conflict with another plugin ( i have the snippets-Emu, supertabs, and taglist plugins also. ) The overall effect is really cool. thanks again. sk On 4/2/07, Luc Hermitte [EMAIL PROTECTED] wrote: * On Tue, Apr 03, 2007 at 02:14:59AM +0300, Panos Laganakos [EMAIL PROTECTED] wrote: One thing that would also be great, was if you were able to tab your way out of it, ie move to the outside of the bracket, once you're done. Now you need to either press right, to move ahead (which is not quite vim-ish), or hit escape and Shift_A, to resume editing. Only possible way I can think of, is to use a snippet system, like snippetsEmu[1] or something. Any other suggestions? Well. You can use my bracketing system, or the fork of mu-template I'm maintaining (which relies on the bracketing system) -- see my signature. The marker/placeholder can be easily enable or disabled, cutomized for every language, ... -- Luc Hermitte http://hermitte.free.fr/vim/ressources/
Newbee question:Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc?
Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc? After commands like syntax on,still nothing happened. below is my /etc/vim/vimrc,what else should I do to turn the syntax highlighting on? Thanks, shell. set runtimepath=~/.vim,/etc/vim,/usr/share/vim/vimfiles,/usr/share/vim/addons,/usr/share/vim/vim63,/usr/share/vim/vimfiles,/usr/share/vim/addons/after,~/.vim/after set nocompatible Use Vim defaults instead of 100% vi compatibility set backspace=indent,eol,start more powerful backspacing set autoindent always set autoindenting on set textwidth=0 Don't wrap lines by default set viminfo='20,\50 read/write a .viminfo file, don't store more than 50 lines of registers set history=50 keep 50 lines of command line history set ruler show the cursor position all the time set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc if term =~ xterm-debian || term =~ xterm-xfree86 || term =~ xterm set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif vnoremap p Esc:let current_reg = @CRgvdiC-R=current_regCREsc syntax on if has(autocmd) Enabled file type detection Use the default filetype settings. If you also want to load indent files to automatically do language-dependent indenting add 'indent' as well. filetype plugin on endif has (autocmd) augroup filetype au BufRead reportbug.* set ft=mail au BufRead reportbug-* set ft=mail augroup END try if filereadable('/etc/papersize') let s:papersize = matchstr(system('/bin/cat /etc/papersize'), '\p*') if strlen(s:papersize) let printoptions = paper: . s:papersize endif unlet! s:papersize endif catch /E145/ endtry if filereadable(/etc/vim/vimrc.local) source /etc/vim/vimrc.local endif if t_Co 2 || has(gui_running) syntax on set hlsearch endif
completion menu colors
Hi all, Is there a way to change the completion menu colors? -fREW
Re: Newbee question:Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc?
syntax on should be ok. Please use :version to confirm your vim was compiled with +syntax function and keep the corresponding syntax file in vim runtime folder. Also to check if there has any syntax off in /etc/vim/vimrc.local. wangxu wrote: Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc? After commands like syntax on,still nothing happened. below is my /etc/vim/vimrc,what else should I do to turn the syntax highlighting on? Thanks, shell. set runtimepath=~/.vim,/etc/vim,/usr/share/vim/vimfiles,/usr/share/vim/addons,/usr/share/vim/vim63,/usr/share/vim/vimfiles,/usr/share/vim/addons/after,~/.vim/after set nocompatible Use Vim defaults instead of 100% vi compatibility set backspace=indent,eol,start more powerful backspacing set autoindent always set autoindenting on set textwidth=0 Don't wrap lines by default set viminfo='20,\50 read/write a .viminfo file, don't store more than 50 lines of registers set history=50 keep 50 lines of command line history set ruler show the cursor position all the time set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc if term =~ xterm-debian || term =~ xterm-xfree86 || term =~ xterm set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif vnoremap p Esc:let current_reg = @CRgvdiC-R=current_regCREsc syntax on if has(autocmd) Enabled file type detection Use the default filetype settings. If you also want to load indent files to automatically do language-dependent indenting add 'indent' as well. filetype plugin on endif has (autocmd) augroup filetype au BufRead reportbug.* set ft=mail au BufRead reportbug-* set ft=mail augroup END try if filereadable('/etc/papersize') let s:papersize = matchstr(system('/bin/cat /etc/papersize'), '\p*') if strlen(s:papersize) let printoptions = paper: . s:papersize endif unlet! s:papersize endif catch /E145/ endtry if filereadable(/etc/vim/vimrc.local) source /etc/vim/vimrc.local endif if t_Co 2 || has(gui_running) syntax on set hlsearch endif
Re: Newbee question:Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc?
I checked with :version,it is compiled with the +syntax,and no syntax off in /etc/vim/vimrc.local or files like that. I don't know where the syntax files should be,but there are syntax files in /usr/share/vim/vim70/syntax. Below is the :version result. :version VIM - Vi IMproved 7.0 (2006 May 7, compiled Jan 31 2007 17:43:00) 包含补丁: 1-122 编译者 [EMAIL PROTECTED] 大型版本 带 GTK2 图形界面。 可使用(+)与不可使用(-)的功能: +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile -python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save 系统 vimrc 文件: $VIM/vimrc 用户 vimrc 文件: $HOME/.vimrc 用户 exrc 文件: $HOME/.exrc 系统 gvimrc 文件: $VIM/gvimrc 用户 gvimrc 文件: $HOME/.gvimrc 系统菜单文件: $VIMRUNTIME/menu.vim $VIM 预设值: /usr/share/vim Xi Juanjie wrote: syntax on should be ok. Please use :version to confirm your vim was compiled with +syntax function and keep the corresponding syntax file in vim runtime folder. Also to check if there has any syntax off in /etc/vim/vimrc.local. wangxu wrote: Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc? After commands like syntax on,still nothing happened. below is my /etc/vim/vimrc,what else should I do to turn the syntax highlighting on? Thanks, shell. set runtimepath=~/.vim,/etc/vim,/usr/share/vim/vimfiles,/usr/share/vim/addons,/usr/share/vim/vim63,/usr/share/vim/vimfiles,/usr/share/vim/addons/after,~/.vim/after set nocompatible Use Vim defaults instead of 100% vi compatibility set backspace=indent,eol,start more powerful backspacing set autoindent always set autoindenting on set textwidth=0 Don't wrap lines by default set viminfo='20,\50 read/write a .viminfo file, don't store more than 50 lines of registers set history=50 keep 50 lines of command line history set ruler show the cursor position all the time set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc if term =~ xterm-debian || term =~ xterm-xfree86 || term =~ xterm set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif vnoremap p Esc:let current_reg = @CRgvdiC-R=current_regCREsc syntax on if has(autocmd) Enabled file type detection Use the default filetype settings. If you also want to load indent files to automatically do language-dependent indenting add 'indent' as well. filetype plugin on endif has (autocmd) augroup filetype au BufRead reportbug.* set ft=mail au BufRead reportbug-* set ft=mail augroup END try if filereadable('/etc/papersize') let s:papersize = matchstr(system('/bin/cat /etc/papersize'), '\p*') if strlen(s:papersize) let printoptions = paper: . s:papersize endif unlet! s:papersize endif catch /E145/ endtry if filereadable(/etc/vim/vimrc.local) source /etc/vim/vimrc.local endif if t_Co 2 || has(gui_running) syntax on set hlsearch endif
Re: Newbee question:Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc?
Hello, Also you can use :set ft? syntax? to see which filetype has been detected, and which syntax has been activated. regards, Peter --- Xi Juanjie [EMAIL PROTECTED] wrote: syntax on should be ok. Please use :version to confirm your vim was compiled with +syntax function and keep the corresponding syntax file in vim runtime folder. Also to check if there has any syntax off in /etc/vim/vimrc.local. wangxu wrote: Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc? After commands like syntax on,still nothing happened. below is my /etc/vim/vimrc,what else should I do to turn the syntax highlighting on? Thanks, shell. set runtimepath=~/.vim,/etc/vim,/usr/share/vim/vimfiles,/usr/share/vim/addons,/usr/share/vim/vim63,/usr/share/vim/vimfiles,/usr/share/vim/addons/after,~/.vim/after set nocompatible Use Vim defaults instead of 100% vi compatibility set backspace=indent,eol,start more powerful backspacing set autoindent always set autoindenting on set textwidth=0 Don't wrap lines by default set viminfo='20,\50 read/write a .viminfo file, don't store more than 50 lines of registers set history=50 keep 50 lines of command line history set ruler show the cursor position all the time set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc if term =~ xterm-debian || term =~ xterm-xfree86 || term =~ xterm set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif vnoremap p Esc:let current_reg = @CRgvdiC-R=current_regCREsc syntax on if has(autocmd) Enabled file type detection Use the default filetype settings. If you also want to load indent files to automatically do language-dependent indenting add 'indent' as well. filetype plugin on endif has (autocmd) augroup filetype au BufRead reportbug.* set ft=mail au BufRead reportbug-* set ft=mail augroup END try if filereadable('/etc/papersize') let s:papersize = matchstr(system('/bin/cat /etc/papersize'), '\p*') if strlen(s:papersize) let printoptions = paper: . s:papersize endif unlet! s:papersize endif catch /E145/ endtry if filereadable(/etc/vim/vimrc.local) source /etc/vim/vimrc.local endif if t_Co 2 || has(gui_running) syntax on set hlsearch endif Send instant messages to your online friends http://au.messenger.yahoo.com
RE: completion menu colors
Is there a way to change the completion menu colors? See: :help hl-Pmenu :help hl-PmenuSel :help hl-Pmenu-Sbar :help hl-PmenuThumb For example: :highlight Pmenu guibg=DarkRed cheers
Re: completion menu colors
--- fREW [EMAIL PROTECTED] wrote: Hi all, Is there a way to change the completion menu colors? Change the highlighting options for the Pmenu* highlight groups: :hi Pmenu ctermfg=Cyanctermbg=Blue cterm=None guifg=Cyan guibg=DarkBlue :hi PmenuSel ctermfg=White ctermbg=Blue cterm=Bold guifg=White guibg=DarkBlue gui=Bold :hi PmenuSbar ctermbg=Cyanguibg=Cyan :hi PmenuThumb ctermfg=White guifg=White etc. The 'cterm*' settings are for colour terminal, the 'gui*' settings are for GUI. You can see all colour groups by using ':runtime syntax/hitest.vim', or in GUI Vim use the menu selection Syntax - Highlight Test. regards, Peter Send instant messages to your online friends http://au.messenger.yahoo.com
Re: completion menu colors
On 4/2/07, Peter Hodge [EMAIL PROTECTED] wrote: --- fREW [EMAIL PROTECTED] wrote: Hi all, Is there a way to change the completion menu colors? Change the highlighting options for the Pmenu* highlight groups: :hi Pmenu ctermfg=Cyanctermbg=Blue cterm=None guifg=Cyan guibg=DarkBlue :hi PmenuSel ctermfg=White ctermbg=Blue cterm=Bold guifg=White guibg=DarkBlue gui=Bold :hi PmenuSbar ctermbg=Cyanguibg=Cyan :hi PmenuThumb ctermfg=White guifg=White etc. The 'cterm*' settings are for colour terminal, the 'gui*' settings are for GUI. You can see all colour groups by using ':runtime syntax/hitest.vim', or in GUI Vim use the menu selection Syntax - Highlight Test. regards, Peter Are these things that should be set in the colorschemes, but just aren't yet because the names are new, or what? -fREW
Re: Newbee question:Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc?
You are right.my runtimepath is wrong. I updated vim to 7.0 using apt-get, but left the old vimrc unchanged. I checked the vimrc and replaced /usr/share/vim/vim63 to /usr/share/vim/vim70, It is OK now. thank you! Peter Hodge wrote: --- wangxu [EMAIL PROTECTED] wrote: the results are filetype= syntax= Why could this happen? Not sure? Do you get any results if you type :au filetypedetect * *.sh You should see something like: --- Auto-Commands --- filetypedetect BufNewFile *.sh call SetFileTypeSH(getline(1)) filetypedetect BufRead *.sh call SetFileTypeSH(getline(1)) If you don't see any commands like those above, then the syntax will not work; perhaps your 'runtimepath' is wrong? Also, check the value of 'eventignore', it might prevent the FileType detection from activating: :set eventignore? should show: eventignore= regards, Peter Peter Hodge wrote: Hello, Also you can use :set ft? syntax? to see which filetype has been detected, and which syntax has been activated. regards, Peter --- Xi Juanjie [EMAIL PROTECTED] wrote: syntax on should be ok. Please use :version to confirm your vim was compiled with +syntax function and keep the corresponding syntax file in vim runtime folder. Also to check if there has any syntax off in /etc/vim/vimrc.local. wangxu wrote: Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc? After commands like syntax on,still nothing happened. below is my /etc/vim/vimrc,what else should I do to turn the syntax highlighting on? Thanks, shell. set runtimepath=~/.vim,/etc/vim,/usr/share/vim/vimfiles,/usr/share/vim/addons,/usr/share/vim/vim63,/usr/share/vim/vimfiles,/usr/share/vim/addons/after,~/.vim/after set nocompatible Use Vim defaults instead of 100% vi compatibility set backspace=indent,eol,start more powerful backspacing set autoindent always set autoindenting on set textwidth=0 Don't wrap lines by default set viminfo='20,\50 read/write a .viminfo file, don't store more than 50 lines of registers set history=50 keep 50 lines of command line history set ruler show the cursor position all the time set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc if term =~ xterm-debian || term =~ xterm-xfree86 || term =~ xterm set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif vnoremap p Esc:let current_reg = @CRgvdiC-R=current_regCREsc syntax on if has(autocmd) Enabled file type detection Use the default filetype settings. If you also want to load indent files to automatically do language-dependent indenting add 'indent' as well. filetype plugin on endif has (autocmd) augroup filetype au BufRead reportbug.* set ft=mail au BufRead reportbug-* set ft=mail augroup END try if filereadable('/etc/papersize') let s:papersize = matchstr(system('/bin/cat /etc/papersize'), '\p*') if strlen(s:papersize) let printoptions = paper: . s:papersize endif unlet! s:papersize endif catch /E145/ endtry if filereadable(/etc/vim/vimrc.local) source /etc/vim/vimrc.local endif if t_Co 2 || has(gui_running) syntax on set hlsearch endif Send instant messages to your online friends http://au.messenger.yahoo.com Send instant messages to your online friends http://au.messenger.yahoo.com
Re: completion menu colors
fREW [EMAIL PROTECTED] 写于 2007-04-03 10:56:11: Are these things that should be set in the colorschemes, but just aren't yet because the names are new, or what? -fREW This should be set in colorscheme, however, if you're using the default colorschme it is buit-in with Vim and you cannot change the source code of colorscheme. If you are not using the default colorscheme, then you can just edit the colorscheme and set those settings. Note: a colorscheme does not have to set all the highlight settings, the settings which are not set inside a colorscheme will use the default. -- Sincerely, Pan, Shi Zhu. ext: 2606