knowledge-database (beta)

Current group: comp.editors

Vim & slrn (in colour) in newbie's hands.

Vim & slrn (in colour) in newbie's hands.  
Rara Avis
 Re: Vim & slrn (in colour) in newbie's hands.  
Rara Avis
 Re: Vim & slrn (in colour) in newbie's hands.  
W. Citoan
 Re: Vim & slrn (in colour) in newbie's hands.  
Sven Guckes
 Re: Vim & slrn (in colour) in newbie's hands.  
Rara Avis
 Re: Vim & slrn (in colour) in newbie's hands.  
Sven Guckes
 Re: Vim & slrn (in colour) in newbie's hands.  
W. Citoan
 Re: Vim & slrn (in colour) in newbie's hands.  
Rara Avis
 Re: Vim & slrn (in colour) in newbie's hands.  
W. Citoan
 Re: Vim & slrn (in colour) in newbie's hands.  
Rara Avis
 Re: Vim & slrn (in colour) in newbie's hands.  
W. Citoan
 Re: Vim & slrn (in colour) in newbie's hands.  
Rara Avis
 Re: Vim & slrn (in colour) in newbie's hands.  
W. Citoan
 Re: Vim & slrn (in colour) in newbie's hands.  
Rara Avis
 Re: Vim & slrn (in colour) in newbie's hands.  
W. Citoan
From:Rara Avis
Subject:Vim & slrn (in colour) in newbie's hands.
Date:5 Jan 2005 09:32:51 GMT
Tired of the clumsy alliance between MSEdit and slrn, I decided to give Vim
a try. I'm in the process of teaching myself C (I'm actually at the very
beginning of it), so having to use the editor for my newsposting would give
me a chance to finally learn it; at least the most basic commands.

One of the truly enticing possibilities of that scenario was Vim's
capabilities to do coloured syntax highlighting (which, in theory, would
help me deal with several levels of quotes and allow me to check headers at
a glance). It took me a while and a bit of rc editing, but finally Vim
started performing smoothly and seamlessly... except that it only has done
so in Glorious Black and White. (Ah yes, and it lacks auto wrapping.)

I did everything David Gerard advices in his very helpful web page
(http://thingy.apana.org.au/~fun/slrn/), but the colors are still not there
and I keep on having to insert hard line breaks to get my text to display
in more than one very long line.

I have read and researched, all to no avail. I have the feeling that the
answer is much simpler than I imagine it to be at this point. Is there
anybody out there that would not mind giving me a hand here? It would be
truly appreciated.

Thanks for your time and bandwith,

RA
From:Rara Avis
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:Sun, 9 Jan 2005 05:28:29 -0500
In message ,
W. Citoan writes:

>You should be seeing 3 levels of color by default.

Well, I am seeing all quoted text in uniform blue... or aquamarine. This
is like one of those dramas in which, whenever everything seems to be
nearing an apparent denouement, it gets all entangled again.
--
Rara Avis
raravis@tutopia.com
From:W. Citoan
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:Sun, 09 Jan 2005 20:46:34 -0000
Rara Avis wrote:
> In message , W.
> Citoan writes:
>
> >You should be seeing 3 levels of color by default.
>
> Well, I am seeing all quoted text in uniform blue... or aquamarine.
> This is like one of those dramas in which, whenever everything seems
> to be nearing an apparent denouement, it gets all entangled again.

The colors displayed will vary based upon the color scheme you are
using. I played around with some of them and the number of colors used
can vary. Try a few and see if you find one you like better.

:color

- W. Citoan
--
It only makes sense that every facet of our daily lives should depend upon
the position of celestial bodies hundreds of millions of miles away.
-- Bill Watterson from Calvin & Hobbes
From:Sven Guckes
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:5 Jan 2005 09:36:53 GMT
* Rara Avis [2005-01-05]:
> I did everything David Gerard advices in his very
> helpful web page .. but the colors are still not there

:syntax on

> and I keep on having to insert hard line breaks to get
> my text to display in more than one very long line.

:set tw=70

Sven
From:Rara Avis
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:5 Jan 2005 10:14:39 GMT
Sven Guckes wrote in news:2005-01-05T09-36-
04@guckes.net:

> * Rara Avis [2005-01-05]:

>> I did everything David Gerard advices in his very helpful web page ..
>> but the colors are still not there
>
>:syntax on
>
>> and I keep on having to insert hard line breaks to get my text to
>> display in more than one very long line.
>
>:set tw=70

Thanks, Sven for your prompt reply. I had gathered already that something
like these would be the commands (I actually had thought the first one was
":syntax enable"). But my real problem is I do not really think I
understand the _vimrc file nature. In case I did not make it clear enough
with the David Gerard reference, I am running Windows; XP SP2 to be
specific, and installed Vim and slrn from pre-compiled binaries. The
resulting directories structure is something like this: "C:\Program
Files\Vim" which is "Home". Here I find two directories: "vim63" and
"vimfiles" (which by the way only has a bunch of empty folders), plus a
file: _vimrc.

Inside vim63, besides all the Vim and gVim files and folders, there is
another vimrc-like file ("vimrc_example.vim" to be precise).

I have several questions about this:
a)Is the "_vimrc" file in the right place (outside the vim63 directory,
that is)?
b)Don't I have to remove the "_example" part from "vimrc_example.vim"?
and
c) If so, why is it referred to as "vimrc_example.vim" in the "_vimrc"?

At the risk of being too fastidious, I include a copy of said "_vimrc"
file:

------Start of file----------------

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
if &sh =~ '\ silent execute '!""C:\Program Files\Vim\vim63\diff" ' . opt . arg1 . '
' . arg2 . ' > ' . arg3 . '"'
else
silent execute '!C:\Program" Files\Vim\vim63\diff" ' . opt . arg1 . ' '
.. arg2 . ' > ' . arg3
endif
endfunction
------End of file------------------

Ah, and two more questions:

Do I have to include the ":" in ":syntax on" when I add it to whichever
file it is I have to add it to?

and

What exactly is the "$vimrumtime"?

Thanks for your troubles,

RA
From:Sven Guckes
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:5 Jan 2005 12:03:32 GMT
* Rara Avis [2005-01-05]:
> Sven Guckes :
>> * Rara Avis [2005-01-05]:
>>> I did everything David Gerard advices in his very helpful
>>> web page .. but the colors are still not there
>>
>>:syntax on
>>
>>> and I keep on having to insert hard line breaks to
>>> get my text to display in more than one very long line.
>>
>>:set tw=70
>
> Thanks, Sven for your prompt reply.

you are welcome. so... do these work now, or don't they? problem solved?

> I had gathered already that something like these would be the commands
> (I actually had thought the first one was ":syntax enable").

i wonder why..

> But my real problem is I do not really think I understand the _vimrc
> file nature. In case I did not make it clear enough with the David
> Gerard reference, I am running Windows; XP SP2 to be specific,

if i hadn't seen his page before and remembered some of its contents then
i would have had no idea. remember: it's up to you to provide information.
don't make people look up stuff - chances are that you won't get a reply.

> ..and installed Vim and slrn from pre-compiled binaries.
> The resulting directories structure is something like this:
> "C:\Program Files\Vim" which is "Home". Here I find two directories:
> "vim63" and "vimfiles" (which by the way only has
> a bunch of empty folders), plus a file: _vimrc.

sounds like you did not install the runtime archive.

> Inside vim63, besides all the Vim and gVim files and folders, there
> is another vimrc-like file ("vimrc_example.vim" to be precise).
>
> I have several questions about this:
> a)Is the "_vimrc" file in the right place
> (outside the vim63 directory, that is)?

that's a file name - not a directory. you should
place the file where the ":version" info indicates.

there is more info with ":help startup" - but if
you haven't installed the runtime archive then
you are probably missing the help pages, too.

> b)Don't I have to remove the "_example"
> part from "vimrc_example.vim"?

you could ":source vimrc_example.vim" every time
you run vim, of course. but do you want that?

> c) If so, why is it referred to as "vimrc_example.vim" in the "_vimrc"?

it's up to you to make that change. take it, or leave it.

> Do I have to include the ":" in ":syntax on" when
> I add it to whichever file it is I have to add it to?

you can, but it is redundant.

> What exactly is the "$vimrumtime"?

see ":help vimrumtime" - *after* you
have installed the runtime archive.

Sven
From:W. Citoan
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:Thu, 06 Jan 2005 04:02:45 -0000
Sven Guckes wrote:
> * Rara Avis [2005-01-05]:
>
> > ..and installed Vim and slrn from pre-compiled binaries. The
> > resulting directories structure is something like this: "C:\Program
> > Files\Vim" which is "Home". Here I find two directories: "vim63" and
> > "vimfiles" (which by the way only has a bunch of empty folders),
> > plus a file: _vimrc.
>
> sounds like you did not install the runtime archive.

No, that is correct for a Windows install. The Windows installer takes
care of everything that is needed.

> > Inside vim63, besides all the Vim and gVim files and folders, there
> > is another vimrc-like file ("vimrc_example.vim" to be precise).
> >
> > I have several questions about this: a)Is the "_vimrc" file in the
> > right place (outside the vim63 directory, that is)?

Yes, that is the right place. You can locate it elsewhere (for example
if multiple users use the machine and they want separate configs), but
using that one should work by default.

> > b)Don't I have to remove the "_example" part from
> > "vimrc_example.vim"?

No, that file is simply an example of how you can configure things. If
you look inside the _vimrc file, you will see it actually sources the
vimrc_example.vim file by default.

> > c) If so, why is it referred to as "vimrc_example.vim" in the
> > "_vimrc"?

Because it's an example. It's just there to show you some of the things
that you can do. Using it is up to you.

> > What exactly is the "$vimrumtime"?

By default, it will be set to the correct location. For your case,
that's "C:\Program Files\Vim\vim63". You should not have to worry about
this variable unless you have broken your installation.

Here's my suggestion:

1) Make a copy of the _vimrc file.

2) Starting editing the original. Just put your customizations after
the lines that are already there. Later you may decide to change the
default behavior, but at this point don't worry about it. You might
want to try these lines:

" turn off beeps:
set noerrorbells
set visualbell
set t_vb=

" color scheme
color murphy
syn on

" number of lines to display (only use for gvim):
set lines=50

" wrapping:
set tw=78

3) Use the :help function and the documentation on www.vim.org.

4) Search google (web & groups) for vimrc and look at people's
configuration files that they have posted. You'll have some
explanations of settings and things that you might want to try.

5) In your srln.rc file, make sure you have a line like:
set editor_command "C:/Program Files/vim/vim63/gvim -f +%d %s"
so that slrn will call gvim.

- W. Citoan
--
If a man can write a better book, preach a better sermon, or make a better
mouse-trap than his neighbor, though he builds his house in the woods, the
world will make a beaten path to his door.
-- Ralph Waldo Emerson
From:Rara Avis
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:6 Jan 2005 04:00:53 GMT
Sven Guckes wrote in
news:2005-01-05T11-55-20@guckes.net:
> * Rara Avis [2005-01-05]:

Thanks once again... but

> so... do these work now, or don't they? problem
> solved?

I'm afraid not.

> if i hadn't seen his page before and remembered some of its contents
> then i would have had no idea. remember: it's up to you to provide
> information. don't make people look up stuff - chances are that you
> won't get a reply.

Sorry about that... I just did not know exactly how to quote all that info
in my posting... did not want to make it overlong.

Again thanks for your time, but my problem remains.

I have done a bit of reading in the past few hours, and I now realise that
everythig is OK with the Vim installation. (The precompiled binaries for
Windows come in the shape of a .zip file that already includes the runtime,
and is structured correctly. It was this .zip file that I used to install
my copy. I still do not fully understand the structure, but I can see that
color highlighting works soundly and well both on Vim as in gVim. If I open
or create files from within Vim, everything is OK.

I think the problem resides in the way Vim is trying to identify slrn-
generated files in order to highlight them. What follows is the pertinent
fragment of the "filetype.vim" in my copy of Vim:

--------Start of fragment------------------------

" Mail (for Elm, trn, mutt, rn, slrn)
au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,
followup.txt,.article, article.txt,.article.\d\+,pico.\d\+,mutt-*-
\w\+,mutt\w\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail

--------End of fragment--------------------------


and the pertinent fragment from the "slrn.rc" in my copy of slrn:


--------Start of fragment------------------------

% Note OS/2 and Win32 users:
% To separate directories you can either use a single '/' or
% double '\\'. Single backslashes are not supported. For example, use
% "C:\\home\\file.txt" or "C:/home/file.txt" but NOT "C:\home\file.txt"

% Set your favourite editor. Use %s for the file name and %d for the line
% where the cursor should be placed (usually at the beginning of the body).
set editor_command "vim.exe +%d %s"

% You can have separate commands for editing posts, mail, and score files.
%set mail_editor_command "jed '%s' -g %d -tmp --mail-mode"
%set post_editor_command "jed '%s' -g %d -tmp --mail-mode"
%set score_editor_command "jed '%s' -g %d -tmp --score-arrange-score"

% If non-zero, abort posting or email operation if the file was not
modified
% by the editor.
set abort_unmodified_edits 1

% In case we need metamail to display an article:
%set metamail_command "metamail"

% WWW browser to use. Xbrowser is used when the DISPLAY environment
variable
% is set; non_Xbrowser otherwise.
set non_Xbrowser "start %s"
%set Xbrowser "firefox"

% Command to use for printing
% Note: On Win32, this variable defines the name of the printer queue to
use.
%set printer_name "lpr -Plp"

% In case you want to use another mailer than sendmail. Be sure that it
% implements the same interface, though!
set sendmail_command "start /m sendsmtp smtp.myrealbox.com"

% Set this to one if you want the "From:" header in e-mails to be generated
% from the hostname / username / realname variable.
% Note: Not all MTAs are configured to allow this.
set generate_email_from 1

%
%% 4. Directory / file names
%

% Note: All filenames in this section are relative to HOME unless they
start
% with a '/'.

% Filename where articles / email you sent are archived.
% Note: If these are unset, slrn does not keep a copy of outgoing messages.
set save_posts "News/article.txt"
set save_replies "News/followup.txt"

% File where failed posts are appended. Use "" to disable saving.
set failed_posts_file "News/Failed_Posts.txt"

% Name of score file.
set scorefile "News/Score.txt"

% Name of directory where decoded files are placed.
set decode_directory "News"

% Directory where all other files are saved.
set save_directory "News"

% Directory where postponed articles are placed. Please make sure it
exists.
set postpone_directory "News\\Postponed"

% Whether to put temporary files for postings, followups and replies in the
% directory specified by the TMPDIR environment variable or /tmp.
set use_tmpdir 1


--------End of fragment--------------------------


When I open (from Vim) any of the defined files (article.txt, followup.txt)
the colours are on target. But if I intend to open the temp file that slrn
makes Vim open in the Windows/Temp directory, the colours are not there.

Now, while the article or followup is being composed, it is my perception
that Vim has not changed it yet to its final format, nor saved it to its
final destination directories; it is (it seems to me), during the period
before I finally decide that it's ok to post, temporarily dealt with as an
(aptly named) temp file, and placed in the Windows/Temp directory. It is
this type of file that Vim is failing to colourize adequately.

As a sample, here is the name generated for one of these temp files:

"c:\windows\temp\SLRN474088765.0" (where the "SLRN" and the ".0" seem to be
constant)

I do not know whether or not the expression (in filetype.vim, see above)
"/tmp/SLRN[0-9A-Z.]\+" adequately describes this filename. If it didn't,
this would explain the problem (from my very lay perspective).

Well, I hope to get to the bottom of this, somehow, and I definitely
appreciate your help so far.

RA
From:W. Citoan
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:Thu, 06 Jan 2005 04:23:21 -0000
Rara Avis wrote:
>

This post of yours came in after I sent mine. You can probably ignore
that one as it looks like you've covered all my suggestions already.

> " Mail (for Elm, trn, mutt, rn, slrn)
> au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,
> followup.txt,.article, article.txt,.article.\d\+,pico.\d\+,mutt-*-
> \w\+,mutt\w\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail

I'm guessing you picked this up as an example from somewhere? See
below...

> "c:\windows\temp\SLRN474088765.0" (where the "SLRN" and the ".0" seem
> to be constant)
>
> I do not know whether or not the expression (in filetype.vim, see
> above) "/tmp/SLRN[0-9A-Z.]\+" adequately describes this filename. If
> it didn't, this would explain the problem (from my very lay
> perspective).

Your vim command above is looking for a unix temp directory, but you're
using a windows one. Try changing the "/tmp/SLRN" portion to
"c:\windows\temp\SLRN". Leave the rest of the line exactly the same.

- W. Citoan
--
If a man can write a better book, preach a better sermon, or make a better
mouse-trap than his neighbor, though he builds his house in the woods, the
world will make a beaten path to his door.
-- Ralph Waldo Emerson
From:Rara Avis
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:6 Jan 2005 07:52:05 GMT
"W. Citoan" wrote in
news:slrnctpf9j.3nk.wcitoan@wcitoan-via.supernews.com:

>> I do not know whether or not the expression (in filetype.vim, see
>> above) "/tmp/SLRN[0-9A-Z.]\+" adequately describes this filename. If
>> it didn't, this would explain the problem (from my very lay
>> perspective).
>
> Your vim command above is looking for a unix temp directory, but you're
> using a windows one. Try changing the "/tmp/SLRN" portion to
> "c:\windows\temp\SLRN". Leave the rest of the line exactly the same.
>

Thanks for your interest W.

It was in some way quite satisfying to have someone, who evidently knows
more about this than I do, confirm my uneducated guesses. So it was with a
bit of anticipation that I followed your instructions. I'm sorry to say the
fix did not work. Then it hit me: the expression that (per your
recommendation) I was modyfying contained one forward slash that evidently
meant something other than the standard "and, inside this directory,
open..." in regular Windows filename practice.

Then I remembered that, when editing the slrn.rc file, I read that filename
slashes could be rendered both as double backward slashes (\\) or as single
forward slashes (/), but never as single backward slahes (\) in the
standard windows fashion. This made me wonder whether or not Vim could
interpret single backward slashes in configuration files the way they are
usually interpreted within a filename in windows; the doubt was of course
generated by the presence of that single backward slash at the end of the
expression I have been focusing on (right before the + symbol):

"/tmp/SLRN[0-9A-Z.]\+"

This backward slash evidently has other semantic significance than that of
being a filename separator for directories in a path.

After your suggested fix, the line would become

"c:\Windows\Temp\[0-9A-Z]\+"

Since arriving at this conclusion (which I am just presuming to be true), I
have tried every possible coordinated combination of \\s and /s in all of
slrn.bat, filetype.vim and slrn.rc, all of this to no avail. My vim page
remains, as qualified before, in glorious black and white. When I do post
from slrn, anyway, I can then go to the directories specified in slrn.rc
and open the _saved_ files, which will then appear appropriately
colourized.

Quite a puzzle! Any ideas out there?

Thanks to both Sven and W., for the attention.

RA
From:W. Citoan
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:Thu, 06 Jan 2005 13:26:30 -0000
Rara Avis wrote:
> "W. Citoan" wrote in
> news:slrnctpf9j.3nk.wcitoan@wcitoan-via.supernews.com:
>
> > Your vim command above is looking for a unix temp directory, but
> > you're using a windows one. Try changing the "/tmp/SLRN" portion to
> > "c:\windows\temp\SLRN". Leave the rest of the line exactly the
> > same.

I messed up. I simply copied and pasted the windows path name. Windows
uses the "\" separator while unix uses the "/" separator in paths (well,
technically Windows supports both, but it defaults to the "\").

vim and slrn's configuration files use the "/" separator.

You were on the right track, but you didn't quite get there...

> After your suggested fix, the line would become
>
> "c:\Windows\Temp\[0-9A-Z]\+"

No, here's where you went wrong. Also, after playing around with it, I
believe I had some additional errors. Try this:

/WINDOWS/temp/SLRN[0-9A-Z.]\+

It looks like vim doesn't care about the drive letter, but it is case
sensitive on the match to the directory[1]. On a quick test (I created
a dummy file and manually set the command)[2], it worked for me.

[1] Which makes sense a vim comes from a unix environment where
directory names are case sensitive. Windows doesn't care, but vim
does.

[2] While I use slrn & vim on Windows, I don't have it configured to
use the temp directory. I just let it create the forward.txt file in
my home directory.

- W. Citoan
--
If a man can write a better book, preach a better sermon, or make a better
mouse-trap than his neighbor, though he builds his house in the woods, the
world will make a beaten path to his door.
-- Ralph Waldo Emerson
From:Rara Avis
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:6 Jan 2005 22:19:24 GMT
"W. Citoan" wrote in
news:slrnctqf40.3ho.wcitoan@wcitoan-via.supernews.com:

> Rara Avis wrote:
>> "W. Citoan" wrote in
>> news:slrnctpf9j.3nk.wcitoan@wcitoan-via.supernews.com:

Thanks again for both your attention and your time. However I'm sorry to
say that I'm still seeing my posts in B&W. I am starting to believe that
it's a slrn version issue; I couldn't fail to notice that the two people
that have mentioned the thing does work in their systems--you and a friend
of mine, who tried helping me a couple of days back--have slightly older
distributions of slrn.

BTW, I actually miscopied to my previous post...

> You were on the right track, but you didn't quite get there...
>
>> After your suggested fix, the line would become
>>
>> "c:\Windows\Temp\[0-9A-Z]\+"
> No, here's where you went wrong. Also, after playing around with it, I
> believe I had some additional errors.

I actually had pasted it correctly (c:\Windows\Temp\SLRN\[0-9A-Z]\+) to the
..vim file. I just clarify it now because it's important to know that that
option was tried and eliminated.

> Try this:
>
> /WINDOWS/temp/SLRN[0-9A-Z.]\+
>

I did. And also every other possible combination with all type of
separators ("/","\" and "\\"), both with and without "C:" at the beginning,
and paying extra attention to the sequence of cases in both directory and
file names. It's been B&W throughout. But at least I learned a bit about
both Unix and Windows (I didn't know that both forward and back slashes
worked in the latter).

It occurred to me (again my very lay brain sticking its nose in something
it knows little about) to try to define the file type in terms based on the
".0" extension, since I don't think said ending is allocated to any other
type of file my Vim is likely to run into. But I was not able to do it; I
don't really know the syntax on which the expressions are bsed.

By the way--and just because on rereading your previous postings I noticed
you mentioned gVim--I am using Vim proper, not the GUI version. This
because I want to keep the temptations of both menus and mouse away from
me.

This whole thing is frustrating as hell, but quite a lot of fun.

RA
From:W. Citoan
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:Fri, 07 Jan 2005 00:09:15 -0000
Rara Avis wrote:
>
> I am starting to believe that it's a slrn version issue; I couldn't
> fail to notice that the two people that have mentioned the thing does
> work in their systems--you and a friend of mine, who tried helping me
> a couple of days back--have slightly older distributions of slrn.

No, vim coloring is independent of slrn. They are entirely separate
applications.

> By the way--and just because on rereading your previous postings I
> noticed you mentioned gVim--I am using Vim proper, not the GUI
> version. This because I want to keep the temptations of both menus
> and mouse away from me.

Doesn't matter. vim and gvim configuration settings work the same (for
the most part, there are some specific settings for each but they don't
apply here).

Are you using XP? If so, then we're using the wrong directory as the
temporary directory. Under XP, it's not under the windows directory.
It's under the Documents and Settings\username directory.

Let's try simplifying this: Leave the existing buffer command alone.
Create a second one that is only:

au BufNewFile,BufRead SLRN[0-9A-Z.]\+ setf mail

This will match any file that has the SLRN temporary file name pattern
and not just those in the temp directory. But it's not a common file
name so I wouldn't worry about.

I modified my set-up here to use the temporary directory and this works
for me. As I said, the fact that we have different versions of slrn
does not matter.

If the above command doesn't work for you, then perhaps you have changed
your set-up so that vim is not reading the _vimrc file you are editing
(ex. if you've set a $HOME variable). Try it manually. Via slrn, start
a reply to a post; when vim opens, start a new cmd window. cd to your
Documents and Settings\username\Temp directory. Do a dir and see if the
slrn temporary file is there (if not find it via the explorer and cd to
the correct directory). Start vim in that directory (just the command
vim with no options), enter the above command by hand (:au ...) and then
open the slrn file (:e ).

- W. Citoan
--
If a man can write a better book, preach a better sermon, or make a better
mouse-trap than his neighbor, though he builds his house in the woods, the
world will make a beaten path to his door.
-- Ralph Waldo Emerson
From:Rara Avis
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:7 Jan 2005 06:25:17 GMT
On 2005-01-07, W. Citoan wrote:
> Rara Avis wrote:


Thanks W.

This time you did it. Thanks so much!


> Let's try simplifying this: Leave the existing buffer command alone.
> Create a second one that is only:
>
> au BufNewFile,BufRead SLRN[0-9A-Z.]\+ setf mail
>
> This will match any file that has the SLRN temporary file name pattern
> and not just those in the temp directory. But it's not a common file
> name so I wouldn't worry about.

I am still intrigued about why the other expression did not cut it.

And yes: I start my slrn via a .bat file as David Gerard suggests
in his page. And yes, In it I do refer Vim to C:\WINDOWS\Temp as the
tmpdir.

But evidently I defined home correctly, since it seems to be working
now. (I'm still puzzled by the fact that it did not work before.)

And now, on to greener (literally, thanks to you) pastures: I want to
learn to modify the syntax files to get the different quote levels
to appear in different colours in the editor as well.

As you will have noticed, I am posting this from slrn, (with *vim* as
editor), and that accounts for the lack of effusiveness in my thanks: My
brain is desperately trying to remember the editing commands.

Thanks again W., You are great!
From:W. Citoan
Subject:Re: Vim & slrn (in colour) in newbie's hands.
Date:Sat, 08 Jan 2005 17:53:00 -0000
Rara Avis wrote:
>
> This time you did it. Thanks so much!

You're welcome.

> I am still intrigued about why the other expression did not cut it.

I'm sure it has something to do with the path. When vim compares the
path & filename to the specified pattern, it's not seeing a match for
some reason. The other option is something else is written wrong in
that statement somewhere so that the whole thing is failing...

> And now, on to greener (literally, thanks to you) pastures: I want to
> learn to modify the syntax files to get the different quote levels to
> appear in different colours in the editor as well.

You should be seeing 3 levels of color by default. I'm not aware of any
other pre-defined syntax files that provide more but check out vim.org
and search the net.

- W. Citoan
--
Remember that no man loses other life than that which he lives, or lives
any other life than that which he loses.
-- Marcus Aurelius
   

Copyright © 2006 knowledge-database   -   All rights reserved