[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT Einrahmung Codeschnippsel] Re: IMAP accounts und Mailfolder size automatische ermitteln



am  Tue, dem 18.03.2008, um 11:57:18 +0100 mailte Ralph Plawetzki folgendes:
> Hallo,
> 
> wie kriegt man denn diese Einrahmung für Codeschnippsel hin?
> Du hast mit mutt gemailt - ist das ein Plug-in für mutt?

mutt ruft einen Editor auf, dort passiert das. Bei mir ist das vim, und
für dem vim gibt es ein Makro dafür.


,----[  in aktion  ]
| " File: VBlockquote.vim
| "
| " Purpose: Insert (Quote) stuff the way some emacs people do
| " Example:
| " ,----[ title ]
| " | Inspired by Blockquote.vim
| " | by Tilmann Bitterberg <tilmann@bitterberg.de>
| " | ...
| " `----
| "
| " Use: visually select text and
| "       :call VBlockquote()
| "       or if you want to create a title
| "       :call VBlockquote("title")
| "
| " Author: Ralf Arens <ralf.arens@gmx.net>
| " Last Modified: 2000-03-30 09:31:23 CEST
| " + changed section "remove trailing whitespace", no more trouble with
| " + trailing whitespace.
|
|
| function! VBlockquote(...) range
|     " put `| ' at beginning of line
|     exe a:firstline.",".a:lastline."s/^/| /"
|     " remove trailing whitespaces
|     exe a:firstline.",".a:lastline.'s/^| $/|/e'
|     " generate tail
|     exe a:lastline."put ='`----'"
|     " set mark
|     normal m'
|     " generate title
|     let @z = ',----'
|     if (a:0 != 0)
|         " -> extra argument a:1
|         let @z = @z."[ ".a:1." ]"
|     endif
|     exe a:firstline."put! z"
|     " jump back to mark
|     normal ''
| endfunction
`----




Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


Reply to: