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

2007-01-02 Thread Thomas
Hi, I have the following line in my source: exec 'autocmd BufReadCmd '. pattern .' call '. rcmd .'(1, expand(afile), , %)' This fails if the filename contains % which is replaced with expand('%'). I can't seem to escape the % at any point, can I? Wrapping the exand(afile) in a escape(, %)

RE: Bug in 7.0.178? autocmd BufReadCmd * DoSomething expand(afile) 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(afile), , %)' This fails if the filename contains % which is replaced with expand('%'). I can't seem to escape the % at any point,

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

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

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

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 if plugins can

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 statements,

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

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,

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*

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

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 numbers

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: 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, '$'),

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

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.

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 mode, but

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. But I have

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 power