Article View: news.software.readers
Article #138197Re: [slrn] using vim
From: Mike Vanecek
Date: Tue, 25 Nov 2003 20:42
Date: Tue, 25 Nov 2003 20:42
83 lines
4279 bytes
4279 bytes
On Tue, 25 Nov 2003 15:16:46 +0100, Tobias Mummert wrote:
> Hi Mike,
> * Mike Vanecek [2003-11-23 19:17 GMT] wrote:
>> The follow-opens and the quote indicators on empty lines are removed.
>> However, the cursor is left at the beginning of the text, i.e., at On
>> Mon, 17 Nov 2003 .... rather than being placed after all the quoted text
>> and before the -- signature indicator. Any ideas on how to get both to
>> work at the same time?
> sorry for the late answer, please put
> set post_editor_command "vim -c '/^-- $/-'"
> in your .slrnrc.
> If it works, report it.
> Best Regards,
> Tobias
Yes it works!! Places the cursor at the line just above the signature space.
FYI, here is what I now have:
.slrnrc
set editor_command "gvim -geometry 106x42+10+10 %s +%d -c '+/^$/+'"
set mail_editor_command "gvim -f -geometry 106x42+10+10 '+set tw=72' +%d '%s'"
set post_editor_command "gvim -f -geometry 106x42+10+10 '+set tw=78' -c '/^-- $/-'"
set score_editor_command "gvim -f -geometry 106x42+10+10 '+set tw=72' +%d '%s'"
.vimrc
set nocp
" Spelling Macros
map <f8> \1\2<CR>:e! %<CR>
map \1 :w!<CR>
map \2 :!/usr/local/bin/newsbody -qs -n % -p /usr/bin/aspell check \%f<CR>
" Auto reformat macro
map <f5> gg/^$<CR>V/^-- $<CR>{gq`^
map <f4> :set nohlsearch
" delete quote indicators on empty lines
" from w.citoan in n.s.r:
au BufRead ~/.followup :% s/^>[ >]*$//
set cmdheight=2
Note I am not using au BufNewFile,BufRead /tmp/SLRN[0-9A-Z.]* so
~/.vim/vim.news. Since things appear to be working, I assume it is not needed?
I would like to understand why all this is happening. So, ...
The autocommand says to watch for the event of starting to edit a new file or
or starting to edit a new buffer, look for a file matching the /tmp/SLRN]
pattern, and then process the options in vim.news. In that manner, slrn
options can be kept separate from general edit options. Yes? My question with
this however, is that when I look in the /tmp directory, it does not contain
the SLRN file. Hence, that autocommand is not really doing anything? Am I
missing something with the way slrn works?
I understand the -f and -geometry. The set tw=78 sets the text width to 78 for
the current edit session. If I understand it correctly, it could also have
been written as -c 'set tw=78' since the + and -c means execute a command? The
command -c '/^-- $/-' says to execute a search command for --space, go to the
end of the line, and then up one line? How does the /- tell it to go up one
line?
Also, the +%d %s options are not on the line. What exactly is their
interpretation? Is it + == -c for command, % == this file? Then I get lost
with the d and s?
The other autocommand says whenever .followup is read into a buffer, search
this file (:%), do a global find and replace for > starting at the beginning
of a line, followed by either a space or another >, followed by either a space
or another >, until the end of line; if match is true, replace it with
nothing. Anywhere close?
Thank you very much for your help. Even with a Vi Editor book, man gvim, and
online gvim help, this stuff is close to magic.
--
Thanks, Mike.
Technical Details
Message-ID:
<87rc91-pmv.ln1@news.invalid.99computer>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nf3.bellglobal.com!snoopy.risq.qc.ca!news.primus.ca!news.primus.ca!news3.optonline.net!newscene!novia!novia!sequencer.newscene.com!not-for-mailReferences:
<2e44pb.oq3.ln@127.0.0.1> <slrnbrbpoa.26n.teergrube@doczook.de> <gs3l81-jp7.ln1@news.invalid.99computer> <slrnbrhb5p.15c.teergrube@doczook.de> <bfd791-6td.ln1@news.invalid.99computer> <slrnbs6p2e.1rm.teergrube@doczook.de>Show Full Headers
Complete Article Headers
Message-ID: <87rc91-pmv.ln1@news.invalid.99computer> Subject: Re: [slrn] using vim Date: Tue, 25 Nov 2003 20:42:20 +0000 From: Mike Vanecek <MikeV99@privacy.net> References: <2e44pb.oq3.ln@127.0.0.1> <slrnbrbpoa.26n.teergrube@doczook.de> <gs3l81-jp7.ln1@news.invalid.99computer> <slrnbrhb5p.15c.teergrube@doczook.de> <bfd791-6td.ln1@news.invalid.99computer> <slrnbs6p2e.1rm.teergrube@doczook.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nf3.bellglobal.com!snoopy.risq.qc.ca!news.primus.ca!news.primus.ca!news3.optonline.net!newscene!novia!novia!sequencer.newscene.com!not-for-mail Newsgroups: news.software.readers Lines: 83 X-Archive: encrypt User-Agent: slrn/0.9.8.0 (Linux)