First, a word from our sponsers:

In Memoriam Linuxlots (http://www.linuxlots.com/~dunne), 1999 -- 2011, R.I.P.

You are here: http://dunne.yenn.ulegend.net//exrc.html

Go to: index | blog | contact


My .exrc


" generic options

set autoindent
set exrc
set flash
set mesg
set noautowrite
set noerrorbells
set noshowmatch
set nowrapscan
set report=1
set ruler
set shell=/bin/ksh
set shiftwidth=4
set showmode
set tabstop=8
set tildeop
set nowarn
"set wrapmargin=1
set wraplen=79

" version-specific options

"" vim

"set compatible
"set directory=>/tmp/
"set visualbell

"" nvi

set cedit=
set filec=
set leftright
" this appears to fuck stuff up (!)
"set extended
" tc source /home/paul/.nvi_tcl

" key-mappings

"" single keystrokes

" comment out a line, C-style
map C I/* A */

" spell-check file
map V :w
:!ispell -x -S %
:e!


" adjust/fill a paragraph 
map f {!} fmt -p -w 76
}

" adjust/fill current line
map F :.!fmt -p -w 76

" goto beginning of file
map g 1G

" adjust/fill a paragraph for posting to mailing lists
map q {!} fmt -p -w 70
}

" attach personal .sig 
"map s Go
I-- :r ~/.sig2
0

" sign end of document
map s Go
I-- 
Paul Dunne,
!!jdate
kJ

"" double keystrokes

" attach business .sig 
"map zs Go
I-- :r ~/.sig
0

"" control/key combinations

" write file
map  :w

" next file
map  :n

" previous file
map  :prev

" strip leading whitespace
map s :'a,.s/^[	 ]*//g

" quote the current paragraph with >
map q mc{jma}kmb:'a,'bs/^/> /
'c

" reverse order of lines 
map r :g/.*/m0

" replace multiple blank lines with just one blank line
map j :v/./.,/./-1join

" make first letter on line lower-case
map l :.s/^[A-Z]/\l&/

" footnotes
" This makes a end notes. It will insert a [#] at the current location
" and put a [#] at the bottom of the document and let you type there.
" Hitting `a will take you back to the original location once you are
" done with your end note. [#] will be the number of the end note, not
" the literal # character. (Pretty crazy, huh?)
"map K ma1GO[0]G$?[[0-9]*]lyt]`aaOpI:r!echo '1 A + p' | dc0"yD@y 0i[A]kkJJJmb1Gdd`bF[yf]GopA

" format MH message
map zm 1G/---
j:.,$!fmt -p
}

" unquote blank lines in an e-mail repy
map zu :%s/^> $//

" launch vi?
"vmap ,net y:!lynx "

" same for m4
" map C Im4_dnl 

" map C :.s/\<[a-z]/\u&/g
" comment out entry in linux .config

" map C :.s/^/# /
:.s/=[ym]/ is not set/

" word count (not working right)
" map w :w
:!wc -w %
:e!


" format trn post
map zt 1G/^$
j:.,$!fmt -p
}

" centre current line
map c :.!centre

" hardlink in everything2
"map l ebi[ea]

" Execute current line (without deleting it; #x above deletes it)
" Uses buffer y. - is normally the same as k^
map - "yyy@y

" quote the current paragraph with >
map z> mc{jma}kmb:'a,'bs/^/> /
'c

" center current line
map zc :.!centre

" format from mark to point
map zf :'a,.!fmt -p

" move a bookmark to the file of Linux bookmarks
map zl 0:.w>> ~/.linux_bookmarks.html
dd

" produce a numbered list
map zn {jma}k:'a,.!number

" sort a paragraph
map zs {jma}k:'a,.!sort

" insert today's date
map zd !!jdate

" timestamp
map zt !!date '+\%d/\%m/\%y'

" comment out a line (shell)
map z# I#

map zw :!wc -w %
map zC :'a,.tc wc

" abbreviations

"" short-cuts

ab nfy Notes from Yesterday:

"" common typos

ab Pual Paul
ab basci basic
ab chagne change
ab eamil email
ab eidtor editor
ab hte the
ab monring morning
ab mroe more
ab mvoe move
ab noly only
ab peices pieces
ab probelm problem
ab ssytem system
ab taht that
ab teh the
ab thsi this
ab waht what
ab wehn when
ab wnat want
ab wnated wanted
ab Falt Flat
ab seh she
ab nad and
ab recieved received
ab baout about
ab ahd had
ab whiel while
ab htat that
ab cleint client
ab itmes items
ab hwo how
ab hse she
ab aviod avoid
ab ahve have
ab clcok clock
ab dorve drove
ab alos also
ab taks task
ab wich which
ab eidting editing
ab yoru your
ab aritcle article
ab ti it
ab wroking working
ab emial email
ab msot most
ab wiht with
ab iwth with
ab soem some
ab soemthing something
ab macors macros
ab macor macro
ab Teh The
ab tiem time
ab peice piece
ab otehr other
ab tkae take
ab htat that
ab hwen when
ab sapce space
ab iwll will
ab toher other
ab skae sake
ab singel single
ab sepnt spent
ab tahn than
ab hepls helps
ab wlak walk
ab whcih which
ab beleive believe
ab writign writing
ab mnay many
ab ommitted omitted
ab ohter other
ab upt put
ab hwat what
ab lvoe love
ab bset best
ab knwo know
ab writtne written
ab Amry Army
ab wrok work
ab sbaine sabine
ab doen done
ab hwich which
ab srot sort
ab pirntf printf
ab Taht That
ab puase pause
ab siad said
ab plams palms


Viewable with any browser

This page was brought to you by ksh, vi, m4, sed & make, courtesy of openbsd.
Last changed: Wed Dec 21 22:29:50 CET 2016

pay no attention to the 1x1 gif behind the curtain!