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

You are here: http://dunne.freeshell.org//exrc.html

Go to: index | blog | contact


My .exrc

" Paul Dunne's decades-old .exrc file
" last updated Sunday 30th July 2017
"
" Generic options
"
set autoindent
set exrc
set flash
set nomesg
" this is off by default in nvi
set noautowrite
set noerrorbells
set noshowmatch
set nowrapscan
set report=1
set ruler
" superfluous if SHELL is set, and it always is
"set shell=/bin/ksh
set shiftwidth=4
set showmode
" I only use tab as a field seperator in data files
" NB: use -t n with fmt to match the setting here
" NB: use -x 1 with less, ditto
" NB: use stty -xtabs, ditto
" is this more trouble than it is worth?
" yes!
"set tabstop=1
"set tabstop=4
set tabstop=8
set tildeop
" try it out
set verbose
set nowarn
" I like to write with four-space margins to right and left
set wrapmargin=4
"
" Version-specific options
"
"" vim
"
"set compatible
"set directory=>/tmp/
"set visualbell
"
"" nvi
"
set cedit=
" why not just use default (TAB)?
" because it messes up command that use literal tab in regexps on command line
"set filec=
" vim doesn't like this:
set leftright
" this appears to fuck stuff up (!)
"set extended
" not present in vi on openbsd 
" tc source /home/paul/.nvi_tcl
" I got used to this that I forgot it was an nvi extension
" set wraplen=79
"
" Key mappings
"
"" SINGLE KEYSTROKES
"
" comment out a line, C-style
"map C I/* A */
"
" adjust/fill a paragraph 
map f {!} fmt -t 8 -p -w 79
}
"
" adjust/fill current line (default: Search count times backward through the current line for character.)
map F :.!fmt -t 8 -p -w 79
"
" goto beginning of file
map g 1G
"
" attach personal .sig 
"map s Go
I-- :r ~/.sig2
0
"
" sign end of document
map s Go
I-- 
Paul Dunne,
!!jdate
kJ
"
" adjust/fill a paragraph for posting to mailing lists
map q {!} fmt -t 8 -p -w 70
}
"
" spell-check file
map V :w
:!ispell -x -S %
:e!

"
" comment out a line (shell)
map z# I#
"
"" DOUBLE KEYSTROKES
"
" center current line
map zc :.!centre
"
" double spacing
map zd !!dbl
"
" format from mark to point
map zf :'a,.!fmt -t 8 -p -w 79
"
" format MH message
map zm 1G/---
j:.,$!fmt -t 8 -p -w 70
}
"
" sort a paragraph
map zs {jma}k:'a,.!sort
"
" attach business .sig 
"map zs Go
I-- :r ~/.sig
0
"
" timestamp
map zt !!date '+\%d/\%m/\%y'
"
" unquote blank lines in an e-mail repy
"map zu :%s/^> $//
map zu :'a,.!unfill
"
" word count
map zw :!wc -w %
"
" quote the current paragraph with >
map z> mc{jma}kmb:'a,'bs/^/> /
'c
"
"" CONTROL/KEY COMBINATIONS
"
" next file
map  :n
"
" previous file
map  :prev
"
" write file
map  :w
"
" centre current line
" map c :.!centre
map c :.!fmt -t 8 -c -w 79
"
" format from mark to point
map f :'a,.!fmt -t 8 -p -w 79
"
" 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&/
"
" quote the current paragraph with >
map q mc{jma}kmb:'a,'bs/^/> /
'c
"
" reverse order of lines 
map r :g/.*/m0
"
" strip leading whitespace
" NB: the tab in the char class must be escaped!
map s :'a,.:s/^[\	 ]*//g
"
" Junk (!)
"
" 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
"
" launch lynx?
"vmap ,net y:!lynx "
"
" comment for (GNU) 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 -t 8 -p -w 70
}
"
" 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
"
" 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
"
" 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
ab acorss across
ab hlep help


Viewable with any browser

This page was brought to you by ksh, vi, m4, sed & make, courtesy of openbsd.
Last changed: Sun Mar 3 11:54:02 CET 2019