Vim Icon
Before install the new vim, I deleted the version of vim first. In the process it deleted the vim icon. Now I have installed Vim 7.1. Where is the icon located for vim? I am using VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39) MS-Windows 32 bit GUI version with OLE support. Thanks for your help in advance. Michael Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/
css indenting
Hello everyone, How do I get vim to stop adding an indent to a line when the previous line ends with a semicolon? This happens when I am editing a CSS file. What options should I be looking at? Thank you for your time, Michael Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
indenting
How does one start debugging indent? I am trying to figure out how to change the behavior. Any help would be greatly appreciated. Michael Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
netrw
What is the latest version of netrw? I am have version v108k. I am getting an error of undefined tfile variable. Can someone help me with this? TIA Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
@=
Would someone please explain the usage of @=. I am getting confuse from the help file. [EMAIL PROTECTED] Matches the preceding atom with zero width. {not in Vi} Like (?=pattern) in Perl. Example matches ~ foo\(bar\)[EMAIL PROTECTED] foo in foobar foo\(bar\)[EMAIL PROTECTED] nothing To me, the second example matches nothing because there is no foo in between the \( and \) The first example, I am all confused. If someone can enlighten me, I would be greatful. Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather
Re: @= (thanks)
Thanks for replying. The examples you gave me has help me to understand the command. I may not every use it. Thanks for the info Michael --- Tim Chase [EMAIL PROTECTED] wrote: Would someone please explain the usage of @=. I am getting confuse from the help file. [EMAIL PROTECTED] Matches the preceding atom with zero width. {not in Vi} Like (?=pattern) in Perl. Example matches ~ foo\(bar\)[EMAIL PROTECTED] foo in foobar foo\(bar\)[EMAIL PROTECTED] nothing To me, the second example matches nothing because there is no foo in between the \( and \) The first example, I am all confused. If someone can enlighten me, I would be greatful. The pattern \(...\)[EMAIL PROTECTED] is interpreted as make sure that this matches here, but don't consume any of the characters so that things after the '=' begin at the same point as this. In the first example, as stated it matches the foo in foobar because the bar can be found after the foo, but it doesn't become part of the match. To see this as you're playing around, it's helpful to have :set hls so you can see what matches. In the second example, the regexp is asking for two disjoint things: foo followed by bar and also followed by a second foo. It might be more clear if foo wasn't used twice: /foo\(bar\)[EMAIL PROTECTED] This would match nothing as well, as it asks for foo followed immediately by bar as well as foo followed immediately by fred. For most uses, this isn't very helpful and can be more clearly expressed as /foo\zebar where the \ze means and I want the pattern to stop matching here. I can concoct crazy uses for the [EMAIL PROTECTED] where it might be useful but most of them are refactorable: /foo\([[:print:]]+\)[EMAIL PROTECTED] could become /foo[a-z]\ze[[:print:]]* One could also use it for crazy filtering: /foo\(\%(.[aeiou]\)\{5}\)[EMAIL PROTECTED] This would ensure that you have five pairs of word-characters (\w) followed by a vowel following foo, and that the 4th letter following foo is an a. The above could be written without using [EMAIL PROTECTED] as something ilke /foo\w[aeiou]\wa\w[aeiou]\w[aeiou]\w[aeiou] Readability is in the eye of the beholder. :) With 2 characters times 5 instances plus 3+1+6, they balance out to about the same. As those numbers get larger, using the [EMAIL PROTECTED] notation might prove more helpful. This allows you to do some pattern intersection (in the set-theory definition of intersection) which might allow you to shorten the pattern if you have long stretches of things. It might be helpful in DNA sequencing or something of the like, where one is hunting for certain patterns of A/C/G/T and want to ensure that a certain repeating pattern exists, and then at a certain point in that pattern a given item is more constrained. One might have an alternating sequence where you know you want something like agct followed by 75 alternating pairs /agct\(\%([at][cg]\)\{75,}\)[EMAIL PROTECTED] You can then tack on but position 28 through 30 must be 'gag' (I might be off-by-one here) /agct\(\%([at][cg]\)\{75,}\)[EMAIL PROTECTED](.\{27}gag\)[EMAIL PROTECTED] The result will only be the agct, but it will be followed by the context you need, as there might be many other instances of agct that you don't care about because they lack this context. (the genetics example chosen as I've seen a couple genetics-searching related questions on the list) As cautioned, they're fairly contrived instances, but I hope the above ramblings shed more light than they bewilder, and that using :set hls helps see what's considered when using the [EMAIL PROTECTED]. -tim Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Food fight? Enjoy some healthy debate in the Yahoo! Answers Food Drink QA. http://answers.yahoo.com/dir/?link=listsid=396545367
list
How do I get part of a line into a list? TIA Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
Re: list
--- Tim Chase [EMAIL PROTECTED] wrote: How do I get part of a line into a list? What sort of list? An actual Vim7 List datatype? Perhaps something like: let my_list = [matchstr(getline(2), 'regexp')] This is what I want. Now I need help with the regexp. I would like to use the following expression: [^]\+ but I do not want the first TIA Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather
Re: list
I should have sent an example of what I am trying to do. If I have the following text: a href=http://www.google.com;Google/a I want to put http://www.google.com into a List. --- Michael Phillips [EMAIL PROTECTED] wrote: --- Tim Chase [EMAIL PROTECTED] wrote: How do I get part of a line into a list? What sort of list? An actual Vim7 List datatype? Perhaps something like: let my_list = [matchstr(getline(2), 'regexp')] This is what I want. Now I need help with the regexp. I would like to use the following expression: [^]\+ but I do not want the first TIA Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com
save a file
How do you save a file in a vim script? I have a script that modify a file and I want to save it. After that send it to an external command. The last two lines are the important ones. Any help would be greatly appreciate it. exe normal! :%j\r while search(div class=\vpc_bcc_cell\,Wc) != 0 exe normal! d^ exe normal! /\\\/div\r exe normal! 2nf exe normal! a\r\e endwhile exe normal! /\\\/div\r exe normal! 2nf exe normal! a\r\e exe normal! :g!/^div/d\r %s#^.*window.open('\([^']\+\)'.*thumb src=\([^]\+\).*_link[^]\+\([^]\+\).*class=vpc_bcc_cell_text[^]*\([^]\+\).*$#\1br /\r\2br /\r\3br /\r\4br /\rbr /\r# %s//amp;/g exe normal! gg exe normal! Ihtmlheadtitle/title/headbody\e exe normal! Go/body/html\e exe normal! :upd exe normal! :!firefox.exe \.expand(%:p).\\r Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news
Re: your best vim scripting tip
Towards the bottom of Luc Hermitte message, the following was said: substitute(), match*(), exists(), ... But also :exe, :normal!, I-CTRL_R, :s, ... which are not functions indeed. What does the I-CTRL_R command do? TIA Michael --- Luc Hermitte [EMAIL PROTECTED] wrote: Hello, * On Sat, Dec 02, 2006 at 07:05:40PM +0100, Kim Schulz [EMAIL PROTECTED] wrote: It you should give one (or more) tips to a person who was going to start creating scripts for vim, then what would it be? Tough question. ideas could be: Do's and dont's * Do know the various kinds of scripts (plugins, ftplugins, compiler plugins, indent plugins, ...). In particular |ftplugins| can be seen as buffer-wise plugins dedicated to specific type of files. :h map-local :h b:var :h :setlocal BTW, b:did_ftplugin is not to be used by us, mere mortals. This anti-reinclusion guard must be reserved to standard ftplugins. For instance, they can't be of any help in my C++ ftplugins suite as it is made of several distinct C++ ftplugin scripts (and many other plugins, auto-plugins (VimL functions dedicated to C++ analysis (scopes, signatures, ...) , ...) * Don't assume anything about the configuration of the users of your scripts. This means that vim versions can vary, and even the way vim is compiled can make some differences as it has already been said in this thread. Moreover, sometimes people override standard keys sequences to do, well, quite odd things that have nothing to do with the standard and default behavior we can expect. This means we, plugins writers, must always prefer the nore version of :*map, :*abbr, and :normal! over :normal. Unless it can't be done otherwise. In the same kind of idea, our users may not like the default keybindings we propose for our mappings. Instead of having them patch by hand our scripts (that they may have to upgrade for a newer version someday), we have to consider using |plug|, |Leader|, and other global options (|g:var|), all three to be set from within the .vimrc. best util script I use a lot the scripts I'm maintaining (searchInRuntime, BuildToolsWrappers, my fork of mu-template, my bracketing suite). But also a few other scripts like a.vim, enhancedCommentify, CVS-menu, Matchit, swap-words, ... Lately, I've started moving a few functions to autoload plugins, which are perfect to implement VimL library plugins. often used functions substitute(), match*(), exists(), ... But also :exe, :normal!, I-CTRL_R, :s, ... which are not functions indeed. ways of optimization etc. etc.. A couple of years ago, I gave a presentation of vim configuration. The slides are available on my web site [1], they are in French and pre-date the release of vim7 which changed a few things in the way I develop my plugins. The few examples, and references to vim help topics should be understandable. SVN is my precious friend, even if I haven't moved all my scripts into subversion repositories. Having a documentation that also stats the purpose of your scripts is plus. HTH, [1] http://hermitte.free.fr/vim/ressources/vim-config.pdf -- Luc Hermitte http://hermitte.free.fr/vim/ Michael D. Phillips - A computer science enthusiast I do not hate Windows, I just like the alternatives better. Linux is my primary choice. Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com