On Sat, Mar 17, 2012 at 16:49, Benjamin R. Haskell <[email protected]> wrote:
> (Minor nit: don't include line numbers -- it makes it slightly annoying to
> copy-paste).
>

Thanks, I will be more careful about that in the future.


> Initial thoughts:
>
>
>>  9         let startline =
>> search('^\s*\(static\|public\|private\)\=\s*\(static\|public\|private\)\=\s*\(static\|public\|private\)\=\s*\(function\|class\)\s*&\=\w\+','cbW')
>
>
> You left out 'protected'.

Thanks, I'll add it.


>  And you can only have two of those in PHP, not
> three (static/not) + (one visibility).
>

Right, but I don't know in which order they will appear. Though I
guess that only 'static' has to worry about that, what do you think of
this:

search('^\s*\(static\)\=\s*\(public\|private\|protected\)\=\s*\(static\)\=\s*\(function\|class\)\s*&\=\w\+','cbW')

I am supposing that all the modifiers must come before "function"
(class can't have any), but I've never seen it any other way anyway.


> Also, there's an optional space after the return-by-reference marker.
>
> Taking those two considerations, and using ___\{,2} instead of ___\= ___\=,
> you get:
>
> let startline =
> search('^\s*\(\(static\|public\|private\|protected\)\s\+\)\{,2}\(function\|class\)\s*&\=\s*\w\+','cbW')

Ah, thank you! I knew that there was some syntax for not repeating
myself with the 'static' but didn't know if offhand. I should have
googled, tsk tsk.

>> Just opening .vimrc and leaving the curso at the opening position
>> makes the console bell ring repeatedly. What might be the problem?
>
> No idea.  Doesn't happen here under Gentoo w/ 7.3.266 or OpenSUSE w/ 7.3.322
>

Thanks.


>> I also have these plugins and files installed:
>
>
> Just listing what files you have installed doesn't help much.  There's no
> central registrar for Vim plugin filenames, so e.g. your ctags.vim could be
> any of several such plugins.
>
> If you think it's plugin-related, there are two things to try.  First, try
> disabling them all, by starting Vim with the --noplugin flag.  Then, try
> disabling them individually or in groups by adding 'finish' as the first
> line of the one(s) you want to disable.
>

It has been open for a few minutes with the --noplugin flag and the
bell isn't ringing. So it must be a conflict with one of the plugins.

Thanks!

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to