Re: OT: Reply-To munging [was: [SOLVED] Need advice on pattern matching using match()]

2007-04-04 Thread Michael Klier
Jean-Rene David wrote:
> * Michael Klier [2007.04.04 17:30]:
> > I am sure this has been questioned before but why is the
> > "Reply-To:" header field not set via the mailing-list?
> 
> Short answer: because it makes it more difficult
> to reply to the author without making it easier to
> reply to the list.
> 
> Long answer:
> http://www.unicom.com/pw/reply-to-harmful.html
> 
> -- 
> JR
> $ grep reply .muttrc
> folder-hook . bind index r reply
> folder-hook .*-L$ bind index r list-reply

Thanks for the clarification (especially the link), these are reasonable
arguments.

-- 
Michael Klier


signature.asc
Description: Digital signature


Re: [SOLVED] Need advice on pattern matching using match()

2007-04-04 Thread Michael Klier
Tim Chase wrote:
> >  if match(getline(1,20),"^ \{0,1}\(=\{2,6}\)[^=]\+\1 *$") >= 0
> >
> >The pattern used in the match() call is the same as in the
> >syntax highlighting script. 
> 
> My guess is that it's something like an escaping problem.  You're 
> using double-quotes which are a little more finicky about 
> contained-escapes.

Thanks a lot Tim! It was indeed an escaping problem!

Just sending the mail again because I forgot to Cc: to the list - sorry
for that. I am sure this has been questioned before but why is the
"Reply-To:" header field not set via the mailing-list?

Kind Regards
Michael

-- 
Michael Klier


signature.asc
Description: Digital signature


Need advice on pattern matching using match()

2007-04-04 Thread Michael Klier
Hi everybody,

I have a little problem with pattern matching using Vims' match()
function. I`ve wrote a syntax highlighting script for a certain Wiki
Syntax, now I want to check via autocommand if the edited text file is a
Wiki file:

autocmd BufEnter *.txt call IsWikiSyntax()

The function looks like this:

fun IsWikiSyntax()
  if match(getline(1,20),"^ \{0,1}\(=\{2,6}\)[^=]\+\1 *$") >= 0
set textwidth=0
set wrap
set linebreak
set filetype=wiki
  endif
endfun

The pattern used in the match() call is the same as in the syntax highlighting
script. The idea is that the function looks for the occurance of the following
strings in the first 20 lines and activate change the filetype if it finds a
match. The searched strings could be of the type:

== foo ==
= foo =
 foo 
=== foo ===
== foo ==

I am a bit confused because the above pattern works for the syntax highlighting
part but not for the  match() call. I tried several abbreviations of the above
pattern on a string via :echo match(line(1),"[pattern]") but always get "-1".

Does the match() function interpret patterns in a different way - or am my 
missing something else?

I am using Vim 7.0.174.

Thanks in Advance
Michael

-- 
Michael Klier


signature.asc
Description: Digital signature


Re: Maximize gvim at startup

2007-03-13 Thread Michael Klier
Mr. Shawn H. Corey wrote:
> François Ingelrest wrote:
> >Because it's managed by the window manager, not by the app itself. You
> >may be able to set the size to what your screen is able to display,
> >but I don't think you'll be able to "really" maximize the window.
> 
> Yes, but I thought there is a command in the window manager API that 
> allowed an application to make a request to maximize the window.

You may have a look at devilspie [1] & [2]. It`s a small app which
enables you to control the behavior of any application when it`s started
like resizing, pinning, skipping the pager, moving to another workspace
etc..  Also it doesn`t depend on a certain window manager (I`ve used
with GNOME and XFCE).

[1] http://live.gnome.org/DevilsPie
[2] http://www.burtonini.com/blog/computers/devilspie (official hp)

Regards
Michael

-- 
Michael Klier


signature.asc
Description: Digital signature