About: Automatically position the cursor when editing email messages   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

I prefer to start two lines into the first big chunk of empty text (either in the main body on a new email, or after all the quoted lines on a reply), so I changed the if str == '' let cur = cur + 1 " If the first line of the body is an attribution, put " the cursor _after_ that line, otherwise the cursor is " leaved right after the headers (assuming we're writing " a new mail, and not editing a reply). " NOTE: modify the regexp to match your mail client's attribution! if strlen(matchstr(getline(cur), '^On.*wrote:.*')) > 0 let cur = cur + 1 endif execute cur :start break endif to

AttributesValues
rdfs:label
  • Automatically position the cursor when editing email messages
rdfs:comment
  • I prefer to start two lines into the first big chunk of empty text (either in the main body on a new email, or after all the quoted lines on a reply), so I changed the if str == '' let cur = cur + 1 " If the first line of the body is an attribution, put " the cursor _after_ that line, otherwise the cursor is " leaved right after the headers (assuming we're writing " a new mail, and not editing a reply). " NOTE: modify the regexp to match your mail client's attribution! if strlen(matchstr(getline(cur), '^On.*wrote:.*')) > 0 let cur = cur + 1 endif execute cur :start break endif to
Version
  • 5(xsd:double)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1238(xsd:integer)
Category
  • Email
Author
  • Davide Alberani
Complexity
  • basic
Created
  • 2006(xsd:integer)
ID
  • 1240(xsd:integer)
NEXT
  • 1244(xsd:integer)
Rating
  • 5(xsd:integer)
abstract
  • I prefer to start two lines into the first big chunk of empty text (either in the main body on a new email, or after all the quoted lines on a reply), so I changed the if str == '' let cur = cur + 1 " If the first line of the body is an attribution, put " the cursor _after_ that line, otherwise the cursor is " leaved right after the headers (assuming we're writing " a new mail, and not editing a reply). " NOTE: modify the regexp to match your mail client's attribution! if strlen(matchstr(getline(cur), '^On.*wrote:.*')) > 0 let cur = cur + 1 endif execute cur :start break endif to if str == '' :start normal gg/ ^M2ji break endif Note that the ^M there is entered with Ctrl-V Ctrl-M (or Ctrl-Q Ctrl-M on Windows). Here's a one-line-in-the-dot-vimrc option: autocmd BufRead mutt* execute 'normal gg/ ^M2j' I prefer to still stay in normal mode in case I need to search or perform other commands before entering insert mode. Your signature will need to start with a few newlines in it for the above to work.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software