On Tue, Aug 28, 2007 at 07:39:21PM +0200, Axel Kielhorn wrote: > > Am 27.08.2007 um 06:58 schrieb Werner LEMBERG: > > > > >>Please take a look at this document (It is written in german), I > >>would like to add it to the groff-wiki or maybe even the groff > >>distribution, once it is finished. > > > >Attached a revised version which already includes Bruno's changes. > >This is far from perfect yet, but... > > Thanks for your extensive revision, so far I learned a few things: > > Start a new sentence at a new line (is this a "law" or just a good > idea?) > > vi has a ) command:-)
... just in case someone uses `vim' or `elvis' (or, for the most part `nvi'): attached are some settings for your `.exrc' file (which is read by all the incarnations of vi, I think) which I find useful when editing groff (or program) source files. I have used commands combined of a backslash plus a letter such as \s but if you use a keyboard with german layout something different, e.g. `;s', might be better: just substitute all `\' by your choice in `.exrc'. now, if in command mode, hitting (quickly) subsequently the two keys `\s' , the current sentence is swapped with the following. `\w' swaps neighbouring words `\p' swaps whole groff paragraphs `\l' moves the last word of the current line to the start of the next line etc. and `<CNTRL>-x' reformats the current paragraph with `fmt' (after which action not all sentences do start on a new line :-)) joerg
"lift first word of next line to end of current line: map \j j0Ea kkJ "move last word of current line to start of next line: map \l $Bi Jk "swap current paragraph with the following: "a bit rough at end of sections... map \p j{d}}P}b "swap current sentence with the following. "works best with `vim', "whereas in `elvis' it behaves a bit differently. "this is not perfect, thus improvable. "problems are related to `troff' macros "interpreted as sentence starts. map \s l(d))ba p) map \u map !}fmt -s -w72 "swap current word with following: map \w lBdWWP map :w! :!aspell check % :e! % map :w! :!aspell --lang=de-alt check % :e! % map :w! :!aspell --lang=de check % :e! % se nu sw=3 ai sm showmode se wm=10 se para=IPLPPPQPNPBPEQENTSTEXPDS