Re: end of line whitespace

2007-01-02 Thread A.J.Mechelynck
Robert Hicks wrote: I know that in some IDE's I can check a box that causes the IDE to automatically strip trailing white space. Does Vim have a switch to do that or do I need to do: autocmd BufWritePre * %s/\s*$//e It would be nice to have a "set stripwhitespace" if that is the case but I g

end of line whitespace

2007-01-02 Thread Robert Hicks
I know that in some IDE's I can check a box that causes the IDE to automatically strip trailing white space. Does Vim have a switch to do that or do I need to do: autocmd BufWritePre * %s/\s*$//e It would be nice to have a "set stripwhitespace" if that is the case but I guess that is the powe

Re: Any way of getting statusline=%B in insert mode?

2007-01-02 Thread A.J.Mechelynck
Bill McCarthy wrote: [...] Perhaps. It behaves that way (also in 6.4) for both %b and %B. In Gvim, the cursor is between 2 characters - so returning zero for %b and %B seems reasonable. OTOH, supporting the bug conclusion, the character position of %c, %v and %V report the position following t

Re: surrparen

2007-01-02 Thread Gary Johnson
On 2007-01-02, AOYAMA Shotaro <[EMAIL PROTECTED]> wrote: > Hi, > > Now I'm writing a plugin that hilights a pair of > parens/braces which surround the cursor position. > Unlike matchparen.vim, it works even when the cursor > is not just on a paren/brace. > The attached file is the source. > > B

Re: Any way of getting statusline=%B in insert mode?

2007-01-02 Thread Bill McCarthy
On Tue 2-Jan-07 12:57pm -0600, A.J.Mechelynck wrote: > DervishD wrote: >> Hi all, and happy new year! >> >> I have %B in my status line, but it doesn't work in insert mode, >> only on normal and visual mode. At first I thought that the status line >> wasn't being evaluated while in insert

Re: Syntax highlighting

2007-01-02 Thread A.J.Mechelynck
cupaxe wrote: Is there a way to have different (see below) syntax highlighting for different portions of a file? What I am interested in knowing is whether there exists a meta file format (say multisyn) which highlights different portions of a file with syntax corresponding to that portion. For

Re: enable perl

2007-01-02 Thread Jorge Almeida
On Tue, 2 Jan 2007, A.J.Mechelynck wrote: see my HowTo page for Unix/Linux: http://users.skynet.be/antoine.mechelynck/vim/compunix.htm See also : help if_perl.txt : help if_cscop.txt Configuring with --enable-perlinterp will (if it succeeds) build a Vim executable with +perl c

Syntax highlighting

2007-01-02 Thread cupaxe
Is there a way to have different (see below) syntax highlighting for different portions of a file? What I am interested in knowing is whether there exists a meta file format (say multisyn) which highlights different portions of a file with syntax corresponding to that portion. For instance, let

Re: automatic code completion in vim

2007-01-02 Thread zhengda
Mikolaj Machowski wrote: On pon sty 1 2007, Mikolaj Machowski wrote: This won't work: you need a different variable name, see ":help E706". Yeah, I forgot (not only about that). This is complete solution:: function! UpdateTags() call writefile(getline(1, '$'), '.tmp.c

Re: Any way of getting statusline=%B in insert mode?

2007-01-02 Thread A.J.Mechelynck
DervishD wrote: Hi Tony :) :-) Olá Raúl * A.J.Mechelynck <[EMAIL PROTECTED]> dixit: DervishD wrote: I have %B in my status line, but it doesn't work in insert mode, only on normal and visual mode. At first I thought that the status line wasn't being evaluated while in insert mode,

Re: enable perl

2007-01-02 Thread A.J.Mechelynck
Jorge Almeida wrote: Quoting the Makefile: # - Uncomment one or more of these lines to include an interface; # each makes Vim quite a bit bigger: # --enable-perlinterp for Perl interpreter # --enable-pythoninterp for Python interpreter #

Re: enable perl

2007-01-02 Thread Jorge Almeida
On Tue, 2 Jan 2007, Yakov Lerner wrote: On 1/2/07, Jorge Almeida <[EMAIL PROTECTED]> wrote: Quoting the Makefile: #- Uncomment one or more of these lines to include an interface; # each makes Vim quite a bit bigger: #--enable-perlinterp for Perl interpreter

Re: Any way of getting statusline=%B in insert mode?

2007-01-02 Thread DervishD
Hi Tony :) * A.J.Mechelynck <[EMAIL PROTECTED]> dixit: > DervishD wrote: > >I have %B in my status line, but it doesn't work in insert mode, > >only on normal and visual mode. At first I thought that the status line > >wasn't being evaluated while in insert mode, but the line and column >

Re: enable perl

2007-01-02 Thread Yakov Lerner
On 1/2/07, Jorge Almeida <[EMAIL PROTECTED]> wrote: Quoting the Makefile: # - Uncomment one or more of these lines to include an interface; # each makes Vim quite a bit bigger: # --enable-perlinterp for Perl interpreter # --enable-pythoninterp for P

enable perl

2007-01-02 Thread Jorge Almeida
Quoting the Makefile: # - Uncomment one or more of these lines to include an interface; # each makes Vim quite a bit bigger: # --enable-perlinterp for Perl interpreter # --enable-pythoninterp for Python interpreter # --enable-rubyinterp

Re: Any way of getting statusline=%B in insert mode?

2007-01-02 Thread A.J.Mechelynck
DervishD wrote: Hi all, and happy new year! I have %B in my status line, but it doesn't work in insert mode, only on normal and visual mode. At first I thought that the status line wasn't being evaluated while in insert mode, but the line and column numbers change correctly, so it *is* b

Any way of getting statusline=%B in insert mode?

2007-01-02 Thread DervishD
Hi all, and happy new year! I have %B in my status line, but it doesn't work in insert mode, only on normal and visual mode. At first I thought that the status line wasn't being evaluated while in insert mode, but the line and column numbers change correctly, so it *is* being evaluated, it

Re: cvim

2007-01-02 Thread Fritz Mehner
spx2 schrieb: just did that and outputted filetype detection:ON plugin:ON indent:ON All these mappings are defined in the file $HOME/.vim/ftplugin/c.vim (filetype plugin). This file must also be loaded. The mappings are only present for c- and h-files (filetype is 'c' or 'cpp') to avo

Re: cvim

2007-01-02 Thread Thomi Dammann
A.J.Mechelynck schrieb: > spx2 wrote: >> hello. >> i just installed cvim but \lcs and \ucs work perfectly but >> \ce or \cn or any other \xx stuff or \xxx stuff don't work at all. >> what do i do ? > > What is cvim? It's the scrip c.vim: c.vim : C/C++-IDE -- Write and run programs. Insert stateme

Re: cvim

2007-01-02 Thread spx2
just did that and outputted filetype detection:ON plugin:ON indent:ON Fritz Mehner wrote: > > spx2 schrieb: > >>hello. >>i just installed cvim but \lcs and \ucs work perfectly but >>\ce or \cn or any other \xx stuff or \xxx stuff don't work at all. >>what do i do ? >> >> > Please check

Re: perl x modifier regex ?

2007-01-02 Thread Marc Chantreux
A.J.Mechelynck a écrit : You can always add one or more lines of comments above or below the line including the pattern in a Vim script, or even, in most cases, at the end of the line; but IIUC you cannot insert comments in the middle of a pattern. Ok. There is no solution so i decided to write

RE: Bug in 7.0.178? autocmd BufReadCmd * DoSomething expand("") fails if the filename contains %

2007-01-02 Thread Suresh Govindachar
>> Shouldn't be wrapped in escape before the expand, >> so that -- omitting other arguments -- the sequence would be: >> >> expand( escape( ) ) >> > I'd assumed that "" is an argument to expand (:h > expand()) and only valid in this context. OK -- I put the cursor on

Re: perl x modifier regex ?

2007-01-02 Thread Marc Chantreux
Hi Theerasak, my problem is not to read the regExp but maintain them so your script don't help here. It sounds good btw. Regards, mc Theerasak Photha a écrit : On 12/28/06, Marc Chantreux <[EMAIL PROTECTED]> wrote: hi all, Is there a way to obtain the perl x modifier behaviour in vim regex

surrparen

2007-01-02 Thread AOYAMA Shotaro
Hi, Now I'm writing a plugin that hilights a pair of parens/braces which surround the cursor position. Unlike matchparen.vim, it works even when the cursor is not just on a paren/brace. The attached file is the source. But I have noticed a bothering problem with it. When cursor is on '0' in th

RE: Bug in 7.0.178? autocmd BufReadCmd * DoSomething expand("") fails if the filename contains %

2007-01-02 Thread Suresh Govindachar
Thomas sent to vim-dev@vim.org > I have the following line in my source: > > exec 'autocmd BufReadCmd '. pattern .' call '. rcmd .'(1, > expand(""), "", "%")' > > This fails if the filename contains % which is replaced with > expand('%'). I can't seem to escape the % at any po