Re: where can I download vimtips.txt
On 08/05/12 06:23, John Beckett wrote: I'm using win7. I don't think it would be very useful, but *if* you can find a text-browser for Windows, you could construct a short script based on ViewHtmlText at: http://vim.wikia.com/wiki/Preview_current_HTML_file to read a text version of a random tip from: http://vim.wikia.com/wiki/Special:Random Or, just open the above link in a browser with: :silent ! start http://vim.wikia.com/wiki/Special:Random Some better-than-average tips are here: http://vim.wikia.com/wiki/Vim_Tips_Wiki:Featured_Tip I got tired of doing all the work to produce monthly featured tips after April 2011, but browsing the above might be useful. John The Lynx text browser is available for Windows, see http://en.wikipedia.org/wiki/Lynx_(web_browser)#External_links Best regards, Tony. -- Don't cook tonight -- starve a rat today! -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
mapping for regular expression search
what's wrong with this mapping nmap script s /[a-z|_|0-9]\+(.\+[^\r\n]\+);\C CR i get the following error. E492: Not an editor command: _|0-9]\+(.\+[^\r\n]\+);\C CR -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: mapping for regular expression search
On Tue, May 8, 2012 08:45, sinbad wrote: what's wrong with this mapping nmap script s /[a-z|_|0-9]\+(.\+[^\r\n]\+);\C CR i get the following error. E492: Not an editor command: _|0-9]\+(.\+[^\r\n]\+);\C CR :h map_bar regards, Christian -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Expanding a range of characters
if buffer is empty, setline is useful. call setline('.', call('range', split('46-58', '-'))) On Tuesday, May 8, 2012 2:25:34 PM UTC+9, JohnBeckett wrote: The following might be slightly better (and this handles '@-@', but I still haven't read all the docs to see if there is anything else needed; testing needed!): function! ShowChars(spec) let result = [] for item in split(a:spec, ',') if len(item) 1 if item == '@-@' call add(result, char2nr(item)) else call extend(result, call('range', split(item, '-'))) endif else if item == '@' assume this is [A-Za-z] for [c1, c2] in [['A', 'Z'], ['a', 'z']] call extend(result, range(char2nr(c1), char2nr(c2))) endfor else call add(result, char2nr(item)) endif endif endfor return join(map(result, 'nr2char(v:val)'), ', ') endfunction John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Perform Google searches from inside Vim or on the command line, in plain text, with `goog`
Thanks for pointing this out. I will rectify. On May 7, 4:07 pm, Chris Jones cjns1...@gmail.com wrote: On Mon, May 07, 2012 at 01:45:18PM EDT, Daniel Choi wrote: I'm happy to announce my latest open source mini-project, `goog`. goog is a command line tool that lets you perform Google searches from the command line. Along with your query, you can specify the number of pages of results you want and the time range you are interested in. You can output the result in simple, colored plain text in the shell, or you can browse the results in Vim, where you are supplied with Vim key bindings to quickly open any URL in the results in a web browser. goog can also install itself as a Vim plugin, giving you the power to :Goog Google inside Vim. Link to github project and installation instructions: https://github.com/danchoi/goog I noticed the following: 1. no man page (something cmdline folks expect) or even a --help flag to provide basic usage info about the program. The help2man tool might help. 2. Maybe dependencies should be clearly stated in the install guide.. README.. web page: . nokogiri . tidy . Ruby 1.9 I was unable to test further since debian stable does not provide Ruby 1.9 by default and even after installling it, I would have had to make manual symlink adjustments. Lastly, to cover google's search engine capabilities, perhaps a language flag (any, english, german.. etc.) might be of interest to some users..? HTH CJ -- Hi! My name is bobby... -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Perform Google searches from inside Vim or on the command line, in plain text, with `goog`
OK it should work now on Ruby 1.8.7 I don't have a man page yet, but I'll work on that, and a language flag On May 7, 4:07 pm, Chris Jones cjns1...@gmail.com wrote: On Mon, May 07, 2012 at 01:45:18PM EDT, Daniel Choi wrote: I'm happy to announce my latest open source mini-project, `goog`. goog is a command line tool that lets you perform Google searches from the command line. Along with your query, you can specify the number of pages of results you want and the time range you are interested in. You can output the result in simple, colored plain text in the shell, or you can browse the results in Vim, where you are supplied with Vim key bindings to quickly open any URL in the results in a web browser. goog can also install itself as a Vim plugin, giving you the power to :Goog Google inside Vim. Link to github project and installation instructions: https://github.com/danchoi/goog I noticed the following: 1. no man page (something cmdline folks expect) or even a --help flag to provide basic usage info about the program. The help2man tool might help. 2. Maybe dependencies should be clearly stated in the install guide.. README.. web page: . nokogiri . tidy . Ruby 1.9 I was unable to test further since debian stable does not provide Ruby 1.9 by default and even after installling it, I would have had to make manual symlink adjustments. Lastly, to cover google's search engine capabilities, perhaps a language flag (any, english, german.. etc.) might be of interest to some users..? HTH CJ -- Hi! My name is bobby... -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Perform Google searches from inside Vim or on the command line, in plain text, with `goog`
On Tue, May 08, 2012 at 07:59:00AM EDT, Daniel Choi wrote: OK it should work now on Ruby 1.8.7 Great, I'll give it a shot. I don't have a man page yet, but I'll work on that, and a language flag I don't know if help2man plays well with ruby, but I've used it in python and it's a real time saver. Also, it guarantees that the man page is in sync' with the output of the --help flag. I could email you a sample (off-list) if you're interested. As to the language flag, I don't know what standard (if any) google uses or what languages they choose to (or not to) support. Seems they support Catalan but they don't support Basque for instance. They support Thai, but I didn't see Khmer in the list.. So maybe the query syntax supports some exotic languages that are not listed in google's advanced search language pull-down..? Should be easy to verify that.. I hope it doesn't add too much bloat. CJ -- WHAT YOU SAY?? -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: scrollbind problem
On Monday, May 7, 2012 5:56:30 PM UTC-5, Filip Rembiałkowski wrote: filip@srv:~$ type vimpager vimpager is /home/filip/bin/vimpager filip@srv:~$ more /home/filip/bin/vimpager #!/bin/bash what=- test quot;$@quot; amp;amp; what=quot;$@quot; ### execute Vim with this plugin ONLY exec vim -u NONE -R -S ~/.vim/plugin/less.vim -c Less $what vim -R testfile , then :Less - works OK vimpager testfile - not OK. first keystroke does not scroll upper window horizontally Using your vimscript, I was not able to reproduce the issue. It always works for me on Windows XP, Vim 7.3.514. I tried editing a file, sourcing your script, and executing :Less; and I tried with gvim -u NONE -R -S less.vim -c Less file.txt which also worked. What system/full Vim version are you using? I did use zl and zh directly, I did not use your mappings. Note the script as given has 4 incomplete mappings: B and A need a right-hand-side, and q and Q need a CR to complete the mapping. In case google groups just ate it, here's what I see: scrolling instead of moving nmap C zL nmap B nmap D zH nmap A nmap Space PageDown fast quit nmap q :qa nmap Q :qa -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: scrollbind problem
I was using Vi IMproved 7.3 (2010 Aug 15) Included patches: 1-62 on opensuse linux. Yes, the mappings were eaten but they are non-issue here, zL gives me same problem. I will follow up when I have time Thanks On Tue, May 8, 2012 at 9:43 AM, Ben Fritz fritzophre...@gmail.com wrote: On Monday, May 7, 2012 5:56:30 PM UTC-5, Filip Rembiałkowski wrote: filip@srv:~$ type vimpager vimpager is /home/filip/bin/vimpager filip@srv:~$ more /home/filip/bin/vimpager #!/bin/bash what=- test quot;$@quot; amp;amp; what=quot;$@quot; ### execute Vim with this plugin ONLY exec vim -u NONE -R -S ~/.vim/plugin/less.vim -c Less $what vim -R testfile , then :Less - works OK vimpager testfile - not OK. first keystroke does not scroll upper window horizontally Using your vimscript, I was not able to reproduce the issue. It always works for me on Windows XP, Vim 7.3.514. I tried editing a file, sourcing your script, and executing :Less; and I tried with gvim -u NONE -R -S less.vim -c Less file.txt which also worked. What system/full Vim version are you using? I did use zl and zh directly, I did not use your mappings. Note the script as given has 4 incomplete mappings: B and A need a right-hand-side, and q and Q need a CR to complete the mapping. In case google groups just ate it, here's what I see: scrolling instead of moving nmap C zL nmap B nmap D zH nmap A nmap Space PageDown fast quit nmap q :qa nmap Q :qa -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Vim Key counter
I am trying to create some vim exercises for beginner/advanced vim users like me and was hoping if I can recommend some sort of Vim key counter (or even a trustworthy third-party program) so people can compare the number of keystrokes they pressed. Is there such a program/plugin? -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim Key counter
On Tuesday, May 8, 2012 12:09:11 PM UTC-5, Eumir wrote: I am trying to create some vim exercises for beginner/advanced vim users like me and was hoping if I can recommend some sort of Vim key counter (or even a trustworthy third-party program) so people can compare the number of keystrokes they pressed. Is there such a program/plugin? It's not exactly what you're looking for, but you can launch Vim with the -w flag to record all keystrokes entered by the user. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim Key counter
On Tue, May 08, 2012 at 11:07:56AM -0700, Ben Fritz wrote: On Tuesday, May 8, 2012 12:09:11 PM UTC-5, Eumir wrote: I am trying to create some vim exercises for beginner/advanced vim users like me and was hoping if I can recommend some sort of Vim key counter (or even a trustworthy third-party program) so people can compare the number of keystrokes they pressed. Is there such a program/plugin? It's not exactly what you're looking for, but you can launch Vim with the -w flag to record all keystrokes entered by the user. This rather reminds me of http://vimgolf.com -- Erik Falor http://unnovative.net Registered Linux User #445632 http://linuxcounter.net pgpZHDp7w3dcI.pgp Description: PGP signature
Re: where can I download vimtips.txt
Am Sonntag, 6. Mai 2012 11:02:05 UTC+2 schrieb 鹏 左: I added a plugin called totd.vim which will show me a tip a day when launch vim, but I don't know where to download vimtips.txt. I went to Vim Tips Wiki but still can't find where to download it, any one knows. Many thanks! I wrote a small ruby script that converts a wikia xml dump, which can be downloaded from http://wikistats.wikia.com/v/vi/vim/pages_current.xml.gz, to vim help format: https://github.com/tomtom/vimtips2help.rb Maybe that's of some help for you. Regards -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim Key counter
On 05/08/12 13:17, Erik Falor wrote: On Tue, May 08, 2012 at 11:07:56AM -0700, Ben Fritz wrote: On Tuesday, May 8, 2012 12:09:11 PM UTC-5, Eumir wrote: I am trying to create some vim exercises for beginner/advanced vim users like me and was hoping if I can recommend some sort of Vim key counter (or even a trustworthy third-party program) so people can compare the number of keystrokes they pressed. Is there such a program/plugin? It's not exactly what you're looking for, but you can launch Vim with the -w flag to record all keystrokes entered by the user. This rather reminds me of http://vimgolf.com ...which used the -w flag behind the scenes to track the number of keystrokes. -tim (@gumnos on vimgolf) -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Highlighting block of text
Tim, I finally got to the point in my project where I could tryout your code. In one sense your code was similar to some of my attempts at using the match/highlight capability but I 1) did not order the column/line correctly and, more importantly, 2) I did not have a trailing '.' in the match patterns. If one is willing to create highlight groups on the fly, then one can programatically highlight arbitrary blocks of code ... W5! function! XXX(name, c1, c2, l1, l2) exec highlight! . a:name . ctermbg=green guibg=green exec sil! match . a:name. ' /\%' .a:c1. 'c\%' .a:c2. 'c\%' .a:l1. 'l\%' .a:l2. 'l./' endfunction map Leaderh :call XXX(Foo33,8,21,5,14)CR Thanks. Richard Emberson ps: 5W == Which Was What We Wanted On 05/06/2012 05:12 PM, Tim Chase wrote: On 05/06/12 16:14, Richard wrote: I'd like to highlight an arbitrary block of text even when normal syntax-base highlighting is in effect. Now, one can highlight a block of height 1 using matching: :hi Green ctermbg=Green :match Green /\%10l\%30c.*\%40c\%10l/ :match none But what I'd like to do is for a block with height greater than 1; something like what can be done with Cntl-V visual block selection but without using visual selection. I've search the net without finding a solution. Is it possible? I'm not sure if this does what you want, but I threw it together in the hopes that it was close. Just visually highlight the range (linewise, characterwise, or blockwise) that you want to highlight and pressf4. Adjust the Error at the bottom for whatever highlighting group you want (in the case of your example, Green) -tim function! Hi(scheme) let l:mode=visualmode() let [_, lnum1, col1, _]=getpos(') let [_, lnum2, col2, _]=getpos(') if l:mode == 'v' if lnum1==lnum2 let range='\%'.lnum1.'l\%'.(col1-1).'c.*\%'.(col2+1).'c' else let range=join([ \'\%'.lnum1.'l\%'.(col1-1).'c.*', \'.*\%'.lnum2.'l\%'.(col2+1).'c', \'\%'.lnum1.'l\%'.lnum2.'l', \], '\|') endif else let left=min([col1, col2]) let right=max([col1, col2]) let top=min([lnum1, lnum2]) let bottom=max([lnum1, lnum2]) if l:mode == 'V' let range= \'\%'.(top-1).'l'. \'\%'.(bottom+1).'l'. \'.' else visual block let range= \'\%'.(left-1).'c'. \'\%'.(right+1).'c'. \'\%'.(top-1).'l'. \'\%'.(bottom+1).'l'. \'.' endif endif exec printf('sil! match %s /%s/', a:scheme, range) endfunction vnoremapf4 :c-ucall Hi(Error)cr nnoremapf4 :match NONEcr -- Quis custodiet ipsos custodes -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Highlighting block of text
On 8 May 2012, at 23:08, Richard wrote: Well, I spoke too soon. What I wanted was to highlight multiple block with different colors *at the same time* Seems that match only works on a single pattern at a time. Richard You could try generating a random name for each block? or base it off the line/column pairs? Regards, Andy On May 8, 3:01 pm, richard emberson richard.ember...@gmail.com wrote: Tim, I finally got to the point in my project where I could tryout your code. In one sense your code was similar to some of my attempts at using the match/highlight capability but I 1) did not order the column/line correctly and, more importantly, 2) I did not have a trailing '.' in the match patterns. If one is willing to create highlight groups on the fly, then one can programatically highlight arbitrary blocks of code ... W5! function! XXX(name, c1, c2, l1, l2) exec highlight! . a:name . ctermbg=green guibg=green exec sil! match . a:name. ' /\%' .a:c1. 'c\%' .a:c2. 'c\%' .a:l1. 'l\%' .a:l2. 'l./' endfunction map Leaderh :call XXX(Foo33,8,21,5,14)CR Thanks. Richard Emberson ps: 5W == Which Was What We Wanted On 05/06/2012 05:12 PM, Tim Chase wrote: On 05/06/12 16:14, Richard wrote: I'd like to highlight an arbitrary block of text even when normal syntax-base highlighting is in effect. Now, one can highlight a block of height 1 using matching: :hi Green ctermbg=Green :match Green /\%10l\%30c.*\%40c\%10l/ :match none But what I'd like to do is for a block with height greater than 1; something like what can be done with Cntl-V visual block selection but without using visual selection. I've search the net without finding a solution. Is it possible? I'm not sure if this does what you want, but I threw it together in the hopes that it was close. Just visually highlight the range (linewise, characterwise, or blockwise) that you want to highlight and pressf4. Adjust the Error at the bottom for whatever highlighting group you want (in the case of your example, Green) -tim function! Hi(scheme) let l:mode=visualmode() let [_, lnum1, col1, _]=getpos(') let [_, lnum2, col2, _]=getpos(') if l:mode == 'v' if lnum1==lnum2 let range='\%'.lnum1.'l\%'.(col1-1).'c.*\%'.(col2+1).'c' else let range=join([ \'\%'.lnum1.'l\%'.(col1-1).'c.*', \'.*\%'.lnum2.'l\%'.(col2+1).'c', \'\%'.lnum1.'l\%'.lnum2.'l', \], '\|') endif else let left=min([col1, col2]) let right=max([col1, col2]) let top=min([lnum1, lnum2]) let bottom=max([lnum1, lnum2]) if l:mode == 'V' let range= \'\%'.(top-1).'l'. \'\%'.(bottom+1).'l'. \'.' else visual block let range= \'\%'.(left-1).'c'. \'\%'.(right+1).'c'. \'\%'.(top-1).'l'. \'\%'.(bottom+1).'l'. \'.' endif endif exec printf('sil! match %s /%s/', a:scheme, range) endfunction vnoremapf4 :c-ucall Hi(Error)cr nnoremapf4 :match NONEcr -- Quis custodiet ipsos custodes -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php -- Andrew Long andrew dot long at mac dot com -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Highlighting block of text
Andy, Have you tried your suggestion? If it works, could you share your code? Richard On 05/08/2012 03:10 PM, Andrew Long wrote: On 8 May 2012, at 23:08, Richard wrote: Well, I spoke too soon. What I wanted was to highlight multiple block with different colors *at the same time* Seems that match only works on a single pattern at a time. Richard You could try generating a random name for each block? or base it off the line/column pairs? Regards, Andy On May 8, 3:01 pm, richard embersonrichard.ember...@gmail.com wrote: Tim, I finally got to the point in my project where I could tryout your code. In one sense your code was similar to some of my attempts at using the match/highlight capability but I 1) did not order the column/line correctly and, more importantly, 2) I did not have a trailing '.' in the match patterns. If one is willing to create highlight groups on the fly, then one can programatically highlight arbitrary blocks of code ... W5! function! XXX(name, c1, c2, l1, l2) exec highlight! . a:name . ctermbg=green guibg=green exec sil! match . a:name. ' /\%' .a:c1. 'c\%' .a:c2. 'c\%' .a:l1. 'l\%' .a:l2. 'l./' endfunction mapLeaderh :call XXX(Foo33,8,21,5,14)CR Thanks. Richard Emberson ps: 5W == Which Was What We Wanted On 05/06/2012 05:12 PM, Tim Chase wrote: On 05/06/12 16:14, Richard wrote: I'd like to highlight an arbitrary block of text even when normal syntax-base highlighting is in effect. Now, one can highlight a block of height 1 using matching: :hi Green ctermbg=Green :match Green /\%10l\%30c.*\%40c\%10l/ :match none But what I'd like to do is for a block with height greater than 1; something like what can be done with Cntl-V visual block selection but without using visual selection. I've search the net without finding a solution. Is it possible? I'm not sure if this does what you want, but I threw it together in the hopes that it was close. Just visually highlight the range (linewise, characterwise, or blockwise) that you want to highlight and pressf4. Adjust the Error at the bottom for whatever highlighting group you want (in the case of your example, Green) -tim function! Hi(scheme) let l:mode=visualmode() let [_, lnum1, col1, _]=getpos(') let [_, lnum2, col2, _]=getpos(') if l:mode == 'v' if lnum1==lnum2 let range='\%'.lnum1.'l\%'.(col1-1).'c.*\%'.(col2+1).'c' else let range=join([ \'\%'.lnum1.'l\%'.(col1-1).'c.*', \'.*\%'.lnum2.'l\%'.(col2+1).'c', \'\%'.lnum1.'l\%'.lnum2.'l', \], '\|') endif else let left=min([col1, col2]) let right=max([col1, col2]) let top=min([lnum1, lnum2]) let bottom=max([lnum1, lnum2]) if l:mode == 'V' let range= \'\%'.(top-1).'l'. \'\%'.(bottom+1).'l'. \'.' else visual block let range= \'\%'.(left-1).'c'. \'\%'.(right+1).'c'. \'\%'.(top-1).'l'. \'\%'.(bottom+1).'l'. \'.' endif endif exec printf('sil! match %s /%s/', a:scheme, range) endfunction vnoremapf4 :c-ucall Hi(Error)cr nnoremapf4 :match NONEcr -- Quis custodiet ipsos custodes -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php -- Quis custodiet ipsos custodes -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Highlighting block of text
On 2012-05-08, Richard wrote: Well, I spoke too soon. What I wanted was to highlight multiple block with different colors *at the same time* Seems that match only works on a single pattern at a time. Use matchadd() instead. Regards, Gary -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
How do I tell VIMN to :set number whenever I view a help topic?
How can I tell VIM that I want it to display line numbering whenever I view a help topic? Of course set number (without the quotation marks) in my .vimrc file tells Vim I want line numbering on by default in my editing windows. But I also want to tell Vim to display line numbers in help topics I access via :help [topic]. As it stands, I need to type set number after Vim displays the help information to display line numbering. And with a help window open, if I use any of the navigation features to move to another topic, Vim turns off the line numbers. Cheers thanks, Ric SFO -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
How do I tell Vim I want line numbering when I view Help topics?
How can I tell VIM that I want it to display line numbering whenever I view a help topic? Of course set number (without the quotation marks) in my .vimrc file tells Vim I want line numbering on by default in my editing windows. So far, so good. But I also want to tell Vim to display line numbers in help topics I access via :help [topic]. As it stands, to display line numbering in Help I need to type set number after Vim displays the help information. And if I've done that, and then use any of the navigation features to move to another Help topic, Vim turns off the line numbers. Cheers thanks, Ric SFO -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Highlighting block of text
On 05/08/12 17:45, Gary Johnson wrote: On 2012-05-08, Richard wrote: Well, I spoke too soon. What I wanted was to highlight multiple block with different colors *at the same time* Seems that match only works on a single pattern at a time. Use matchadd() instead. Hopefully made easier by the code I gave which builds up a regexp string that is then simply evaluated, which could instead just be passed to matchadd() with some appropriate highlighting-group designation. -tim -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: How do I tell Vim I want line numbering when I view Help topics?
Hi, you could use set number in .vim/ftplugin/help.vim regards, Thomas On Tue, May 08, 2012 at 15:58:34 -0700, sfosparky wrote: How can I tell VIM that I want it to display line numbering whenever I view a help topic? Of course set number (without the quotation marks) in my .vimrc file tells Vim I want line numbering on by default in my editing windows. So far, so good. But I also want to tell Vim to display line numbers in help topics I access via :help [topic]. As it stands, to display line numbering in Help I need to type set number after Vim displays the help information. And if I've done that, and then use any of the navigation features to move to another Help topic, Vim turns off the line numbers. Cheers thanks, Ric SFO -- Zombie processes haunting the computer -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Does set guitablabel require scripting? (Virtually all examples seem to imply that it does…)
I've been trying to figure out how to change how Vim labels tabs. Everywhere I turn for information contains Vim script examples. This has led me to believe that set guitablabel can only be used via scripts(?) At present, Vim labels tabs with a file name prefaced with a path code of the form \P\M\M\F\R\F\R\T, where each character is the first character of a folder name on the path. Ugh! In an effort to get rid of the path info, I tried using (without the quotation marks) :set guitabel=%t This has no effect. So I went out looking for more help. But everywhere I've gone, set guitablabel is used within a script. Is scripting really necessary? Or is my problem that I'm formatting the : set guitablabel command improperly? Or? Cheers thanks, Rick SFO -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: How do I tell Vim I want line numbering when I view Help topics?
Thomas: Thanks! I just needed to know where to go. Cheers thanks 'gain, Rick SFO On Tuesday, May 8, 2012 4:26:17 PM UTC-7, Thomas Ba wrote: Hi, you could use set number in .vim/ftplugin/help.vim regards, Thomas On Tue, May 08, 2012 at 15:58:34 -0700, sfosparky wrote: How can I tell VIM that I want it to display line numbering whenever I view a help topic? Of course set number (without the quotation marks) in my .vimrc file tells Vim I want line numbering on by default in my editing windows. So far, so good. But I also want to tell Vim to display line numbers in help topics I access via :help [topic]. As it stands, to display line numbering in Help I need to type set number after Vim displays the help information. And if I've done that, and then use any of the navigation features to move to another Help topic, Vim turns off the line numbers. Cheers thanks, Ric SFO -- Zombie processes haunting the computer -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Highlighting block of text
Success :exec highlight! Foo33 ctermbg=green guibg=green :call matchadd(Foo33, '\%8c\%21c\%5l\%14l.') :call matchadd(Foo33, '\%2c\%11c\%3l\%6l.') :exec highlight! Foo34 ctermbg=white guibg=white :call matchadd(Foo34, '\%18c\%31c\%5l\%14l.') :call matchadd(Foo34, '\%12c\%21c\%3l\%6l.') :call clearmatches() Tim, note that the leading and trailing '/' (patterns generated by your example code) should not be included. So, folks should modify your Hi function to remove them if they wish to use matchadd(). Thanks all. Richard On 05/08/2012 04:14 PM, Tim Chase wrote: On 05/08/12 17:45, Gary Johnson wrote: On 2012-05-08, Richard wrote: Well, I spoke too soon. What I wanted was to highlight multiple block with different colors *at the same time* Seems that match only works on a single pattern at a time. Use matchadd() instead. Hopefully made easier by the code I gave which builds up a regexp string that is then simply evaluated, which could instead just be passed to matchadd() with some appropriate highlighting-group designation. -tim -- Quis custodiet ipsos custodes -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
RE: How do I tell VIMN to :set number whenever I view a help topic?
sfosparky wrote: How can I tell VIM that I want it to display line numbering whenever I view a help topic? Create the following file, and any missing subdirectories. The file is ~/.vim/after/ftplugin/help.vim (Unix) $HOME\vimfiles\after\ftplugin\help.vim (Windows) ---start--- setlocal number ---end--- John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php