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

2009-09-10 Fir de Conversatie rajesh
Hi Gary, Great for the reply. But I still see the problem in other aspect. The command u gave me is entered in gvim window in command window. But this is applicable only for all the tabbed files in the current gvim console where i typed that command But If I open new gvim console and new tabbed

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

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.

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 Aleafs
Thanks a lot. Expecting your conclusion On 9月10日, 下午4时13分, John Beckett johnb.beck...@gmail.com 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).

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

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

2009-09-10 Fir de Conversatie Lech Lorens
2009/9/10 John Beckett johnb.beck...@gmail.com: 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

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 lech.lor...@gmail.com 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

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 /error

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 garyj...@spocom.com 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

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 distinction

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 mi...@ucw.cz 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.

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 regard :h

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 mila...@atrey.karlin.mff.cuni.cz - To: Bram Moolenaar b...@moolenaar.net Cc: Vim development list vim-...@vim.org 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

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 of 'l'

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 can see

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 garyj...@spocom.com 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