Re: execute a script only if first line contains more then one word

2009-07-06 Thread Christian Brabandt
Hi Jeri! On Di, 07 Jul 2009, Jeri Raye wrote: > > On 7/6/09, Ben Fritz wrote: > > > > vim -c "if getline(1)=~'\v^\W*\w+%(\W+\w+)+\W*$' | source myscript.vim > > | endif" memfile.psm > > > > How do I change the line, given by Ben Fritz, so that I can add an > else where it says exit vim untes

Re: execute a script only if first line contains more then one word

2009-07-06 Thread Jeri Raye
On 7/6/09, Ben Fritz wrote: [...] > > I want to let vim execute this myscript.vim only when the first line > > of the memfile.psm file contains more then one word. > > Otherwise it should do nothing, > > vim -c "if getline(1)=~'\v^\W*\w+%(\W+\w+)+\W*$' | source myscript.vim > | endif" memfile.psm

Re: Problem with xml syntax folding?

2009-07-06 Thread Raúl Núñez de Arenas Coronado
Saluton Charles :) Charles Campbell dixit: >>> Essentially Raúl Núñez de Arenas Coronado's >> >> Not even I would wrote my full name, way too tiring for the fingers >> XD >> > Actually, I used the mouse. I supposed that, or at least yank+paste ;) > Also, not being familiar with all the culture

Re: Problem with xml syntax folding?

2009-07-06 Thread Raúl Núñez de Arenas Coronado
Saluton Christian :) Christian Brabandt dixit: > On Mo, 06 Jul 2009, Raúl Núñez de Arenas Coronado wrote: > >> I swear I saw once an option to fix this kind of things, but I >> cannot remember. Looks like Charles Campbell has updated the >> conversation while I was replying, so he may be of help

Re: .vimrc for Solaris 10 and vim 7.2

2009-07-06 Thread Tony Mechelynck
On 04/07/09 22:17, Matt Wozniski wrote: [...] > I believe this is the first time you mentioned that you were using the > console, and not a GUI. :) But, that said - note that the console is > still considered a terminal emulator; pretty much anything but a > *real* vt220 teletype is. Many have

Re: Problem with xml syntax folding?

2009-07-06 Thread Russell Urquhart
On Mon, Jul 06, 2009 at 02:00:36PM -0700, Ben Fritz wrote: > > That did it! I set synmaxcol=0 and now everything seems to work properly. > > I was thinking there might be an issue as in several LONG lines of a > > element, the syntax coloring was getting confused. > > Thanks again > > I'm g

Re: File info disappears in vim status line after startup from command line

2009-07-06 Thread Jay Heyl
On Thu, Jul 2, 2009 at 11:11 PM, bgold12 wrote: > > I've found that when I type "gvim a" from the command line, I get a > message in the status line after gvim has started up that gives some > info about the file a. For example, if the file doesn't exist, it says > ""a" [New File]"; if the file d

Re: Temp files with netrw

2009-07-06 Thread Charles E Campbell Jr
Mr.SpOOn wrote: > Hi, > sometimes I edit files on a server using Vim with netrw. This works > fine, but at some point I find myself editing a temp file in a local > /tmp directory instead of the same file on the server. This happens > often when I use the ftp protocol. Usin ssh, via scp:// things

Re: File info disappears in vim status line after startup from command line

2009-07-06 Thread Tony Mechelynck
On 03/07/09 08:11, bgold12 wrote: > > I've found that when I type "gvim a" from the command line, I get a > message in the status line after gvim has started up that gives some > info about the file a. For example, if the file doesn't exist, it says > ""a" [New File]"; if the file does exist but i

Re: FW: Compiling 7.2 on Solaris 10

2009-07-06 Thread Tony Mechelynck
On 02/07/09 21:34, David Lehmann wrote: > Hello, > > After untarring the vim7.2 package and running configure, I get the > following error on Solaris 10. Can anyone help? Thanks. > > % make > > CC="gcc -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-2.0 > -I/usr/lib/gtk-2.0/include -I/us

Re: Problem with xml syntax folding?

2009-07-06 Thread Ben Fritz
On Jul 6, 2:32 pm, russurquha...@verizon.net wrote: > That did it! I set synmaxcol=0 and now everything seems to work properly. > I was thinking there might be an issue as in several LONG lines of a > element, the syntax coloring was getting confused. > Thanks again I'm glad we were able

Re: Problem with xml syntax folding?

2009-07-06 Thread Charles Campbell
Raúl Núñez de Arenas Coronado wrote: > Saluton Charles :) > > Charles Campbell dixit: > >> Raúl Núñez de Arenas Coronado wrote: >> >>> Blind shot, from ":help syntax": >>> >>> :syntax sync fromstart >>> :syntax syng minlines= >>> >> Essentially Raúl Núñez de Arenas Coronado's >>

Re: Re: Problem with xml syntax folding?

2009-07-06 Thread russurquhart1
That did it! I set synmaxcol=0 and now everything seems to work properly.I was thinking there might be an issue as in several LONG lines of a element, the syntax coloring was getting confused.Thanks againRussJul 6, 2009 07:14:01 PM, vim_use@googlegroups.com wrote:Hi Raúl!On Mo, 06 Jul 2009,

Re: Howto run gcc and have vim re-edit buff and show errs by line

2009-07-06 Thread Linda W
Ben Fritz wrote: > :help quickfix > > Read the whole help file, but specifically, within this file: > :help :make > :help :copen > :help :cnext --- That was it! Thanks! linda --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. Fo

Re: Problem with xml syntax folding?

2009-07-06 Thread Christian Brabandt
Hi Raúl! On Mo, 06 Jul 2009, Raúl Núñez de Arenas Coronado wrote: > I swear I saw once an option to fix this kind of things, but I > cannot remember. Looks like Charles Campbell has updated the > conversation while I was replying, so he may be of help. :h 'synmaxcol' regards, Christian -- :

Re: Re: Problem with xml syntax folding?

2009-07-06 Thread Raúl Núñez de Arenas Coronado
Saluton :) dixit: > Looking at this, and trying both > :syntax sync fromstart > > and > > :syntax sync minilines=61000 > > (the number of lines in the file. That should be enough, right?) > > No change? Then I'm lost, sorry O:) -- Raúl "DervishD" Núñez de Arenas Coronado Linux Registered Use

Re: Problem with xml syntax folding?

2009-07-06 Thread Raúl Núñez de Arenas Coronado
Saluton Charles :) Charles Campbell dixit: > Raúl Núñez de Arenas Coronado wrote: >> Blind shot, from ":help syntax": >> >> :syntax sync fromstart >> :syntax syng minlines= > Essentially Raúl Núñez de Arenas Coronado's Not even I would wrote my full name, way too tiring for the fingers XD > he

Re: How to make S&R not report an error when search item isn't found

2009-07-06 Thread Christian Brabandt
Hi Jeri! On Mo, 06 Jul 2009, Jeri Raye wrote: > map :%s/\/RETURN/g > \:%s/\/RETURNI/g > \:%s/\/ADDCY/g > \:%s/\/SUBCY/g […] > How can I make it so that it doesn't give an error when it doens't > find one of the given search items? Add the e flag (see :h :s_flags) to eac

Re: How to make S&R not report an error when search item isn't found

2009-07-06 Thread Charles Campbell
Jeri Raye wrote: > Hi, > > I have a mapping like below. > > > map :%s/\/RETURN/g > \:%s/\/RETURNI/g > \:%s/\/ADDCY/g > \:%s/\/SUBCY/g > > It does several S&R. > But when it doesn't find something it gives an E486: Pattern not found. > Why? > How can I make it so that it do

Re: How to make S&R not report an error when search item isn't found

2009-07-06 Thread Tim Chase
> map :%s/\/RETURN/g > \:%s/\/RETURNI/g > \:%s/\/ADDCY/g > \:%s/\/SUBCY/g > > It does several S&R. > But when it doesn't find something it gives an E486: Pattern not found. > Why? > How can I make it so that it doesn't give an error when it doens't > find one of the given

How to make S&R not report an error when search item isn't found

2009-07-06 Thread Jeri Raye
Hi, I have a mapping like below. map :%s/\/RETURN/g \:%s/\/RETURNI/g \:%s/\/ADDCY/g \:%s/\/SUBCY/g It does several S&R. But when it doesn't find something it gives an E486: Pattern not found. Why? How can I make it so that it doesn't give an error when it doens't find

Re: Re: Problem with xml syntax folding?

2009-07-06 Thread russurquhart1
Looking at this, and trying both :syntax sync fromstart and:syntax sync minilines=61000(the number of lines in the file. That should be enough, right?)No change? After i did these commands, i did a :e to get the syntax folding restarted. (That was the right thing to do, right?)Thanks,RussJul 6, 2

Re: Problem with xml syntax folding?

2009-07-06 Thread Charles Campbell
Raúl Núñez de Arenas Coronado wrote: > Saluton :) > > dixit: > >> My xml files are of a form: >> >> ... >> >> When i did the syntax folding on a sample, albeit large (1.8 Mb) xml >> file, the closing tag seems to be folded in the >> fold. Everything, however, works when i try this on a

Re: Problem with xml syntax folding?

2009-07-06 Thread Raúl Núñez de Arenas Coronado
Saluton :) dixit: > My xml files are of a form: > > ... > > When i did the syntax folding on a sample, albeit large (1.8 Mb) xml > file, the closing tag seems to be folded in the > fold. Everything, however, works when i try this on a > smaller sample file. Is there something about the xm

Re: Problem with xml syntax folding?

2009-07-06 Thread Charles Campbell
russurquha...@verizon.net wrote: > > Hi, > > Thanks first Ben Fritz for the help on using syntax folding for > folding my xml files! That seems to work, except i think i have a problem. > > My xml files are of a form: > > > > ... > > > > When i did the syntax folding on a sample, albeit large

Problem with xml syntax folding?

2009-07-06 Thread russurquhart1
Hi, Thanks first Ben Fritz for the help on using syntax folding for folding my xml files! That seems to work, except i think i have a problem. My xml files are of a form: ... When i did the syntax folding on a sample, albeit large (1.8 Mb) xml file, the closing tag seems to be folded in

Re: :global problem [bug confirmed?]

2009-07-06 Thread Andy Wokula
Efraim Yawitz schrieb: > On Mon, Jul 6, 2009 at 5:46 PM, Andy Wokula wrote: > >> This works for me: >> >> :g/abc/inser...@line1\^@Line2 >> >> where ^@ is one character inserted with CTRL-V_CTRL-J or CTRL-K_N_U etc. > > Right, that works fine, but is that what the help means? I'm not sure, but

Re: :global problem [bug confirmed?]

2009-07-06 Thread Tim Chase
>> This works for me: >> >> :g/abc/inser...@line1\^@Line2 >> >> where ^@ is one character inserted with CTRL-V_CTRL-J or CTRL-K_N_U etc. > > Right, that works fine, but is that what the help means? The help _does_ seem to suggest that one can type 1) colon 2) g 3) slash 4) regexp 5) s

Re: :global problem [bug confirmed?]

2009-07-06 Thread Efraim Yawitz
On Mon, Jul 6, 2009 at 5:46 PM, Andy Wokula wrote: > > This works for me: > > :g/abc/inser...@line1\^@Line2 > > where ^@ is one character inserted with CTRL-V_CTRL-J or CTRL-K_N_U etc. > Right, that works fine, but is that what the help means? --~--~-~--~~~---~--~---

Re: :global problem [bug confirmed?]

2009-07-06 Thread Andy Wokula
Efraim Yawitz schrieb: > Anybody have anything more on this? Bram? Is it really a bug? Hmm, using a trailing backslash for line continuation is a very special thing added in Vim7: :h version7 - When ":append", ":insert" or ":change" is used with ":global", get the inserted lines from the comma

Re: vim folding for xml brackets

2009-07-06 Thread Ben Fritz
On Jul 4, 2:46 pm, Russell Urquhart wrote: > I think i figured this out. The xfa> command assumes the closing '>' is > across a line boundary. As i am on an opening '<' the closing one is > within the same line, so nothing happens. > > So, i guess my question then would be, is there a way to co

Re: vim folding for xml brackets

2009-07-06 Thread Ben Fritz
On Jul 4, 2:46 pm, Russell Urquhart wrote: > I think i figured this out. The xfa> command assumes the closing '>' is > across a line boundary. As i am on an opening '<' the closing one is > within the same line, so nothing happens. > > So, i guess my question then would be, is there a way to co

Re: execute a script only if first line contains more then one word

2009-07-06 Thread Ben Fritz
On Jul 4, 2:03 am, Jeri Raye wrote: > > I want to let vim execute this myscript.vim only when the first line > of the memfile.psm file contains more then one word. > Otherwise it should do nothing, because it has already done this time > the last ime. > How do I do that? > vim -c "if getline(1

Re: :global problem [bug confirmed?]

2009-07-06 Thread Efraim Yawitz
Anybody have anything more on this? Bram? Is it really a bug? > > > On Sun, Jul 5, 2009 at 5:14 PM, Efraim Yawitz wrote: > >> >> A little debugging revealed that this behavior is according to design (but >> not as described in the help). >> >> In ex_cmds.h the :insert command is configured as: >>

vim_use@googlegroups.com

2009-07-06 Thread Jürgen Krämer
Hi, Jeri Raye wrote: > > Can you use the position of a word in a search and replace as an argument > > For example > > if the line has the word INPUT in it, then the last word should have > () around it > > So: > > start: INPUT s1 , s2 > INPUT s3 , s4 > > must become > > s