Re: set syntax for all windows opened using "open tab" in gvim

2009-09-10 Fir de Conversatie rajesh
Thanks Gary and John, It works fine On Sep 10, 7:23 pm, Gary Johnson wrote: > On 2009-09-10, John Little wrote: > > > >     au BufWinEnter * if &ft == "" | set ft=verilog | endif > > > BTW, Gary, the :setfiletype command has the "only set if not already > > set" logic in it; so wouldn't > > >  

Re: Memory is used up when I replace "\t0\n" to "\n"

2009-09-10 Fir de Conversatie Matt Wozniski
On Thu, Sep 10, 2009 at 4:13 AM, John Beckett wrote: > > Aleafs wrote: >> :1,$  s/\t0\n/\n/g Note that :% is a shortcut for :1,$ > In a substitute, \n means two different things: > - In the pattern, it refers to a newline. > - In the replacement, it refers to a null byte (8 zero bits). > > You c

Re: Bug: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Bram Moolenaar
Milan Vancura wrote: > while playing with macros we found this bug. Consider a two-line file: > > AA > 2lp > > Yank the second line, put cursor at first 'A' on the first line and do @" > Everything is OK: the content of second line is appended after the end of the > first line - as the number

Re: Bug: 'l' breaks macro when run at the end of line (fwd)

2009-09-10 Fir de Conversatie Milan Vancura
- Forwarded message from Milan Vancura - To: Bram Moolenaar Cc: Vim development list Subject: Re: Bug: 'l' breaks macro when run at the end of line > Not a bug: "2l" behaves different than "ll" when the second "l" doesn't > work. "2l" just stops, "ll" is an error and the operation i

Re: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Andy Wokula
Milan Vancura schrieb: >> Lech Lorens schrieb: >>> BTW unlike documentation e.g. for :global or :tabdo, documentation for >>> @ does not mention the expected behaviour if an error is encountered. >>> IMHO this means that errors should be ignored. >> Macros and mappings are quite similar in this re

Re: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Tom Sorensen
On Thu, Sep 10, 2009 at 10:20 AM, Milan Vancura wrote: > Sure. The only problem is that, in case I pointed out, the error throwing is > not consistent: '99l' run on the previous-to-last char of the line does NOT > throw the error while even simple 'l' run on the last char of the DOES. Because th

Re: set syntax for all windows opened using "open tab" in gvim

2009-09-10 Fir de Conversatie Gary Johnson
On 2009-09-10, John Little wrote: > >     au BufWinEnter * if &ft == "" | set ft=verilog | endif > > BTW, Gary, the :setfiletype command has the "only set if not already > set" logic in it; so wouldn't > > au BufWinEnter * setf verilog > > be simpler? Good point. I didn't think about that

Re: set syntax for all windows opened using "open tab" in gvim

2009-09-10 Fir de Conversatie Gary Johnson
On 2009-09-09, rajesh wrote: > On Sep 9, 7:06 pm, Gary Johnson wrote: > > On 2009-09-08, rajesh wrote: > > > Hi vim_dev, I am using gvim to open multiple files. Every time I open > > > a new file using "open Tab" option under file Menu, It is required to > > > use ":set syntax=verilog". I wanted

Re: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Milan Vancura
> > Lech Lorens schrieb: > > BTW unlike documentation e.g. for :global or :tabdo, documentation for > > @ does not mention the expected behaviour if an error is encountered. > > IMHO this means that errors should be ignored. > > Macros and mappings are quite similar in this regard >:h macro

Re: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Andy Wokula
Lech Lorens schrieb: > BTW unlike documentation e.g. for :global or :tabdo, documentation for > @ does not mention the expected behaviour if an error is encountered. > IMHO this means that errors should be ignored. Macros and mappings are quite similar in this regard :h macro /error | Note

Re: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Tom Sorensen
On Thu, Sep 10, 2009 at 8:44 AM, Lech Lorens wrote: > > BTW unlike documentation e.g. for :global or :tabdo, documentation for > @ does not mention the expected behaviour if an error is encountered. > IMHO this means that errors should be ignored. No, that would be very bad. A lot of macro usage

Re: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Lech Lorens
2009/9/10 John Beckett : > > Milan Vancura wrote: >> Consider a two-line file: >> >> AA >> 2lp > > I am going to take a wild guess and hope that someone will find > support in the documentation. > > A command like 99l may be interpreted to mean "move right N > times, where N is the smaller of 99 a

RE: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie John Beckett
Milan Vancura wrote: > Consider a two-line file: > > AA > 2lp I am going to take a wild guess and hope that someone will find support in the documentation. A command like 99l may be interpreted to mean "move right N times, where N is the smaller of 99 and the maximum possible". However, a comma

Re: set syntax for all windows opened using "open tab" in gvim

2009-09-10 Fir de Conversatie John Little
>     au BufWinEnter * if &ft == "" | set ft=verilog | endif BTW, Gary, the :setfiletype command has the "only set if not already set" logic in it; so wouldn't au BufWinEnter * setf verilog be simpler? Regards, John --~--~-~--~~~---~--~~ You received this m

Re: Memory is used up when I replace "\t0\n" to "\n"

2009-09-10 Fir de Conversatie Aleafs
Thanks a lot. Expecting your conclusion On 9月10日, 下午4时13分, "John Beckett" wrote: > Aleafs wrote: > > :1,$ s/\t0\n/\n/g > > In a substitute, \n means two different things: > - In the pattern, it refers to a newline. > - In the replacement, it refers to a null byte (8 zero bits). > > You can see

Bug: 'l' breaks macro when run at the end of line

2009-09-10 Fir de Conversatie Milan Vancura
Hello, while playing with macros we found this bug. Consider a two-line file: AA 2lp Yank the second line, put cursor at first 'A' on the first line and do @" Everything is OK: the content of second line is appended after the end of the first line - as the number of 'l' (2) is more than you can

RE: Memory is used up when I replace "\t0\n" to "\n"

2009-09-10 Fir de Conversatie John Beckett
Aleafs wrote: > :1,$ s/\t0\n/\n/g In a substitute, \n means two different things: - In the pattern, it refers to a newline. - In the replacement, it refers to a null byte (8 zero bits). You can see this at ':help :s' by following the first two links. In a replacement, '\r' inserts a newline. Y

Memory is used up when I replace "\t0\n" to "\n"

2009-09-10 Fir de Conversatie Aleafs
Dear all, A bug seems appeared when I tried to delete the last column of a text file (700K bytes, 20K lines ). Memory is used up and the computer need to be reboot when I oprate as below: :1,$ s/\t0\n/\n/g In the other hand, command like this works normal: :1,$ s/\t0$//g The version of my