Re: unable to map ctrl-1

2009-03-31 Thread MisterW
On Apr 1, 3:14 pm, "John Beckett" wrote: > MisterW wrote: > > Why then does vim.exe running in a cmd window allow me to map > > when gvim won't? > > George Reilly has just explained that Ctrl-6, Ctrl-2, Ctrl-- are > special-cased in Windows (which I didn't know). Perhaps there is > also some spe

RE: unable to map ctrl-1

2009-03-31 Thread John Beckett
George V. Reilly wrote: > If you look at process_message() in gui_w48.c (Windows Gvim) > and decode_key_event() in os_win32.c (Win32 console Vim), > you'll find some special-case handling: > /* Ctrl-6 is Ctrl-^ */ > /* Ctrl-2 is Ctrl-@ */ > /* Ctrl-- is Ctrl-_ */ > > I added the remapp

RE: unable to map ctrl-1

2009-03-31 Thread John Beckett
MisterW wrote: > Why then does vim.exe running in a cmd window allow me to map > when gvim won't? George Reilly has just explained that Ctrl-6, Ctrl-2, Ctrl-- are special-cased in Windows (which I didn't know). Perhaps there is also some special casing for Ctrl-1 ... sorry, I don't know. >> I k

Re: unable to map ctrl-1

2009-03-31 Thread MisterW
> No. The problem is that Vim is designed to be portable; it works > on many operating systems and tries to minimise the amount of > special code used for dealing with a particular OS. Why then does vim.exe running in a cmd window allow me to map when gvim won't? > I know this news is a bit sho

Re: unable to map ctrl-1

2009-03-31 Thread George V. Reilly
On Tue, Mar 31, 2009 at 7:52 PM, John Beckett wrote: > > MisterW wrote: > > Gvim 72 on XP won't let me map certain ctrl key combinations. > > Specifically it won't map any of CTRL 1 through to 10. If I > > type > > > > CTRL-V CTRL-1 > > > > I get nothing. Only 2 and 6 actually print anything. Oth

RE: unable to map ctrl-1

2009-03-31 Thread John Beckett
MisterW wrote: > Gvim 72 on XP won't let me map certain ctrl key combinations. > Specifically it won't map any of CTRL 1 through to 10. If I > type > > CTRL-V CTRL-1 > > I get nothing. Only 2 and 6 actually print anything. Other > applications make use of these keys, and vim itself uses > CTRL-6.

unable to map ctrl-1

2009-03-31 Thread MisterW
Gvim 72 on XP won't let me map certain ctrl key combinations. Specifically it won't map any of CTRL 1 through to 10. If I type CTRL-V CTRL-1 I get nothing. Only 2 and 6 actually print anything. Other applications make use of these keys, and vim itself uses CTRL-6. Is there something that can be

Re: Set the buffer name of a scratch buffer

2009-03-31 Thread Ben Fritz
> === > This email, including any attachments, is only for the intended > addressee.  It is subject to copyright, is confidential and may be > the subject of legal or other privilege, none of which is waived or > lost by reason of

Re: The list policy, AGAIN

2009-03-31 Thread Tony Mechelynck
On 31/03/09 18:43, Ben Fritz wrote: > > > > On Mar 31, 6:52 am, Tony Mechelynck > wrote: >> >> I believe it wouldn't have been such a flood if you hadn't been so >> adamant in defending top-posting as the only valid format, and later as >> the only one available to you, because your (IMHO braindea

Re: Hybrid Syntax File?

2009-03-31 Thread Rich Healey
On Apr 1, 3:49 am, Ben Fritz wrote: > On Mar 30, 11:17 pm, Rich Healey wrote: > > > > > I’m writing trigger functions for my postgreSQL database using > > plPython, what this means is that I want vim to highlight everything > > up until a line with just > > > $BODY$ > > > As SQL, then it shoul

Re: Set the buffer name of a scratch buffer

2009-03-31 Thread guwegezo
On Apr 1, 12:07 pm, Tim Chase wrote: > > I have created a couple of scratch buffers: > > >     :setlocal buftype=nofile > >     :setlocal bufhidden=hide > > > They appear in the buffer list as: > > >     :ls > >     1 %a   "[Scratch]"                    line 1 > >     5 %a   "[Scratch]"          

Re: Set the buffer name of a scratch buffer

2009-03-31 Thread Tim Chase
> I have created a couple of scratch buffers: > > :setlocal buftype=nofile > :setlocal bufhidden=hide > > They appear in the buffer list as: > > :ls > 1 %a "[Scratch]"line 1 > 5 %a "[Scratch]"line 1 > > Is there any way of setting

Set the buffer name of a scratch buffer

2009-03-31 Thread Douglas Royds
I have created a couple of scratch buffers: :setlocal buftype=nofile :setlocal bufhidden=hide They appear in the buffer list as: :ls 1 %a "[Scratch]"line 1 5 %a "[Scratch]"line 1 Is there any way of setting the name of a scratch b

RE: selecting a URL

2009-03-31 Thread Gene Kwiecinski
>>Not to sound flip about it, but there's only so much you can do to guard >>against retardery.  If someone *insists* on including, bad enough >>spaces, but *punctuation* into filenames and complete urls, then *he's* >>the one with the problem.  Garbage in, garbage out.  If the link gets >>screwed

Re: selecting a URL

2009-03-31 Thread Dotan Cohen
> Not to sound flip about it, but there's only so much you can do to guard > against retardery.  If someone *insists* on including, bad enough > spaces, but *punctuation* into filenames and complete urls, then *he's* > the one with the problem.  Garbage in, garbage out.  If the link gets > screwed

Re: selecting a URL

2009-03-31 Thread Paul
>There was an article on Codding Horror not long ago discussing this. >What do you do if a URL ends in an end-parenthesis? It could be part >of the url or not! Wikipedia is especially bad about this. Thanks, that article's an interesting read (I found it here: http://www.codinghorror.com/blog/arc

Re: buffer or tab list in quick fix or location list?

2009-03-31 Thread _sc_
On Tuesday 31 March 2009 1:38 pm, Brian Dunn wrote: > > hi list. > is there a way to get a quick fix type window with links to all of my > tabs or buffers? > run :ls to list the buffers, > remembering the number, > run :b with the number, > just seems like too many steps. the easiest, leanest me

RE: selecting a URL

2009-03-31 Thread Gene Kwiecinski
>>Yeah, that would be very nice. I'm manually editing plain text into >>HTML, and dealing with hundreds of unquoted URLs set into sentences >>and terminated with periods, commas, dashes, unmatched closing parens, >>and worse. >There was an article on Codding Horror not long ago discussing this. >

Re: selecting a URL

2009-03-31 Thread Dotan Cohen
> Yeah, that would be very nice. I'm manually editing plain text into > HTML, and dealing with hundreds of unquoted URLs set into sentences > and terminated with periods, commas, dashes, unmatched closing parens, > and worse. > There was an article on Codding Horror not long ago discussing this.

Re: selecting a URL

2009-03-31 Thread Paul
> If you're really determined to do this, you could make your own text > object to do it Aha, I'll look into that, probably borrowing your code, Luc. Thanks both! > In my experience, 99 times out of 100, URLs will either stand alone > (in which case you could use diW) or be quoted (so you could

Re: Using GetLatestVimScript Problems.

2009-03-31 Thread Edward Beach
On Mar 31, 1:33 pm, Charles Campbell wrote: > Edward Beach wrote: > > > Actually I think I spoke too soon... I didn't notice before because > > the error message gets cleared from view but when I disable shellslash > > I get the follow errors on the AutoInstall... > > > considering <"AutoInstall

buffer or tab list in quick fix or location list?

2009-03-31 Thread Brian Dunn
hi list. is there a way to get a quick fix type window with links to all of my tabs or buffers? run :ls to list the buffers, remembering the number, run :b with the number, just seems like too many steps. i'm vim spoiled. : ) --~--~-~--~~~---~--~~ You received t

Re: buffer or tab list in quick fix or location list?

2009-03-31 Thread Brian Dunn
oops! sorry. On Mar 31, 2009, at 11:25 AM, Ben Fritz wrote: > > If you have a new question, create a new message (do not reply to a > message with a new question because all replies are kept in one > thread). > > See our list guidelines at > http://groups.google.com/group/vim_use/web/vim-informa

Re: The list policy, AGAIN

2009-03-31 Thread Tim Chase
> start each email with a statement like "I'm sorry for top-posting, I > know this is not usual list procedure, but I can't configure my XXX > device to bottom post" and a later responder can trim as needed. Heh, does "XXX" stand for profanity, or a make/model of device? ;-) I too am more lenien

Re: Using GetLatestVimScript Problems.

2009-03-31 Thread Charles Campbell
Edward Beach wrote: > > Actually I think I spoke too soon... I didn't notice before because > the error message gets cleared from view but when I disable shellslash > I get the follow errors on the AutoInstall... > > considering <"AutoInstall: Decho.vim> scriptid=120 srcid=1 > ...download new > l

Re: selecting a URL

2009-03-31 Thread Matt Wozniski
On Tue, Mar 31, 2009 at 12:23 PM, Paul wrote: > > How would I go about making it easy for myself to select a string > matching a complex regex, such as a URL? Ideally I'd like to be able > to put my cursor into the middle of a line like > > http://vim.wikia.com/wiki/Special:Search? > search=commen

Re: selecting a URL

2009-03-31 Thread Luc Hermitte
Hello, "Paul" wrote: > How would I go about making it easy for myself to select a string > matching a complex regex, such as a URL? Ideally I'd like to be able > to put my cursor into the middle of a line like > > http://vim.wikia.com/wiki/Special:Search? > search=comments&go=1>search > > and

Re: The list policy, AGAIN

2009-03-31 Thread Agathoklis D. Hatzimanikas
Hi Derek, On Tue, Mar 31, at 02:28 de...@derekwyatt.org wrote: > This topic has been more heavily posted on than anything else by far; I agree. > it's weaved its way into other topics as well and it has zip to do with Vim > (posting off topic being far worse than the format of the message IMH

Re: Using GetLatestVimScript Problems.

2009-03-31 Thread Edward Beach
On Mar 31, 11:14 am, Charles Campbell wrote: > Edward Beach wrote: > > O > > Thanks for the reply Chip, > > > You're right.  My problem is that I have shellslash enabled on a win32 > > build. Unfortunately setting the shellquote to " doesn't seem to > > help.  Shellescape ignores the " and uses t

Re: Hybrid Syntax File?

2009-03-31 Thread Ben Fritz
On Mar 30, 11:17 pm, Rich Healey wrote: > I’m writing trigger functions for my postgreSQL database using > plPython, what this means is that I want vim to highlight everything > up until a line with just > > $BODY$ > > As SQL, then it should highlight everything until the next $BODY$ line > as

Re: The list policy, AGAIN

2009-03-31 Thread Ben Fritz
On Mar 31, 6:52 am, Tony Mechelynck wrote: > > I believe it wouldn't have been such a flood if you hadn't been so > adamant in defending top-posting as the only valid format, and later as > the only one available to you, because your (IMHO braindead) device > wastes everyone's bandwidth for the

Re: Regex substitute only outside "strings"

2009-03-31 Thread ivan budiselic
On Tue, Mar 31, 2009 at 4:40 PM, A. S. Budden wrote: > > 2009/3/31 ivan budiselic : > > On Tue, Mar 31, 2009 at 10:13 AM, Andreas Bernauer > > wrote: > >> > >> ivan budiselic wrote: > >> >>> So, for the line: > >> >>> > >> >>> 1234 a a "a" a > >> >>> > >> >>> I'd like to get: > >> >>> > >> >>> 1

Re: buffer or tab list in quick fix or location list?

2009-03-31 Thread Ben Fritz
If you have a new question, create a new message (do not reply to a message with a new question because all replies are kept in one thread). See our list guidelines at http://groups.google.com/group/vim_use/web/vim-information --~--~-~--~~~---~--~~ You received th

selecting a URL

2009-03-31 Thread Paul
How would I go about making it easy for myself to select a string matching a complex regex, such as a URL? Ideally I'd like to be able to put my cursor into the middle of a line like http://vim.wikia.com/wiki/Special:Search? search=comments&go=1>search and type "diu" and have Vim delete just the

Re: setting vim tabline

2009-03-31 Thread Erik Falor
On Tue, Mar 31, 2009 at 02:28:12PM +0300, Nicolas Aggelidis wrote: > hi to all the list! a fellow vimmer (from the list) has posted the > following tabline for gvim [i don't recall if it was exactly the > same]: > [code snipped...] > > this function ,works great for gvim, but when i try to us

Re: Using GetLatestVimScript Problems.

2009-03-31 Thread Charles Campbell
Edward Beach wrote: > O > Thanks for the reply Chip, > > You're right. My problem is that I have shellslash enabled on a win32 > build. Unfortunately setting the shellquote to " doesn't seem to > help. Shellescape ignores the " and uses the ' regardless; it's only > when I disable shellslash tha

Re: Regex substitute only outside "strings"

2009-03-31 Thread A. S. Budden
2009/3/31 ivan budiselic : > On Tue, Mar 31, 2009 at 10:13 AM, Andreas Bernauer > wrote: >> >> ivan budiselic wrote: >> >>> So, for the line: >> >>> >> >>> 1234 a a "a" a >> >>> >> >>> I'd like to get: >> >>> >> >>> 1234 b b "a" b >> >>> >> >>> The question is, is this possible and how. >> >>> >>

Re: Using GetLatestVimScript Problems.

2009-03-31 Thread Edward Beach
On Mar 31, 9:58 am, Charles Campbell wrote: > Edward Beach wrote: > > Thanks for the reply, Chip. > > > * I can execute :!dir and even :!wget and :execute "silent r!wget" but > > I fail at executing :execute silent r!dir > > > * Version dump: > > VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug  9

buffer or tab list in quick fix or location list?

2009-03-31 Thread Brian Dunn
hi list. is there a way to get a quick fix type window with links to all of my tabs or buffers? run :ls to list the buffers, remembering the number, run :b with the number, just seems like too many steps. i'm vim spoiled. : ) --~--~-~--~~~---~--~~ You recei

Re: Using GetLatestVimScript Problems.

2009-03-31 Thread Charles Campbell
Edward Beach wrote: > Thanks for the reply, Chip. > > * I can execute :!dir and even :!wget and :execute "silent r!wget" but > I fail at executing :execute silent r!dir > > * Version dump: > VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug 9 2008 18:46:22) > > [snip] OK, 7.2 is good (although

Re: How to redraw the whole vim screen after splitting new windows?

2009-03-31 Thread Charles Campbell
Clark J. Wang wrote: > The following steps can reproduce the issue for vim 7.2.69: > > vim -u NONE -N > :set laststatus=2 > :set statusline=%{winnr()} > :vsplit > :split > > I tested with an old vim-6.3.30 on Fedora 3 but it worked fine so > different versions of vim behave differently. > Hello

Re: How to customize comment style?

2009-03-31 Thread Abhishek Gupta
Hi, > >> while the defalt comment style is >> >> /* >> * >> * >> */ >> >> > To remove this comment style use: > autocmd FileType c,cpp set comments-=s1:/*,mb:**,ex:*/ > > Sorry .. this should be: autocmd FileType c,cpp set comments-=s1:/*,mb:*,ex:*/ Forgot to remove the extra * from middle po

Re: The list policy, AGAIN

2009-03-31 Thread Tony Mechelynck
On 31/03/09 14:08, Ivan Van Laningham wrote: > > On Tue, Mar 31, 2009 at 5:52 AM, Tony Mechelynck > mailto:antoine.mechely...@gmail.com>> wrote: > > > On 31/03/09 11:28, de...@derekwyatt.org > wrote: > [...] > > I think this is my cue to leave :) >

Re: How to customize comment style?

2009-03-31 Thread Abhishek Gupta
Hi Loudking, You can check your existing comment styles by :set comments > My manager prefers comments in C files in this style > > /* > ** > ** > */ > To add this comment style for c,cpp: autocmd FileType c,cpp set comments+=s:/*,mb:**,ex:*/ > while the defalt comment style is > > /* > * >

Re: How to redraw the whole vim screen after splitting new windows?

2009-03-31 Thread John Little
> The following steps can reproduce the issue for vim 7.2.69: > > vim -u NONE -N > :set laststatus=2 > :set statusline=%{winnr()} > :vsplit > :split I see this (two windows with status line set to "2") with 7.2.141 and 7.1.314. I noticed that to see the problem, the :split has to be in window 1.

Re: The list policy, AGAIN

2009-03-31 Thread Ivan Van Laningham
On Tue, Mar 31, 2009 at 5:52 AM, Tony Mechelynck < antoine.mechely...@gmail.com> wrote: > > On 31/03/09 11:28, de...@derekwyatt.org wrote: > [...] > > I think this is my cue to leave :) > > > > This topic has been more heavily posted on than anything else by far; > it's > > weaved its way into oth

Re: The list policy, AGAIN

2009-03-31 Thread Tony Mechelynck
On 31/03/09 11:28, de...@derekwyatt.org wrote: [...] > I think this is my cue to leave :) > > This topic has been more heavily posted on than anything else by far; it's > weaved its way into other topics as well and it has zip to do with Vim > (posting off topic being far worse than the format of

Updating status line of inactive windows

2009-03-31 Thread François Ingelrest
Hi all, In my status line, I display the number of lines in the corresponding buffer. If I split the window, so that I have the same buffer into two visible windows, only the status line of the active window is updated. For instance, if I add some new lines to the buffer, the number of lines in t

setting vim tabline

2009-03-31 Thread Nicolas Aggelidis
hi to all the list! a fellow vimmer (from the list) has posted the following tabline for gvim [i don't recall if it was exactly the same]: function! VimTabLabel() let label = '' let bufnrlist = tabpagebuflist(v:lnum) " Add '+' if one of the buffers in the tab page is modified for bufnr in bu

Re: How to redraw the whole vim screen after splitting new windows?

2009-03-31 Thread Clark J. Wang
On Mar 30, 10:38 pm, Charles Campbell wrote: > Clark J. Wang wrote: > > On Mar 27, 7:16 pm, "Clark J. Wang" wrote: > > >> I included %{winnr()} in the var `statusline'. But sometimes when I > >> splitted new windows the winnr() string on screen was not updated > >> (try :vsplit and then :split).

Re: How to define a function with optional arguments?

2009-03-31 Thread Clark J. Wang
On Mar 31, 6:14 pm, Tim Chase wrote: > > Some built-in vim functions support optional arguments. For example, > > we can write winnr() as well as winnr('$'). Can I define my own > > functions with optional arguments? I found no hints in vim's online > > help. > > The relevant help is at > >    :h

RE: [vim script] How to define a function with optional arguments?

2009-03-31 Thread John Beckett
Clark J. Wang wrote: > Some built-in vim functions support optional arguments. > For example, we can write winnr() as well as winnr('$'). > Can I define my own functions with optional arguments? Yes. When desperate, try something like this to search Help: :helpgrep \coptional.*arg That does a

Re: [vim script] How to define a function with optional arguments?

2009-03-31 Thread Tim Chase
> Some built-in vim functions support optional arguments. For example, > we can write winnr() as well as winnr('$'). Can I define my own > functions with optional arguments? I found no hints in vim's online > help. The relevant help is at :help a:0 (it's another of those "it's easy to find i

[vim script] How to define a function with optional arguments?

2009-03-31 Thread Clark J. Wang
Some built-in vim functions support optional arguments. For example, we can write winnr() as well as winnr('$'). Can I define my own functions with optional arguments? I found no hints in vim's online help. --~--~-~--~~~---~--~~ You received this message from the "v

Re: Regex substitute only outside "strings"

2009-03-31 Thread ivan budiselic
On Tue, Mar 31, 2009 at 10:13 AM, Andreas Bernauer wrote: > > ivan budiselic wrote: > >>> So, for the line: > >>> > >>> 1234 a a "a" a > >>> > >>> I'd like to get: > >>> > >>> 1234 b b "a" b > >>> > >>> The question is, is this possible and how. > >>> > >>> What I've tried is > >>> let line = subs

Re: The list policy, AGAIN

2009-03-31 Thread derek
> On Mar 30, 5:28 pm, "John Beckett" wrote: >> Please clarify: Given these choices, what do you favour: >> >> 1. I post TO THE LIST a couple of times a week (could be more, >> but no more than once a day) in reply to some top-poster, along >> the lines that I have done in the past. > > I like thi

How to customize comment style?

2009-03-31 Thread loudking
Hello all, My manager prefers comments in C files in this style /* ** ** */ while the defalt comment style is /* * * */ Could anybody tell me how to change that in VIM? Thanks in advance! --~--~-~--~~~---~--~~ You received this message from the "vim_use" ma

Re: Regex substitute only outside "strings"

2009-03-31 Thread Andreas Bernauer
ivan budiselic wrote: >>> So, for the line: >>> >>> 1234 a a "a" a >>> >>> I'd like to get: >>> >>> 1234 b b "a" b >>> >>> The question is, is this possible and how. >>> >>> What I've tried is >>> let line = substitute(line, '\([^\"]\{-}\)a', "\\1b", "g") >> >> ...because \{-} matches also 0 times

RE: The list policy, AGAIN

2009-03-31 Thread John Beckett
Raúl Núñez de wrote: >> 1. I post TO THE LIST a couple of times a week (could be >> more, but no more than once a day) in reply to some >> top-poster, along the lines that I have done in the past. > > I think this is the most effective, and I can help with that. > In fact, *any* list member can he

Re: The list policy, AGAIN

2009-03-31 Thread Raúl Núñez de Arenas Coronado
Saluton John :) On Tue 31 Mar 2009 00:28 +0200, John Beckett dixit: > Please clarify: Given these choices, what do you favour: > > 1. I post TO THE LIST a couple of times a week (could be more, but no > more than once a day) in reply to some top-poster, along the lines > that I have done in the