Clean up a bunch of old stuff

This commit is contained in:
Hunter Haugen 2025-05-15 15:52:59 -07:00
parent ffc67ae3d7
commit a8a99b0c47
Signed by: hunner
GPG key ID: EF99694AA599DDAD
113 changed files with 123 additions and 43466 deletions

476
.XCompose
View file

@ -1,476 +0,0 @@
include "%L"
<dead_abovedot> <Amacron> : U01E0
<dead_abovedot> <amacron> : U01E1
<dead_abovedot> <j> : U0237
<dead_abovedot> <L> : U013F
<dead_abovedot> <l> : U0140
<dead_abovedot> <Omacron> : U0230
<dead_abovedot> <omacron> : U0231
<dead_abovedot> <nobreakspace> : U0307
<dead_acute> <Sabovedot> : U1E64
<dead_acute> <sabovedot> : U1E65
<dead_acute> <V> : U01D7
<dead_acute> <v> : U01D8
#<dead_acute> <nobreakspace> : combining_acute
<dead_belowdot> <Sabovedot> : U1E68
<dead_belowdot> <sabovedot> : U1E69
#<dead_belowdot> <dead_belowdot> : combining_belowdot
#<dead_belowdot> <nobreakspace> : combining_belowdot
#<dead_belowdot> <space> : combining_belowdot
<dead_breve> <Aacute> : Abreveacute
<dead_breve> <Agrave> : Abrevegrave
<dead_breve> <Ahook> : Abrevehook
<dead_breve> <Atilde> : Abrevetilde
<dead_breve> <aacute> : abreveacute
<dead_breve> <agrave> : abrevegrave
<dead_breve> <ahook> : abrevehook
<dead_breve> <atilde> : abrevetilde
<dead_breve> <nobreakspace> : U0306
<dead_caron> <parenleft> : U208D
<dead_caron> <parenright> : U208E
<dead_caron> <plus> : U208A
<dead_caron> <minus> : U208B
<dead_caron> <0> : zerosubscript
<dead_caron> <1> : onesubscript
<dead_caron> <2> : twosubscript
<dead_caron> <3> : threesubscript
<dead_caron> <4> : foursubscript
<dead_caron> <5> : fivesubscript
<dead_caron> <6> : sixsubscript
<dead_caron> <7> : sevensubscript
<dead_caron> <8> : eightsubscript
<dead_caron> <9> : ninesubscript
<dead_caron> <equal> : U208C
<dead_caron> <U01F2> : U01C5
<dead_caron> <Sabovedot> : U1E66
<dead_caron> <sabovedot> : U1E67
<dead_caron> <V> : U01D9
<dead_caron> <v> : U01DA
<dead_caron> <nobreakspace> : U030C
<dead_cedilla> <Cacute> : U1E08
<dead_cedilla> <ColonSign> : U20B5
<dead_cedilla> <cacute> : U1E09
<dead_cedilla> <cent> : U20B5
<dead_cedilla> <U0114> : U1E1C
<dead_cedilla> <U0115> : U1E1D
<dead_cedilla> <nobreakspace> : U0327
<dead_circumflex> <minus> : U207B
<dead_circumflex> <Aacute> : Acircumflexacute
<dead_circumflex> <Agrave> : Acircumflexgrave
<dead_circumflex> <Ahook> : Acircumflexhook
<dead_circumflex> <Atilde> : Acircumflextilde
<dead_circumflex> <aacute> : acircumflexacute
<dead_circumflex> <agrave> : acircumflexgrave
<dead_circumflex> <ahook> : acircumflexhook
<dead_circumflex> <atilde> : acircumflextilde
<dead_circumflex> <Eacute> : Ecircumflexacute
<dead_circumflex> <Egrave> : Ecircumflexgrave
<dead_circumflex> <Ehook> : Ecircumflexhook
<dead_circumflex> <Etilde> : Ecircumflextilde
<dead_circumflex> <eacute> : ecircumflexacute
<dead_circumflex> <egrave> : ecircumflexgrave
<dead_circumflex> <ehook> : ecircumflexhook
<dead_circumflex> <etilde> : ecircumflextilde
<dead_circumflex> <Oacute> : Ocircumflexacute
<dead_circumflex> <Ograve> : Ocircumflexgrave
<dead_circumflex> <Ohook> : Ocircumflexhook
<dead_circumflex> <Otilde> : Ocircumflextilde
<dead_circumflex> <oacute> : ocircumflexacute
<dead_circumflex> <ograve> : ocircumflexgrave
<dead_circumflex> <ohook> : ocircumflexhook
<dead_circumflex> <otilde> : ocircumflextilde
<dead_circumflex> <nobreakspace> : U0302
<UFDD3> <S> : U0218
<UFDD3> <s> : U0219
<UFDD3> <T> : U021A
<UFDD3> <t> : U021B
<UFDD3> <UFDD3> : comma
<UFDD3> <nobreakspace> : U0326
<UFDD3> <space> : comma
<UFDD1> <A> : U20B3
<UFDD1> <a> : U060B
<UFDD1> <B> : U20B1
<UFDD1> <b> : Thai_baht
<UFDD1> <Ccedilla> : U20B5
<UFDD1> <C> : ColonSign
<UFDD1> <ccedilla> : U20B5
<UFDD1> <c> : cent
<UFDD1> <D> : U20AF
<UFDD1> <d> : DongSign
<UFDD1> <E> : EcuSign
<UFDD1> <e> : EuroSign
<UFDD1> <F> : FFrancSign
<UFDD1> <f> : function
<UFDD1> <G> : U20B2
<UFDD1> <g> : U20B2
<UFDD1> <H> : U20B4
<UFDD1> <h> : U20B4
<UFDD1> <I> : U17DB
<UFDD1> <i> : UFDFC
<UFDD1> <K> : U20AD
<UFDD1> <k> : U20AD
<UFDD1> <L> : LiraSign
<UFDD1> <l> : sterling
<UFDD1> <M> : U2133
<UFDD1> <m> : MillSign
<UFDD1> <N> : NairaSign
<UFDD1> <n> : NairaSign
<UFDD1> <O> : U0AF1
<UFDD1> <o> : U0BF9
<UFDD1> <P> : PesetaSign
<UFDD1> <p> : U20B0
<UFDD1> <r> : CruzeiroSign
<UFDD1> <R> : RupeeSign
<UFDD1> <S> : dollar
<UFDD1> <s> : NewSheqelSign
<UFDD1> <T> : U20AE
<UFDD1> <t> : U09F3
<UFDD1> <THORN> : U09F2
<UFDD1> <thorn> : U09F2
<UFDD1> <U> : U5713
<UFDD1> <u> : U5143
<UFDD1> <W> : WonSign
<UFDD1> <w> : WonSign
<UFDD1> <Y> : U5186
<UFDD1> <y> : yen
<UFDD1> <UFDD1> : currency
<UFDD1> <nobreakspace> : currency
<UFDD1> <space> : currency
<dead_diaeresis> <Amacron> : U01DE
<dead_diaeresis> <amacron> : U01DF
<dead_diaeresis> <Iacute> : U1E2E
<dead_diaeresis> <iacute> : U1E2F
<dead_diaeresis> <Omacron> : U022A
<dead_diaeresis> <omacron> : U022B
<dead_diaeresis> <Uacute> : U01D7
<dead_diaeresis> <U01D3> : U01D9
<dead_diaeresis> <Ugrave> : U01DB
<dead_diaeresis> <uacute> : U01D8
<dead_diaeresis> <U01D4> : U01DA
<dead_diaeresis> <ugrave> : U01DC
<dead_diaeresis> <nobreakspace> : U0308
<dead_doubleacute> <nobreakspace> : U030B
<dead_grave> <V> : U01DB
<dead_grave> <v> : U01DC
#<dead_grave> <nobreakspace> : combining_grave
<UFDD2> <A> : Greek_ALPHA
<UFDD2> <a> : Greek_alpha
<UFDD2> <B> : Greek_BETA
<UFDD2> <b> : Greek_beta
<UFDD2> <D> : Greek_DELTA
<UFDD2> <d> : Greek_delta
<UFDD2> <E> : Greek_EPSILON
<UFDD2> <e> : Greek_epsilon
<UFDD2> <F> : Greek_PHI
<UFDD2> <f> : Greek_phi
<UFDD2> <G> : Greek_GAMMA
<UFDD2> <g> : Greek_gamma
<UFDD2> <H> : Greek_ETA
<UFDD2> <h> : Greek_eta
<UFDD2> <I> : Greek_IOTA
<UFDD2> <i> : Greek_iota
<UFDD2> <J> : Greek_THETA
<UFDD2> <j> : Greek_theta
<UFDD2> <K> : Greek_KAPPA
<UFDD2> <k> : Greek_kappa
<UFDD2> <L> : Greek_LAMBDA
<UFDD2> <l> : Greek_lamda
<UFDD2> <M> : Greek_MU
<UFDD2> <m> : Greek_mu
<UFDD2> <N> : Greek_NU
<UFDD2> <n> : Greek_nu
<UFDD2> <O> : Greek_OMICRON
<UFDD2> <o> : Greek_omicron
<UFDD2> <P> : Greek_PI
<UFDD2> <p> : Greek_pi
<UFDD2> <Q> : Greek_CHI
<UFDD2> <q> : Greek_chi
<UFDD2> <R> : Greek_RHO
<UFDD2> <r> : Greek_rho
<UFDD2> <S> : Greek_SIGMA
<UFDD2> <s> : Greek_sigma
<UFDD2> <T> : Greek_TAU
<UFDD2> <t> : Greek_tau
<UFDD2> <U> : Greek_UPSILON
<UFDD2> <u> : Greek_upsilon
<UFDD2> <W> : Greek_OMEGA
<UFDD2> <w> : Greek_omega
<UFDD2> <X> : Greek_XI
<UFDD2> <x> : Greek_xi
<UFDD2> <Y> : Greek_PSI
<UFDD2> <y> : Greek_psi
<UFDD2> <Z> : Greek_ZETA
<UFDD2> <z> : Greek_zeta
<UFDD2> <UFDD2> : mu
<UFDD2> <nobreakspace> : mu
<UFDD2> <space> : mu
<dead_hook> <B> : U0181
<dead_hook> <b> : U0253
<dead_hook> <C> : U0187
<dead_hook> <c> : U0188
<dead_hook> <D> : U018A
<dead_hook> <d> : U0257
<dead_hook> <U0256> : U1D91
<dead_hook> <F> : U0191
<dead_hook> <f> : function
<dead_hook> <G> : U0193
<dead_hook> <g> : U0260
<dead_hook> <h> : U0266
<dead_hook> <U025F> : U0284
<dead_hook> <K> : U0198
<dead_hook> <k> : U0199
<dead_hook> <M> : U2C6E
<dead_hook> <m> : U0271
<dead_hook> <N> : U019D
<dead_hook> <n> : U0272
<dead_hook> <P> : U01A4
<dead_hook> <p> : U01A5
<dead_hook> <q> : U02A0
<dead_hook> <s> : U0282
<dead_hook> <schwa> : U025A
<dead_hook> <T> : U01AC
<dead_hook> <t> : U01AD
<dead_hook> <V> : U01B2
<dead_hook> <v> : U028B
<dead_hook> <W> : U2C72
<dead_hook> <w> : U2C73
<dead_hook> <Z> : U0224
<dead_hook> <z> : U0225
<dead_hook> <dead_hook> : U0309
<dead_hook> <nobreakspace> : U0309
<dead_hook> <space> : U0309
<dead_horn> <Oacute> : Ohornacute
<dead_horn> <Obelowdot> : Ohornbelowdot
<dead_horn> <Ograve> : Ohorngrave
<dead_horn> <Ohook> : Ohornhook
<dead_horn> <Otilde> : Ohorntilde
<dead_horn> <oacute> : ohornacute
<dead_horn> <obelowdot> : ohornbelowdot
<dead_horn> <ograve> : ohorngrave
<dead_horn> <ohook> : ohornhook
<dead_horn> <otilde> : ohorntilde
<dead_horn> <Uacute> : Uhornacute
<dead_horn> <Ubelowdot> : Uhornbelowdot
<dead_horn> <Ugrave> : Uhorngrave
<dead_horn> <Uhook> : Uhornhook
<dead_horn> <Utilde> : Uhorntilde
<dead_horn> <uacute> : uhornacute
<dead_horn> <ubelowdot> : uhornbelowdot
<dead_horn> <ugrave> : uhorngrave
<dead_horn> <uhook> : uhornhook
<dead_horn> <utilde> : uhorntilde
<dead_horn> <dead_horn> : U031B
<dead_horn> <nobreakspace> : U031B
<dead_horn> <space> : U031B
<dead_macron> <Eacute> : U1E16
<dead_macron> <Egrave> : U1E14
<dead_macron> <eacute> : U1E17
<dead_macron> <egrave> : U1E15
<dead_macron> <Oacute> : U1E52
<dead_macron> <Ograve> : U1E50
<dead_macron> <oacute> : U1E53
<dead_macron> <ograve> : U1E51
<dead_macron> <V> : U01D5
<dead_macron> <v> : U01D6
<dead_macron> <nobreakspace> : U0304
<dead_ogonek> <Omacron> : U01EC
<dead_ogonek> <omacron> : U01ED
<dead_ogonek> <nobreakspace> : U0328
<dead_abovering> <Aacute> : U01FA
<dead_abovering> <aacute> : U01FB
<dead_abovering> <nobreakspace> : U030A
<UFDD0> <2> : U01BB
<UFDD0> <equal> : notequal
<UFDD0> <A> : U023A
<UFDD0> <a> : U2C65
<UFDD0> <B> : U0243
<UFDD0> <b> : U0180
<UFDD0> <C> : U023B
<UFDD0> <c> : U023C
<UFDD0> <D> : Dstroke
<UFDD0> <d> : dstroke
<UFDD0> <E> : U0246
<UFDD0> <e> : U0247
<UFDD0> <G> : U01E4
<UFDD0> <g> : U01E5
<UFDD0> <greater> : U226F
<UFDD0> <greaterthanequal> : U2271
<UFDD0> <H> : Hstroke
<UFDD0> <h> : hstroke
<UFDD0> <I> : U0197
<UFDD0> <i> : U0268
<UFDD0> <J> : U0248
<UFDD0> <j> : U0249
<UFDD0> <U0269> : U1D7C
<UFDD0> <U0237> : U025F
<UFDD0> <L> : Lstroke
<UFDD0> <l> : lstroke
<UFDD0> <less> : U226E
<UFDD0> <lessthanequal> : U2270
<UFDD0> <Oacute> : U01FE
<UFDD0> <O> : Oslash
<UFDD0> <oacute> : U01FF
<UFDD0> <o> : oslash
<UFDD0> <P> : U2C63
<UFDD0> <p> : U1D7D
<UFDD0> <R> : U024C
<UFDD0> <r> : U024D
<UFDD0> <T> : Tslash
<UFDD0> <t> : tslash
<UFDD0> <U> : U0244
<UFDD0> <u> : U0289
<UFDD0> <Y> : U024E
<UFDD0> <y> : U024F
<UFDD0> <Z> : Zstroke
<UFDD0> <z> : zstroke
<UFDD0> <UFDD0> : slash
<UFDD0> <nobreakspace> : U0338
<UFDD0> <space> : slash
<dead_tilde> <Oacute> : U1E4C
<dead_tilde> <Odiaeresis> : U1E4E
<dead_tilde> <Omacron> : U022C
<dead_tilde> <oacute> : U1E4D
<dead_tilde> <odiaeresis> : U1E4F
<dead_tilde> <omacron> : U022D
<dead_tilde> <Uacute> : U1E78
<dead_tilde> <uacute> : U1E79
<dead_tilde> <minus> : similarequal
<dead_tilde> <less> : U2272
<dead_tilde> <greater> : U2273
#<dead_tilde> <nobreakspace> : combining_tilde
<dead_acute> <dead_abovedot> <S> : U1E64
<dead_acute> <dead_abovedot> <s> : U1E65
<dead_belowdot> <dead_abovedot> <S> : U1E68
<dead_belowdot> <dead_abovedot> <s> : U1E69
<dead_caron> <dead_abovedot> <S> : U1E66
<dead_caron> <dead_abovedot> <s> : U1E67
<dead_abovedot> <dead_macron> <A> : U01E0
<dead_abovedot> <dead_macron> <a> : U01E1
<dead_abovedot> <dead_macron> <O> : U0230
<dead_abovedot> <dead_macron> <o> : U0231
<dead_abovedot> <UFDD0> <j> : U025F
<UFDD0> <dead_abovedot> <j> : U025F
<dead_breve> <dead_acute> <A> : Abreveacute
<dead_breve> <dead_acute> <a> : abreveacute
<dead_cedilla> <dead_acute> <C> : U1E08
<dead_cedilla> <dead_acute> <c> : U1E09
<dead_circumflex> <dead_acute> <A> : Acircumflexacute
<dead_circumflex> <dead_acute> <a> : acircumflexacute
<dead_circumflex> <dead_acute> <E> : Ecircumflexacute
<dead_circumflex> <dead_acute> <e> : ecircumflexacute
<dead_circumflex> <dead_acute> <O> : Ocircumflexacute
<dead_circumflex> <dead_acute> <o> : ocircumflexacute
<dead_diaeresis> <dead_acute> <I> : U1E2E
<dead_diaeresis> <dead_acute> <i> : U1E2F
<dead_diaeresis> <dead_acute> <U> : U01D7
<dead_diaeresis> <dead_acute> <u> : U01D8
<dead_horn> <dead_acute> <O> : Ohornacute
<dead_horn> <dead_acute> <o> : ohornacute
<dead_horn> <dead_acute> <U> : Uhornacute
<dead_horn> <dead_acute> <u> : uhornacute
<dead_macron> <dead_acute> <E> : U1E16
<dead_macron> <dead_acute> <e> : U1E17
<dead_macron> <dead_acute> <O> : U1E52
<dead_macron> <dead_acute> <o> : U1E53
<dead_abovering> <dead_acute> <A> : U01FA
<dead_abovering> <dead_acute> <a> : U01FB
<dead_acute> <UFDD0> <O> : U01FE
<UFDD0> <dead_acute> <O> : U01FE
<dead_acute> <UFDD0> <o> : U01FF
<UFDD0> <dead_acute> <o> : U01FF
<dead_tilde> <dead_acute> <O> : U1E4C
<dead_tilde> <dead_acute> <o> : U1E4D
<dead_tilde> <dead_acute> <U> : U1E78
<dead_tilde> <dead_acute> <u> : U1E79
<dead_belowdot> <dead_breve> <A> : Abrevebelowdot
<dead_belowdot> <dead_breve> <a> : abrevebelowdot
<dead_belowdot> <dead_circumflex> <A> : Acircumflexbelowdot
<dead_belowdot> <dead_circumflex> <a> : acircumflexbelowdot
<dead_belowdot> <dead_circumflex> <E> : Ecircumflexbelowdot
<dead_belowdot> <dead_circumflex> <e> : ecircumflexbelowdot
<dead_belowdot> <dead_circumflex> <O> : Ocircumflexbelowdot
<dead_belowdot> <dead_circumflex> <o> : ocircumflexbelowdot
<dead_horn> <dead_belowdot> <O> : Ohornbelowdot
<dead_horn> <dead_belowdot> <o> : ohornbelowdot
<dead_horn> <dead_belowdot> <U> : Uhornbelowdot
<dead_horn> <dead_belowdot> <u> : uhornbelowdot
<dead_belowdot> <dead_macron> <L> : U1E38
<dead_belowdot> <dead_macron> <l> : U1E39
<dead_belowdot> <dead_macron> <R> : U1E5C
<dead_belowdot> <dead_macron> <r> : U1E5D
<dead_cedilla> <dead_breve> <E> : U1E1C
<dead_cedilla> <dead_breve> <e> : U1E1D
<dead_breve> <dead_grave> <A> : Abrevegrave
<dead_breve> <dead_grave> <a> : abrevegrave
<dead_breve> <dead_hook> <A> : Abrevehook
<dead_breve> <dead_hook> <a> : abrevehook
<dead_breve> <dead_tilde> <A> : Abrevetilde
<dead_breve> <dead_tilde> <a> : abrevetilde
<dead_diaeresis> <dead_caron> <U> : U01D9
<dead_diaeresis> <dead_caron> <u> : U01DA
<dead_cedilla> <UFDD1> <C> : U20B5
<UFDD1> <dead_cedilla> <C> : U20B5
<dead_cedilla> <UFDD1> <c> : U20B5
<UFDD1> <dead_cedilla> <c> : U20B5
<dead_circumflex> <dead_grave> <A> : Acircumflexgrave
<dead_circumflex> <dead_grave> <a> : acircumflexgrave
<dead_circumflex> <dead_grave> <E> : Ecircumflexgrave
<dead_circumflex> <dead_grave> <e> : ecircumflexgrave
<dead_circumflex> <dead_grave> <O> : Ocircumflexgrave
<dead_circumflex> <dead_grave> <o> : ocircumflexgrave
<dead_circumflex> <dead_hook> <A> : Acircumflexhook
<dead_circumflex> <dead_hook> <a> : acircumflexhook
<dead_circumflex> <dead_hook> <E> : Ecircumflexhook
<dead_circumflex> <dead_hook> <e> : ecircumflexhook
<dead_circumflex> <dead_hook> <O> : Ocircumflexhook
<dead_circumflex> <dead_hook> <o> : ocircumflexhook
<dead_circumflex> <dead_tilde> <A> : Acircumflextilde
<dead_circumflex> <dead_tilde> <a> : acircumflextilde
<dead_circumflex> <dead_tilde> <E> : Ecircumflextilde
<dead_circumflex> <dead_tilde> <e> : ecircumflextilde
<dead_circumflex> <dead_tilde> <O> : Ocircumflextilde
<dead_circumflex> <dead_tilde> <o> : ocircumflextilde
<dead_diaeresis> <dead_grave> <U> : U01DB
<dead_diaeresis> <dead_grave> <u> : U01DC
<dead_diaeresis> <dead_macron> <A> : U01DE
<dead_diaeresis> <dead_macron> <a> : U01DF
<dead_diaeresis> <dead_macron> <O> : U022A
<dead_diaeresis> <dead_macron> <o> : U022B
<dead_tilde> <dead_diaeresis> <O> : U1E4E
<dead_tilde> <dead_diaeresis> <o> : U1E4F
<dead_horn> <dead_grave> <O> : Ohorngrave
<dead_horn> <dead_grave> <o> : ohorngrave
<dead_horn> <dead_grave> <U> : Uhorngrave
<dead_horn> <dead_grave> <u> : uhorngrave
<dead_macron> <dead_grave> <E> : U1E14
<dead_macron> <dead_grave> <e> : U1E15
<dead_macron> <dead_grave> <O> : U1E50
<dead_macron> <dead_grave> <o> : U1E51
<UFDD2> <dead_hook> <U> : U03D2
<dead_hook> <UFDD2> <U> : U03D2
<UFDD2> <dead_macron> <A> : U1FB9
<dead_macron> <UFDD2> <A> : U1FB9
<UFDD2> <dead_macron> <a> : U1FB1
<dead_macron> <UFDD2> <a> : U1FB1
<UFDD2> <dead_macron> <I> : U1FD9
<dead_macron> <UFDD2> <I> : U1FD9
<UFDD2> <dead_macron> <i> : U1FD1
<dead_macron> <UFDD2> <i> : U1FD1
<UFDD2> <dead_macron> <U> : U1FE9
<dead_macron> <UFDD2> <U> : U1FE9
<UFDD2> <dead_macron> <u> : U1FE1
<dead_macron> <UFDD2> <u> : U1FE1
<UFDD2> <UFDD0> <r> : U03FC
<UFDD0> <UFDD2> <r> : U03FC
<dead_horn> <dead_hook> <O> : Ohornhook
<dead_horn> <dead_hook> <o> : ohornhook
<dead_horn> <dead_hook> <U> : Uhornhook
<dead_horn> <dead_hook> <u> : uhornhook
<dead_horn> <dead_tilde> <O> : Ohorntilde
<dead_horn> <dead_tilde> <o> : ohorntilde
<dead_horn> <dead_tilde> <U> : Uhorntilde
<dead_horn> <dead_tilde> <u> : uhorntilde
<dead_ogonek> <dead_macron> <O> : U01EC
<dead_ogonek> <dead_macron> <o> : U01ED
<dead_tilde> <dead_macron> <O> : U022C
<dead_tilde> <dead_macron> <o> : U022D

1
.ackrc
View file

@ -1 +0,0 @@
--type-set=json=.json

View file

@ -1,135 +0,0 @@
#!/bin/bash
#
# NOTE: specify the absolutepath to the directory to use when
# loading a plugin. '~' expansion is supported.
#
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
chunkc core::log_file /usr/local/var/log/chunkwm/chunkwm.log
#
# NOTE: if enabled, chunkwm will monitor the specified plugin_dir
# and automatically reload any '.so' file that is changed.
#
chunkc core::hotload 1
#
# NOTE: the following are config variables for the chunkwm-tiling plugin.
#
chunkc set global_desktop_mode monocle
#chunkc set 2_desktop_mode bsp
#chunkc set 5_desktop_mode float
#chunkc set 1_desktop_tree ~/.chunkwm_layouts/dev_1
chunkc set global_desktop_offset_top 30
chunkc set global_desktop_offset_bottom 10
chunkc set global_desktop_offset_left 10
chunkc set global_desktop_offset_right 10
chunkc set global_desktop_offset_gap 10
#chunkc set 1_desktop_offset_top 190
#chunkc set 1_desktop_offset_bottom 190
#chunkc set 1_desktop_offset_left 190
#chunkc set 1_desktop_offset_right 190
#chunkc set 1_desktop_offset_gap 15
#chunkc set 3_desktop_offset_top 190
#chunkc set 3_desktop_offset_bottom 190
#chunkc set 3_desktop_offset_left 190
#chunkc set 3_desktop_offset_right 190
chunkc set desktop_padding_step_size 10.0
chunkc set desktop_gap_step_size 5.0
chunkc set bsp_spawn_left 1
chunkc set bsp_optimal_ratio 1.618
chunkc set bsp_split_mode optimal
chunkc set bsp_split_ratio 0.5
chunkc set window_focus_cycle monitor
chunkc set mouse_follows_focus 1
chunkc set window_float_next 0
chunkc set window_float_center 1
chunkc set window_region_locked 1
#
# NOTE: shell commands require escaped quotes
# to pass value containing a whitespace.
#
# chunkc set mouse_modifier \"cmd shift\"
chunkc set mouse_modifier fn
chunkc set preselect_border_color 0xffd75f5f
chunkc set preselect_border_width 5
chunkc set preselect_border_radius 0
#
# NOTE: these settings require chwm-sa.
# (https://github.com/koekeishiya/chwm-sa)
#
chunkc set window_float_topmost 0
chunkc set window_fade_inactive 0
chunkc set window_fade_alpha 0.85
chunkc set window_fade_duration 0.25
chunkc set window_use_cgs_move 0
#
# NOTE: the following are config variables for the chunkwm-border plugin.
#
chunkc set focused_border_color 0xddbdd322
chunkc set focused_border_width 5
chunkc set focused_border_radius 5
chunkc set focused_border_skip_floating 1
chunkc set focused_border_skip_monocle 0
#
# NOTE: specify plugins to load when chunkwm starts.
# if chunkc plugin_dir is not set, the absolutepath is necessary.
#
chunkc core::load border.so
chunkc core::load tiling.so
# chunkc core::load ffm.so
#
# NOTE: shell commands require escaped quotes
# to pass value containing a whitespace.
#
chunkc tiling::rule --owner Spotify --role AXWindow --subrole AXDialog --state tile
chunkc tiling::rule --owner iTerm2 --role AXWindow --subrole AXDialog --state tile
chunkc tiling::rule --owner Finder --name Copy --state float
chunkc tiling::rule --owner \"App Store\" --state float
chunkc tiling::rule --owner \"Arq\" --state float
chunkc tiling::rule --owner \"Lightroom\" --state float
chunkc tiling::rule --owner \"Steam\" --state float
chunkc tiling::rule --owner \"Stickies\" --state float
chunkc tiling::rule --owner \"System Preferences\" --state float
chunkc tiling::rule --owner \"DEVONagent\" --state float
chunkc tiling::rule --owner \"nvALT\" --state float
chunkc tiling::rule --owner \"Day One\" --state float
chunkc tiling::rule --owner \"1Password 7\" --name ".*1Password mini.*" --state float
chunkc tiling::rule --owner \"1Password 7\" --except ".*1Password mini.*" --state tile
chunkc tiling::rule --owner \"Buckets\" --state float
chunkc tiling::rule --owner \"Electron\" --state float
chunkc tiling::rule --owner \"GlassBrowser\" --state float
chunkc tiling::rule --owner \"Helium\" --state float
chunkc tiling::rule --owner \"QuickTime Player\" --state float
chunkc tiling::rule --owner \"MultiFirefox\" --state float
chunkc tiling::rule --owner \"Cathode\" --state float
chunkc tiling::rule --owner \"VLC\" --state float
chunkc tiling::rule --owner \"IINA\" --state float
chunkc tiling::rule --owner \"Emacs\" --state tile
chunkc tiling::rule --owner \"Alfred Preferences\" --state float
chunkc tiling::rule --owner \"Adobe Lightroom CC\" --state float
chunkc tiling::rule --owner \"IntelliJ IDEA\" --name ".+Documents/work/git.+" --state tile
chunkc tiling::rule --owner \"IntelliJ IDEA\" --except ".+Documents/work/git.+" --state float
chunkc tiling::rule --owner \"GoLand\" --name ".+Documents/work/git.+" --state tile
chunkc tiling::rule --owner \"GoLand\" --except ".+Documents/work/git.+" --state float

63
.config/alacritty.toml Normal file
View file

@ -0,0 +1,63 @@
[colors.bright]
black = "#4c566a"
blue = "#81a1c1"
cyan = "#8fbcbb"
green = "#a3be8c"
magenta = "#b48ead"
red = "#bf616a"
white = "#eceff4"
yellow = "#ebcb8b"
[colors.cursor]
cursor = "#d8dee9"
text = "#2e3440"
[colors.dim]
black = "#373e4d"
blue = "#68809a"
cyan = "#6d96a5"
green = "#809575"
magenta = "#8c738c"
red = "#94545d"
white = "#aeb3bb"
yellow = "#b29e75"
[colors.normal]
black = "#3b4252"
blue = "#81a1c1"
cyan = "#88c0d0"
green = "#a3be8c"
magenta = "#b48ead"
red = "#bf616a"
white = "#e5e9f0"
yellow = "#ebcb8b"
[colors.primary]
background = "#2e3440"
dim_foreground = "#a5abb6"
foreground = "#d8dee9"
[colors.search.footer_bar]
background = "#434c5e"
foreground = "#d8dee9"
[colors.search.matches]
background = "#88c0d0"
foreground = "CellBackground"
[colors.selection]
background = "#4c566a"
text = "CellForeground"
[colors.vi_mode_cursor]
cursor = "#d8dee9"
text = "#2e3440"
[font]
size = 9.0
[font.glyph_offset]
y = -2
[font.normal]
family = "Liberation Mono"

1
.config/nix/nix.conf Normal file
View file

@ -0,0 +1 @@
allow-dirty = true

View file

@ -1,15 +0,0 @@
(defconst dot-emacs (concat (getenv "HOME") "/" ".emacs.hunner.el")
"My dot emacs file")
(require 'bytecomp)
(setq compiled-dot-emacs (byte-compile-dest-file dot-emacs))
(if (or (not (file-exists-p compiled-dot-emacs))
(file-newer-than-file-p dot-emacs compiled-dot-emacs)
(equal (nth 4 (file-attributes dot-emacs)) (list 0 0)))
(load dot-emacs)
(load compiled-dot-emacs))
(add-hook 'kill-emacs-hook
'(lambda () (and (file-newer-than-file-p dot-emacs compiled-dot-emacs)
(byte-compile-file dot-emacs))))

View file

@ -1,939 +0,0 @@
;;; babel.el --- interface to web translation services such as Babelfish
;;;
;;; Git blob $Id$
;;;
;;; Author: Eric Marsden <emarsden@laas.fr>
;;; Juergen Hoetzel <juergen@hoetzel.info>
;;; Keywords: translation, web
;;; Copyright: (C) 1999-2001 Eric Marsden
;;; 2005-2009 Juergen Hoetzel
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of
;; the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public
;; License along with this program; if not, write to the Free
;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;; MA 02111-1307, USA.
;;
;; Please send suggestions and bug reports to <juergen@hoetzel.info>.
;; The latest version of this package should be available at
;;
;; http://github.com/juergenhoetzel/babel/tree/master
;;; Commentary:
;;; Overview ==========================================================
;;
;; This module provides an Emacs interface to different translation
;; services available on the Internet. You give it a word or paragraph
;; to translate and select the source and destination languages, and
;; it connects to the translation server, retrieves the data, and
;; presents it in a special *babel* buffer. Currently the following
;; backends are available:
;;
;; * the FOSS MT platform Apertium
;; * the Babelfish service at babelfish.yahoo.com
;; * the Google service at translate.google.com
;; * the Transparent Language motor at FreeTranslation.com
;;
;; Entry points: either 'M-x babel', which prompts for a phrase, a
;; language pair and a backend, or 'M-x babel-region', which prompts
;; for a language pair and backend, then translates the currently
;; selected region, and 'M-x babel-buffer' to translate the current
;; buffer.
;;
;; If you ask for a language combination which several backends could
;; translate, babel.el will allow you to choose which backend to
;; use. Since most servers have limits on the quantity of text
;; translated, babel.el will split long requests into translatable
;; chunks and submit them sequentially.
;;
;; Please note that the washing process (which takes the raw HTML
;; returned by a translation server and attempts to extract the useful
;; information) is fragile, and can easily be broken by a change in
;; the server's output format. In that case, check whether a new
;; version is available (and if not, warn me; I don't translate into
;; Welsh very often).
;;
;; Also note that by accessing an online translation service you are
;; bound by its Terms and Conditions; in particular
;; FreeTranslation.com is for "personal, non-commercial use only".
;;
;;
;; Installation ========================================================
;;
;; Place this file in a directory in your load-path (to see a list of
;; appropriate directories, type 'C-h v load-path RET'). Optionally
;; byte-compile the file (for example using the 'B' key when the
;; cursor is on the filename in a dired buffer). Then add the
;; following lines to your ~/.emacs.el initialization file:
;;
;; (autoload 'babel "babel"
;; "Use a web translation service to translate the message MSG." t)
;; (autoload 'babel-region "babel"
;; "Use a web translation service to translate the current region." t)
;; (autoload 'babel-as-string "babel"
;; "Use a web translation service to translate MSG, returning a string." t)
;; (autoload 'babel-buffer "babel"
;; "Use a web translation service to translate the current buffer." t)
;;
;; babel.el requires emacs >= 23
;;
;;
;; Backend information =================================================
;;
;; A babel backend named <zob> must provide three functions:
;;
;; (babel-<zob>-translation from to)
;;
;; where FROM and TO are three-letter language abbreviations from
;; the alist `babel-languages'. This should return non-nil if the
;; backend is capable of translating between these two languages.
;;
;; (babel-<zob>-fetch msg from to)
;;
;; where FROM and TO are as above, and MSG is the text to
;; translate. Connect to the appropriate server and fetch the raw
;; HTML corresponding to the request.
;;
;; (babel-<zob>-wash)
;;
;; When called on a buffer containing the raw HTML provided by the
;; server, remove all the uninteresting text and HTML markup.
;;
;; I would be glad to incorporate backends for new translation servers
;; which are accessible to the general public.
;;
;; babel.el was inspired by a posting to the ding list by Steinar Bang
;; <sb@metis.no>. Morten Eriksen <mortene@sim.no> provided several
;; patches to improve InterTrans washing. Thanks to Per Abrahamsen and
;; Thomas Lofgren for pointing out a bug in the keymap code. Matt
;; Hodges <pczmph@unix.ccc.nottingham.ac.uk> suggested ignoring case
;; on completion. Colin Marquardt suggested
;; `babel-preferred-to-language'. David Masterson suggested adding a
;; menu item. Andy Stewart provided
;; `babel-remember-window-configuration' functionality, output window
;; adjustments and more improvements.
;;
;; User quotes: Dieses ist die größte Sache seit geschnittenem Brot.
;; -- Stainless Steel Rat <ratinox@peorth.gweep.net>
;;; History
;; Discontinued Log (Use GIT: git://github.com/juergenhoetzel/babel.git)
;; 1.4 * `babel-region' now yank the translation instead insert him at
;; point.
;; 1.3 n* Added new Google languages
;; 1.2 * Added FOSS MT platform Apertium
;; (by Kevin Brubeck Unhammer)
;; * Assume UTF-8, if HTTP header missing
;; 1.1 * Fixed invalid language code mapping for serveral
;; languages
;; 1.0 * Fixed Google backend (new regex)
;; * New custom variables `babel-buffer-name',
;; `babel-echo-area', `babel-select-output-window'
;; * Disable use of echo area usage on xemacs if lines > 1
;; (resize of minibuffer does not work reliable)
;; * `babel-url-retrieve' fix for xemacs from Uwe Brauer
;; 0.9 * Use `babel-buffer-name' for output buffer
;; 0.8 * Remember window config if `babel-remember-window-configuration'
;; is non-nil.
;; * made *babel* buffer read-only
;; * use echo area (like `shell-command')
;; * New functions `babel-as-string-default',`babel-region-default',
;; `babel-buffer-default', `babel-smart' (provided by Andy)
;; 0.7 * error handling if no backend is available for translating
;; the supplied languages
;; * rely on url-* functions (for charset decoding) on GNU emacs
;; * increased chunk size for better performance
;; * added support for all Google languages
;; * `babel-region' with prefix argument inserts the translation
;; output at point.
;; 0.6 * get rid of w3-region (implementend basic html entity parsing)
;; * get rid of w3-form-encode-xwfu (using mm-url-form-encode-xwfu)
;; * no character classes in regex (for xemacs compatibility)
;; * default backend: Google
;; 0.5: * Fixed Google and Babelfish backends
;; 0.4: * revised FreeTranslation backend
;;; 0.3: * removed non-working backends: systran, intertrans, leo, e-PROMPT
;;; * added Google backend
;;; * revised UTF-8 handling
;;; * Added customizable variables: babel-preferred-to-language, babel-preferred-from-language
;;; * revised history handling
;;; * added helper function: babel-wash-regex
;; TODO:
;;
;; * Use google xml output
;;
;; * Adjust output window height. Current versions use
;; `with-current-buffer' instead `with-output-to-temp-buffer'. So
;; `temp-buffer-show-hook' will fail to adjust output window height
;; -> Use (fit-window-to-buffer nil babel-max-window-height) to
;; adjust output window height in new version.
;;
;; * use non-blocking `url-retrieve'
;;
;; * improve function `babel-simple-html-parse'.
;;
;; * In `babel-quite' function, should be add (boundp
;; 'babel-previous-window-configuration) to make value of
;; `babel-previous-window-configuration' is valid
;;
(require 'cl)
(require 'mm-url)
(require 'json)
(require 'easymenu)
;; xemacs compatibility
(eval-and-compile
(when (featurep 'xemacs)
(defun url-retrieve-synchronously (url)
(save-excursion
(cdr (url-retrieve url))))))
;; ======================================================================
;;; Customizables
;; ======================================================================
(defgroup babel nil
"provides an Emacs interface to different translation services available on the Internet"
:group 'applications)
(defconst babel-version "1.4"
"The version number of babel.el")
(defconst babel-languages
'(("Afrikaans" . "af")
("Albanian" . "sq")
("Arabic" . "ar")
("Belarusian" . "be")
("Bulgarian" . "bg")
("Catalan" . "ca")
("Chinese" . "zh-CN")
("Croatian" . "hr")
("Czech" . "cs")
("Danish" . "da")
("Dutch" . "nl")
("English" . "en")
("Estonian" . "et")
("Filipino" . "tl")
("Finnish" . "fi")
("French" . "fr")
("Galician" . "gl")
("German" . "de")
("Greek" . "el")
("Hebrew" . "iw")
("Hindi" . "hi")
("Hungarian" . "hu")
("Icelandic" . "is")
("Indonesian" . "id")
("Irish" . "ga")
("Italian" . "it")
("Japanese" . "ja")
("Korean" . "ko")
("Latvian" . "lv")
("Lithuanian" . "lt")
("Macedonian" . "mk")
("Malay" . "ms")
("Maltese" . "mt")
("Norwegian" . "no")
("Persian" . "fa")
("Polish" . "pl")
("Portuguese" . "pt")
("Romanian" . "ro")
("Russian" . "ru")
("Serbian" . "sr")
("Slovak" . "sk")
("Slovenian" . "sl")
("Spanish" . "es")
("Swahili" . "sw")
("Swedish" . "sv")
("Thai" . "th")
("Turkish" . "tr")
("Ukrainian" . "uk")
("Vietnamese" . "vi")
("Welsh" . "cy")
("Yiddish" . "yi")))
(defcustom babel-preferred-to-language "German"
"*Default target translation language.
This must be the long name of one of the languages in the alist"
:type `(choice ,@(mapcar (lambda (s) `(const ,(car s))) babel-languages))
:set (lambda (symbol value)
(set-default symbol value)
(setq babel-to-history (list value)))
:group 'babel)
(defcustom babel-preferred-from-language "English"
"*Default target translation language.
This must be the long name of one of the languages in the alist"
:type `(choice ,@(mapcar (lambda (s) `(const ,(car s))) babel-languages))
:set (lambda (symbol value)
(set-default symbol value)
(setq babel-from-history (list value)))
:group 'babel)
(defcustom babel-remember-window-configuration t
"Whether remeber window configuration before transform. If this
variable is t, will use `babel-quit' command restore window
configuration."
:type 'boolean
:group 'babel)
(defcustom babel-max-window-height 30
"The max height that babel output window."
:type 'integer
:group 'babel)
(defcustom babel-buffer-name "*babel*"
"The buffer name of `babel' transform output."
:type 'string
:group 'babel)
(defcustom babel-echo-area t
"If this option is `non-nil' and the output is short enough to
display in the echo area (which is determined by the variables
`resize-mini-windows' and `max-mini-window-height'), it is shown in
echo area.
Default is `t'."
:type 'boolean
:group 'babel)
(defcustom babel-select-output-window t
"Select output window after transform complete.
This is useful when you have a complex window layout.
Save you time to switch babel output window."
:type 'boolean
:group 'babel)
(defvar babel-previous-window-configuration nil
"The window configuration before transform.")
(defvar babel-to-history (list babel-preferred-to-language))
(defvar babel-from-history (list babel-preferred-to-language))
(defvar babel-backend-history (list))
(defvar babel-mode-hook nil)
(defvar babel-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "q") #'bury-buffer)
(define-key map (kbd "SPC") #'scroll-up)
(define-key map (kbd "DEL") #'scroll-down)
(define-key map (kbd "<") #'beginning-of-buffer)
(define-key map (kbd ">") #'end-of-buffer)
(define-key map (kbd "s") #'isearch-forward)
(define-key map (kbd "r") #'isearch-backward)
(define-key map (kbd "h") #'describe-mode)
map)
"Keymap used in Babel mode.")
(defvar babel-backends
'(("Google" . google)
("Babelfish at Yahoo" . fish)
("FreeTranslation" . free)
("Apertium" . apertium))
"List of backends for babel translations.")
(defun babel-sentence-end()
"portability function. emacs 22.0.50 introduced sentence-end
function, not available on other emacsen"
(if (fboundp 'sentence-end)
(sentence-end)
sentence-end))
;; xemacs compatibility
(eval-and-compile
(if (featurep 'xemacs)
;; XEmacs
(defun babel-url-retrieve (url)
"Retrieve URL and decode"
(let ((current (current-buffer))
(tmp (url-retrieve-synchronously url)))
(with-current-buffer tmp
;;shrug: we asume utf8
(decode-coding-region (point-min) (point-max) 'utf-8)
(copy-to-buffer current (point-min) (point-max)))))
;; GNUs Emacs
(require 'url-handlers)
(defun babel-url-retrieve (url)
(let* ((url-show-status nil)
(tmp (url-retrieve-synchronously url)))
(unless (cadr (url-insert tmp))
(mm-decode-coding-region (point-min) (point-max) 'utf-8))))))
(defun babel-wash-regex (regex)
"Extract the useful information from the HTML returned by fetch function
translated text should be inside parenthesized expression in regex"
(goto-char (point-min))
(if (search-forward-regexp regex (point-max) t)
(progn
(delete-region (match-end 1) (point-max))
(delete-region (point-min) (match-beginning 1))
t)))
;;;###autoload
(defun babel (msg &optional no-display accept-default-setup)
"Use a web translation service to translate the message MSG.
Display the result in a buffer *babel* unless the optional argument
NO-DISPLAY is nil.
If the output is short enough to display in the echo area (which is
determined by the variables `resize-mini-windows' and
`max-mini-window-height'), it is shown there, but it is nonetheless
available in buffer `*babel*' even though that buffer is not
automatically displayed."
(interactive "sTranslate phrase: ")
(let* ((completion-ignore-case t)
(from-suggest (or (first babel-from-history) (caar babel-languages)))
(from-long
(if accept-default-setup
babel-preferred-from-language
(completing-read (format "Translate from (%s): " from-suggest)
babel-languages nil t
nil
'babel-from-history
from-suggest)))
(to-avail (remove* from-long babel-languages
:test #'(lambda (a b) (string= a (car b)))))
(to-suggest (or (first
(remove* from-long babel-to-history
:test #'string=))
(caar to-avail)))
(to-long
(if accept-default-setup
babel-preferred-to-language
(completing-read (format "Translate to (%s): " to-suggest)
to-avail nil t
nil
'babel-to-history
to-suggest)))
(from (cdr (assoc from-long babel-languages)))
(to (cdr (assoc to-long babel-languages)))
(backends (babel-get-backends from to)))
(if (not backends)
(error "No Backend available for translating %s to %s"
from-long to-long)
(let* ((backend-str
(if accept-default-setup (caar backends)
(completing-read "Using translation service: "
backends nil t
(cons (or (member (first babel-backend-history)
backends) (caar backends)) 0)
'babel-backend-history)))
(backend (symbol-name (cdr (assoc backend-str babel-backends))))
(fetcher (intern (concat "babel-" backend "-fetch")))
(washer (intern (concat "babel-" backend "-wash")))
(chunks (babel-chunkify msg 7000))
(translated-chunks '())
(view-read-only nil))
(loop for chunk in chunks
do (push (babel-work chunk from to fetcher washer)
translated-chunks))
(if no-display
(apply #'concat (nreverse translated-chunks))
(let ((pop-up-frames nil)
(temp-buffer-show-hook
'(lambda ()
(fit-window-to-buffer nil babel-max-window-height)
(shrink-window-if-larger-than-buffer))))
(if (and babel-remember-window-configuration
(null babel-previous-window-configuration))
(setq babel-previous-window-configuration (current-window-configuration)))
(with-current-buffer
(get-buffer-create babel-buffer-name)
;; ensure buffer is writeable
(setq buffer-read-only nil)
(erase-buffer)
(loop for tc in (nreverse translated-chunks)
do (insert tc))
(save-excursion
(with-current-buffer babel-buffer-name
(let ((lines
(if (= (buffer-size) 0)
0
;; xemacs compatibility
(if (not (featurep 'xemacs))
(count-screen-lines nil nil nil (minibuffer-window))
(count-lines (point-min) (point-max))))))
(babel-mode)
(cond ((= lines 0))
((and babel-echo-area (or (<= lines 1)
(and (not (featurep 'xemacs))
(<= lines
(if resize-mini-windows
(cond ((floatp max-mini-window-height)
(* (frame-height)
max-mini-window-height))
((integerp max-mini-window-height)
max-mini-window-height)
(t
1))
1))))
;; Don't use the echo area if the output buffer is
;; already dispayed in the selected frame.
(not (get-buffer-window (current-buffer))))
;; Echo area
(goto-char (point-max))
(when (bolp)
(backward-char 1))
(message "%s" (buffer-substring (point-min) (point))))
(t
;; Buffer
(goto-char (point-min))
(display-buffer (current-buffer))))))))))))))
(defun babel-as-string-default (msg)
"Use a web translation service to translate MSG, returning a string."
(interactive "sTranslate phrase: ")
(babel msg t t))
(defun babel-region-default (start end &optional arg)
"Use a web translation service to translate the current region.
With prefix argument, yank the translation to the kill-ring."
(interactive "r\nP")
(if arg
(kill-new (babel (buffer-substring-no-properties start end) t))
(babel (buffer-substring-no-properties start end) nil t)))
(defun babel-buffer-default ()
"Use a web translation service to translate the current buffer.
Default is to present the translated text in a *babel* buffer.
With a prefix argument, replace the current buffer contents by the
translated text."
(interactive)
(let (pos)
(cond (prefix-arg
(setq pos (point-max))
(goto-char pos)
(insert
(babel-as-string-default
(buffer-substring-no-properties (point-min) (point-max))))
(delete-region (point-min) pos))
(t
(babel-region-default (point-min) (point-max))))))
(defun babel-smart (&optional prefix)
"Smart babel function. If you use prefix keystroke, prompt with
input. Same effect with `babel'. If mark active with current buffer,
transform region. Same effect with `babel-region'. Otherwise
transform all content of current buffer. Same effect with
`babel-buffer'."
(interactive "P")
(if (null prefix)
(if mark-active
(babel-region-default (region-beginning) (region-end) 'yank)
(babel-buffer-default))
(babel (read-string "Translate phrase: ") nil t)))
(defun babel-quit ()
"Quit babel window. If `babel-remember-window-configuration' is t,
restore window configuration before transform. Otherwise just do
`bury-buffer'."
(interactive)
(if (and babel-remember-window-configuration
babel-previous-window-configuration)
(progn
(kill-buffer (get-buffer babel-buffer-name))
(set-window-configuration babel-previous-window-configuration)
(setq babel-previous-window-configuration nil))
(bury-buffer)))
;;;###autoload
(defun babel-region (start end &optional arg)
"Use a web translation service to translate the current region.
With prefix argument, yank the translation to the kill-ring."
(interactive "r\nP")
(if arg
(kill-new (babel (buffer-substring-no-properties start end) t))
(babel (buffer-substring-no-properties start end))))
;;;###autoload
(defun babel-as-string (msg)
"Use a web translation service to translate MSG, returning a string."
(interactive "sTranslate phrase: ")
(babel msg t))
;; suggested by Djalil Chafai <djalil@free.fr>
;;
;;;###autoload
(defun babel-buffer ()
"Use a web translation service to translate the current buffer.
Default is to present the translated text in a *babel* buffer.
With a prefix argument, replace the current buffer contents by the
translated text."
(interactive)
(let (pos)
(cond (prefix-arg
(setq pos (point-max))
(goto-char pos)
(insert
(babel-as-string
(buffer-substring-no-properties (point-min) (point-max))))
(delete-region (point-min) pos))
(t
(babel-region (point-min) (point-max))))))
(defun babel-work (msg from to fetcher washer)
(with-temp-buffer
(funcall fetcher (babel-preprocess msg) from to)
(funcall washer)
(babel-postprocess)
(babel-simple-html-parse)
(buffer-substring-no-properties (point-min) (point-max))))
(defun babel-get-backends (from to)
"Return a list of those backends which are capable of translating
language FROM into language TO."
(loop for b in babel-backends
for name = (symbol-name (cdr b))
for translator = (intern (concat "babel-" name "-translation"))
for translatable = (funcall translator from to)
if translatable collect b))
(defconst babel-html-entity-regex
"&\\(#\\([0-9]+\\)\\|\\([a-zA-Z]+\\)\\);")
(defun babel-decode-html-entitiy (str)
(if (and str (string-match babel-html-entity-regex
str))
(if (string= (substring str 1 2) "#")
;TODO: xemacs
(if (not (featurep 'xemacs))
(let ((number (match-string-no-properties 2 str)))
(decode-char 'ucs (string-to-number number)))
str)
(let ((letter (match-string-no-properties 3 str)))
(cond ((string= "gt" letter) ">")
((string= "lt" letter) "<")
(t "?"))))))
(defun babel-display ()
"Parse and display the region of this for basic HTML entities."
(save-excursion
(goto-char (point-min))
(while (and (< (point) (point-max)) (search-forward-regexp
babel-html-entity-regex
(point-max) t))
(let* ((start (match-beginning 0))
(end (match-end 0))
(entity (buffer-substring start end))
(replacement (babel-decode-html-entitiy entity)))
(delete-region start end)
(insert replacement)))))
(defun babel-mode ()
(interactive)
(kill-all-local-variables)
(use-local-map babel-mode-map)
(setq major-mode 'babel-mode
mode-name "Babel"
buffer-read-only t)
(buffer-disable-undo)
(run-hooks 'babel-mode-hook))
(cond ((fboundp 'string-make-unibyte)
(fset 'babel-make-unibyte #'string-make-unibyte))
((fboundp 'string-as-unibyte)
(fset 'babel-make-unibyte #'string-as-unibyte))
(t
(fset 'babel-make-unibyte #'identity)))
;; from nnweb.el, with added `string-make-unibyte'.
(defun babel-form-encode (pairs)
"Return PAIRS encoded for forms."
(mapconcat
(lambda (data)
(concat (mm-url-form-encode-xwfu (babel-make-unibyte (car data))) "="
(mm-url-form-encode-xwfu (babel-make-unibyte (cdr data)))))
pairs "&"))
;; We mark paragraph endings with a special token, so that we can
;; recover a little information on the original message's format after
;; translation and washing and rendering. Should really be using
;; `paragraph-start' and `paragraph-separate' here, but we no longer
;; have any information on the major-mode of the buffer that STR was
;; ripped from.
;;
;; This kludge depends on the fact that all the translation motors
;; seem to leave words they don't know how to translate alone, passing
;; them through untouched.
(defun babel-preprocess (str)
(while (string-match "\n\n\\|^\\s-+$" str)
(setq str (replace-match " FLOBSiCLE " nil t str)))
str)
;; decode paragraph endings in current buffer
(defun babel-postprocess ()
(goto-char (point-min))
(while (search-forward "FLOBSiCLE" nil t)
(replace-match "\n<p>" nil t)))
(defun babel-simple-html-parse ()
"Replace basic html markup"
(goto-char (point-min))
(while (re-search-forward "<\\(br\\|p\\)/?>" nil t)
(replace-match "\n"))
(goto-char (point-min))
(while (re-search-forward "^[ \t]+" nil t)
(replace-match "")))
;; split STR into chunks of around LENGTH characters, trying to
;; maintain sentence structure (this is used to send big requests in
;; several batches, because otherwise the motors cut off the
;; translation).
(defun babel-chunkify (str chunksize)
(let ((start 0)
(pos 0)
(chunks '()))
(while (setq pos (string-match (babel-sentence-end) str pos))
(incf pos)
(when (> (- pos start) chunksize)
(push (substring str start pos) chunks)
(setq start pos)))
(when (/= start (length str))
(push (substring str start) chunks))
(nreverse chunks)))
;;;###autoload
(defun babel-version (&optional here)
"Show the version number of babel in the minibuffer.
If optional argument HERE is non-nil, insert version number at point."
(interactive "P")
(let ((version-string
(format "Babel version %s" babel-version)))
(if here
(insert version-string)
(if (interactive-p)
(message "%s" version-string)
version-string))))
;; Babelfish-specific functions ================================================
;;
;; Babelfish (which uses the SysTran engine) is only able to translate
;; between a limited number of languages.
;; translation from generic names to Babelfish 2-letter names
(defconst babel-fish-languages
'(("en" . "en")
("de" . "de")
("it" . "it")
("pt" . "pt")
("es" . "es")
("fr" . "fr")))
;; those inter-language translations that Babelfish is capable of
(defconst babel-fish-translations
'("en_fr" "en_de" "en_it" "en_pt" "en_es" "fr_en" "de_en" "it_en"
"es_en" "pt_en"))
;; if Babelfish is able to translate from language FROM to language
;; TO, then return the corresponding string, otherwise return nil
(defun babel-fish-translation (from to)
(let* ((fromb (cdr (assoc from babel-fish-languages)))
(tob (cdr (assoc to babel-fish-languages)))
(comb (and fromb tob (concat fromb "_" tob))))
(find comb babel-fish-translations :test #'string=)))
(defun babel-fish-fetch (msg from to)
"Connect to the Babelfish server and request the translation."
(let ((translation (babel-fish-translation from to)))
(unless translation
(error "Babelfish can't translate from %s to %s" from to))
(let* ((pairs `(("trtext" . ,(mm-encode-coding-string msg 'utf-8))
("lp" . ,translation)
("ei" . "UTF-8")
("doit" . "done")
("fr" . "bf-res")
("intl" . "1")
("tt" . "urltext")
("btnTrTxt" . "Translate")))
(url-request-data (babel-form-encode pairs))
(url-request-method "POST")
(url-request-extra-headers
'(("Content-Type" . "application/x-www-form-urlencoded"))))
(babel-url-retrieve "http://babelfish.yahoo.com/translate_txt" ))))
(defun babel-fish-wash ()
"Extract the useful information from the HTML returned by Babelfish."
(if (not (babel-wash-regex "<div id=\"result\"><div style=\"padding:[0-9.]*em;\">\\([^<]*\\)</div></div>"))
(error "Babelfish HTML has changed ; please look for a new version of babel.el")))
;; FreeTranslation.com stuff ===========================================
;; translation from generic letter names to FreeTranslation names
(defconst babel-free-languages
'(("en" . "English")
("de" . "German")
("it" . "Italian")
("nl" . "Dutch")
("pt" . "Portuguese")
("es" . "Spanish")
("no" . "Norwegian")
("ru" . "Russian")
("zh-CN" . "SimplifiedChinese")
("zh-TW" . "TraditionalChinese")
("fr" . "French")))
;; those inter-language translations that FreeTranslation is capable of
(defconst babel-free-translations
'("English/Spanish" "English/French" "English/German" "English/Italian" "English/Dutch" "English/Portuguese"
"English/Russian" "English/Norwegian" "English/SimplifiedChinese" "English/TraditionalChinese" "Spanish/English"
"French/English" "German/English" "Italian/English" "Dutch/English" "Portuguese/English"))
(defun babel-free-translation (from to)
(let* ((ffrom (cdr (assoc from babel-free-languages)))
(fto (cdr (assoc to babel-free-languages)))
(trans (concat ffrom "/" fto)))
(find trans babel-free-translations :test #'string=)))
(defun babel-free-fetch (msg from to)
"Connect to the FreeTranslation server and request the translation."
(let ((coding-system-for-read 'utf-8)
(translation (babel-free-translation from to))
(url "http://ets.freetranslation.com/"))
(unless translation
(error "FreeTranslation can't translate from %s to %s" from to))
(let* ((pairs `(("sequence" . "core")
("mode" . "html")
("template" . "results_en-us.htm")
("srctext" . ,msg)
("charset" . "UTF-8")
("language" . ,translation)))
(url-request-data (babel-form-encode pairs))
(url-mime-accept-string "text/html")
(url-request-method "POST")
(url-privacy-level '(email agent))
(url-mime-charset-string "utf-8")
(url-request-extra-headers
'(("Content-Type" . "application/x-www-form-urlencoded")
("Referer" . "http://ets.freetranslation.com/"))))
(babel-url-retrieve url))))
(defun babel-free-wash ()
"Extract the useful information from the HTML returned by FreeTranslation."
;;; <textarea name="dsttext" cols="40" rows="6">hello together</textarea><br />
(if (not (babel-wash-regex "<textarea name=\"dsttext\"[^>]+>\\([^<]*\\)</textarea>"))
(error "FreeTranslations HTML has changed ; please look for a new version of babel.el")))
;; Google stuff ===========================================
;; Google supports all languages
(defconst babel-google-languages
babel-languages)
(defun babel-google-translation (from to)
;; Google can always translate in both directions
(find to babel-google-languages
:test '(lambda (st el)
(string= (cdr el) st))))
(defun babel-google-fetch (msg from to)
"Connect to google server and request the translation."
;; Google can always translate in both directions
(if (not (find to babel-google-languages
:test '(lambda (st el)
(string= (cdr el) st))))
(error "Google can't translate from %s to %s" from to)
(let* ((langpair (format "%s|%s" from to))
(pairs `(("q" . ,(mm-encode-coding-string msg 'utf-8))
("langpair" . ,langpair)
("v" . "1.0")))
(url-request-data (babel-form-encode pairs))
(url-request-method "POST")
(url-request-extra-headers
'(("Content-Type" . "application/x-www-form-urlencoded"))))
(babel-url-retrieve "http://ajax.googleapis.com/ajax/services/language/translate"))))
(defun babel-google-wash ()
"Extract the useful information from the HTML returned by google."
(beginning-of-buffer)
(let* ((json-object-type 'alist)
(json-response (json-read)))
(erase-buffer)
(if json-response
(insert-string
(cdr (assoc 'translatedText (assoc 'responseData json-response))))
(error "Google API has changed ; please look for a new version of babel.el"))))
(defconst babel-apertium-languages
'(("English" . "en")
("Spanish" . "es")
("Esperanto" . "eo")))
(defun babel-apertium-translation (from to)
(member (cons from to)
'(("en" . "es")
("es" . "en")
("en" . "eo"))))
(defun babel-apertium-fetch (msg from to)
"Connect to apertium server and request the translation."
(if (not (babel-apertium-translation from to))
(error "Apertium can't translate from %s to %s" from to)
(let* ((lang-pair (concat from "-" to))
(pairs `(("pair" . ,lang-pair)
("text" . ,msg)))
(request-url
(concat "http://www.neuralnoise.com/ApertiumWeb2/xml.php?"
(babel-form-encode pairs)))
(url-request-method "GET"))
(babel-url-retrieve request-url))))
(defun babel-apertium-wash ()
"Extract the useful information from the XML returned by apertium."
(if (not (babel-wash-regex
"<translation>\\(\\(.\\|\n\\)*?\\)</translation>"))
(error "Apertium XML has changed ; please look for a
new version of babel.el")))
;; TODO: ecs.freetranslation.com
;; (defun babel-debug ()
;; (let ((buf (get-buffer-create "*babel-debug*")))
;; (set-buffer buf)
;; (babel-free-fetch "state mechanisms are too busy" "eng" "ger")))
(easy-menu-add-item nil '("tools") ["Babel Translation" babel t])
(provide 'babel)
;; babel.el ends here

View file

@ -1,187 +0,0 @@
;;; @(#) bar-cursor.el -- package used to switch block cursor to a bar
;;; @(#) $Id: bar-cursor.el,v 1.1 2001/07/10 00:18:40 jcasa Exp $
;; This file is not part of Emacs
;; Copyright (C) 2001 by Joseph L. Casadonte Jr.
;; Author: Joe Casadonte (emacs@northbound-train.com)
;; Maintainer: Joe Casadonte (emacs@northbound-train.com)
;; Created: July 1, 2001
;; Keywords: bar cursor overwrite
;; Latest Version: http://www.northbound-train.com/emacs.html
;; COPYRIGHT NOTICE
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;;
;; Simple package to convert the block cursor into a bar cursor. In
;; overwrite mode, the bar cursor changes back into a block cursor.
;; This is a quasi-minor mode, meaning that it can be turned on & off
;; easily though only globally (hence the quasi-)
;;; Installation:
;;
;; Put this file on your Emacs-Lisp load path and add the following to
;; your ~/.emacs startup file
;;
;; (require 'bar-cursor)
;; (bar-cursor-mode 1)
;;
;; To add a directory to your load-path, use something like the following:
;;
;; (add-to-list 'load-path (expand-file-name "/some/load/path"))
;;; Usage:
;;
;; M-x `bar-cursor-mode'
;; Toggles bar-cursor-mode on & off. Optional arg turns
;; bar-cursor-mode on iff arg is a positive integer.
;;; To Do:
;;
;; o Nothing, at the moment.
;;; Credits:
;;
;; The basis for this code comes from Steve Kemp by way of the
;; NTEmacs mailing list.
;;; Comments:
;;
;; Any comments, suggestions, bug reports or upgrade requests are welcome.
;; Please send them to Joe Casadonte (emacs@northbound-train.com).
;;
;; This version of bar-cursor was developed and tested with NTEmacs
;; 20.7.1 under Windows 2000 & NT 4.0 and Emacs 20.7.1 under Linux
;; (RH7). Please, let me know if it works with other OS and versions
;; of Emacs.
;;; Change Log:
;;
;; see http://www.northbound-train.com/emacs/bar-cursor.log
;;; **************************************************************************
;;; **************************************************************************
;;; **************************************************************************
;;; **************************************************************************
;;; **************************************************************************
;;; Code:
(eval-when-compile
;; silence the old byte-compiler
(defvar byte-compile-dynamic nil)
(set (make-local-variable 'byte-compile-dynamic) t))
;;; **************************************************************************
;;; ***** version related routines
;;; **************************************************************************
(defconst bar-cursor-version
"$Revision: 1.1 $"
"Version number for 'bar-cursor' package.")
;; ---------------------------------------------------------------------------
(defun bar-cursor-version-number ()
"Return 'bar-cursor' version number."
(string-match "[0123456789.]+" bar-cursor-version)
(match-string 0 bar-cursor-version))
;; ---------------------------------------------------------------------------
(defun bar-cursor-display-version ()
"Display 'bar-cursor' version."
(interactive)
(message "bar-cursor version <%s>." (bar-cursor-version-number)))
;;; **************************************************************************
;;; ***** real functions
;;; **************************************************************************
(defvar bar-cursor-mode nil "Non-nil if 'bar-cursor-mode' is enabled.")
;;; --------------------------------------------------------------------------
;;;###autoload
(defun bar-cursor-mode (&optional arg)
"Toggle use of 'bar-cursor-mode'.
This quasi-minor mode changes cursor to a bar cursor in insert mode,
and a block cursor in overwrite mode. It may only be turned on and
off globally, not on a per-buffer basis (hence the quasi- designation).
Optional ARG turns mode on iff ARG is a positive integer."
(interactive "P")
;; toggle on and off
(let ((old-mode bar-cursor-mode))
(setq bar-cursor-mode
(if arg (or (listp arg)
(> (prefix-numeric-value arg) 0))
(not bar-cursor-mode)))
(when (not (equal old-mode bar-cursor-mode))
;; enable/disable advice
(if bar-cursor-mode
(ad-enable-advice 'overwrite-mode 'after 'bar-cursor-overwrite-mode-ad)
(ad-disable-advice 'overwrite-mode 'after 'bar-cursor-overwrite-mode-ad))
(ad-activate 'overwrite-mode)
;; set the initial cursor type now
(bar-cursor-set-cursor)
;; add or remove to frame hook
(if bar-cursor-mode
(add-hook 'after-make-frame-functions 'bar-cursor-set-cursor)
(remove-hook 'after-make-frame-functions 'bar-cursor-set-cursor))
)))
;;;--------------------------------------------------------------------------
(defadvice overwrite-mode (after bar-cursor-overwrite-mode-ad disable)
"Advice that controls what type of cursor is displayed."
(bar-cursor-set-cursor))
;;;--------------------------------------------------------------------------
(defun bar-cursor-set-cursor-type (cursor &optional frame)
"Set the cursor-type for the named frame.
CURSOR is the name of the cursor to use (bar or block -- any others?).
FRAME is optional frame to set the cursor for; current frame is used
if not passed in."
(interactive)
(if (not frame)
(setq frame (selected-frame)))
;; Do the modification.
(modify-frame-parameters frame
(list (cons 'cursor-type cursor))))
;;; --------------------------------------------------------------------------
(defun bar-cursor-set-cursor (&optional frame)
"Set the cursor-type according to the insertion mode.
FRAME is optional frame to set the cursor for; current frame is used
if not passed in."
(if (and bar-cursor-mode (not overwrite-mode))
(bar-cursor-set-cursor-type 'bar frame)
(bar-cursor-set-cursor-type 'block frame)))
;;; **************************************************************************
;;; ***** we're done
;;; **************************************************************************
(provide 'bar-cursor)
;;; bar-cursor.el ends here
;;; **************************************************************************
;;;; ***** EOF ***** EOF ***** EOF ***** EOF ***** EOF *************

File diff suppressed because it is too large Load diff

View file

@ -1,89 +0,0 @@
-*- coding: utf-8 -*-
Note: When the context is about keys on the keyboard hardware, then QWERTY is used to indicate the key. For example, “Changed M+y to something”, that “y” means the key that is under the key 7. (which is Dvorak's “f”).
version 5, 2009-09-15 • A much improved version, by David Capello. This version is now a full featured minor mode. It supports 3 different keyboard layout: US QWERTY, US Dvorak, and “Spanish (Spain)” (aka “Spanish (International sort)”). Also supports a new command where-is-old-binding (with shortcut Ctrl+h o).
version 4.3.13, 2009-08-28 • improved shrink-whitespaces. Now, when called twice, it removes the remaining single space. Thanks to David Capello for the code.
version 4.3.12.2, 2009-08-15 • Fixed a bug where delete-selection-mode migth be turned off. Changed “(delete-selection-mode t)” to “(delete-selection-mode 1)”.
version 4.3.12.1, 2009-08-14 • A minor implementation improvement. In one place, changed the use of functionp to fboundp for checking the existing of a emacs 23 feature recenter-top-bottom. Was using functionp because i forgot about fboundp.
version 4.3.12, 2009-08-13 • Alt+p is now “recenter-top-bottom” for emacs 23 users. In emacs 22, it is “recenter”.
version 4.3.11, 2009-08-05 • Added a hook to fix message-mode.
version 4.3.10, 2009-06-14 • fixed a previous/next reversal for f11/f12 keys in rcirc-mode-hook. • diff-mode uses some bindings in M-key space. Fixed by adding a diff-mode-hook. (thanks to lwarxx)
version 4.3.9, 2009-06-14 • unbind C-x 3 (use Alt+@ for split-window-horizontally) • unbind C-M-% (use Alt+% for query-replace-regexp). • unbind C-@ (use Alt+SPACE for set-mark-command). • unbind M-{ (use Alt+U for backward-paragraph). • unbind M-} (use Alt+O for forward-paragraph). Thanks to marciomazza
version 4.3.8, 2009-06-14 • added 【】 to select-text-in-quote.
version 4.3.7, 2009-05-27 • ibuffer's M-s changed in emacs 23, such that M-s is now a prefix. For Dvorak users, M-s should be isearch. This is reclaimed to be isearch. For qwerty users, M-s should be other-window. Fixed.
version 4.3.6, 2009-05-26 • dired's M-s changed in emacs 23, such that M-s is now a prefix. For Dvorak users, M-s should be isearch. This is reclaimed to be isearch. For qwerty users, M-s should be other-windox. Fixed.
version 4.3.5, 2009-05-10 • experimental modification to shrink-whitespaces.
version 4.3.4, 2009-04-19 • Added Alt+Shift+PageDown for forward-page (move cursor to the next ascii formfeed char (often displayed as ^L)). Same for PageDown key.
version 4.3.3, 2009-03-16 • Added Ctrl+Shift+n for opening a new window (make-frame-command). Removed “C-x 5 2”. Added Ctrl+Shift+w for closing window (delete-frame), removed “C-x 5 0”.
version 4.3.2, 2009-03-11 • Removed C-x o for other-window. (use Alt+s and Alt+Shift+s instead.)
version 4.3.1, 2009-03-04 • A better implementation for making M-t call M-TAB. So that, describe-key on M-t will show better documentation.
version 4.3.0, 2009-03-02 • Added Alt+Shift+x for cut-all and Alt+Shift+c for copy-all.
version 4.2.4, 2009-03-01 • Removed Ctrl+x Ctrl+w for write-file. Use Ctrl+Shift+s. • Fixed Ctrl+o for ibuffer to run find-file instead of ibuffer-visit-buffer-other-window-noselect.
version 4.2.3, 2009-03-01 • fixed a dired binding so that Ctrl+o runs find-file instead of dired-display-file
version 4.2.2, 2009-03-01 • Removed the default keybinding for split-window-vertically (Ctrl+x 2). Use Alt+2 instead. • The key “Ctrl+x Ctrl+b” is now ibuffer, instead of list-buffers. • “Ctrl+h m” now calls describe-major-mode.
version 4.2.1, 2009-02-28 Changed the keybinding for previous-user-buffer from Ctrl+← to Ctrl+PageUp. And previous-emacs-buffer from Ctrl+Shift+← to Ctrl+Shift+PageUp. Similar for the “next” versions. Rationale: The Ctrl+Arrow are standard editing shortcuts commond in Windows, Mac, Linux.
version 4.2.0, 2009-02-27 Added Alt+t for keyword completion. Rationale: The default M-TAB is used by Windows, Mac, Linux, to switch apps.
version 4.1.8, 2009-02-15 Corrected the keybinding for Save As (write-file)
version 4.1.7, 2008-12-10 Made compact-uncompact-block to work on text selection if there's one.
version 4.1.6, 2008-12-09. Added select-text-in-quote.
version 4.1.5, 2008-10-21. Added extend-selection by Nikolaj Schumacher.
version 4.1.4, 2008-10-20. Fixed close-current-buffer: sometimes when closing a buffer not associated with a file, it'll prompt whether to kill instead of whether to save.
version 4.1.3, 2008-10-18. Fixed minor bug in toggle-letter-case. It now works non-english letters such as éÉ and single letter word “a teapot” or words starting with a number “1st timer”. Thanks to Andreas Politz and Nikolaj Schumacher. • next-frame-command is renamed to switch-to-next-frame. Similar for previous-frame-command.
version 4.1.2, 2008-10-16. Removed C-x h for mark-whole-buffer. (use Ctrl+a instead) Improved compact-uncompact-block and shrink-whitespaces.
version 4.1.1, 2008-10-07. Removed unfill-paragraph and unfill-region because they are defined in ourcomments-util.el bundled with emacs 22, also because they are not used in this file now (compact-uncompact-block replaced most of their functionality).
version 4.1, 2008-10-06. Added keys for previous-user-buffer, next-user-buffer, next-frame-command, previous-frame-command, query-replace and query-replace-regexp, move-cursor-to-next-pane, move-cursor-to-previous-pane, split-window-horizontally, toggle-letter-case. Combined delete-blank-lines and just-one-space to shrink-whitespaces. Moved delete-window to be with delete-other-window.
version 4.0.1, 2008-09-23. Fixed C-o in dired mode.
version 4, 2008-09-21. Unbind almost all Meta-key and Ctrl-key space bindings. Added about 11 commands, such as next-user-buffer, close-current-buffer etc.
version 3.6, 2008-09-18. Reclaimed keybindings in text-mode.
version 3.5, 2008-09-16. Reclaimed keybindings in ibuffer.
version 3.4, 2008-09-06. Fixed key bindings in the Meta-key space in about 10 modes.
version 3.3, 2008-09-05. Fixed cua-mode-hook by setting symbol property 'CUA to nil, so that a bunch of no-select-* functions kludge is no longer needed. Thanks to Lennart Borgman.
version 3.2, 2008-09-02. Moved cua fix functions to modern_operations.el. The functinos are: no-select-cua-scroll-down, no-select-cua-scroll-up, no-select-backward-paragraph, no-select-forward-paragraph, no-select-beginning-of-buffer, no-select-end-of-buffer, no-select-move-end-of-line.
version 3.1, 2008-09-02. Added just-one-space, delete-blank-lines. Added fill-paragraph, unfill-paragraph. Added comment-dwim.
version 3, 2008-08-31. Added isearch. Added redo, kill-line-backward, shell-command. Added bug fix for cua-mode. Now, commands with Shift keys won't go into a selection mode.
version 2, 2008-08-29. Somewhat major change. Positions for undo, cut, copy, paste, paste previous, has been moved. Added delete-char, delete-backward-char, kill-word, backward-kill-word. Removed the now redundant binding of kill-word and backward-kill-word using the backspace key. Removed the other-frame binding.
version 1.1, 2007-12-18. changed keycode to consistantly use kbd syntax. Fixed a scroll-up and scroll-down mixup.
version 1.0, 2007-08-01. first version, by Xah Lee

View file

@ -1,64 +0,0 @@
-*- coding: utf-8 -*-
INSTALLATION INSTRUCTIONS
------------------------------
1. Unzip the folder.
If you downloaded a file named “ergoemacs-keybindings_v123.zip”, unzip it.
Now you should have a folder named “ergoemacs-keybindings_v123”.
------------------------------
2. Place the folder somewhere in your home directory. For examples:
On Windows:
C:\Users\mary\.emacs.d\ergoemacs-keybindings_v123
On Mac OS X or Linux:
/Users/mary/.emacs.d/ergoemacs-keybindings_v123
------------------------------
3. Specify your keyboard layout.
Place one of the following line in your emacs init file (~/.emacs):
(setenv "ERGOEMACS_KEYBOARD_LAYOUT" "us") ; US layout
(setenv "ERGOEMACS_KEYBOARD_LAYOUT" "dv") ; US Dvorak layout
(setenv "ERGOEMACS_KEYBOARD_LAYOUT" "sp") ; Spanish (Spain) (aka “Spanish (International sort)”)
(setenv "ERGOEMACS_KEYBOARD_LAYOUT" "it") ; Italian layout
(setenv "ERGOEMACS_KEYBOARD_LAYOUT" "colemak") ; Colemak layout
------------------------------
4. Make Emacs load the file, and turn on the mode.
Place the following lines in your emacs init file. Make sure that the path points to your file is correct. You do not need to have the file path end in “.el”.
;; load ErgoEmacs keybinding
(load "~/.emacs.d/ergoemacs-keybindings/ergoemacs-mode")
;; turn on minor mode ergoemacs-mode
(ergoemacs-mode 1)
These lines should be placed below your keyboard layout in step 3.
------------------------------
5. Restart emacs.
Now, your will be using the new keybinding. The shortcut for emacs's “M-x” is now “Alt+a”.
To turn off the mode, type “Alt+a” then “ergoemacs-mode”. After that, your keybinding is the same as GNU Emacs's default keybinding.
The command “ergoemacs-mode” toggles the minor mode.
--------------------------------------------------
Byte Compile Elisp Files (Optional)
If you like, you can byte-compile the elisp files. To byte compile them, call the command byte-compile-file, then the elisp file name. Once you do that, emacs will create a file with “.elc” ending, and will automatically load byte compiled file if there is one.
Byte compiled files makes loading and running programs about 5 or more times faster, but for small elisp files, the speed increse is probably not noticeable.
You do not need to change any lines in the emacs initialization given above.

View file

@ -1,106 +0,0 @@
;-*- coding: utf-8 -*-
;; Shortcuts for ERGOEMACS_KEYBOARD_LAYOUT=colemak
;;; --------------------------------------------------
;;; CURSOR MOVEMENTS
;; Single char cursor movement
(defconst ergoemacs-backward-char-key (kbd "M-n"))
(defconst ergoemacs-forward-char-key (kbd "M-i"))
(defconst ergoemacs-previous-line-key (kbd "M-u"))
(defconst ergoemacs-next-line-key (kbd "M-e"))
;; Move by word
(defconst ergoemacs-backward-word-key (kbd "M-l"))
(defconst ergoemacs-forward-word-key (kbd "M-y"))
;; Move by paragraph
(defconst ergoemacs-backward-paragraph-key (kbd "M-L"))
(defconst ergoemacs-forward-paragraph-key (kbd "M-Y"))
;; Move to beginning/ending of line
(defconst ergoemacs-move-beginning-of-line-key (kbd "M-h"))
(defconst ergoemacs-move-end-of-line-key (kbd "M-H"))
;; Move by screen (page up/down)
(defconst ergoemacs-scroll-down-key (kbd "M-U"))
(defconst ergoemacs-scroll-up-key (kbd "M-E"))
;; Move to beginning/ending of file
(defconst ergoemacs-beginning-of-buffer-key (kbd "M-N"))
(defconst ergoemacs-end-of-buffer-key (kbd "M-I"))
;; isearch
(defconst ergoemacs-isearch-forward-key (kbd "M-o"))
(defconst ergoemacs-isearch-backward-key (kbd "M-O"))
(defconst ergoemacs-recenter-key (kbd "M-;"))
;;; MAJOR EDITING COMMANDS
;; Delete previous/next char.
(defconst ergoemacs-delete-backward-char-key (kbd "M-s"))
(defconst ergoemacs-delete-char-key (kbd "M-t"))
; Delete previous/next word.
(defconst ergoemacs-backward-kill-word-key (kbd "M-f"))
(defconst ergoemacs-kill-word-key (kbd "M-p"))
; Copy Cut Paste, Paste previous
(defconst ergoemacs-kill-region-key (kbd "M-x"))
(defconst ergoemacs-kill-ring-save-key (kbd "M-c"))
(defconst ergoemacs-yank-key (kbd "M-v"))
(defconst ergoemacs-yank-pop-key (kbd "M-V"))
(defconst ergoemacs-copy-all-key (kbd "M-C"))
(defconst ergoemacs-cut-all-key (kbd "M-X"))
;; undo and redo
(defconst ergoemacs-redo-key (kbd "M-Z"))
(defconst ergoemacs-undo-key (kbd "M-z"))
; Kill line
(defconst ergoemacs-kill-line-key (kbd "M-d"))
(defconst ergoemacs-kill-line-backward-key (kbd "M-D"))
;;; Textual Transformation
(defconst ergoemacs-mark-paragraph-key (kbd "M-S-SPC"))
(defconst ergoemacs-shrink-whitespaces-key (kbd "M-w"))
(defconst ergoemacs-comment-dwim-key (kbd "M-'"))
(defconst ergoemacs-toggle-letter-case-key (kbd "M-/"))
; keyword completion, because Alt+Tab is used by OS
(defconst ergoemacs-call-keyword-completion-key (kbd "M-g"))
; Hard-wrap/un-hard-wrap paragraph
(defconst ergoemacs-compact-uncompact-block-key (kbd "M-q"))
;;; EMACS'S SPECIAL COMMANDS
; Mark point.
(defconst ergoemacs-set-mark-command-key (kbd "M-SPC"))
(defconst ergoemacs-execute-extended-command-key (kbd "M-a"))
(defconst ergoemacs-shell-command-key (kbd "M-A"))
;;; WINDOW SPLITING
(defconst ergoemacs-move-cursor-next-pane-key (kbd "M-r"))
(defconst ergoemacs-move-cursor-previous-pane-key (kbd "M-R"))
;;; --------------------------------------------------
;;; OTHER SHORTCUTS
(defconst ergoemacs-switch-to-previous-frame-key (kbd "M-~"))
(defconst ergoemacs-switch-to-next-frame-key (kbd "M-`"))
(defconst ergoemacs-query-replace-key (kbd "M-5"))
(defconst ergoemacs-query-replace-regexp-key (kbd "M-%"))
(defconst ergoemacs-delete-other-windows-key (kbd "M-1"))
(defconst ergoemacs-delete-window-key (kbd "M-!"))
(defconst ergoemacs-split-window-vertically-key (kbd "M-2"))
(defconst ergoemacs-split-window-horizontally-key (kbd "M-@"))
(defconst ergoemacs-extend-selection-key (kbd "M-8"))
(defconst ergoemacs-select-text-in-quote-key (kbd "M-*"))

View file

@ -1,106 +0,0 @@
;-*- coding: utf-8 -*-
;; Shortcuts for ERGOEMACS_KEYBOARD_LAYOUT=dv | us_dvorak
;;; --------------------------------------------------
;;; CURSOR MOVEMENTS
;; Single char cursor movement
(defconst ergoemacs-backward-char-key (kbd "M-h"))
(defconst ergoemacs-forward-char-key (kbd "M-n"))
(defconst ergoemacs-previous-line-key (kbd "M-c"))
(defconst ergoemacs-next-line-key (kbd "M-t"))
;; Move by word
(defconst ergoemacs-backward-word-key (kbd "M-g"))
(defconst ergoemacs-forward-word-key (kbd "M-r"))
;; Move by paragraph
(defconst ergoemacs-backward-paragraph-key (kbd "M-G"))
(defconst ergoemacs-forward-paragraph-key (kbd "M-R"))
;; Move to beginning/ending of line
(defconst ergoemacs-move-beginning-of-line-key (kbd "M-d"))
(defconst ergoemacs-move-end-of-line-key (kbd "M-D"))
;; Move by screen (page up/down)
(defconst ergoemacs-scroll-down-key (kbd "M-C"))
(defconst ergoemacs-scroll-up-key (kbd "M-T"))
;; Move to beginning/ending of file
(defconst ergoemacs-beginning-of-buffer-key (kbd "M-H"))
(defconst ergoemacs-end-of-buffer-key (kbd "M-N"))
;; isearch
(defconst ergoemacs-isearch-forward-key (kbd "M-s"))
(defconst ergoemacs-isearch-backward-key (kbd "M-S"))
(defconst ergoemacs-recenter-key (kbd "M-l"))
;;; MAJOR EDITING COMMANDS
;; Delete previous/next char.
(defconst ergoemacs-delete-backward-char-key (kbd "M-e"))
(defconst ergoemacs-delete-char-key (kbd "M-u"))
; Delete previous/next word.
(defconst ergoemacs-backward-kill-word-key (kbd "M-."))
(defconst ergoemacs-kill-word-key (kbd "M-p"))
; Copy Cut Paste, Paste previous
(defconst ergoemacs-kill-region-key (kbd "M-q"))
(defconst ergoemacs-kill-ring-save-key (kbd "M-j"))
(defconst ergoemacs-yank-key (kbd "M-k"))
(defconst ergoemacs-yank-pop-key (kbd "M-K"))
(defconst ergoemacs-copy-all-key (kbd "M-J"))
(defconst ergoemacs-cut-all-key (kbd "M-Q"))
;; undo and redo
(defconst ergoemacs-redo-key (kbd "M-:"))
(defconst ergoemacs-undo-key (kbd "M-;"))
; Kill line
(defconst ergoemacs-kill-line-key (kbd "M-i"))
(defconst ergoemacs-kill-line-backward-key (kbd "M-I"))
;;; Textual Transformation
(defconst ergoemacs-mark-paragraph-key (kbd "M-S-SPC"))
(defconst ergoemacs-shrink-whitespaces-key (kbd "M-,"))
(defconst ergoemacs-comment-dwim-key (kbd "M--"))
(defconst ergoemacs-toggle-letter-case-key (kbd "M-z"))
; keyword completion, because Alt+Tab is used by OS
(defconst ergoemacs-call-keyword-completion-key (kbd "M-y"))
; Hard-wrap/un-hard-wrap paragraph
(defconst ergoemacs-compact-uncompact-block-key (kbd "M-'"))
;;; EMACS'S SPECIAL COMMANDS
; Mark point.
(defconst ergoemacs-set-mark-command-key (kbd "M-SPC"))
(defconst ergoemacs-execute-extended-command-key (kbd "M-a"))
(defconst ergoemacs-shell-command-key (kbd "M-A"))
;;; WINDOW SPLITING
(defconst ergoemacs-move-cursor-next-pane-key (kbd "M-o"))
(defconst ergoemacs-move-cursor-previous-pane-key (kbd "M-O"))
;;; --------------------------------------------------
;;; OTHER SHORTCUTS
(defconst ergoemacs-switch-to-previous-frame-key (kbd "M-~"))
(defconst ergoemacs-switch-to-next-frame-key (kbd "M-`"))
(defconst ergoemacs-query-replace-key (kbd "M-5"))
(defconst ergoemacs-query-replace-regexp-key (kbd "M-%"))
(defconst ergoemacs-delete-other-windows-key (kbd "M-1"))
(defconst ergoemacs-delete-window-key (kbd "M-!"))
(defconst ergoemacs-split-window-vertically-key (kbd "M-2"))
(defconst ergoemacs-split-window-horizontally-key (kbd "M-@"))
(defconst ergoemacs-extend-selection-key (kbd "M-8"))
(defconst ergoemacs-select-text-in-quote-key (kbd "M-*"))

View file

@ -1,106 +0,0 @@
;-*- coding: utf-8 -*-
;; Shortcuts for ERGOEMACS_KEYBOARD_LAYOUT=it
;;; --------------------------------------------------
;;; CURSOR MOVEMENTS
;; Single char cursor movement
(defconst ergoemacs-backward-char-key (kbd "M-j"))
(defconst ergoemacs-forward-char-key (kbd "M-l"))
(defconst ergoemacs-previous-line-key (kbd "M-i"))
(defconst ergoemacs-next-line-key (kbd "M-k"))
;; Move by word
(defconst ergoemacs-backward-word-key (kbd "M-u"))
(defconst ergoemacs-forward-word-key (kbd "M-o"))
;; Move by paragraph
(defconst ergoemacs-backward-paragraph-key (kbd "M-U"))
(defconst ergoemacs-forward-paragraph-key (kbd "M-O"))
;; Move to beginning/ending of line
(defconst ergoemacs-move-beginning-of-line-key (kbd "M-h"))
(defconst ergoemacs-move-end-of-line-key (kbd "M-H"))
;; Move by screen (page up/down)
(defconst ergoemacs-scroll-down-key (kbd "M-I"))
(defconst ergoemacs-scroll-up-key (kbd "M-K"))
;; Move to beginning/ending of file
(defconst ergoemacs-beginning-of-buffer-key (kbd "M-J"))
(defconst ergoemacs-end-of-buffer-key (kbd "M-L"))
;; isearch
(defconst ergoemacs-isearch-forward-key (kbd "M-ò"))
(defconst ergoemacs-isearch-backward-key (kbd "M-ç"))
(defconst ergoemacs-recenter-key (kbd "M-p"))
;;; MAJOR EDITING COMMANDS
;; Delete previous/next char.
(defconst ergoemacs-delete-backward-char-key (kbd "M-d"))
(defconst ergoemacs-delete-char-key (kbd "M-f"))
; Delete previous/next word.
(defconst ergoemacs-backward-kill-word-key (kbd "M-e"))
(defconst ergoemacs-kill-word-key (kbd "M-r"))
; Copy Cut Paste, Paste previous
(defconst ergoemacs-kill-region-key (kbd "M-x"))
(defconst ergoemacs-kill-ring-save-key (kbd "M-c"))
(defconst ergoemacs-yank-key (kbd "M-v"))
(defconst ergoemacs-yank-pop-key (kbd "M-V"))
(defconst ergoemacs-copy-all-key (kbd "M-C"))
(defconst ergoemacs-cut-all-key (kbd "M-X"))
;; undo and redo
(defconst ergoemacs-redo-key (kbd "M-Z"))
(defconst ergoemacs-undo-key (kbd "M-z"))
; Kill line
(defconst ergoemacs-kill-line-key (kbd "M-g"))
(defconst ergoemacs-kill-line-backward-key (kbd "M-G"))
;;; Textual Transformation
(defconst ergoemacs-mark-paragraph-key (kbd "M-S-SPC"))
(defconst ergoemacs-shrink-whitespaces-key (kbd "M-w"))
(defconst ergoemacs-comment-dwim-key (kbd "M-à"))
(defconst ergoemacs-toggle-letter-case-key (kbd "M--"))
; keyword completion, because Alt+Tab is used by OS
(defconst ergoemacs-call-keyword-completion-key (kbd "M-t"))
; Hard-wrap/un-hard-wrap paragraph
(defconst ergoemacs-compact-uncompact-block-key (kbd "M-q"))
;;; EMACS'S SPECIAL COMMANDS
; Mark point.
(defconst ergoemacs-set-mark-command-key (kbd "M-SPC"))
(defconst ergoemacs-execute-extended-command-key (kbd "M-a"))
(defconst ergoemacs-shell-command-key (kbd "M-A"))
;;; WINDOW SPLITING
(defconst ergoemacs-move-cursor-next-pane-key (kbd "M-s"))
(defconst ergoemacs-move-cursor-previous-pane-key (kbd "M-S"))
;;; --------------------------------------------------
;;; OTHER SHORTCUTS
(defconst ergoemacs-switch-to-previous-frame-key (kbd "M-|"))
(defconst ergoemacs-switch-to-next-frame-key (kbd "M-\\"))
(defconst ergoemacs-query-replace-key (kbd "M-5"))
(defconst ergoemacs-query-replace-regexp-key (kbd "M-%"))
(defconst ergoemacs-delete-other-windows-key (kbd "M-1"))
(defconst ergoemacs-delete-window-key (kbd "M-!"))
(defconst ergoemacs-split-window-vertically-key (kbd "M-2"))
(defconst ergoemacs-split-window-horizontally-key (kbd "M-\""))
(defconst ergoemacs-extend-selection-key (kbd "M-8"))
(defconst ergoemacs-select-text-in-quote-key (kbd "M-("))

View file

@ -1,106 +0,0 @@
;-*- coding: utf-8 -*-
;; Shortcuts for ERGOEMACS_KEYBOARD_LAYOUT=sp
;;; --------------------------------------------------
;;; CURSOR MOVEMENTS
;; Single char cursor movement
(defconst ergoemacs-backward-char-key (kbd "M-j"))
(defconst ergoemacs-forward-char-key (kbd "M-l"))
(defconst ergoemacs-previous-line-key (kbd "M-i"))
(defconst ergoemacs-next-line-key (kbd "M-k"))
;; Move by word
(defconst ergoemacs-backward-word-key (kbd "M-u"))
(defconst ergoemacs-forward-word-key (kbd "M-o"))
;; Move by paragraph
(defconst ergoemacs-backward-paragraph-key (kbd "M-U"))
(defconst ergoemacs-forward-paragraph-key (kbd "M-O"))
;; Move to beginning/ending of line
(defconst ergoemacs-move-beginning-of-line-key (kbd "M-h"))
(defconst ergoemacs-move-end-of-line-key (kbd "M-H"))
;; Move by screen (page up/down)
(defconst ergoemacs-scroll-down-key (kbd "M-I"))
(defconst ergoemacs-scroll-up-key (kbd "M-K"))
;; Move to beginning/ending of file
(defconst ergoemacs-beginning-of-buffer-key (kbd "M-J"))
(defconst ergoemacs-end-of-buffer-key (kbd "M-L"))
;; isearch
(defconst ergoemacs-isearch-forward-key (kbd "M-ñ"))
(defconst ergoemacs-isearch-backward-key (kbd "M-Ñ"))
(defconst ergoemacs-recenter-key (kbd "M-p"))
;;; MAJOR EDITING COMMANDS
;; Delete previous/next char.
(defconst ergoemacs-delete-backward-char-key (kbd "M-d"))
(defconst ergoemacs-delete-char-key (kbd "M-f"))
; Delete previous/next word.
(defconst ergoemacs-backward-kill-word-key (kbd "M-e"))
(defconst ergoemacs-kill-word-key (kbd "M-r"))
; Copy Cut Paste, Paste previous
(defconst ergoemacs-kill-region-key (kbd "M-x"))
(defconst ergoemacs-kill-ring-save-key (kbd "M-c"))
(defconst ergoemacs-yank-key (kbd "M-v"))
(defconst ergoemacs-yank-pop-key (kbd "M-V"))
(defconst ergoemacs-copy-all-key (kbd "M-C"))
(defconst ergoemacs-cut-all-key (kbd "M-X"))
;; undo and redo
(defconst ergoemacs-redo-key (kbd "M-Z"))
(defconst ergoemacs-undo-key (kbd "M-z"))
; Kill line
(defconst ergoemacs-kill-line-key (kbd "M-g"))
(defconst ergoemacs-kill-line-backward-key (kbd "M-G"))
;;; Textual Transformation
(defconst ergoemacs-mark-paragraph-key (kbd "M-S-SPC"))
(defconst ergoemacs-shrink-whitespaces-key (kbd "M-w"))
(defconst ergoemacs-comment-dwim-key (kbd "M-´"))
(defconst ergoemacs-toggle-letter-case-key (kbd "M--"))
; keyword completion, because Alt+Tab is used by OS
(defconst ergoemacs-call-keyword-completion-key (kbd "M-t"))
; Hard-wrap/un-hard-wrap paragraph
(defconst ergoemacs-compact-uncompact-block-key (kbd "M-q"))
;;; EMACS'S SPECIAL COMMANDS
; Mark point.
(defconst ergoemacs-set-mark-command-key (kbd "M-SPC"))
(defconst ergoemacs-execute-extended-command-key (kbd "M-a"))
(defconst ergoemacs-shell-command-key (kbd "M-A"))
;;; WINDOW SPLITING
(defconst ergoemacs-move-cursor-next-pane-key (kbd "M-s"))
(defconst ergoemacs-move-cursor-previous-pane-key (kbd "M-S"))
;;; --------------------------------------------------
;;; OTHER SHORTCUTS
(defconst ergoemacs-switch-to-previous-frame-key (kbd "M-ª"))
(defconst ergoemacs-switch-to-next-frame-key (kbd "M-º"))
(defconst ergoemacs-query-replace-key (kbd "M-5"))
(defconst ergoemacs-query-replace-regexp-key (kbd "M-%"))
(defconst ergoemacs-delete-other-windows-key (kbd "M-1"))
(defconst ergoemacs-delete-window-key (kbd "M-!"))
(defconst ergoemacs-split-window-vertically-key (kbd "M-2"))
(defconst ergoemacs-split-window-horizontally-key (kbd "M-\""))
(defconst ergoemacs-extend-selection-key (kbd "M-8"))
(defconst ergoemacs-select-text-in-quote-key (kbd "M-("))

View file

@ -1,106 +0,0 @@
;-*- coding: utf-8 -*-
;; Shortcuts for ERGOEMACS_KEYBOARD_LAYOUT=us
;;; --------------------------------------------------
;;; CURSOR MOVEMENTS
;; Single char cursor movement
(defconst ergoemacs-backward-char-key (kbd "M-j"))
(defconst ergoemacs-forward-char-key (kbd "M-l"))
(defconst ergoemacs-previous-line-key (kbd "M-i"))
(defconst ergoemacs-next-line-key (kbd "M-k"))
;; Move by word
(defconst ergoemacs-backward-word-key (kbd "M-u"))
(defconst ergoemacs-forward-word-key (kbd "M-o"))
;; Move by paragraph
(defconst ergoemacs-backward-paragraph-key (kbd "M-U"))
(defconst ergoemacs-forward-paragraph-key (kbd "M-O"))
;; Move to beginning/ending of line
(defconst ergoemacs-move-beginning-of-line-key (kbd "M-h"))
(defconst ergoemacs-move-end-of-line-key (kbd "M-H"))
;; Move by screen (page up/down)
(defconst ergoemacs-scroll-down-key (kbd "M-I"))
(defconst ergoemacs-scroll-up-key (kbd "M-K"))
;; Move to beginning/ending of file
(defconst ergoemacs-beginning-of-buffer-key (kbd "M-J"))
(defconst ergoemacs-end-of-buffer-key (kbd "M-L"))
;; isearch
(defconst ergoemacs-isearch-forward-key (kbd "M-;"))
(defconst ergoemacs-isearch-backward-key (kbd "M-:"))
(defconst ergoemacs-recenter-key (kbd "M-p"))
;;; MAJOR EDITING COMMANDS
;; Delete previous/next char.
(defconst ergoemacs-delete-backward-char-key (kbd "M-d"))
(defconst ergoemacs-delete-char-key (kbd "M-f"))
; Delete previous/next word.
(defconst ergoemacs-backward-kill-word-key (kbd "M-e"))
(defconst ergoemacs-kill-word-key (kbd "M-r"))
; Copy Cut Paste, Paste previous
(defconst ergoemacs-kill-region-key (kbd "M-x"))
(defconst ergoemacs-kill-ring-save-key (kbd "M-c"))
(defconst ergoemacs-yank-key (kbd "M-v"))
(defconst ergoemacs-yank-pop-key (kbd "M-V"))
(defconst ergoemacs-copy-all-key (kbd "M-C"))
(defconst ergoemacs-cut-all-key (kbd "M-X"))
;; undo and redo
(defconst ergoemacs-redo-key (kbd "M-Z"))
(defconst ergoemacs-undo-key (kbd "M-z"))
; Kill line
(defconst ergoemacs-kill-line-key (kbd "M-g"))
(defconst ergoemacs-kill-line-backward-key (kbd "M-G"))
;;; Textual Transformation
(defconst ergoemacs-mark-paragraph-key (kbd "M-S-SPC"))
(defconst ergoemacs-shrink-whitespaces-key (kbd "M-w"))
(defconst ergoemacs-comment-dwim-key (kbd "M-'"))
(defconst ergoemacs-toggle-letter-case-key (kbd "M-/"))
; keyword completion, because Alt+Tab is used by OS
(defconst ergoemacs-call-keyword-completion-key (kbd "M-t"))
; Hard-wrap/un-hard-wrap paragraph
(defconst ergoemacs-compact-uncompact-block-key (kbd "M-q"))
;;; EMACS'S SPECIAL COMMANDS
; Mark point.
(defconst ergoemacs-set-mark-command-key (kbd "M-SPC"))
(defconst ergoemacs-execute-extended-command-key (kbd "M-a"))
(defconst ergoemacs-shell-command-key (kbd "M-A"))
;;; WINDOW SPLITING
(defconst ergoemacs-move-cursor-next-pane-key (kbd "M-s"))
(defconst ergoemacs-move-cursor-previous-pane-key (kbd "M-S"))
;;; --------------------------------------------------
;;; OTHER SHORTCUTS
(defconst ergoemacs-switch-to-previous-frame-key (kbd "M-~"))
(defconst ergoemacs-switch-to-next-frame-key (kbd "M-`"))
(defconst ergoemacs-query-replace-key (kbd "M-5"))
(defconst ergoemacs-query-replace-regexp-key (kbd "M-%"))
(defconst ergoemacs-delete-other-windows-key (kbd "M-1"))
(defconst ergoemacs-delete-window-key (kbd "M-!"))
(defconst ergoemacs-split-window-vertically-key (kbd "M-2"))
(defconst ergoemacs-split-window-horizontally-key (kbd "M-@"))
(defconst ergoemacs-extend-selection-key (kbd "M-8"))
(defconst ergoemacs-select-text-in-quote-key (kbd "M-*"))

View file

@ -1,379 +0,0 @@
;-*- coding: utf-8 -*-
;; ergoemacs-mode.el -- A emacs keybinding set based on ergonomics.
;; Copyright © 2007, 2008, 2009 by Xah Lee
;; Copyright © 2009 by David Capello
;; Author: Xah Lee ( http://xahlee.org/ ), David Capello ( http://www.davidcapello.com.ar/ )
;; Version: 5.1
;; Keywords: qwerty, dvorak, keybinding, ergonomic, colemak
;; You can redistribute this program and/or modify it under the terms
;; of the GNU General Public License as published by the Free Software
;; Foundation; either version 2, or (at your option) any later
;; version.
;;; DESCRIPTION
;; This keybinding set puts the most frequently used emacs keyboard
;; shortcuts into the most easy-to-type spots.
;;
;; For complete detail, see:
;; http://xahlee.org/emacs/ergonomic_emacs_keybinding.html
;;; INSTALL
;; See the file “_INSTALL.txt”.
;;; HISTORY
;; See the file “_HISTORY.txt”.
;;; ACKNOWLEDGMENT
;; Thanks to Nikolaj Schumacher for his implementation of extend-selection.
;; Thanks to Andreas Politz and Nikolaj Schumacher for correcting/improving implementation of toggle-letter-case.
;; Thanks to Lennart Borgman for several suggestions on code to prevent shortcuts involving shift key to start select text when CUA-mode is on.
;; Thanks to David Capello for contribution to shrink-whitespaces.
;; Thanks to marciomazza for spotting several default bindings that should have been unbound.
;; Thanks to those who have created and improved the version for Colemak layout. They are (by date): “vockets”, “postivan”, Graham Poulter.
;; Thanks to lwarxx for bug report on diff-mode
;; Thanks to many users who send in comments and appreciations on this.
;;; --------------------------------------------------
;; Add this same directory to load elisp files
(add-to-list 'load-path (file-name-directory (or load-file-name buffer-file-name)))
;; Ergoemacs-keybindings version
(defconst ergoemacs-mode-version "5.1"
"Ergoemacs-keybindings minor mode version number.")
;; Include extra files
(load "functions")
(load "ergoemacs-unbind")
;; Load the keyboard layout looking the ERGOEMACS_KEYBOARD_LAYOUT
;; enviroment variable (this variable is set by ErgoEmacs runner)
(defvar ergoemacs-keyboard-layout (getenv "ERGOEMACS_KEYBOARD_LAYOUT")
"It is set with the value of ERGOEMACS_KEYBOARD_LAYOUT
enviroment variable. The possible values are:
us = US English QWERTY keyboard layout
dv = US-Dvorak keyboard layout
sp = Spanish keyboard layout
it = Italian keyboard layout
colemak = Ergonomic Colemak keyboard layout")
(cond
((string= ergoemacs-keyboard-layout "us")
(load "ergoemacs-layout-us"))
((or (string= ergoemacs-keyboard-layout "us_dvorak")
(string= ergoemacs-keyboard-layout "dv"))
(load "ergoemacs-layout-dv"))
((string= ergoemacs-keyboard-layout "sp")
(load "ergoemacs-layout-sp"))
((or (string= ergoemacs-keyboard-layout "it")
(string= ergoemacs-keyboard-layout "it142"))
(load "ergoemacs-layout-it"))
((string= ergoemacs-keyboard-layout "colemak")
(load "ergoemacs-layout-colemak"))
(t ; US qwerty by default
(load "ergoemacs-layout-us"))
)
;;; --------------------------------------------------
;;; ergoemacs-keymap
(defvar ergoemacs-keymap (make-sparse-keymap)
"ErgoEmacs minor mode keymap.")
;; Single char cursor movement
(define-key ergoemacs-keymap ergoemacs-backward-char-key 'backward-char)
(define-key ergoemacs-keymap ergoemacs-forward-char-key 'forward-char)
(define-key ergoemacs-keymap ergoemacs-previous-line-key 'previous-line)
(define-key ergoemacs-keymap ergoemacs-next-line-key 'next-line)
;; Move by word
(define-key ergoemacs-keymap ergoemacs-backward-word-key 'backward-word)
(define-key ergoemacs-keymap ergoemacs-forward-word-key 'forward-word)
;; Move by paragraph
(define-key ergoemacs-keymap ergoemacs-backward-paragraph-key 'backward-paragraph)
(define-key ergoemacs-keymap ergoemacs-forward-paragraph-key 'forward-paragraph)
;; Move to beginning/ending of line
(define-key ergoemacs-keymap ergoemacs-move-beginning-of-line-key 'move-beginning-of-line)
(define-key ergoemacs-keymap ergoemacs-move-end-of-line-key 'move-end-of-line)
;; Move by screen (page up/down)
(define-key ergoemacs-keymap ergoemacs-scroll-down-key 'scroll-down)
(define-key ergoemacs-keymap ergoemacs-scroll-up-key 'scroll-up)
;; Move to beginning/ending of file
(define-key ergoemacs-keymap ergoemacs-beginning-of-buffer-key 'beginning-of-buffer)
(define-key ergoemacs-keymap ergoemacs-end-of-buffer-key 'end-of-buffer)
;; isearch
(define-key ergoemacs-keymap ergoemacs-isearch-forward-key 'isearch-forward)
(define-key ergoemacs-keymap ergoemacs-isearch-backward-key 'isearch-backward)
(define-key ergoemacs-keymap ergoemacs-recenter-key 'recenter)
;;; MAJOR EDITING COMMANDS
;; Delete previous/next char.
(define-key ergoemacs-keymap ergoemacs-delete-backward-char-key 'delete-backward-char)
(define-key ergoemacs-keymap ergoemacs-delete-char-key 'delete-char)
; Delete previous/next word.
(define-key ergoemacs-keymap ergoemacs-backward-kill-word-key 'backward-kill-word)
(define-key ergoemacs-keymap ergoemacs-kill-word-key 'kill-word)
; Copy Cut Paste, Paste previous
(define-key ergoemacs-keymap ergoemacs-kill-region-key 'kill-region)
(define-key ergoemacs-keymap ergoemacs-kill-ring-save-key 'kill-ring-save)
(define-key ergoemacs-keymap ergoemacs-yank-key 'yank)
(define-key ergoemacs-keymap ergoemacs-yank-pop-key 'yank-pop)
(define-key ergoemacs-keymap ergoemacs-copy-all-key 'copy-all)
(define-key ergoemacs-keymap ergoemacs-cut-all-key 'cut-all)
;; undo and redo
(define-key ergoemacs-keymap ergoemacs-redo-key 'redo)
(define-key ergoemacs-keymap ergoemacs-undo-key 'undo)
; Kill line
(define-key ergoemacs-keymap ergoemacs-kill-line-key 'kill-line)
(define-key ergoemacs-keymap ergoemacs-kill-line-backward-key 'kill-line-backward)
;;; Textual Transformation
(define-key ergoemacs-keymap ergoemacs-mark-paragraph-key 'mark-paragraph)
(define-key ergoemacs-keymap ergoemacs-shrink-whitespaces-key 'shrink-whitespaces)
(define-key ergoemacs-keymap ergoemacs-comment-dwim-key 'comment-dwim)
(define-key ergoemacs-keymap ergoemacs-toggle-letter-case-key 'toggle-letter-case)
; keyword completion, because Alt+Tab is used by OS
(define-key ergoemacs-keymap ergoemacs-call-keyword-completion-key 'call-keyword-completion)
; Hard-wrap/un-hard-wrap paragraph
(define-key ergoemacs-keymap ergoemacs-compact-uncompact-block-key 'compact-uncompact-block)
;;; EMACS'S SPECIAL COMMANDS
; Mark point.
(define-key ergoemacs-keymap ergoemacs-set-mark-command-key 'set-mark-command)
(define-key ergoemacs-keymap ergoemacs-execute-extended-command-key 'execute-extended-command)
(define-key ergoemacs-keymap ergoemacs-shell-command-key 'shell-command)
;;; WINDOW SPLITING
(define-key ergoemacs-keymap ergoemacs-move-cursor-next-pane-key 'move-cursor-next-pane)
(define-key ergoemacs-keymap ergoemacs-move-cursor-previous-pane-key 'move-cursor-previous-pane)
;;; --------------------------------------------------
;;; STANDARD SHORTCUTS
(define-key ergoemacs-keymap (kbd "C-n") 'new-empty-buffer)
(define-key ergoemacs-keymap (kbd "C-S-n") 'make-frame-command)
(define-key ergoemacs-keymap (kbd "C-o") 'find-file)
(define-key ergoemacs-keymap (kbd "C-w") 'close-current-buffer)
(define-key ergoemacs-keymap (kbd "C-s") 'save-buffer)
(define-key ergoemacs-keymap (kbd "C-S-s") 'write-file)
(define-key ergoemacs-keymap (kbd "C-p") 'print-buffer)
(define-key ergoemacs-keymap (kbd "C-a") 'mark-whole-buffer)
(define-key ergoemacs-keymap (kbd "C-S-w") 'delete-frame)
(define-key ergoemacs-keymap (kbd "C-f") 'search-forward)
(define-key ergoemacs-keymap (kbd "<delete>") 'delete-char) ; the Del key for forward delete. Needed if C-d is set to nil.
(define-key ergoemacs-keymap (kbd "C-<prior>") 'previous-user-buffer)
(define-key ergoemacs-keymap (kbd "C-<next>") 'next-user-buffer)
(define-key ergoemacs-keymap (kbd "C-S-<prior>") 'previous-emacs-buffer)
(define-key ergoemacs-keymap (kbd "C-S-<next>") 'next-emacs-buffer)
(define-key ergoemacs-keymap (kbd "M-S-<prior>") 'backward-page)
(define-key ergoemacs-keymap (kbd "M-S-<next>") 'forward-page)
(define-key ergoemacs-keymap (kbd "C-x C-b") 'ibuffer)
(define-key ergoemacs-keymap (kbd "C-h m") 'describe-major-mode)
(define-key ergoemacs-keymap (kbd "C-h o") 'where-is-old-binding)
;; Ctrl+Break is a common IDE shortcut to stop compilation/find/grep
(define-key ergoemacs-keymap (kbd "C-<pause>") 'kill-compilation)
;;; --------------------------------------------------
;;; OTHER SHORTCUTS
(define-key ergoemacs-keymap ergoemacs-switch-to-previous-frame-key 'switch-to-previous-frame)
(define-key ergoemacs-keymap ergoemacs-switch-to-next-frame-key 'switch-to-next-frame)
(define-key ergoemacs-keymap ergoemacs-query-replace-key 'query-replace)
(define-key ergoemacs-keymap ergoemacs-query-replace-regexp-key 'query-replace-regexp)
(define-key ergoemacs-keymap ergoemacs-delete-other-windows-key 'delete-other-windows)
(define-key ergoemacs-keymap ergoemacs-delete-window-key 'delete-window)
(define-key ergoemacs-keymap ergoemacs-split-window-vertically-key 'split-window-vertically)
(define-key ergoemacs-keymap ergoemacs-split-window-horizontally-key 'split-window-horizontally)
(define-key ergoemacs-keymap ergoemacs-extend-selection-key 'extend-selection)
(define-key ergoemacs-keymap ergoemacs-select-text-in-quote-key 'select-text-in-quote)
;;----------------------------------------------------------------------
;; ErgoEmacs hooks
(defun ergoemacs-cua-hook ()
"Prevent `cua-mode' from going into selection mode when commands with Shift key is used."
(put 'cua-scroll-down 'CUA nil)
(put 'cua-scroll-up 'CUA nil)
(put 'backward-paragraph 'CUA nil)
(put 'forward-paragraph 'CUA nil)
(put 'beginning-of-buffer 'CUA nil)
(put 'end-of-buffer 'CUA nil)
(put 'move-end-of-line 'CUA nil)
)
(defun ergoemacs-minibuffer-setup-hook ()
"Hook for minibuffer to move through history with previous-line and next-line keys."
(defvar ergoemacs-minibuffer-keymap (copy-keymap ergoemacs-keymap))
(define-key ergoemacs-minibuffer-keymap ergoemacs-previous-line-key 'previous-history-element)
(define-key ergoemacs-minibuffer-keymap ergoemacs-next-line-key 'next-history-element)
(define-key ergoemacs-minibuffer-keymap (kbd "<f11>") 'previous-history-element)
(define-key ergoemacs-minibuffer-keymap (kbd "<f12>") 'next-history-element)
(define-key ergoemacs-minibuffer-keymap (kbd "S-<f11>") 'previous-matching-history-element)
(define-key ergoemacs-minibuffer-keymap (kbd "S-<f12>") 'next-matching-history-element)
(add-to-list 'minor-mode-overriding-map-alist (cons 'ergoemacs-mode ergoemacs-minibuffer-keymap))
)
(defun ergoemacs-isearch-hook ()
"Hook for `isearch-mode-hook' so ergoemacs keybindings are not lost."
;; TODO restore these keys! (it is not necessary, when the
;; ergoemacs-isearch-hook is removed from isearch-mode-hook)
(define-key isearch-mode-map (kbd "M-p") 'nil) ; was isearch-ring-retreat
(define-key isearch-mode-map (kbd "M-n") 'nil) ; was isearch-ring-advance
(define-key isearch-mode-map (kbd "M-y") 'nil) ; was isearch-yank-kill
(define-key isearch-mode-map (kbd "M-c") 'nil) ; was isearch-toggle-case-fold
(define-key isearch-mode-map (kbd "M-r") 'nil) ; was isearch-toggle-regexp
(define-key isearch-mode-map (kbd "M-e") 'nil) ; was isearch-edit-string
(define-key isearch-mode-map ergoemacs-isearch-forward-key 'isearch-repeat-forward)
(define-key isearch-mode-map ergoemacs-isearch-backward-key 'isearch-repeat-backward)
(define-key isearch-mode-map ergoemacs-recenter-key 'recenter)
(define-key isearch-mode-map ergoemacs-yank-key 'isearch-yank-kill)
;; isearch-other-control-char sends the key to the original buffer and cancels isearch
(define-key isearch-mode-map ergoemacs-kill-ring-save-key 'isearch-other-control-char)
(define-key isearch-mode-map ergoemacs-kill-word-key 'isearch-other-control-char)
(define-key isearch-mode-map ergoemacs-backward-kill-word-key 'isearch-other-control-char)
(define-key isearch-mode-map (kbd "<f11>") 'isearch-ring-retreat)
(define-key isearch-mode-map (kbd "<f12>") 'isearch-ring-advance)
)
;; Hook for interpreters
(defun ergoemacs-comint-hook ()
"Hook for `comint-mode-hook'."
(define-key comint-mode-map (kbd "<f11>") 'comint-previous-input)
(define-key comint-mode-map (kbd "<f12>") 'comint-next-input)
(define-key comint-mode-map (kbd "S-<f11>") 'comint-previous-matching-input)
(define-key comint-mode-map (kbd "S-<f12>") 'comint-next-matching-input)
)
;; Log edit mode
(defun ergoemacs-log-edit-hook ()
"Hook for `log-edit-mode-hook'."
(define-key log-edit-mode-map (kbd "<f11>") 'log-edit-previous-comment)
(define-key log-edit-mode-map (kbd "<f12>") 'log-edit-next-comment)
(define-key log-edit-mode-map (kbd "S-<f11>") 'log-edit-previous-comment)
(define-key log-edit-mode-map (kbd "S-<f12>") 'log-edit-next-comment)
)
(defun ergoemacs-eshell-hook ()
"Hook for `eshell-mode-hook', to redefine some ErgoEmacs keys so they are more useful."
;; Redefining ergoemacs-move-beginning-of-line-key to eshell-bol in eshell-mode-map
;; does not work, we have to use minor-mode-overriding-map-alist in this case
(defvar ergoemacs-eshell-keymap (copy-keymap ergoemacs-keymap))
(define-key ergoemacs-eshell-keymap ergoemacs-move-beginning-of-line-key 'eshell-bol)
(define-key ergoemacs-eshell-keymap (kbd "<home>") 'eshell-bol)
(define-key ergoemacs-eshell-keymap (kbd "<f11>") 'eshell-previous-matching-input-from-input)
(define-key ergoemacs-eshell-keymap (kbd "<f12>") 'eshell-next-matching-input-from-input)
(define-key ergoemacs-eshell-keymap (kbd "S-<f11>") 'eshell-previous-matching-input-from-input)
(define-key ergoemacs-eshell-keymap (kbd "S-<f12>") 'eshell-next-matching-input-from-input)
(add-to-list 'minor-mode-overriding-map-alist (cons 'ergoemacs-mode ergoemacs-eshell-keymap))
)
(defun ergoemacs-iswitchb-hook ()
"Hooks for `iswitchb-minibuffer-setup-hook'."
(defvar ergoemacs-iswitchb-keymap (copy-keymap ergoemacs-keymap))
(define-key ergoemacs-iswitchb-keymap ergoemacs-isearch-backward-key 'iswitchb-prev-match)
(define-key ergoemacs-iswitchb-keymap ergoemacs-isearch-forward-key 'iswitchb-next-match)
(define-key ergoemacs-iswitchb-keymap (kbd "<f11>") 'iswitchb-prev-match)
(define-key ergoemacs-iswitchb-keymap (kbd "<f12>") 'iswitchb-next-match)
(define-key ergoemacs-iswitchb-keymap (kbd "S-<f11>") 'iswitchb-prev-match)
(define-key ergoemacs-iswitchb-keymap (kbd "S-<f12>") 'iswitchb-next-match)
(add-to-list 'minor-mode-overriding-map-alist (cons 'ergoemacs-mode ergoemacs-iswitchb-keymap))
)
(defun ergoemacs-hook-modes ()
"Installs/Removes ErgoEmacs minor mode hooks from major modes
depending the state of `ergoemacs-mode' variable. If the mode
is being initialized, some global keybindings in current-global-map
will change."
(let ((modify-hook (if ergoemacs-mode 'add-hook 'remove-hook)))
;; when ergoemacs-mode is on, activate hooks and unset global keys, else do inverse
(if (and ergoemacs-mode (not (equal ergoemacs-mode 0)))
(ergoemacs-unset-redundant-global-keys)
(ergoemacs-restore-global-keys))
(funcall modify-hook 'cua-mode-hook 'ergoemacs-cua-hook)
(funcall modify-hook 'isearch-mode-hook 'ergoemacs-isearch-hook)
(funcall modify-hook 'comint-mode-hook 'ergoemacs-comint-hook)
(funcall modify-hook 'log-edit-mode-hook 'ergoemacs-log-edit-hook)
(funcall modify-hook 'eshell-mode-hook 'ergoemacs-eshell-hook)
(funcall modify-hook 'minibuffer-setup-hook 'ergoemacs-minibuffer-setup-hook)
(funcall modify-hook 'iswitchb-minibuffer-setup-hook 'ergoemacs-iswitchb-hook)
)
)
;;----------------------------------------------------------------------
;; ErgoEmacs minor mode
(define-minor-mode ergoemacs-mode
"Toggle ergoemacs keybinding mode.
This minor mode changes your emacs keybindings.
Without argument, toggles the minor mode.
If optional argument is 1, turn it on.
If optional argument is 0, turn it off.
Argument of t or nil should not be used.
For full documentation, see:
URL `http://xahlee.org/emacs/ergonomic_emacs_keybinding.html'
If you turned on by mistake, the shortcut to call execute-extended-command is M-a."
nil
:lighter " ErgoEmacs" ;; TODO this should be nil (it is for testing purposes)
:global t
:keymap ergoemacs-keymap
(ergoemacs-hook-modes)
)
(provide 'ergoemacs-mode)

View file

@ -1,205 +0,0 @@
;-*- coding: utf-8 -*-
;; this file define keys that we want to set/unset because they are already defined by ergoemacs minor mode
(eval-when-compile (require 'edmacro))
(defconst ergoemacs-redundant-keys
'( "C-/"
"C-0"
"C-1"
"C-2"
"C-3"
"C-4"
"C-5"
"C-6"
"C-7"
"C-8"
"C-9"
"C-<backspace>"
"C-<next>"
"C-<prior>"
"C-@"
"C-M-%"
"C-_"
"C-a"
"C-b"
"C-d"
"C-e"
"C-f"
"C-j"
"C-k"
"C-l"
"C-n"
"C-o"
"C-p"
"C-r"
"C-s"
"C-t"
"C-v"
"C-w"
"C-x 0"
"C-x 1"
"C-x 2"
"C-x 3"
"C-x 5 0"
"C-x 5 2"
"C-x C-d"
"C-x C-f"
"C-x C-s"
"C-x C-w"
"C-x d"
"C-x h"
"C-x o"
"C-y"
"C-z"
"M--"
"M-0"
"M-1"
"M-2"
"M-3"
"M-4"
"M-5"
"M-6"
"M-7"
"M-8"
"M-9"
"M-<"
"M->"
"M-@"
"M-\\"
"M-a"
"M-b"
"M-c"
"M-d"
"M-e"
"M-f"
"M-h"
"M-i"
"M-j"
"M-k"
"M-l"
"M-m"
"M-n"
"M-o"
"M-p"
"M-q"
"M-r"
"M-s"
"M-t"
"M-u"
"M-v"
"M-w"
"M-x"
"M-y"
"M-z"
"M-{"
"M-}"
)
)
;; Some exceptions we don't want to unset.
;; "C-g" 'keyboard-quit
;; "C-i" 'indent-for-tab-command
;; "C-m" 'newline-and-indent
;; "C-q" 'quote-insert
;; "C-u" 'universal-argument
;; "C-h" ; (help-map)
;; "C-x" ; (ctl-x-map)
;; "C-c" ; (prefix)
;; "M-g" ; (prefix)
(defvar ergoemacs-overridden-global-keys '()
"Alist to store overridden keyboard shortcuts in
`current-global-map' and other maps. Each item looks like '(MAP KEY OLD-COMMAND).")
(defun ergoemacs-unset-global-key (map key-s)
"Sets to nil the associated command for the specified key in specified map.
It is like:
\(define-key map (kbd key-s) nil))
But it saves the old command associated with the
specified key, so we can restore it when ergoemacs minor mode is
disabled at `ergoemacs-restore-global-keys'."
(let (key oldcmd)
(setq key (edmacro-parse-keys key-s))
;; get the old command associated with this key
(setq oldcmd (lookup-key map key))
;; save that shortcut in ergoemacs-overridden-global-keys
(if oldcmd
(add-to-list 'ergoemacs-overridden-global-keys (cons map (cons key-s (cons oldcmd nil)))))
;; redefine the key in the ergoemacs-keymap
(define-key map key nil)
)
)
(defun ergoemacs-unset-redundant-global-keys ()
"Unsets redundant keyboard shortcuts that should not be used in ErgoEmacs."
(mapc (lambda (x)
(ergoemacs-unset-global-key (current-global-map) x))
ergoemacs-redundant-keys)
)
(defun ergoemacs-restore-global-keys ()
"Restores all keyboard shortcuts that were overwritten by `ergoemacs-unbind-global-key'."
(mapc (lambda (x)
(define-key
(car x)
(edmacro-parse-keys (car (cdr x)))
(car (cdr (cdr x))))
)
ergoemacs-overridden-global-keys)
(setq ergoemacs-overridden-global-keys '()) ; clear the list
)
;; Based on describe-key-briefly
(defun where-is-old-binding (&optional key)
"Print the name of the function KEY invoked before to start ErgoEmacs minor mode."
(interactive
(let ((enable-disabled-menus-and-buttons t)
(cursor-in-echo-area t)
saved-yank-menu)
(unwind-protect
(let (key)
;; If yank-menu is empty, populate it temporarily, so that
;; "Select and Paste" menu can generate a complete event.
(when (null (cdr yank-menu))
(setq saved-yank-menu (copy-sequence yank-menu))
(menu-bar-update-yank-menu "(any string)" nil))
(setq key (read-key-sequence "Describe old key (or click or menu item): "))
;; If KEY is a down-event, read and discard the
;; corresponding up-event. Note that there are also
;; down-events on scroll bars and mode lines: the actual
;; event then is in the second element of the vector.
(and (vectorp key)
(let ((last-idx (1- (length key))))
(and (eventp (aref key last-idx))
(memq 'down (event-modifiers (aref key last-idx)))))
(read-event))
(list key))
;; Put yank-menu back as it was, if we changed it.
(when saved-yank-menu
(setq yank-menu (copy-sequence saved-yank-menu))
(fset 'yank-menu (cons 'keymap yank-menu))))))
(let (key-desc item-key item-cmd old-cmd)
(setq key-desc (key-description key))
(setq item ergoemacs-overridden-global-keys)
(while (and item (not old-cmd))
(setq item-key (car (cdr (car item))))
(setq item-cmd (car (cdr (cdr (car item)))))
(if (string= item-key key-desc)
(setq old-cmd item-cmd))
(setq item (cdr item))
)
(if old-cmd
(with-temp-buffer
(where-is old-cmd t)
(message "Key %s was bound to %s which is now invoked by %s"
key-desc old-cmd (buffer-string))
)
(message "Key %s was not bound to any command" key-desc)
)
)
)

View file

@ -1,385 +0,0 @@
;-*- coding: utf-8 -*-
(require 'redo "redo.elc" t) ; for redo shortcut
(delete-selection-mode 1) ; turn on text selection highlighting and make typing override selected text (Note: when delete-selection-mode is on, then transient-mark-mode is automatically on too.)
(defun call-keyword-completion ()
"Call the command that has keyboard shortcut M-TAB."
(interactive)
(call-interactively (key-binding (kbd "M-TAB")))
)
(defun describe-major-mode ()
"Show inline doc for current major-mode."
;; code by Kevin Rodgers. 2009-02-25
(interactive)
(describe-function major-mode))
(defun copy-all ()
"Put the whole buffer content into the kill-ring.
If narrow-to-region is in effect, then copy that region only."
(interactive)
(kill-ring-save (point-min) (point-max))
(message "Buffer content copied")
)
(defun cut-all ()
"Cut the whole buffer content into the kill-ring.
If narrow-to-region is in effect, then cut that region only."
(interactive)
(kill-region (point-min) (point-max))
(message "Buffer content cut")
)
;;; TEXT SELECTION RELATED
(defun select-text-in-quote ()
"Select text between the nearest left and right delimiters.
Delimiters are paired characters: ()[]<>«», including \"\"."
(interactive)
(let (b1 b2)
(skip-chars-backward "^<>(“{[「«【\"")
(setq b1 (point))
(skip-chars-forward "^<>)”}]」】»\"")
(setq b2 (point))
(set-mark b1)
)
)
;; by Nikolaj Schumacher, 2008-10-20. Released under GPL.
(defun semnav-up (arg)
(interactive "p")
(when (nth 3 (syntax-ppss))
(if (> arg 0)
(progn
(skip-syntax-forward "^\"")
(goto-char (1+ (point)))
(decf arg))
(skip-syntax-backward "^\"")
(goto-char (1- (point)))
(incf arg)))
(up-list arg))
;; by Nikolaj Schumacher, 2008-10-20. Released under GPL.
(defun extend-selection (arg &optional incremental)
"Select the current word.
Subsequent calls expands the selection to larger semantic unit."
(interactive (list (prefix-numeric-value current-prefix-arg)
(or (and transient-mark-mode mark-active)
(eq last-command this-command))))
(if incremental
(progn
(semnav-up (- arg))
(forward-sexp)
(mark-sexp -1))
(if (> arg 1)
(extend-selection (1- arg) t)
(if (looking-at "\\=\\(\\s_\\|\\sw\\)*\\_>")
(goto-char (match-end 0))
(unless (memq (char-before) '(?\) ?\"))
(forward-sexp)))
(mark-sexp -1))))
;;; TEXT TRANSFORMATION RELATED
(defun kill-line-backward ()
"Kill text between the beginning of the line to the cursor position.
If there's no text, delete the previous line ending."
(interactive)
(if (looking-back "\n")
(delete-char -1)
(kill-line 0)
)
)
(defun move-cursor-next-pane ()
"Move cursor to the next pane."
(interactive)
(other-window 1)
)
(defun move-cursor-previous-pane ()
"Move cursor to the previous pane."
(interactive)
(other-window -1)
)
(defun compact-uncompact-block ()
"Remove or add line endings on the current block of text.
This is similar to a toggle for fill-paragraph and unfill-paragraph
When there is a text selection, act on the region.
When in text mode, a paragraph is considerd a block. When in programing
language mode, the block is defined by between empty lines.
Todo: The programing language behavior is currently not done.
Right now, the code uses fill* functions, so does not work or work well
in programing lang modes. A proper implementation to compact is replacing
EOL chars by space when the EOL char is not inside string."
(interactive)
;; This command symbol has a property “'stateIsCompact-p”, the
;; possible values are t and nil. This property is used to easily
;; determine whether to compact or uncompact, when this command is
;; called again
(let (bds currentLineCharCount currentStateIsCompact
(bigFillColumnVal 4333999) (deactivate-mark nil))
(save-excursion
;; currentLineCharCount is used to determine whether current state
;; is compact or not, when the command is run for the first time
(setq currentLineCharCount
(progn
(setq bds (bounds-of-thing-at-point 'line))
(length (buffer-substring-no-properties (car bds) (cdr bds)))
;; Note: 'line includes eol if it is not buffer's last line
)
)
;; Determine whether the text is currently compact. when the last
;; command is this, then symbol property easily tells, but when
;; this command is used fresh, right now we use num of chars of
;; the cursor line as a way to define current compatness state
(setq currentStateIsCompact
(if (eq last-command this-command)
(get this-command 'stateIsCompact-p)
(if (> currentLineCharCount fill-column) t nil)
)
)
(if (and transient-mark-mode mark-active)
(if currentStateIsCompact
(fill-region (region-beginning) (region-end))
(let ((fill-column bigFillColumnVal))
(fill-region (region-beginning) (region-end)))
)
(if currentStateIsCompact
(fill-paragraph nil)
(let ((fill-column bigFillColumnVal))
(fill-paragraph nil))
)
)
(put this-command 'stateIsCompact-p (if currentStateIsCompact
nil t)) ) ) )
(defun shrink-whitespaces ()
"Remove white spaces around cursor to just one or none.
If current line does not contain non-white space chars, then remove blank lines to just one.
If current line contains non-white space chars, then shrink any whitespace char surrounding cursor to just one space.
If current line is a single space, remove that space.
Calling this command 3 times will always result in no whitespaces around cursor."
(interactive)
(let (
cursor-point
line-has-meat-p ; current line contains non-white space chars
spaceTabNeighbor-p
whitespace-begin whitespace-end
space-or-tab-begin space-or-tab-end
line-begin-pos line-end-pos
)
(save-excursion
;; todo: might consider whitespace as defined by syntax table, and also consider whitespace chars in unicode if syntax table doesn't already considered it.
(setq cursor-point (point))
(setq spaceTabNeighbor-p (if (or (looking-at " \\|\t") (looking-back " \\|\t")) t nil) )
(move-beginning-of-line 1) (setq line-begin-pos (point) )
(move-end-of-line 1) (setq line-end-pos (point) )
;; (re-search-backward "\n$") (setq line-begin-pos (point) )
;; (re-search-forward "\n$") (setq line-end-pos (point) )
(setq line-has-meat-p (if (< 0 (count-matches "[[:graph:]]" line-begin-pos line-end-pos)) t nil) )
(goto-char cursor-point)
(skip-chars-backward "\t ")
(setq space-or-tab-begin (point))
(skip-chars-backward "\t \n")
(setq whitespace-begin (point))
(goto-char cursor-point) (skip-chars-forward "\t ")
(setq space-or-tab-end (point))
(skip-chars-forward "\t \n")
(setq whitespace-end (point))
)
(if line-has-meat-p
(let (deleted-text)
(when spaceTabNeighbor-p
;; remove all whitespaces in the range
(setq deleted-text (delete-and-extract-region space-or-tab-begin space-or-tab-end))
;; insert a whitespace only if we have removed something
;; different that a simple whitespace
(if (not (string= deleted-text " "))
(insert " ") ) ) )
(progn
;; (delete-region whitespace-begin whitespace-end)
;; (insert "\n")
(delete-blank-lines)
)
;; todo: possibly code my own delete-blank-lines here for better efficiency, because delete-blank-lines seems complex.
)
)
)
(defun toggle-letter-case ()
"Toggle the letter case of current word or text selection.
Toggles from 3 cases: UPPER CASE, lower case, Title Case,
in that cyclic order."
(interactive)
(let (pos1 pos2 (deactivate-mark nil) (case-fold-search nil))
(if (and transient-mark-mode mark-active)
(setq pos1 (region-beginning)
pos2 (region-end))
(setq pos1 (car (bounds-of-thing-at-point 'word))
pos2 (cdr (bounds-of-thing-at-point 'word))))
(when (not (eq last-command this-command))
(save-excursion
(goto-char pos1)
(cond
((looking-at "[[:lower:]][[:lower:]]") (put this-command 'state "all lower"))
((looking-at "[[:upper:]][[:upper:]]") (put this-command 'state "all caps") )
((looking-at "[[:upper:]][[:lower:]]") (put this-command 'state "init caps") )
(t (put this-command 'state "all lower") )
)
)
)
(cond
((string= "all lower" (get this-command 'state))
(upcase-initials-region pos1 pos2) (put this-command 'state "init caps"))
((string= "init caps" (get this-command 'state))
(upcase-region pos1 pos2) (put this-command 'state "all caps"))
((string= "all caps" (get this-command 'state))
(downcase-region pos1 pos2) (put this-command 'state "all lower"))
)
)
)
;;; FRAME
(defun switch-to-next-frame ()
"Select the next frame on current display, and raise it."
(interactive)
(other-frame 1)
)
(defun switch-to-previous-frame ()
"Select the previous frame on current display, and raise it."
(interactive)
(other-frame -1)
)
;;; BUFFER RELATED
(defun next-user-buffer ()
"Switch to the next user buffer.
User buffers are those whose name does not start with *."
(interactive)
(next-buffer)
(let ((i 0))
(while (and (string-match "^*" (buffer-name)) (< i 50))
(setq i (1+ i)) (next-buffer) )))
(defun previous-user-buffer ()
"Switch to the previous user buffer.
User buffers are those whose name does not start with *."
(interactive)
(previous-buffer)
(let ((i 0))
(while (and (string-match "^*" (buffer-name)) (< i 50))
(setq i (1+ i)) (previous-buffer) )))
(defun next-emacs-buffer ()
"Switch to the next emacs buffer.
Emacs buffers are those whose name starts with *."
(interactive)
(next-buffer)
(let ((i 0))
(while (and (not (string-match "^*" (buffer-name))) (< i 50))
(setq i (1+ i)) (next-buffer) )))
(defun previous-emacs-buffer ()
"Switch to the previous emacs buffer.
Emacs buffers are those whose name starts with *."
(interactive)
(previous-buffer)
(let ((i 0))
(while (and (not (string-match "^*" (buffer-name))) (< i 50))
(setq i (1+ i)) (previous-buffer) )))
(defun new-empty-buffer ()
"Opens a new empty buffer."
(interactive)
(let ((buf (generate-new-buffer "untitled")))
(switch-to-buffer buf)
(funcall (and initial-major-mode))
(setq buffer-offer-save t)))
;; note: emacs won't offer to save a buffer that's
;; not associated with a file,
;; even if buffer-modified-p is true.
;; One work around is to define your own my-kill-buffer function
;; that wraps around kill-buffer, and check on the buffer modification
;; status to offer save
;; This custome kill buffer is close-current-buffer.
(defvar recently-closed-buffers (cons nil nil) "A list of recently closed buffers. The max number to track is controlled by the variable recently-closed-buffers-max.")
(defvar recently-closed-buffers-max 10 "The maximum length for recently-closed-buffers.")
(defun close-current-buffer ()
"Close the current buffer.
Similar to (kill-buffer (current-buffer)) with the following addition:
prompt user to save if the buffer has been modified even if the buffer is not associated with a file.
make sure the buffer shown after closing is a user buffer.
if the buffer is a file, add the path to the list recently-closed-buffers.
A emacs buffer is one who's name starts with *.
Else it is a user buffer."
(interactive)
(let (emacsBuff-p isEmacsBufferAfter)
(if (string-match "^*" (buffer-name))
(setq emacsBuff-p t)
(setq emacsBuff-p nil))
;; offer to save buffers that are non-empty and modified, even for non-file visiting buffer. (because kill-buffer does not offer to save buffers that are not associated with files)
(when (and (buffer-modified-p)
(not emacsBuff-p)
(not (string-equal major-mode "dired-mode"))
(if (equal (buffer-file-name) nil)
(if (string-equal "" (save-restriction (widen) (buffer-string))) nil t)
t
)
)
(if (y-or-n-p
(concat "Buffer " (buffer-name) " modified; Do you want to save?"))
(save-buffer)
(set-buffer-modified-p nil)))
;; save to a list of closed buffer
(when (not (equal buffer-file-name nil))
(setq recently-closed-buffers
(cons (cons (buffer-name) (buffer-file-name)) recently-closed-buffers))
(when (> (length recently-closed-buffers) recently-closed-buffers-max)
(setq recently-closed-buffers (butlast recently-closed-buffers 1))
)
)
;; close
(kill-buffer (current-buffer))
;; if emacs buffer, switch to a user buffer
(if (string-match "^*" (buffer-name))
(setq isEmacsBufferAfter t)
(setq isEmacsBufferAfter nil))
(when isEmacsBufferAfter
(previous-user-buffer)
)
)
)

View file

@ -1,31 +0,0 @@
(require 'color-theme)
(defun color-theme-gentooish ()
"Mostly green and purple color theme"
(interactive)
(color-theme-install
'(color-theme-gentooish
((foreground-color . "#c0c0c0")
(background-color . "#171717")
(border-color . "black")
(cursor-color . "green")
(background-mode . dark))
(bold ((t (:foreground "white" :weight normal))))
(font-lock-builtin-face ((((class color) (min-colors 88) (background dark)) (:foreground "#c476f1"))))
(font-lock-comment-face ((((class color) (min-colors 88) (background dark)) (:foreground "grey30" :slant italic))))
(font-lock-function-name-face ((((class color) (min-colors 88) (background dark)) (:foreground "#4cbbd1"))))
(font-lock-keyword-face ((((class color) (min-colors 88) (background dark)) (:foreground "#9a383a"))))
(font-lock-string-face ((((class color) (min-colors 88) (background dark)) (:background "#0f291a" :foreground "#5dff9e"))))
(hi-blue ((((background dark)) (:background "grey20"))))
(ido-first-match ((t (:background "#361d45" :foreground "#cf7dff" :weight bold))))
(ido-only-match ((((class color)) (:background "#361d45" :foreground "#cf7dff" :weight bold))))
(ido-subdir ((((min-colors 88) (class color)) (:foreground "#7dcfff"))))
(linum ((t (:inherit shadow :background "grey12"))))
(minibuffer-prompt ((((background dark)) (:foreground "#863335"))))
(mode-line ((((class color) (min-colors 88)) (:background "#333333" :foreground "#ffffff" :box (:line-width -1 :color "#333333")))))
(mode-line-highlight ((((class color) (min-colors 88)) nil)))
(mode-line-inactive ((default (:inherit mode-line)) (((class color) (min-colors 88) (background dark)) (:foreground "#8b8b8b" :weight light))))
(show-paren-match ((((class color) (background dark)) (:background "#005500"))))
(tool-bar ((default (:foreground "black")) (((type x w32 ns) (class color)) (:background "grey75")))))))
(provide 'gentooish)

File diff suppressed because it is too large Load diff

View file

@ -1,104 +0,0 @@
Changes since 2.5.1
* Parser corrections for haskell-indentation and haskell-decl-scan
* haskell-indentation: Pressing tab in the rightmost position now
moves to the leftmost, by default with a warning.
* Typo fix: One haskell-indentation variable had ended up in the
haskell-ntation customize group.
* haskell-hoogle aliased to hoogle, haskell-hayoo aliased to hayoo
* Courtesy of Alex Ott:
- Additional unicode symbols for font-lock-symbols: () == /= >= <= !! && || sqrt
- M-x haskell-hayoo search added, opens using browse-url
- Bug-fix for inferior-haskell-type
* If haskell-indentation errors out, it now fail-safes to inserting
a literal newline or deleting one character, for return and
backspace respectively.
Changes since 2.4:
* haskell-indentation, a new minor mode for indentation.
Changes since 2.3:
* Update license to GPLv3.
* New derived major mode for .hsc files.
* Removed the C-c C-r binding to reload a file. You can still call
inferior-haskell-reload-file (and/or bind it to your favorite key,
including C-c C-r) or you can now use C-u C-c C-l.
* C-c C-d looks up the symbol at point in the Haddock docs.
* Haddock comments are highlighted with font-lock-doc-face if it exists.
* Use `tex' rather than `latex' for haskell-literate.
* inf-haskell.el tries to find the root of the module hierarchy to determine
the root of a project (either by looking for a Cabal file or relying on
the `module' declaration line). If all works well, this will make C-c C-l
automatically switch to the root dir, so that dependencies in other
directories are automatically found. If it doesn't, complain and/or set
inferior-haskell-find-project-root to nil.
* The new command haskell-hoogle helps you query Hoogle from Emacs.
Changes since 2.2:
* Trivial support for Cabal package description files.
* Minor bug fixes.
Changes since 2.1:
* There are now commands to find type and info of identifiers by querying an
inferior haskell process. Available under C-c C-t, C-c C-i, and C-c M-.
* Indentation now looks back further, until a line that has no indentation.
To recover the earlier behavior of stopping at the first empty line
instead, configure haskell-indent-look-past-empty-line.
* inf-haskell can wait until a file load completes and jump directly to the
first error, like haskell-ghci and haskell-hugs used to do. See the var
inferior-haskell-wait-and-jump.
Changes since 2.0:
* inf-haskell uses ghci if hugs is absent.
* Fix up some binding conflicts (C-c C-o in haskell-doc)
* Many (hopefully minor) changes to the indentation.
* New symbols in haskell-font-lock-symbols-alist.
Changes since 1.45:
* keybindings C-c <char> have been replaced by C-c C-<char> so as not
to collide with minor modes.
* The following modules are now automatically activated without having to
add anything to haskell-mode-hook:
haskell-font-lock (just turn on global-font-lock-mode).
haskell-decl-scan (just bind `imenu' to some key).
* In recent Emacsen, haskell-doc hooks into eldoc-mode.
* haskell-hugs and haskell-ghci are superceded by inf-haskell.
* Indentation rules have been improved when using layout inside parens/braces.
* Symbols like -> and \ can be displayed as actual arrows and lambdas.
See haskell-font-lock-symbols.
* Tweaks to the font-lock settings. Among other things paren-matching
with things like \(x,y) should work correctly now.
* New maintainer <monnier@gnu.org>.
# arch-tag: e50204f2-98e4-438a-bcd1-a49afde5efa5

View file

@ -1,108 +0,0 @@
Haskell Mode for Emacs
----------------------
Version number: v2.6.4.
This is the Haskell mode package for Emacs. Its use should be mostly
self-explanatory if you're accustomed to Emacs.
When Emacs is started up, it normally runs a file called ~/.emacs located in
your home directory. This file should contain all of your personal
customisations written as a series of Elisp commands. In order to install
the Haskell mode, you have to tell Emacs where to find it. This is done by
adding some commands to the init file.
Installation
------------
- If you are using XEmacs, the haskell-mode package may be available for
installation through the XEmacs package UI.
- If you are using Debian, you may be able to install the package
haskell-mode with a command like "apt-get install haskell-mode".
Otherwise:
- Download and unpack the basic mode and modules into a suitable directory,
e.g. ~/lib/emacs/haskell-mode/ where ~ stands for your home directory.
- Assuming you have placed the basic mode haskell-mode.el and the modules
you want to use in the directory ~/lib/emacs/haskell-mode/, add the
following command to your init file (~/.emacs):
(load "~/lib/emacs/haskell-mode/haskell-site-file")
This only loads the bare-bones haskell-mode. To make it useful, you
need additional modules; you can use the haskell customize-group
to edit the Haskell mode hook or, if you prefer manual setup, try
adding the following lines according to which modules you want to use:
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
Note that the three indentation modules are mutually exclusive - add at
most one. Note that the line of code for simple indentation is commented
out (using a preceeding ;) in preference for the more advanced
indentation module. Installation is now complete!
The other modules are automatically loaded when needed in the following way:
- Font locking: just turn it on via `global-font-lock-mode' or do
(add-hook 'haskell-mode-hook 'font-lock-mode)
- Declaration scanning: just use M-x imenu or bind `imenu' to a key. E.g.
(global-set-key [(control meta down-mouse-3)] 'imenu) or you can also add
it to the menubar with (add-hook 'haskell-mode-hook 'imenu-add-menubar-index)
- Interaction with inferior Haskell interpreter: just hit C-c C-z or C-c C-l.
Setup
-----
Normally, inf-haskell automatically finds ghci or hugs in your PATH, but if
that's not the case (common under Windows), or if you need to specify your
preference, just tell Emacs which executable to use with:
(setq haskell-program-name "/some/where/ghci.exe")
If you want to use different settings when you use Cygwin Emacs and NTEmacs,
you can test the value of `system-type':
(setq haskell-program-name
(if (eq system-type 'cygwin)
"/cygdrive/c/ghc/ghc-6.8.1/bin/ghcii.sh"
"c:/ghc/ghc-6.8.1/bin/ghci.exe"))
Note that Cygwin binaries tend to interact poorly with NTEmacs, especially
w.r.t signal-handling.
Customization
-------------
Most customizations are on the functionality of a particular module.
See the documentation of that module for information on its
customisation.
Known problems
--------------
It seems that some version of XEmacs come without the fsf-compat package
(which provides functions such as `line-end-position') and it seems that
even if your XEmacs does have the fsf-compat package installed it does not
autoload its part. Thus you may have to install the fsf-compat package and
add (require 'goto-addr) in your .emacs.
Support
-------
Any problems, do mail me <svein.ove@aas.no> and I will try my best
to help you!
<!-- arch-tag: 25fc8494-611d-459f-9919-579c97f6313e -->

View file

@ -1,49 +0,0 @@
-- Comments are coloured brightly and stand out clearly.
import qualified Foo as F hiding (toto)
import qualified Foo hiding (toto)
import qualified Foo as F (toto)
import Foo as F hiding (toto)
import Foo hiding (toto)
import Foo as F (toto)
hiding = 1
qualified = 3
as = 2
repeat :: a -> [a]
repeat xs = xs where xs = x:xs -- Keywords are also bright.
head :: [a] -> a
head (x:_) = x
head [] = error "PreludeList.head: empty list" -- Strings are coloured softly.
data Maybe a = Nothing | Just a -- Type constructors, data
deriving (Eq, Ord, Read, Show) -- constructors, class names
-- and module names are coloured
-- closer to ordinary code.
recognize +++ infix :: Operator Declarations
as `well` as = This Form
(+) and this one = as well
instance Show Toto where
fun1 arg1 = foo -- FIXME: `fun1' should be highlighted.
constStr = "hello \
\asdgfasgf\
\asf"
{-
map :: (a -> b) -> [a] -> [b] -- Commenting out large sections of
map f [] = [] -- code can be misleading. Coloured
map f (x:xs) = f x : map f xs -- comments reveal unused definitions.
-}
-- Note: the least significant bit is the first element of the list
bdigits :: Int -> [Int]
bdigits 0 = [0]
bdigits 1 = [1]
bdigits n | n>1 = n `mod` 2 :
-- arch-tag: a0d08cc2-4a81-4139-93bc-b3c6be0b5fb2

View file

@ -1,47 +0,0 @@
;;; haskell-c.el --- Major mode for *.hsc files
;; Copyright (C) 2007 Stefan Monnier
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;
;;; Code:
(require 'haskell-mode)
(require 'haskell-font-lock)
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.hsc\\'" . haskell-c-mode))
(defvar haskell-c-font-lock-keywords
`(("^#[ \t]*[[:alnum:]]+" (0 font-lock-preprocessor-face))
,@haskell-font-lock-symbols))
;;;###autoload
(define-derived-mode haskell-c-mode haskell-mode "Haskell-C"
"Major mode for Haskell FFI files."
(set (make-local-variable 'font-lock-keywords)
(cons 'haskell-c-font-lock-keywords
(cdr font-lock-keywords))))
(provide 'haskell-c)
;; arch-tag: 51294c41-29f0-4599-9ce8-47fe2e7d3fd5
;;; haskell-c.el ends here

View file

@ -1,182 +0,0 @@
;;; haskell-cabal.el --- Support for Cabal packages
;; Copyright (C) 2007, 2008 Stefan Monnier
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; Todo:
;; - distinguish continued lines from indented lines.
;; - indent-line-function.
;; - outline-minor-mode.
;;; Code:
;; (defun haskell-cabal-extract-fields-from-doc ()
;; (require 'xml)
;; (require 'cl)
;; (let ((section (completing-read
;; "Section: "
;; '("general-fields" "library" "executable" "buildinfo"))))
;; (goto-char (point-min))
;; (search-forward (concat "<sect3 id=\"" section "\">")))
;; (let* ((xml (xml-parse-region
;; (progn (search-forward "<variablelist>") (match-beginning 0))
;; (progn (search-forward "</variablelist>") (point))))
;; (varlist (remove-if-not 'consp (cddar xml)))
;; (syms (mapcar (lambda (entry) (caddr (assq 'literal (assq 'term entry))))
;; varlist))
;; (fields (mapcar (lambda (sym) (substring-no-properties sym 0 -1)) syms)))
;; fields))
(eval-when-compile (require 'cl))
(defconst haskell-cabal-general-fields
;; Extracted with (haskell-cabal-extract-fields-from-doc "general-fields")
'("name" "version" "cabal-version" "license" "license-file" "copyright"
"author" "maintainer" "stability" "homepage" "package-url" "synopsis"
"description" "category" "tested-with" "build-depends" "data-files"
"extra-source-files" "extra-tmp-files"))
(defconst haskell-cabal-library-fields
;; Extracted with (haskell-cabal-extract-fields-from-doc "library")
'("exposed-modules"))
(defconst haskell-cabal-executable-fields
;; Extracted with (haskell-cabal-extract-fields-from-doc "executable")
'("executable" "main-is"))
(defconst haskell-cabal-buildinfo-fields
;; Extracted with (haskell-cabal-extract-fields-from-doc "buildinfo")
'("buildable" "other-modules" "hs-source-dirs" "extensions" "ghc-options"
"ghc-prof-options" "hugs-options" "nhc-options" "includes"
"install-includes" "include-dirs" "c-sources" "extra-libraries"
"extra-lib-dirs" "cc-options" "ld-options" "frameworks"))
(defvar haskell-cabal-mode-syntax-table
(let ((st (make-syntax-table)))
;; The comment syntax can't be described simply in syntax-table.
;; We could use font-lock-syntactic-keywords, but is it worth it?
;; (modify-syntax-entry ?- ". 12" st)
(modify-syntax-entry ?\n ">" st)
st))
(defvar haskell-cabal-font-lock-keywords
;; The comment syntax can't be described simply in syntax-table.
;; We could use font-lock-syntactic-keywords, but is it worth it?
'(("^[ \t]*--.*" . font-lock-comment-face)
("^ *\\([^ \t:]+\\):" (1 font-lock-keyword-face))
("^\\(Library\\)[ \t]*\\({\\|$\\)" (1 font-lock-keyword-face))
("^\\(Executable\\)[ \t]+\\([^\n \t]*\\)"
(1 font-lock-keyword-face) (2 font-lock-function-name-face))
("^\\(Flag\\)[ \t]+\\([^\n \t]*\\)"
(1 font-lock-keyword-face) (2 font-lock-constant-face))
("^ *\\(if\\)[ \t]+.*\\({\\|$\\)" (1 font-lock-keyword-face))
("^ *\\(}[ \t]*\\)?\\(else\\)[ \t]*\\({\\|$\\)"
(2 font-lock-keyword-face))))
(defvar haskell-cabal-buffers nil
"List of Cabal buffers.")
;; (defsubst* inferior-haskell-string-prefix-p (str1 str2)
;; "Return non-nil if STR1 is a prefix of STR2"
;; (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
(defun haskell-cabal-find-file ()
"Return a buffer visiting the cabal file of the current directory, or nil."
(catch 'found
;; ;; First look for it in haskell-cabal-buffers.
;; (dolist (buf haskell-cabal-buffers)
;; (if (inferior-haskell-string-prefix-p
;; (with-current-buffer buf default-directory) default-directory)
;; (throw 'found buf)))
;; Then look up the directory hierarchy.
(let ((user (nth 2 (file-attributes default-directory)))
;; Abbreviate, so as to stop when we cross ~/.
(root (abbreviate-file-name default-directory))
files)
(while (and root (equal user (nth 2 (file-attributes root))))
(if (setq files (directory-files root 'full "\\.cabal\\'"))
;; Avoid the .cabal directory.
(dolist (file files (throw 'found nil))
(unless (file-directory-p file)
(throw 'found (find-file-noselect file))))
(if (equal root
(setq root (file-name-directory
(directory-file-name root))))
(setq root nil))))
nil)))
(defun haskell-cabal-buffers-clean (&optional buffer)
(let ((bufs ()))
(dolist (buf haskell-cabal-buffers)
(if (and (buffer-live-p buf) (not (eq buf buffer))
(with-current-buffer buf (derived-mode-p 'haskell-cabal-mode)))
(push buf bufs)))
(setq haskell-cabal-buffers bufs)))
(defun haskell-cabal-unregister-buffer ()
(haskell-cabal-buffers-clean (current-buffer)))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.cabal\\'" . haskell-cabal-mode))
;;;###autoload
(define-derived-mode haskell-cabal-mode fundamental-mode "Haskell-Cabal"
"Major mode for Cabal package description files."
(set (make-local-variable 'font-lock-defaults)
'(haskell-cabal-font-lock-keywords t t nil nil))
(add-to-list 'haskell-cabal-buffers (current-buffer))
(add-hook 'change-major-mode-hook 'haskell-cabal-unregister-buffer nil 'local)
(add-hook 'kill-buffer-hook 'haskell-cabal-unregister-buffer nil 'local)
(set (make-local-variable 'comment-start) "-- ")
(set (make-local-variable 'comment-start-skip) "\\(^[ \t]*\\)--[ \t]*")
(set (make-local-variable 'comment-end) "")
(set (make-local-variable 'comment-end-skip) "[ ]*\\(\\s>\\|\n\\)")
)
(defun haskell-cabal-get-setting (name)
(save-excursion
(let ((case-fold-search t))
(goto-char (point-min))
(when (re-search-forward
(concat "^" (regexp-quote name)
":[ \t]*\\(.*\\(\n[ \t]+[ \t\n].*\\)*\\)")
nil t)
(let ((val (match-string 1))
(start 1))
(when (match-end 2) ;Multiple lines.
;; The documentation is not very precise about what to do about
;; the \n and the indentation: are they part of the value or
;; the encoding? I take the point of view that \n is part of
;; the value (so that values can span multiple lines as well),
;; and that only the first char in the indentation is part of
;; the encoding, the rest is part of the value (otherwise, lines
;; in the value cannot start with spaces or tabs).
(while (string-match "^[ \t]\\(?:\\.$\\)?" val start)
(setq start (1+ (match-beginning 0)))
(setq val (replace-match "" t t val))))
val)))))
(provide 'haskell-cabal)
;; arch-tag: d455f920-5e4d-42b6-a2c7-4a7e84a05c29
;;; haskell-cabal.el ends here

View file

@ -1,698 +0,0 @@
;;; haskell-decl-scan.el --- Declaration scanning module for Haskell Mode
;; Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
;; Copyright (C) 1997-1998 Graeme E Moss
;; Author: 1997-1998 Graeme E Moss <gem@cs.york.ac.uk>
;; Maintainer: Stefan Monnier <monnier@gnu.org>
;; Keywords: declarations menu files Haskell
;; URL: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/CONTRIB/haskell-modes/emacs/haskell-decl-scan.el?rev=HEAD
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Purpose:
;;
;; Top-level declarations are scanned and placed in a menu. Supports
;; full Latin1 Haskell 1.4 as well as literate scripts.
;;
;;
;; Installation:
;;
;; To turn declaration scanning on for all Haskell buffers under the
;; Haskell mode of Moss&Thorn, add this to .emacs:
;;
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
;;
;; Otherwise, call `turn-on-haskell-decl-scan'.
;;
;;
;; Customisation:
;;
;; None available so far.
;;
;;
;; History:
;;
;; If you have any problems or suggestions, after consulting the list
;; below, email gem@cs.york.ac.uk quoting the version of the library
;; you are using, the version of Emacs you are using, and a small
;; example of the problem or suggestion. Note that this library
;; requires a reasonably recent version of Emacs.
;;
;; Uses `imenu' under Emacs, and `func-menu' under XEmacs.
;;
;; Version 1.2:
;; Added support for LaTeX-style literate scripts.
;;
;; Version 1.1:
;; Use own syntax table. Fixed bug for very small buffers. Use
;; markers instead of pointers (markers move with the text).
;;
;; Version 1.0:
;; Brought over from Haskell mode v1.1.
;;
;;
;; Present Limitations/Future Work (contributions are most welcome!):
;;
;; . Declarations requiring information extending beyond starting line
;; don't get scanned properly, eg.
;; > class Eq a =>
;; > Test a
;;
;; . Comments placed in the midst of the first few lexemes of a
;; declaration will cause havoc, eg.
;; > infixWithComments :: Int -> Int -> Int
;; > x {-nastyComment-} `infixWithComments` y = x + y
;; but are not worth worrying about.
;;
;; . Would be nice to scan other top-level declarations such as
;; methods of a class, datatype field labels... any more?
;;
;; . Support for GreenCard?
;;
;; . Re-running (literate-)haskell-imenu should not cause the problems
;; that it does. The ability to turn off scanning would also be
;; useful. (Note that re-running (literate-)haskell-mode seems to
;; cause no problems.)
;;
;; . Inconsistency: we define the start of a declaration in `imenu' as
;; the start of the line the declaration starts on, but in
;; `func-menu' as the start of the name that the declaration is
;; given (eg. "class Eq a => Ord a ..." starts at "class" in `imenu'
;; but at "Ord" in `func-menu'). This avoids rescanning of the
;; buffer by the goto functions of `func-menu' but allows `imenu' to
;; have the better definition of the start of the declaration (IMO).
;;
;; . `func-menu' cannot cope well with spaces in declaration names.
;; This is unavoidable in "instance Eq Int" (changing the spaces to
;; underscores would cause rescans of the buffer). Note though that
;; `fume-prompt-function-goto' (usually bound to "C-c g") does cope
;; with spaces okay.
;;
;; . Would like to extend the goto functions given by `func-menu'
;; under XEmacs to Emacs. Would have to implement these
;; ourselves as `imenu' does not provide them.
;;
;; . `func-menu' uses its own syntax table when grabbing a declaration
;; name to lookup (why doesn't it use the syntax table of the
;; buffer?) so some declaration names will not be grabbed correctly,
;; eg. "fib'" will be grabbed as "fib" since "'" is not a word or
;; symbol constituent under the syntax table `func-menu' uses.
;; All functions/variables start with
;; `(turn-(on/off)-)haskell-decl-scan' or `haskell-ds-'.
;; The imenu support is based on code taken from `hugs-mode',
;; thanks go to Chris Van Humbeeck.
;; Version.
;;; Code:
(require 'haskell-mode)
;;###autoload
;; As `cl' defines macros that `imenu' uses, we must require them at
;; compile time.
(eval-when-compile
(require 'cl)
(condition-case nil
(require 'imenu)
(error nil)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; General declaration scanning functions.
(defalias 'haskell-ds-match-string
(if (fboundp 'match-string-no-properties)
'match-string-no-properties
(lambda (num)
"As `match-string' except that the string is stripped of properties."
(format "%s" (match-string num)))))
(defvar haskell-ds-start-keywords-re
(concat "\\(\\<"
"class\\|data\\|i\\(mport\\|n\\(fix\\(\\|[lr]\\)\\|stance\\)\\)\\|"
"module\\|primitive\\|type\\|newtype"
"\\)\\>")
"Keywords that may start a declaration.")
(defvar haskell-ds-syntax-table
(let ((table (copy-syntax-table haskell-mode-syntax-table)))
(modify-syntax-entry ?\' "w" table)
(modify-syntax-entry ?_ "w" table)
(modify-syntax-entry ?\\ "_" table)
table)
"Syntax table used for Haskell declaration scanning.")
(defun haskell-ds-get-variable (prefix)
"Return variable involved in value binding or type signature.
Assumes point is looking at the regexp PREFIX followed by the
start of a declaration (perhaps in the middle of a series of
declarations concerning a single variable). Otherwise return nil.
Point is not changed."
;; I think I can now handle all declarations bar those with comments
;; nested before the second lexeme.
(save-excursion
(with-syntax-table haskell-ds-syntax-table
(if (looking-at prefix) (goto-char (match-end 0)))
;; Keyword.
(if (looking-at haskell-ds-start-keywords-re)
nil
(or ;; Parenthesized symbolic variable.
(and (looking-at "(\\(\\s_+\\))") (haskell-ds-match-string 1))
;; General case.
(if (looking-at
(if (eq ?\( (char-after))
;; Skip paranthesised expression.
(progn
(forward-sexp)
;; Repeating this code and avoiding moving point if
;; possible speeds things up.
"\\(\\'\\)?\\s-*\\(\\s_+\\|`\\(\\sw+\\)`\\)")
"\\(\\sw+\\)?\\s-*\\(\\s_+\\|`\\(\\sw+\\)`\\)"))
(let ((match2 (haskell-ds-match-string 2)))
;; Weed out `::', `=' and `|' from potential infix
;; symbolic variable.
(if (member match2 '("::" "=" "|"))
;; Variable identifier.
(haskell-ds-match-string 1)
(if (eq (aref match2 0) ?\`)
;; Infix variable identifier.
(haskell-ds-match-string 3)
;; Infix symbolic variable.
match2))))
;; Variable identifier.
(and (looking-at "\\sw+") (haskell-ds-match-string 0)))))))
(defun haskell-ds-move-to-start-regexp (inc regexp)
"Move to beginning of line that succeeds/precedes (INC = 1/-1)
current line that starts with REGEXP and is not in `font-lock-comment-face'."
;; Making this defsubst instead of defun appears to have little or
;; no effect on efficiency. It is probably not called enough to do
;; so.
(while (and (= (forward-line inc) 0)
(or (not (looking-at regexp))
(eq (get-text-property (point) 'face)
'font-lock-comment-face)))))
(defun haskell-ds-move-to-start-regexp-skipping-comments (inc regexp)
"Like haskell-ds-move-to-start-regexp, but uses syntax-ppss to
skip comments"
(let (p)
(loop
do (setq p (point))
(haskell-ds-move-to-start-regexp inc regexp)
while (and (nth 4 (syntax-ppss))
(/= p (point))))))
(defvar literate-haskell-ds-line-prefix "> ?"
"Regexp matching start of a line of Bird-style literate code.
Current value is \"> \" as we assume top-level declarations start
at column 3. Must not contain the special \"^\" regexp as we may
not use the regexp at the start of a regexp string. Note this is
only for `imenu' support.")
(defvar haskell-ds-start-decl-re "\\(\\sw\\|(\\)"
"The regexp that starts a Haskell declaration.")
(defvar literate-haskell-ds-start-decl-re
(concat literate-haskell-ds-line-prefix haskell-ds-start-decl-re)
"The regexp that starts a Bird-style literate Haskell declaration.")
(defun haskell-ds-move-to-decl (direction bird-literate fix)
"General function for moving to the start of a declaration,
either forwards or backwards from point, with normal or with Bird-style
literate scripts. If DIRECTION is t, then forward, else backward. If
BIRD-LITERATE is t, then treat as Bird-style literate scripts, else
normal scripts. Returns point if point is left at the start of a
declaration, and nil otherwise, ie. because point is at the beginning
or end of the buffer and no declaration starts there. If FIX is t,
then point does not move if already at the start of a declaration."
;; As `haskell-ds-get-variable' cannot separate an infix variable
;; identifier out of a value binding with non-alphanumeric first
;; argument, this function will treat such value bindings as
;; separate from the declarations surrounding it.
(let ( ;; The variable typed or bound in the current series of
;; declarations.
name
;; The variable typed or bound in the new declaration.
newname
;; Hack to solve hard problem for Bird-style literate scripts
;; that start with a declaration. We are in the abyss if
;; point is before start of this declaration.
abyss
(line-prefix (if bird-literate literate-haskell-ds-line-prefix ""))
;; The regexp to match for the start of a declaration.
(start-decl-re (if bird-literate
literate-haskell-ds-start-decl-re
haskell-ds-start-decl-re))
(increment (if direction 1 -1))
(bound (if direction (point-max) (point-min))))
;; Change syntax table.
(with-syntax-table haskell-ds-syntax-table
;; move to beginning of line that starts the "current
;; declaration" (dependent on DIRECTION and FIX), and then get
;; the variable typed or bound by this declaration, if any.
(let ( ;; Where point was at call of function.
(here (point))
;; Where the declaration on this line (if any) starts.
(start (progn
(beginning-of-line)
;; Checking the face to ensure a declaration starts
;; here seems to be the only addition to make this
;; module support LaTeX-style literate scripts.
(if (and (looking-at start-decl-re)
(not (eq (get-text-property (point) 'face)
'font-lock-comment-face)))
(match-beginning 1)))))
(if (and start
;; This complicated boolean determines whether we
;; should include the declaration that starts on the
;; current line as the "current declaration" or not.
(or (and (or (and direction (not fix))
(and (not direction) fix))
(>= here start))
(and (or (and direction fix)
(and (not direction) (not fix)))
(> here start))))
;; If so, we are already at start of the current line, so
;; do nothing.
()
;; If point was before start of a declaration on the first
;; line of the buffer (possible for Bird-style literate
;; scripts) then we are in the abyss.
(if (and start (bobp))
(setq abyss t)
;; Otherwise we move to the start of the first declaration
;; on a line preceeding the current one, skipping comments
(haskell-ds-move-to-start-regexp-skipping-comments -1 start-decl-re))))
;; If we are in the abyss, position and return as appropriate.
(if abyss
(if (not direction)
nil
(re-search-forward (concat "\\=" line-prefix) nil t)
(point))
;; Get the variable typed or bound by this declaration, if any.
(setq name (haskell-ds-get-variable line-prefix))
(if (not name)
;; If no such variable, stop at the start of this
;; declaration if moving backward, or move to the next
;; declaration if moving forward.
(if direction
(haskell-ds-move-to-start-regexp-skipping-comments 1 start-decl-re))
;; If there is a variable, find the first
;; succeeding/preceeding declaration that does not type or
;; bind it. Check for reaching start/end of buffer and
;; comments.
(haskell-ds-move-to-start-regexp-skipping-comments increment start-decl-re)
(while (and (/= (point) bound)
(and (setq newname (haskell-ds-get-variable line-prefix))
(string= name newname)))
(setq name newname)
(haskell-ds-move-to-start-regexp-skipping-comments increment start-decl-re))
;; If we are going backward, and have either reached a new
;; declaration or the beginning of a buffer that does not
;; start with a declaration, move forward to start of next
;; declaration (which must exist). Otherwise, we are done.
(if (and (not direction)
(or (and (looking-at start-decl-re)
(not (string= name
;; Note we must not use
;; newname here as this may
;; not have been set if we
;; have reached the beginning
;; of the buffer.
(haskell-ds-get-variable
line-prefix))))
(and (not (looking-at start-decl-re))
(bobp))))
(haskell-ds-move-to-start-regexp-skipping-comments 1 start-decl-re)))
;; Store whether we are at the start of a declaration or not.
;; Used to calculate final result.
(let ((at-start-decl (looking-at start-decl-re)))
;; If we are at the beginning of a line, move over
;; line-prefix, if present at point.
(if (bolp)
(re-search-forward (concat "\\=" line-prefix) (point-max) t))
;; Return point if at the start of a declaration and nil
;; otherwise.
(if at-start-decl (point) nil))))))
(defun haskell-ds-bird-p ()
(and (boundp 'haskell-literate) (eq haskell-literate 'bird)))
(defun haskell-ds-backward-decl ()
"Move point backward to the first character preceding the current
point that starts a top-level declaration. A series of declarations
concerning one variable is treated as one declaration by this
function. So, if point is within a top-level declaration then move it
to the start of that declaration. If point is already at the start of
a top-level declaration, then move it to the start of the preceding
declaration. Returns point if point is left at the start of a
declaration, and nil otherwise, ie. because point is at the beginning
of the buffer and no declaration starts there."
(interactive)
(haskell-ds-move-to-decl nil (haskell-ds-bird-p) nil))
(defun haskell-ds-forward-decl ()
"As `haskell-ds-backward-decl' but forward."
(interactive)
(haskell-ds-move-to-decl t (haskell-ds-bird-p) nil))
(defun haskell-ds-generic-find-next-decl (bird-literate)
"Find the name, position and type of the declaration at or after point.
Return ((NAME . (START-POSITION . NAME-POSITION)) . TYPE)
if one exists and nil otherwise. The start-position is at the start
of the declaration, and the name-position is at the start of the name
of the declaration. The name is a string, the positions are buffer
positions and the type is one of the symbols \"variable\", \"datatype\",
\"class\", \"import\" and \"instance\"."
(let (;; The name, type and name-position of the declaration to
;; return.
name
type
name-pos
;; Buffer positions marking the start and end of the space
;; containing a declaration.
start
end)
;; Change to declaration scanning syntax.
(with-syntax-table haskell-ds-syntax-table
;; Stop when we are at the end of the buffer or when a valid
;; declaration is grabbed.
(while (not (or (eobp) name))
;; Move forward to next declaration at or after point.
(haskell-ds-move-to-decl t bird-literate t)
;; Start and end of search space is currently just the starting
;; line of the declaration.
(setq start (point)
end (line-end-position))
(cond
;; If the start of the top-level declaration does not begin
;; with a starting keyword, then (if legal) must be a type
;; signature or value binding, and the variable concerned is
;; grabbed.
((not (looking-at haskell-ds-start-keywords-re))
(setq name (haskell-ds-get-variable ""))
(if name
(progn
(setq type 'variable)
(re-search-forward (regexp-quote name) end t)
(setq name-pos (match-beginning 0)))))
;; User-defined datatype declaration.
((re-search-forward "\\=\\(data\\|newtype\\|type\\)\\>" end t)
(re-search-forward "=>" end t)
(if (looking-at "[ \t]*\\(\\sw+\\)")
(progn
(setq name (haskell-ds-match-string 1))
(setq name-pos (match-beginning 1))
(setq type 'datatype))))
;; Class declaration.
((re-search-forward "\\=class\\>" end t)
(re-search-forward "=>" end t)
(if (looking-at "[ \t]*\\(\\sw+\\)")
(progn
(setq name (haskell-ds-match-string 1))
(setq name-pos (match-beginning 1))
(setq type 'class))))
;; Import declaration.
((looking-at "import[ \t]+\\(qualified[ \t]+\\)?\\(\\(?:\\sw\\|.\\)+\\)")
(setq name (haskell-ds-match-string 2))
(setq name-pos (match-beginning 2))
(setq type 'import))
;; Instance declaration.
((re-search-forward "\\=instance[ \t]+" end t)
(re-search-forward "=>[ \t]+" end t)
;; The instance "title" starts just after the `instance' (and
;; any context) and finishes just before the _first_ `where'
;; if one exists. This solution is ugly, but I can't find a
;; nicer one---a simple regexp will pick up the last `where',
;; which may be rare but nevertheless...
(setq name-pos (point))
(setq name (format "%s"
(buffer-substring
(point)
(progn
;; Look for a `where'.
(if (re-search-forward "\\<where\\>" end t)
;; Move back to just before the `where'.
(progn
(re-search-backward "\\s-where")
(point))
;; No `where' so move to last non-whitespace
;; before `end'.
(progn
(goto-char end)
(skip-chars-backward " \t")
(point)))))))
;; If we did not manage to extract a name, cancel this
;; declaration (eg. when line ends in "=> ").
(if (string-match "^[ \t]*$" name) (setq name nil))
(setq type 'instance)))
;; Move past start of current declaration.
(goto-char end))
;; If we have a valid declaration then return it, otherwise return
;; nil.
(if name
(cons (cons name (cons (copy-marker start t) (copy-marker name-pos t)))
type)
nil))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Declaration scanning via `imenu'.
(defun haskell-ds-create-imenu-index ()
"Function for finding `imenu' declarations in Haskell mode.
Finds all declarations (classes, variables, imports, instances and
datatypes) in a Haskell file for the `imenu' package."
;; Each list has elements of the form `(INDEX-NAME . INDEX-POSITION)'.
;; These lists are nested using `(INDEX-TITLE . INDEX-ALIST)'.
(let* ((bird-literate (haskell-ds-bird-p))
(index-alist '())
(index-class-alist '()) ;; Classes
(index-var-alist '()) ;; Variables
(index-imp-alist '()) ;; Imports
(index-inst-alist '()) ;; Instances
(index-type-alist '()) ;; Datatypes
;; Variables for showing progress.
(bufname (buffer-name))
(divisor-of-progress (max 1 (/ (buffer-size) 100)))
;; The result we wish to return.
result)
(goto-char (point-min))
;; Loop forwards from the beginning of the buffer through the
;; starts of the top-level declarations.
(while (< (point) (point-max))
(message "Scanning declarations in %s... (%3d%%)" bufname
(/ (- (point) (point-min)) divisor-of-progress))
;; Grab the next declaration.
(setq result (haskell-ds-generic-find-next-decl bird-literate))
(if result
;; If valid, extract the components of the result.
(let* ((name-posns (car result))
(name (car name-posns))
(posns (cdr name-posns))
(start-pos (car posns))
(type (cdr result))
;; Place `(name . start-pos)' in the correct alist.
(sym (cdr (assq type
'((variable . index-var-alist)
(datatype . index-type-alist)
(class . index-class-alist)
(import . index-imp-alist)
(instance . index-inst-alist))))))
(set sym (cons (cons name start-pos) (symbol-value sym))))))
;; Now sort all the lists, label them, and place them in one list.
(message "Sorting declarations in %s..." bufname)
(and index-type-alist
(push (cons "Datatypes"
(sort index-type-alist 'haskell-ds-imenu-label-cmp))
index-alist))
(and index-inst-alist
(push (cons "Instances"
(sort index-inst-alist 'haskell-ds-imenu-label-cmp))
index-alist))
(and index-imp-alist
(push (cons "Imports"
(sort index-imp-alist 'haskell-ds-imenu-label-cmp))
index-alist))
(and index-var-alist
(push (cons "Variables"
(sort index-var-alist 'haskell-ds-imenu-label-cmp))
index-alist))
(and index-class-alist
(push (cons "Classes"
(sort index-class-alist 'haskell-ds-imenu-label-cmp))
index-alist))
(message "Sorting declarations in %s...done" bufname)
;; Return the alist.
index-alist))
(defun haskell-ds-imenu-label-cmp (el1 el2)
"Predicate to compare labels in lists from `haskell-ds-create-imenu-index'."
(string< (car el1) (car el2)))
(defun haskell-ds-imenu ()
"Install `imenu' for Haskell scripts."
(setq imenu-create-index-function 'haskell-ds-create-imenu-index)
(if (fboundp 'imenu-add-to-menubar)
(imenu-add-to-menubar "Declarations")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Declaration scanning via `func-menu'.
(defun haskell-ds-func-menu-next (buffer)
"Non-literate Haskell version of `haskell-ds-generic-func-menu-next'."
(haskell-ds-generic-func-menu-next (haskell-ds-bird-p) buffer))
(defun haskell-ds-generic-func-menu-next (bird-literate buffer)
"Return `(name . pos)' of next declaration."
(set-buffer buffer)
(let ((result (haskell-ds-generic-find-next-decl bird-literate)))
(if result
(let* ((name-posns (car result))
(name (car name-posns))
(posns (cdr name-posns))
(name-pos (cdr posns))
;;(type (cdr result))
)
(cons ;(concat
;; func-menu has problems with spaces, and adding a
;; qualifying keyword will not allow the "goto fn"
;; functions to work properly. Sigh.
;; (cond
;; ((eq type 'variable) "")
;; ((eq type 'datatype) "datatype ")
;; ((eq type 'class) "class ")
;; ((eq type 'import) "import ")
;; ((eq type 'instance) "instance "))
name;)
name-pos))
nil)))
(defvar haskell-ds-func-menu-regexp
(concat "^" haskell-ds-start-decl-re)
"Regexp to match the start of a possible declaration.")
(defvar literate-haskell-ds-func-menu-regexp
(concat "^" literate-haskell-ds-start-decl-re)
"As `haskell-ds-func-menu-regexp' but for Bird-style literate scripts.")
(defvar fume-menubar-menu-name)
(defvar fume-function-name-regexp-alist)
(defvar fume-find-function-name-method-alist)
(defun haskell-ds-func-menu ()
"Use `func-menu' to establish declaration scanning for Haskell scripts."
(require 'func-menu)
(set (make-local-variable 'fume-menubar-menu-name) "Declarations")
(set (make-local-variable 'fume-function-name-regexp-alist)
(if (haskell-ds-bird-p)
'((haskell-mode . literate-haskell-ds-func-menu-regexp))
'((haskell-mode . haskell-ds-func-menu-regexp))))
(set (make-local-variable 'fume-find-function-name-method-alist)
'((haskell-mode . haskell-ds-func-menu-next)))
(fume-add-menubar-entry)
(local-set-key "\C-cl" 'fume-list-functions)
(local-set-key "\C-cg" 'fume-prompt-function-goto)
(local-set-key [(meta button1)] 'fume-mouse-function-goto))
;; The main functions to turn on declaration scanning.
(defun turn-on-haskell-decl-scan ()
(interactive)
"Unconditionally activate `haskell-decl-scan-mode'."
(haskell-decl-scan-mode 1))
(defvar haskell-decl-scan-mode nil)
(make-variable-buffer-local 'haskell-decl-scan-mode)
;;;###autoload
(defun haskell-decl-scan-mode (&optional arg)
"Minor mode for declaration scanning for Haskell mode.
Top-level declarations are scanned and listed in the menu item \"Declarations\".
Selecting an item from this menu will take point to the start of the
declaration.
\\[haskell-ds-forward-decl] and \\[haskell-ds-backward-decl] move forward and backward to the start of a declaration.
Under XEmacs, the following keys are also defined:
\\[fume-list-functions] lists the declarations of the current buffer,
\\[fume-prompt-function-goto] prompts for a declaration to move to, and
\\[fume-mouse-function-goto] moves to the declaration whose name is at point.
This may link with `haskell-doc' (only for Emacs currently).
For non-literate and LaTeX-style literate scripts, we assume the
common convention that top-level declarations start at the first
column. For Bird-style literate scripts, we assume the common
convention that top-level declarations start at the third column,
ie. after \"> \".
Anything in `font-lock-comment-face' is not considered for a
declaration. Therefore, using Haskell font locking with comments
coloured in `font-lock-comment-face' improves declaration scanning.
To turn on declaration scanning for all Haskell buffers, add this to
.emacs:
(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
To turn declaration scanning on for the current buffer, call
`turn-on-haskell-decl-scan'.
Literate Haskell scripts are supported: If the value of
`haskell-literate' (automatically set by the Haskell mode of
Moss&Thorn) is `bird', a Bird-style literate script is assumed. If it
is nil or `tex', a non-literate or LaTeX-style literate script is
assumed, respectively.
Invokes `haskell-decl-scan-mode-hook'."
(interactive)
(if (boundp 'beginning-of-defun-function)
(if haskell-decl-scan-mode
(progn
(set (make-local-variable 'beginning-of-defun-function)
'haskell-ds-backward-decl)
(set (make-local-variable 'end-of-defun-function)
'haskell-ds-forward-decl))
(kill-local-variable 'beginning-of-defun-function)
(kill-local-variable 'end-of-defun-function))
(local-set-key "\M-\C-e"
(if haskell-decl-scan-mode 'haskell-ds-forward-decl))
(local-set-key "\M-\C-a"
(if haskell-decl-scan-mode 'haskell-ds-backward-decl)))
(if haskell-decl-scan-mode
(if (fboundp 'imenu)
(haskell-ds-imenu)
(haskell-ds-func-menu))
;; How can we cleanly remove that menus?
(local-set-key [menu-bar index] nil))
(run-hooks 'haskell-decl-scan-mode-hook))
;; Provide ourselves:
(provide 'haskell-decl-scan)
;; arch-tag: f4335fd8-4b6c-472e-9899-004d47d94818
;;; haskell-decl-scan.el ends here

File diff suppressed because it is too large Load diff

View file

@ -1,633 +0,0 @@
;;; haskell-font-lock.el --- Font locking module for Haskell Mode
;; Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Copyright 1997-1998 Graeme E Moss, and Tommy Thorn
;; Authors: 1997-1998 Graeme E Moss <gem@cs.york.ac.uk> and
;; Tommy Thorn <thorn@irisa.fr>
;; 2003 Dave Love <fx@gnu.org>
;; Keywords: faces files Haskell
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Purpose:
;;
;; To support fontification of standard Haskell keywords, symbols,
;; functions, etc. Supports full Haskell 1.4 as well as LaTeX- and
;; Bird-style literate scripts.
;;
;; Installation:
;;
;; To turn font locking on for all Haskell buffers under the Haskell
;; mode of Moss&Thorn, add this to .emacs:
;;
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-font-lock)
;;
;; Otherwise, call `turn-on-haskell-font-lock'.
;;
;;
;; Customisation:
;;
;; The colours and level of font locking may be customised. See the
;; documentation on `turn-on-haskell-font-lock' for more details.
;;
;;
;; History:
;;
;; If you have any problems or suggestions, after consulting the list
;; below, email gem@cs.york.ac.uk and thorn@irisa.fr quoting the
;; version of the mode you are using, the version of Emacs you are
;; using, and a small example of the problem or suggestion. Note that
;; this module requires a reasonably recent version of Emacs. It
;; requires Emacs 21 to cope with Unicode characters and to do proper
;; syntactic fontification.
;;
;; Version 1.3:
;; From Dave Love:
;; Support for proper behaviour (including with Unicode identifiers)
;; in Emacs 21 only hacked in messily to avoid disturbing the old
;; stuff. Needs integrating more cleanly. Allow literate comment
;; face to be customized. Some support for fontifying definitions.
;; (I'm not convinced the faces should be customizable -- fontlock
;; faces are normally expected to be consistent.)
;;
;; Version 1.2:
;; Added support for LaTeX-style literate scripts. Allow whitespace
;; after backslash to end a line for string continuations.
;;
;; Version 1.1:
;; Use own syntax table. Use backquote (neater). Stop ''' being
;; highlighted as quoted character. Fixed `\"' fontification bug
;; in comments.
;;
;; Version 1.0:
;; Brought over from Haskell mode v1.1.
;;
;; Present Limitations/Future Work (contributions are most welcome!):
;;
;; . Debatable whether `()' `[]' `(->)' `(,)' `(,,)' etc. should be
;; highlighted as constructors or not. Should the `->' in
;; `id :: a -> a' be considered a constructor or a keyword? If so,
;; how do we distinguish this from `\x -> x'? What about the `\'?
;;
;; . XEmacs can support both `--' comments and `{- -}' comments
;; simultaneously. If XEmacs is detected, this should be used.
;;
;; . Support for GreenCard?
;;
;; All functions/variables start with
;; `(turn-(on/off)-)haskell-font-lock' or `haskell-fl-'.
;;; Code:
(eval-when-compile
(require 'haskell-mode)
(require 'cl))
(require 'font-lock)
(defcustom haskell-font-lock-symbols nil
"Display \\ and -> and such using symbols in fonts.
This may sound like a neat trick, but be extra careful: it changes the
alignment and can thus lead to nasty surprises w.r.t layout.
If t, try to use whichever font is available. Otherwise you can
set it to a particular font of your preference among `japanese-jisx0208'
and `unicode'."
:group 'haskell
:type '(choice (const nil)
(const t)
(const unicode)
(const japanese-jisx0208)))
(defconst haskell-font-lock-symbols-alist
(append
;; Prefer single-width Unicode font for lambda.
(and (fboundp 'decode-char)
(memq haskell-font-lock-symbols '(t unicode))
(list (cons "\\" (decode-char 'ucs 955))))
;; The symbols can come from a JIS0208 font.
(and (fboundp 'make-char) (fboundp 'charsetp) (charsetp 'japanese-jisx0208)
(memq haskell-font-lock-symbols '(t japanese-jisx0208))
(list (cons "not" (make-char 'japanese-jisx0208 34 76))
(cons "\\" (make-char 'japanese-jisx0208 38 75))
(cons "->" (make-char 'japanese-jisx0208 34 42))
(cons "<-" (make-char 'japanese-jisx0208 34 43))
(cons "=>" (make-char 'japanese-jisx0208 34 77))
;; FIXME: I'd like to either use ∀ or ∃ depending on how the
;; `forall' keyword is used, but currently the rest of the
;; code assumes that such ambiguity doesn't happen :-(
(cons "forall" (make-char 'japanese-jisx0208 34 79))))
;; Or a unicode font.
(and (fboundp 'decode-char)
(memq haskell-font-lock-symbols '(t unicode))
(list (cons "not" (decode-char 'ucs 172))
(cons "->" (decode-char 'ucs 8594))
(cons "<-" (decode-char 'ucs 8592))
(cons "=>" (decode-char 'ucs 8658))
(cons "()" (decode-char 'ucs #X2205))
(cons "==" (decode-char 'ucs #X2261))
(cons "/=" (decode-char 'ucs #X2262))
(cons ">=" (decode-char 'ucs #X2265))
(cons "<=" (decode-char 'ucs #X2264))
(cons "!!" (decode-char 'ucs #X203C))
(cons "&&" (decode-char 'ucs #X2227))
(cons "||" (decode-char 'ucs #X2228))
(cons "sqrt" (decode-char 'ucs #X221A))
(cons "undefined" (decode-char 'ucs #X22A5))
(cons "pi" (decode-char 'ucs #X3C0))
(cons "~>" (decode-char 'ucs 8669)) ;; Omega language
;; (cons "~>" (decode-char 'ucs 8605)) ;; less desirable
(cons "-<" (decode-char 'ucs 8610)) ;; Paterson's arrow syntax
;; (cons "-<" (decode-char 'ucs 10521)) ;; nicer but uncommon
(cons "::" (decode-char 'ucs 8759))
(list "." (decode-char 'ucs 8728) ; (decode-char 'ucs 9675)
;; Need a predicate here to distinguish the . used by
;; forall <foo> . <bar>.
'haskell-font-lock-dot-is-not-composition)
(cons "forall" (decode-char 'ucs 8704)))))
"Alist mapping Haskell symbols to chars.
Each element has the form (STRING . CHAR) or (STRING CHAR PREDICATE).
STRING is the Haskell symbol.
CHAR is the character with which to represent this symbol.
PREDICATE if present is a function of one argument (the start position
of the symbol) which should return non-nil if this mapping should be disabled
at that position.")
(defun haskell-font-lock-dot-is-not-composition (start)
"Return non-nil if the \".\" at START is not a composition operator.
This is the case if the \".\" is part of a \"forall <tvar> . <type>\"."
(save-excursion
(goto-char start)
(re-search-backward "\\<forall\\>[^.\"]*\\="
(line-beginning-position) t)))
;; Use new vars for the font-lock faces. The indirection allows people to
;; use different faces than in other modes, as before.
(defvar haskell-keyword-face 'font-lock-keyword-face)
(defvar haskell-constructor-face 'font-lock-type-face)
;; This used to be `font-lock-variable-name-face' but it doesn't result in
;; a highlighting that's consistent with other modes (it's mostly used
;; for function defintions).
(defvar haskell-definition-face 'font-lock-function-name-face)
;; This is probably just wrong, but it used to use
;; `font-lock-function-name-face' with a result that was not consistent with
;; other major modes, so I just exchanged with `haskell-definition-face'.
(defvar haskell-operator-face 'font-lock-variable-name-face)
(defvar haskell-default-face nil)
(defvar haskell-literate-comment-face 'font-lock-doc-face
"Face with which to fontify literate comments.
Set to `default' to avoid fontification of them.")
(defconst haskell-emacs21-features (string-match "[[:alpha:]]" "x")
"Non-nil if we have regexp char classes.
Assume this means we have other useful features from Emacs 21.")
(defun haskell-font-lock-compose-symbol (alist)
"Compose a sequence of ascii chars into a symbol.
Regexp match data 0 points to the chars."
;; Check that the chars should really be composed into a symbol.
(let* ((start (match-beginning 0))
(end (match-end 0))
(syntaxes (cond
((eq (char-syntax (char-after start)) ?w) '(?w))
;; Special case for the . used for qualified names.
((and (eq (char-after start) ?\.) (= end (1+ start)))
'(?_ ?\\ ?w))
(t '(?_ ?\\))))
sym-data)
(if (or (memq (char-syntax (or (char-before start) ?\ )) syntaxes)
(memq (char-syntax (or (char-after end) ?\ )) syntaxes)
(memq (get-text-property start 'face)
'(font-lock-doc-face font-lock-string-face
font-lock-comment-face))
(and (consp (setq sym-data (cdr (assoc (match-string 0) alist))))
(let ((pred (cadr sym-data)))
(setq sym-data (car sym-data))
(funcall pred start))))
;; No composition for you. Let's actually remove any composition
;; we may have added earlier and which is now incorrect.
(remove-text-properties start end '(composition))
;; That's a symbol alright, so add the composition.
(compose-region start end sym-data)))
;; Return nil because we're not adding any face property.
nil)
(defun haskell-font-lock-symbols-keywords ()
(when (fboundp 'compose-region)
(let ((alist nil))
(dolist (x haskell-font-lock-symbols-alist)
(when (and (if (fboundp 'char-displayable-p)
(char-displayable-p (if (consp (cdr x)) (cadr x) (cdr x)))
t)
(not (assoc (car x) alist))) ;Not yet in alist.
(push x alist)))
(when alist
`((,(regexp-opt (mapcar 'car alist) t)
(0 (haskell-font-lock-compose-symbol ',alist)
;; In Emacs-21, if the `override' field is nil, the face
;; expressions is only evaluated if the text has currently
;; no face. So force evaluation by using `keep'.
keep)))))))
;; The font lock regular expressions.
(defun haskell-font-lock-keywords-create (literate)
"Create fontification definitions for Haskell scripts.
Returns keywords suitable for `font-lock-keywords'."
(let* (;; Bird-style literate scripts start a line of code with
;; "^>", otherwise a line of code starts with "^".
(line-prefix (if (eq literate 'bird) "^> ?" "^"))
;; Most names are borrowed from the lexical syntax of the Haskell
;; report.
;; Some of these definitions have been superseded by using the
;; syntax table instead.
;; (ASCsymbol "-!#$%&*+./<=>?@\\\\^|~")
;; Put the minus first to make it work in ranges.
;; (ISOsymbol "\241-\277\327\367")
(ISOlarge "\300-\326\330-\337")
(ISOsmall "\340-\366\370-\377")
(small
(if haskell-emacs21-features "[:lower:]" (concat "a-z" ISOsmall)))
(large
(if haskell-emacs21-features "[:upper:]" (concat "A-Z" ISOlarge)))
(alnum
(if haskell-emacs21-features "[:alnum:]" (concat small large "0-9")))
;; (symbol
;; (concat ASCsymbol ISOsymbol))
;; We allow _ as the first char to fit GHC
(varid (concat "\\b[" small "_][" alnum "'_]*\\b"))
(conid (concat "\\b[" large "][" alnum "'_]*\\b"))
(modid (concat "\\b" conid "\\(\\." conid "\\)*\\b"))
(qvarid (concat modid "\\." varid))
(qconid (concat modid "\\." conid))
(sym
;; We used to use the below for non-Emacs21, but I think the
;; regexp based on syntax works for other emacsen as well. -- Stef
;; (concat "[" symbol ":]+")
;; Add backslash to the symbol-syntax chars. This seems to
;; be thrown for some reason by backslash's escape syntax.
"\\(\\s_\\|\\\\\\)+")
;; Reserved operations
(reservedsym
(concat "\\S_"
;; (regexp-opt '(".." "::" "=" "\\" "|" "<-" "->"
;; "@" "~" "=>") t)
"\\(->\\|\\.\\.\\|::\\|<-\\|=>\\|[=@\\|~]\\)"
"\\S_"))
;; Reserved identifiers
(reservedid
(concat "\\<"
;; `as', `hiding', and `qualified' are part of the import
;; spec syntax, but they are not reserved.
;; `_' can go in here since it has temporary word syntax.
;; (regexp-opt
;; '("case" "class" "data" "default" "deriving" "do"
;; "else" "if" "import" "in" "infix" "infixl"
;; "infixr" "instance" "let" "module" "newtype" "of"
;; "then" "type" "where" "_") t)
"\\(_\\|c\\(ase\\|lass\\)\\|d\\(ata\\|e\\(fault\\|riving\\)\\|o\\)\\|else\\|i\\(mport\\|n\\(fix[lr]?\\|stance\\)\\|[fn]\\)\\|let\\|module\\|newtype\\|of\\|t\\(hen\\|ype\\)\\|where\\)"
"\\>"))
;; This unreadable regexp matches strings and character
;; constants. We need to do this with one regexp to handle
;; stuff like '"':"'". The regexp is the composition of
;; "([^"\\]|\\.)*" for strings and '([^\\]|\\.[^']*)' for
;; characters, allowing for string continuations.
;; Could probably be improved...
(string-and-char
(concat "\\(\\(\"\\|" line-prefix "[ \t]*\\\\\\)\\([^\"\\\\\n]\\|\\\\.\\)*\\(\"\\|\\\\[ \t]*$\\)\\|'\\([^'\\\\\n]\\|\\\\.[^'\n]*\\)'\\)"))
;; Top-level declarations
(topdecl-var
(concat line-prefix "\\(" varid "\\)\\s-*\\("
;; A toplevel declaration can be followed by a definition
;; (=), a type (::), a guard, or a pattern which can
;; either be a variable, a constructor, a parenthesized
;; thingy, or an integer or a string.
varid "\\|" conid "\\|::\\|=\\||\\|\\s(\\|[0-9\"']\\)"))
(topdecl-var2
(concat line-prefix "\\(" varid "\\|" conid "\\)\\s-*`\\(" varid "\\)`"))
(topdecl-sym
(concat line-prefix "\\(" varid "\\|" conid "\\)\\s-*\\(" sym "\\)"))
(topdecl-sym2 (concat line-prefix "(\\(" sym "\\))"))
keywords)
(setq keywords
`(;; NOTICE the ordering below is significant
;;
("^#.*$" 0 'font-lock-warning-face t)
,@(unless haskell-emacs21-features ;Supports nested comments?
;; Expensive.
`((,string-and-char 1 font-lock-string-face)))
;; This was originally at the very end (and needs to be after
;; all the comment/string/doc highlighting) but it seemed to
;; trigger a bug in Emacs-21.3 which caused the compositions to
;; be "randomly" dropped. Moving it earlier seemed to reduce
;; the occurrence of the bug.
,@(haskell-font-lock-symbols-keywords)
(,reservedid 1 (symbol-value 'haskell-keyword-face))
(,reservedsym 1 (symbol-value 'haskell-operator-face))
;; Special case for `as', `hiding', and `qualified', which are
;; keywords in import statements but are not otherwise reserved.
("\\<import[ \t]+\\(?:\\(qualified\\>\\)[ \t]*\\)?[^ \t\n()]+[ \t]*\\(?:\\(\\<as\\>\\)[ \t]*[^ \t\n()]+[ \t]*\\)?\\(\\<hiding\\>\\)?"
(1 (symbol-value 'haskell-keyword-face) nil lax)
(2 (symbol-value 'haskell-keyword-face) nil lax)
(3 (symbol-value 'haskell-keyword-face) nil lax))
;; Toplevel Declarations.
;; Place them *before* generic id-and-op highlighting.
(,topdecl-var (1 (symbol-value 'haskell-definition-face)))
(,topdecl-var2 (2 (symbol-value 'haskell-definition-face)))
(,topdecl-sym (2 (symbol-value 'haskell-definition-face)))
(,topdecl-sym2 (1 (symbol-value 'haskell-definition-face)))
;; These four are debatable...
("(\\(,*\\|->\\))" 0 (symbol-value 'haskell-constructor-face))
("\\[\\]" 0 (symbol-value 'haskell-constructor-face))
;; Expensive.
(,qvarid 0 (symbol-value 'haskell-default-face))
(,qconid 0 (symbol-value 'haskell-constructor-face))
(,(concat "\`" varid "\`") 0 (symbol-value 'haskell-operator-face))
;; Expensive.
(,conid 0 (symbol-value 'haskell-constructor-face))
;; Very expensive.
(,sym 0 (if (eq (char-after (match-beginning 0)) ?:)
haskell-constructor-face
haskell-operator-face))))
(unless (boundp 'font-lock-syntactic-keywords)
(case literate
(bird
(setq keywords
`(("^[^>\n].*$" 0 haskell-comment-face t)
,@keywords
("^>" 0 haskell-default-face t))))
((latex tex)
(setq keywords
`((haskell-fl-latex-comments 0 'font-lock-comment-face t)
,@keywords)))))
keywords))
;; The next three aren't used in Emacs 21.
(defvar haskell-fl-latex-cache-pos nil
"Position of cache point used by `haskell-fl-latex-cache-in-comment'.
Should be at the start of a line.")
(defvar haskell-fl-latex-cache-in-comment nil
"If `haskell-fl-latex-cache-pos' is outside a
\\begin{code}..\\end{code} block (and therefore inside a comment),
this variable is set to t, otherwise nil.")
(defun haskell-fl-latex-comments (end)
"Sets `match-data' according to the region of the buffer before end
that should be commented under LaTeX-style literate scripts."
(let ((start (point)))
(if (= start end)
;; We're at the end. No more to fontify.
nil
(if (not (eq start haskell-fl-latex-cache-pos))
;; If the start position is not cached, calculate the state
;; of the start.
(progn
(setq haskell-fl-latex-cache-pos start)
;; If the previous \begin{code} or \end{code} is a
;; \begin{code}, then start is not in a comment, otherwise
;; it is in a comment.
(setq haskell-fl-latex-cache-in-comment
(if (and
(re-search-backward
"^\\(\\(\\\\begin{code}\\)\\|\\(\\\\end{code}\\)\\)$"
(point-min) t)
(match-end 2))
nil t))
;; Restore position.
(goto-char start)))
(if haskell-fl-latex-cache-in-comment
(progn
;; If start is inside a comment, search for next \begin{code}.
(re-search-forward "^\\\\begin{code}$" end 'move)
;; Mark start to end of \begin{code} (if present, till end
;; otherwise), as a comment.
(set-match-data (list start (point)))
;; Return point, as a normal regexp would.
(point))
;; If start is inside a code block, search for next \end{code}.
(if (re-search-forward "^\\\\end{code}$" end t)
;; If one found, mark it as a comment, otherwise finish.
(point))))))
(defconst haskell-basic-syntactic-keywords
'(;; Character constants (since apostrophe can't have string syntax).
;; Beware: do not match something like 's-}' or '\n"+' since the first '
;; might be inside a comment or a string.
;; This still gets fooled with "'"'"'"'"'"', but ... oh well.
("\\Sw\\('\\)\\([^\\'\n]\\|\\\\.[^\\'\n \"}]*\\)\\('\\)" (1 "|") (3 "|"))
;; The \ is not escaping in \(x,y) -> x + y.
("\\(\\\\\\)(" (1 "."))
;; The second \ in a gap does not quote the subsequent char.
;; It's probably not worth the trouble, tho.
;; ("^[ \t]*\\(\\\\\\)" (1 "."))
;; Deal with instances of `--' which don't form a comment.
("\\s_\\{3,\\}" (0 (if (string-match "\\`-*\\'" (match-string 0))
;; Sequence of hyphens. Do nothing in
;; case of things like `{---'.
nil
"_"))))) ; other symbol sequence
(defconst haskell-bird-syntactic-keywords
(cons '("^[^\n>]" (0 "<"))
haskell-basic-syntactic-keywords))
(defconst haskell-latex-syntactic-keywords
(append
'(("^\\\\begin{code}\\(\n\\)" 1 "!")
;; Note: buffer is widened during font-locking.
("\\`\\(.\\|\n\\)" (1 "!")) ; start comment at buffer start
("^\\(\\\\\\)end{code}$" 1 "!"))
haskell-basic-syntactic-keywords))
(defcustom haskell-font-lock-haddock (boundp 'font-lock-doc-face)
"If non-nil try to highlight Haddock comments specially."
:type 'boolean
:group 'haskell)
(defvar haskell-font-lock-seen-haddock nil)
(make-variable-buffer-local 'haskell-font-lock-seen-haddock)
(defun haskell-syntactic-face-function (state)
"`font-lock-syntactic-face-function' for Haskell."
(cond
((nth 3 state) font-lock-string-face) ; as normal
;; Else comment. If it's from syntax table, use default face.
((or (eq 'syntax-table (nth 7 state))
(and (eq haskell-literate 'bird)
(memq (char-before (nth 8 state)) '(nil ?\n))))
haskell-literate-comment-face)
;; Try and recognize Haddock comments. From what I gather from its
;; documentation, its comments can take the following forms:
;; a) {-| ... -}
;; b) {-^ ... -}
;; c) -- | ...
;; d) -- ^ ...
;; e) -- ...
;; Where `e' is the tricky one: it is only a Haddock comment if it
;; follows immediately another Haddock comment. Even an empty line
;; breaks such a sequence of Haddock comments. It is not clear if `e'
;; can follow any other case, so I interpreted it as following only cases
;; c,d,e (not a or b). In any case, this `e' is expensive since it
;; requires extra work for each and every non-Haddock comment, so I only
;; go through the more expensive check if we've already seen a Haddock
;; comment in the buffer.
((and haskell-font-lock-haddock
(save-excursion
(goto-char (nth 8 state))
(or (looking-at "\\(-- \\|{-\\)[|^]")
(and haskell-font-lock-seen-haddock
(looking-at "-- ")
(let ((doc nil)
pos)
(while (and (not doc)
(setq pos (line-beginning-position))
(forward-comment -1)
(eq (line-beginning-position 2) pos)
(looking-at "--\\( [|^]\\)?"))
(setq doc (match-beginning 1)))
doc)))))
(set (make-local-variable 'haskell-font-lock-seen-haddock) t)
font-lock-doc-face)
(t font-lock-comment-face)))
(defconst haskell-font-lock-keywords
(haskell-font-lock-keywords-create nil)
"Font lock definitions for non-literate Haskell.")
(defconst haskell-font-lock-bird-literate-keywords
(haskell-font-lock-keywords-create 'bird)
"Font lock definitions for Bird-style literate Haskell.")
(defconst haskell-font-lock-latex-literate-keywords
(haskell-font-lock-keywords-create 'latex)
"Font lock definitions for LaTeX-style literate Haskell.")
(defun haskell-font-lock-choose-keywords ()
(let ((literate (if (boundp 'haskell-literate) haskell-literate)))
(case literate
(bird haskell-font-lock-bird-literate-keywords)
((latex tex) haskell-font-lock-latex-literate-keywords)
(t haskell-font-lock-keywords))))
(defun haskell-font-lock-choose-syntactic-keywords ()
(let ((literate (if (boundp 'haskell-literate) haskell-literate)))
(case literate
(bird haskell-bird-syntactic-keywords)
((latex tex) haskell-latex-syntactic-keywords)
(t haskell-basic-syntactic-keywords))))
(defun haskell-font-lock-defaults-create ()
"Locally set `font-lock-defaults' for Haskell."
(set (make-local-variable 'font-lock-defaults)
'(haskell-font-lock-choose-keywords
nil nil ((?\' . "w") (?_ . "w")) nil
(font-lock-syntactic-keywords
. haskell-font-lock-choose-syntactic-keywords)
(font-lock-syntactic-face-function
. haskell-syntactic-face-function)
;; Get help from font-lock-syntactic-keywords.
(parse-sexp-lookup-properties . t))))
;; The main functions.
(defun turn-on-haskell-font-lock ()
"Turns on font locking in current buffer for Haskell 1.4 scripts.
Changes the current buffer's `font-lock-defaults', and adds the
following variables:
`haskell-keyword-face' for reserved keywords and syntax,
`haskell-constructor-face' for data- and type-constructors, class names,
and module names,
`haskell-operator-face' for symbolic and alphanumeric operators,
`haskell-default-face' for ordinary code.
The variables are initialised to the following font lock default faces:
`haskell-keyword-face' `font-lock-keyword-face'
`haskell-constructor-face' `font-lock-type-face'
`haskell-operator-face' `font-lock-function-name-face'
`haskell-default-face' <default face>
Two levels of fontification are defined: level one (the default)
and level two (more colour). The former does not colour operators.
Use the variable `font-lock-maximum-decoration' to choose
non-default levels of fontification. For example, adding this to
.emacs:
(setq font-lock-maximum-decoration '((haskell-mode . 2) (t . 0)))
uses level two fontification for `haskell-mode' and default level for
all other modes. See documentation on this variable for further
details.
To alter an attribute of a face, add a hook. For example, to change
the foreground colour of comments to brown, add the following line to
.emacs:
(add-hook 'haskell-font-lock-hook
(lambda ()
(set-face-foreground 'haskell-comment-face \"brown\")))
Note that the colours available vary from system to system. To see
what colours are available on your system, call
`list-colors-display' from emacs.
To turn font locking on for all Haskell buffers, add this to .emacs:
(add-hook 'haskell-mode-hook 'turn-on-haskell-font-lock)
To turn font locking on for the current buffer, call
`turn-on-haskell-font-lock'. To turn font locking off in the current
buffer, call `turn-off-haskell-font-lock'.
Bird-style literate Haskell scripts are supported: If the value of
`haskell-literate-bird-style' (automatically set by the Haskell mode
of Moss&Thorn) is non-nil, a Bird-style literate script is assumed.
Invokes `haskell-font-lock-hook' if not nil."
(haskell-font-lock-defaults-create)
(run-hooks 'haskell-font-lock-hook)
(turn-on-font-lock))
(defun turn-off-haskell-font-lock ()
"Turns off font locking in current buffer."
(font-lock-mode -1))
;; Provide ourselves:
(provide 'haskell-font-lock)
;; arch-tag: 89fd122e-8378-4c7f-83a3-1f49a64e458d
;;; haskell-font-lock.el ends here

View file

@ -1,332 +0,0 @@
;;; haskell-ghci.el --- A GHCi interaction mode
;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2001 Chris Webb
;; Copyright (C) 1998, 1999 Guy Lapalme
;; Keywords: inferior mode, GHCi interaction mode, Haskell
;;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Purpose:
;;
;; To send a Haskell buffer to another buffer running a GHCi
;; interpreter.
;;
;; This mode is derived from version 1.1 of Guy Lapalme's
;; haskell-hugs.el, which can be obtained from:
;;
;; http://www.iro.umontreal.ca/~lapalme/Hugs-interaction.html
;;
;; This in turn was adapted from Chris Van Humbeeck's hugs-mode.el,
;; which can be obtained from:
;;
;; http://www-i2.informatik.rwth-aachen.de/Forschung/FP/Haskell/hugs-mode.el
;;
;;
;; Installation:
;;
;; To use with Moss and Thorn's haskell-mode.el
;;
;; http://www.haskell.org/haskell-mode
;;
;; add this to .emacs:
;;
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
;;
;;
;; Customisation:
;;
;; The name of the GHCi interpreter is in haskell-ghci-program-name.
;;
;; Arguments can be sent to the GHCi interpreter when it is started by
;; setting haskell-ghci-program-args (empty by default) to a list of
;; string args to pass it. This value can be set interactively by
;; calling C-c C-s with an argument (i.e. C-u C-c C-s).
;;
;; `haskell-ghci-hook' is invoked in the *ghci* buffer once GHCi is
;; started.
;;
;; All functions/variables start with `turn-{on,off}-haskell-ghci' or
;; `haskell-ghci-'.
;;; Code:
(defgroup haskell-ghci nil
"Major mode for interacting with an inferior GHCi session."
:group 'haskell
:prefix "haskell-ghci-")
(defun turn-on-haskell-ghci ()
"Turn on Haskell interaction mode with a GHCi interpreter running in an
another Emacs buffer named *ghci*.
Maps the following commands in the haskell keymap:
\\<haskell-mode-map>\\[haskell-ghci-start-process] to create the GHCi buffer and start a GHCi process in it.
\\[haskell-ghci-load-file] to save the current buffer and load it by sending the :load command to GHCi.
\\[haskell-ghci-reload-file] to send the :reload command to GHCi without saving the buffer.
\\[haskell-ghci-show-ghci-buffer] to show the GHCi buffer and go to it."
(local-set-key "\C-c\C-s" 'haskell-ghci-start-process)
(local-set-key "\C-c\C-l" 'haskell-ghci-load-file)
(local-set-key "\C-c\C-r" 'haskell-ghci-reload-file)
(local-set-key "\C-c\C-n" 'haskell-ghci-locate-next-error)
(local-set-key "\C-c\C-b" 'haskell-ghci-show-ghci-buffer))
(defun turn-off-haskell-ghci ()
"Turn off Haskell interaction mode with a GHCi interpreter within a buffer."
(local-unset-key "\C-c\C-s")
(local-unset-key "\C-c\C-l")
(local-unset-key "\C-c\C-r")
(local-unset-key "\C-c\C-b"))
(define-derived-mode haskell-ghci-mode comint-mode "Haskell GHCi"
"Major mode for interacting with an inferior GHCi session.
The commands available from within a Haskell script are:
\\<haskell-mode-map>\\[haskell-ghci-start-process] to create the GHCi buffer and start a GHCi process in it.
\\[haskell-ghci-load-file] to save the current buffer and load it by sending the :load command to GHCi.
\\[haskell-ghci-reload-file] to send the :reload command to GHCi without saving the buffer.
\\[haskell-ghci-show-ghci-buffer] to show the GHCi buffer and go to it.
\\<haskell-ghci-mode-map>Commands:
\\[comint-send-input] after end of GHCi output sends line as input to GHCi.
\\[comint-send-input] before end of GHCI output copies rest of line and sends it to GHCI as input.
\\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing.
\\[comint-interrupt-subjob] interrupts the comint or its current subjob if any.
\\[comint-stop-subjob] stops, likewise. \\[comint-quit-subjob] sends quit signal.")
;; GHCi interface:
(require 'comint)
(require 'shell)
(defvar haskell-ghci-process nil
"The active GHCi subprocess corresponding to current buffer.")
(defvar haskell-ghci-process-buffer nil
"*Buffer used for communication with GHCi subprocess for current buffer.")
(defcustom haskell-ghci-program-name "ghci"
"*The name of the GHCi interpreter program."
:type 'string
:group 'haskell-ghci)
(defcustom haskell-ghci-program-args nil
"*A list of string args to pass when starting the GHCi interpreter."
:type '(repeat string)
:group 'haskell-ghci)
(defvar haskell-ghci-load-end nil
"Position of the end of the last load command.")
(defvar haskell-ghci-error-pos nil
"Position of the end of the last load command.")
(defvar haskell-ghci-send-end nil
"Position of the end of the last send command.")
(defun haskell-ghci-start-process (arg)
"Start a GHCi process and invoke `haskell-ghci-hook' if not nil.
Prompt for a list of args if called with an argument."
(interactive "P")
(if arg
;; XXX [CDW] Fix to use more natural 'string' version of the
;; XXX arguments rather than a sexp.
(setq haskell-ghci-program-args
(read-minibuffer (format "List of args for %s:"
haskell-ghci-program-name)
(prin1-to-string haskell-ghci-program-args))))
;; Start the GHCi process in a new comint buffer.
(message "Starting GHCi process `%s'." haskell-ghci-program-name)
(setq haskell-ghci-process-buffer
(apply 'make-comint
"ghci" haskell-ghci-program-name nil
haskell-ghci-program-args))
(setq haskell-ghci-process
(get-buffer-process haskell-ghci-process-buffer))
;; Select GHCi buffer temporarily.
(set-buffer haskell-ghci-process-buffer)
(haskell-ghci-mode)
(make-local-variable 'shell-cd-regexp)
(make-local-variable 'shell-dirtrackp)
;; Track directory changes using the `:cd' command.
(setq shell-cd-regexp ":cd")
(setq shell-dirtrackp t)
(add-hook 'comint-input-filter-functions 'shell-directory-tracker nil 'local)
;; GHCi prompt should be of the form `ModuleName> '.
(setq comint-prompt-regexp "^\\*?[A-Z][\\._a-zA-Z0-9]*\\( \\*?[A-Z][\\._a-zA-Z0-9]*\\)*> ")
;; History syntax of comint conflicts with Haskell, e.g. !!, so better
;; turn it off.
(setq comint-input-autoexpand nil)
(run-hooks 'haskell-ghci-hook)
;; Clear message area.
(message ""))
(defun haskell-ghci-wait-for-output ()
"Wait until output arrives and go to the last input."
(while (progn
(goto-char comint-last-input-end)
(not (re-search-forward comint-prompt-regexp nil t)))
(accept-process-output haskell-ghci-process)))
(defun haskell-ghci-send (&rest string)
"Send `haskell-ghci-process' the arguments (one or more strings).
A newline is sent after the strings and they are inserted into the
current buffer after the last output."
(haskell-ghci-wait-for-output) ; wait for prompt
(goto-char (point-max)) ; position for this input
(apply 'insert string)
(comint-send-input)
(setq haskell-ghci-send-end (marker-position comint-last-input-end)))
(defun haskell-ghci-go (load-command cd)
"Save the current buffer and load its file into the GHCi process.
The first argument LOAD-COMMAND specifies how the file should be
loaded: as a new file (\":load \") or as a reload (\":reload \").
If the second argument CD is non-nil, change directory in the GHCi
process to the current buffer's directory before loading the file.
If the variable `haskell-ghci-command' is set then its value will be
sent to the GHCi process after the load command. This can be used for a
top-level expression to evaluate."
(hack-local-variables) ; in case they've changed
(save-buffer)
(let ((file (if (string-equal load-command ":load ")
(concat "\"" buffer-file-name "\"")
""))
(dir (expand-file-name default-directory))
(cmd (and (boundp 'haskell-ghci-command)
haskell-ghci-command
(if (stringp haskell-ghci-command)
haskell-ghci-command
(symbol-name haskell-ghci-command)))))
(if (and haskell-ghci-process-buffer
(eq (process-status haskell-ghci-process) 'run))
;; Ensure the GHCi buffer is selected.
(set-buffer haskell-ghci-process-buffer)
;; Start Haskell-GHCi process.
(haskell-ghci-start-process nil))
(if cd (haskell-ghci-send (concat ":cd " dir)))
;; Wait until output arrives and go to the last input.
(haskell-ghci-wait-for-output)
(haskell-ghci-send load-command file)
;; Error message search starts from last load command.
(setq haskell-ghci-load-end (marker-position comint-last-input-end))
(setq haskell-ghci-error-pos haskell-ghci-load-end)
(if cmd (haskell-ghci-send cmd))
;; Wait until output arrives and go to the last input.
(haskell-ghci-wait-for-output)))
(defun haskell-ghci-load-file (cd)
"Save a ghci buffer file and load its file.
If CD (prefix argument if interactive) is non-nil, change directory in
the GHCi process to the current buffer's directory before loading the
file. If there is an error, set the cursor at the error line otherwise
show the *ghci* buffer."
(interactive "P")
(haskell-ghci-gen-load-file ":load " cd))
(defun haskell-ghci-reload-file (cd)
"Save a ghci buffer file and load its file.
If CD (prefix argument if interactive) is non-nil, change the GHCi
process to the current buffer's directory before loading the file.
If there is an error, set the cursor at the error line otherwise show
the *ghci* buffer."
(interactive "P")
(haskell-ghci-gen-load-file ":reload " cd))
(defun haskell-ghci-gen-load-file (cmd cd)
"Save a ghci buffer file and load its file or reload depending on CMD.
If CD is non-nil, change the process to the current buffer's directory
before loading the file. If there is an error, set the cursor at the
error line otherwise show the *ghci* buffer."
;; Execute (re)load command.
(save-excursion (haskell-ghci-go cmd cd))
;; Show *ghci* buffer.
(pop-to-buffer haskell-ghci-process-buffer)
(goto-char haskell-ghci-load-end)
;; Did we finish loading without error?
(if (re-search-forward
"^Ok, modules loaded" nil t)
(progn (goto-char (point-max))
(recenter 2)
(message "There were no errors."))
;; Something went wrong. If possible, be helpful and pinpoint the
;; first error in the file whilst leaving the error visible in the
;; *ghci* buffer.
(goto-char haskell-ghci-load-end)
(haskell-ghci-locate-next-error)))
(defun haskell-ghci-locate-next-error ()
"Go to the next error shown in the *ghci* buffer."
(interactive)
(if (buffer-live-p haskell-ghci-process-buffer)
(progn (pop-to-buffer haskell-ghci-process-buffer)
(goto-char haskell-ghci-error-pos)
(if (re-search-forward
"^[^\/]*\\([^:\n]+\\):\\([0-9]+\\)" nil t)
(let ((efile (buffer-substring (match-beginning 1)
(match-end 1)))
(eline (string-to-int
(buffer-substring (match-beginning 2)
(match-end 2)))))
(recenter 2)
(setq haskell-ghci-error-pos (point))
(message "GHCi error on line %d of %s."
eline (file-name-nondirectory efile))
(if (file-exists-p efile)
(progn (find-file-other-window efile)
(goto-line eline)
(recenter))))
;; We got an error without a file and line number, so put the
;; point at end of the *ghci* buffer ready to deal with it.
(goto-char (point-max))
(recenter -2)
(message "No more errors found.")))
(message "No *ghci* buffer found.")))
(defun haskell-ghci-show-ghci-buffer ()
"Go to the *ghci* buffer."
(interactive)
(if (or (not haskell-ghci-process-buffer)
(not (buffer-live-p haskell-ghci-process-buffer)))
(haskell-ghci-start-process nil))
(pop-to-buffer haskell-ghci-process-buffer))
(provide 'haskell-ghci)
;; arch-tag: f0bade4b-288d-4329-9791-98c1e24167ac
;;; haskell-ghci.el ends here

View file

@ -1,316 +0,0 @@
;;; haskell-hugs.el --- simplistic interaction mode with a
;; Copyright 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright 1998, 1999 Guy Lapalme
;; Hugs interpreter for Haskell developped by
;; The University of Nottingham and Yale University, 1994-1997.
;; Web: http://www.haskell.org/hugs.
;; In standard Emacs terminology, this would be called
;; inferior-hugs-mode
;; Keywords: Hugs inferior mode, Hugs interaction mode
;; URL: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/CONTRIB/haskell-modes/emacs/haskell-hugs.el?rev=HEAD
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Purpose:
;;
;; To send a Haskell buffer to another buffer running a Hugs interpreter
;; The functions are adapted from the Hugs Mode developed by
;; Chris Van Humbeeck <chris.vanhumbeeck@cs.kuleuven.ac.be>
;; which used to be available at:
;; http://www-i2.informatik.rwth-aachen.de/Forschung/FP/Haskell/hugs-mode.el
;;
;; Installation:
;;
;; To use with the Haskell mode of
;; Moss&Thorn <http://www.haskell.org/haskell-mode>
;; add this to .emacs:
;;
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)
;;
;; Customisation:
;; The name of the hugs interpreter is in variable
;; haskell-hugs-program-name
;; Arguments can be sent to the Hugs interpreter when it is called
;; by setting the value of the variable
;; haskell-hugs-program-args
;; which by default contains '("+.") so that the progress of the
;; interpreter is visible without any "^H" in the *hugs* Emacs buffer.
;;
;; This value can be interactively by calling C-cC-s with an
;; argument.
;;
;; If the command does not seem to respond, see the
;; content of the `comint-prompt-regexp' variable
;; to check that it waits for the appropriate Hugs prompt
;; the current value is appropriate for Hugs 1.3 and 1.4
;;
;;
;; `haskell-hugs-hook' is invoked in the *hugs* once it is started.
;;
;;; All functions/variables start with
;;; `(turn-(on/off)-)haskell-hugs' or `haskell-hugs-'.
(defgroup haskell-hugs nil
"Major mode for interacting with an inferior Hugs session."
:group 'haskell
:prefix "haskell-hugs-")
(defun turn-on-haskell-hugs ()
"Turn on Haskell interaction mode with a Hugs interpreter running in an
another Emacs buffer named *hugs*.
Maps the followind commands in the haskell keymap.
\\[haskell-hugs-load-file]
to save the current buffer and load it by sending the :load command
to Hugs.
\\[haskell-hugs-reload-file]
to send the :reload command to Hugs without saving the buffer.
\\[haskell-hugs-show-hugs-buffer]
to show the Hugs buffer and go to it."
(local-set-key "\C-c\C-s" 'haskell-hugs-start-process)
(local-set-key "\C-c\C-l" 'haskell-hugs-load-file)
(local-set-key "\C-c\C-r" 'haskell-hugs-reload-file)
(local-set-key "\C-c\C-b" 'haskell-hugs-show-hugs-buffer))
(defun turn-off-haskell-hugs ()
"Turn off Haskell interaction mode with a Hugs interpreter within a buffer."
(local-unset-key "\C-c\C-s")
(local-unset-key "\C-c\C-l")
(local-unset-key "\C-c\C-r")
(local-unset-key "\C-c\C-b"))
(define-derived-mode haskell-hugs-mode comint-mode "Haskell Hugs"
;; called by haskell-hugs-start-process,
;; itself called by haskell-hugs-load-file
;; only when the file is loaded the first time
"Major mode for interacting with an inferior Hugs session.
The commands available from within a Haskell script are:
\\<haskell-mode-map>\\[haskell-hugs-load-file]
to save the current buffer and load it by sending the :load command
to Hugs.
\\[haskell-hugs-reload-file]
to send the :reload command to Hugs without saving the buffer.
\\[haskell-hugs-show-hugs-buffer]
to show the Hugs buffer and go to it.
\\<haskell-hugs-mode-map>
Commands:
Return at end of buffer sends line as input.
Return not at end copies rest of line to end and sends it.
\\[comint-kill-input] and \\[backward-kill-word] are kill commands,
imitating normal Unix input editing.
\\[comint-interrupt-subjob] interrupts the comint or its current
subjob if any.
\\[comint-stop-subjob] stops, likewise.
\\[comint-quit-subjob] sends quit signal."
)
;; Hugs-interface
(require 'comint)
(require 'shell)
(defvar haskell-hugs-process nil
"The active Hugs subprocess corresponding to current buffer.")
(defvar haskell-hugs-process-buffer nil
"*Buffer used for communication with Hugs subprocess for current buffer.")
(defcustom haskell-hugs-program-name "hugs"
"*The name of the command to start the Hugs interpreter."
:type 'string
:group 'haskell-hugs)
(defcustom haskell-hugs-program-args '("+.")
"*A list of string args to send to the hugs process."
:type '(repeat string)
:group 'haskell-hugs)
(defvar haskell-hugs-load-end nil
"Position of the end of the last load command.")
(defvar haskell-hugs-send-end nil
"Position of the end of the last send command.")
(defalias 'run-hugs 'haskell-hugs-start-process)
(defun haskell-hugs-start-process (arg)
"Start a Hugs process and invokes `haskell-hugs-hook' if not nil.
Prompts for a list of args if called with an argument."
(interactive "P")
(message "Starting `hugs-process' %s" haskell-hugs-program-name)
(if arg
(setq haskell-hugs-program-args
(read-minibuffer "List of args for Hugs:"
(prin1-to-string haskell-hugs-program-args))))
(setq haskell-hugs-process-buffer
(apply 'make-comint
"hugs" haskell-hugs-program-name nil
haskell-hugs-program-args))
(setq haskell-hugs-process
(get-buffer-process haskell-hugs-process-buffer))
;; Select Hugs buffer temporarily
(set-buffer haskell-hugs-process-buffer)
(haskell-hugs-mode)
(make-local-variable 'shell-cd-regexp)
(make-local-variable 'shell-dirtrackp)
(setq shell-cd-regexp ":cd")
(setq shell-dirtrackp t)
(add-hook 'comint-input-filter-functions 'shell-directory-tracker nil 'local)
; ? or module name in Hugs 1.4
(setq comint-prompt-regexp "^\? \\|^[A-Z][_a-zA-Z0-9\.]*> ")
;; comint's history syntax conflicts with Hugs syntax, eg. !!
(setq comint-input-autoexpand nil)
(run-hooks 'haskell-hugs-hook)
(message "")
)
(defun haskell-hugs-wait-for-output ()
"Wait until output arrives and go to the last input."
(while (progn
(goto-char comint-last-input-end)
(and
(not (re-search-forward comint-prompt-regexp nil t))
(accept-process-output haskell-hugs-process)))))
(defun haskell-hugs-send (&rest string)
"Send `haskell-hugs-process' the arguments (one or more strings).
A newline is sent after the strings and they are inserted into the
current buffer after the last output."
;; Wait until output arrives and go to the last input.
(haskell-hugs-wait-for-output)
;; Position for this input.
(goto-char (point-max))
(apply 'insert string)
(comint-send-input)
(setq haskell-hugs-send-end (marker-position comint-last-input-end)))
(defun haskell-hugs-go (load-command cd)
"Save the current buffer and load its file into the Hugs process.
The first argument LOAD-COMMAND specifies how the file should be
loaded: as a new file (\":load \") or as a reload (\":reload \").
If the second argument CD is non-nil, change the Haskell-Hugs process to the
current buffer's directory before loading the file.
If the variable `haskell-hugs-command' is set then its value will be sent to
the Hugs process after the load command. This can be used for a
top-level expression to evaluate."
(hack-local-variables) ;; In case they've changed
(save-buffer)
(let ((file (if (string-equal load-command ":load ")
(concat "\"" buffer-file-name "\"")
""))
(dir (expand-file-name default-directory))
(cmd (and (boundp 'haskell-hugs-command)
haskell-hugs-command
(if (stringp haskell-hugs-command)
haskell-hugs-command
(symbol-name haskell-hugs-command)))))
(if (and haskell-hugs-process-buffer
(eq (process-status haskell-hugs-process) 'run))
;; Ensure the Hugs buffer is selected.
(set-buffer haskell-hugs-process-buffer)
;; Start Haskell-Hugs process.
(haskell-hugs-start-process nil))
(if cd (haskell-hugs-send (concat ":cd " dir)))
;; Wait until output arrives and go to the last input.
(haskell-hugs-wait-for-output)
(haskell-hugs-send load-command file)
;; Error message search starts from last load command.
(setq haskell-hugs-load-end (marker-position comint-last-input-end))
(if cmd (haskell-hugs-send cmd))
;; Wait until output arrives and go to the last input.
(haskell-hugs-wait-for-output)))
(defun haskell-hugs-load-file (cd)
"Save a hugs buffer file and load its file.
If CD (prefix argument if interactive) is non-nil, change the Hugs
process to the current buffer's directory before loading the file.
If there is an error, set the cursor at the error line otherwise show
the Hugs buffer."
(interactive "P")
(haskell-hugs-gen-load-file ":load " cd)
)
(defun haskell-hugs-reload-file (cd)
"Save a hugs buffer file and load its file.
If CD (prefix argument if interactive) is non-nil, change the Hugs
process to the current buffer's directory before loading the file.
If there is an error, set the cursor at the error line otherwise show
the Hugs buffer."
(interactive "P")
(haskell-hugs-gen-load-file ":reload " cd)
)
(defun haskell-hugs-gen-load-file (cmd cd)
"Save a hugs buffer file and load its file or reload depending on CMD.
If CD is non-nil, change the process to the current buffer's directory
before loading the file. If there is an error, set the cursor at the
error line otherwise show the Hugs buffer."
(save-excursion (haskell-hugs-go cmd cd))
;; Ensure the Hugs buffer is selected.
(set-buffer haskell-hugs-process-buffer)
;; Error message search starts from last load command.
(goto-char haskell-hugs-load-end)
(if (re-search-forward
"^ERROR \"\\([^ ]*\\)\"\\( (line \\([0-9]*\\))\\|\\)" nil t)
(let ((efile (buffer-substring (match-beginning 1)
(match-end 1)))
(eline (if (match-beginning 3)
(string-to-int (buffer-substring (match-beginning 3)
(match-end 3)))))
(emesg (buffer-substring (1+ (point))
(save-excursion (end-of-line) (point)))))
(pop-to-buffer haskell-hugs-process-buffer) ; show *hugs* buffer
(goto-char (point-max))
(recenter)
(message "Hugs error %s %s"
(file-name-nondirectory efile) emesg)
(if (file-exists-p efile)
(progn (find-file-other-window efile)
(if eline (goto-line eline))
(recenter)))
)
(pop-to-buffer haskell-hugs-process-buffer) ; show *hugs* buffer
(goto-char (point-max))
(message "There were no errors.")
(recenter 2) ; show only the end...
)
)
(defun haskell-hugs-show-hugs-buffer ()
"Goes to the Hugs buffer."
(interactive)
(if (or (not haskell-hugs-process-buffer)
(not (buffer-live-p haskell-hugs-process-buffer)))
(haskell-hugs-start-process nil))
(pop-to-buffer haskell-hugs-process-buffer)
)
(provide 'haskell-hugs)
;; arch-tag: c2a621e9-d743-4361-a459-983fbf1d4589
;;; haskell-hugs.el ends here

File diff suppressed because it is too large Load diff

View file

@ -1,856 +0,0 @@
;;; haskell-indentation.el -- indentation module for Haskell Mode
;; Copyright 2009 Kristof Bastiaensen
;; Author: 2009 Kristof Bastiaensen <kristof.bastiaensen@vleeuwen.org>
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Installation:
;;
;; To turn indentation on for all Haskell buffers under Haskell mode
;; <http://www.haskell.org/haskell-mode/> add this to .emacs:
;;
;; (add-hook haskell-mode-hook 'turn-on-haskell-indentation)
;;
;; Otherwise, call `haskell-indentation-mode'.
;;
;;; Code:
(defgroup haskell-indentation nil
"Haskell indentation."
:group 'haskell
:prefix "haskell-indentation-")
(defcustom haskell-indentation-cycle-warn t
"Warn before moving to the leftmost indentation, if you tab at the rightmost one."
:type 'boolean
:group 'haskell-indentation)
(defcustom haskell-indentation-layout-offset 2
"Extra indentation to add before expressions in a haskell layout list."
:type 'integer
:group 'haskell-indentation)
(defcustom haskell-indentation-starter-offset 1
"Extra indentation after an opening keyword (e.g. let)."
:type 'integer
:group 'haskell-indentation)
(defcustom haskell-indentation-left-offset 2
"Extra indentation after an indentation to the left (e.g. after do)."
:type 'integer
:group 'haskell-indentation)
(defcustom haskell-indentation-ifte-offset 2
"Extra indentation after the keywords `if' `then' or `else'."
:type 'integer
:group 'haskell-indentation)
(when (featurep 'xemacs)
(defun syntax-ppss (&rest pos)
(parse-partial-sexp (point-min) (or pos (point)))))
(defconst haskell-indentation-mode-map
(let ((keymap (make-sparse-keymap)))
(define-key keymap [?\r] 'haskell-newline-and-indent)
(define-key keymap [backspace] 'haskell-indentation-delete-backward-char)
(define-key keymap [?\C-d] 'haskell-indentation-delete-char)
keymap))
;;;###autoload
(define-minor-mode haskell-indentation-mode
"Haskell indentation mode that deals with the layout rule.
It rebinds RET, DEL and BACKSPACE, so that indentations can be
set and deleted as if they were real tabs. It supports
autofill-mode."
:lighter " Ind"
:keymap haskell-indentation-mode-map
(kill-local-variable 'indent-line-function)
(kill-local-variable 'normal-auto-fill-function)
(when haskell-indentation-mode
(setq max-lisp-eval-depth (max max-lisp-eval-depth 600)) ;; set a higher limit for recursion
(set (make-local-variable 'indent-line-function)
'haskell-indentation-indent-line)
(set (make-local-variable 'normal-auto-fill-function)
'haskell-indentation-auto-fill-function)
(set (make-local-variable 'haskell-indent-last-position)
nil)))
(defun turn-on-haskell-indentation ()
"Turn on the haskell-indentation minor mode"
(interactive)
(haskell-indentation-mode t))
(put 'parse-error
'error-conditions
'(error parse-error))
(put 'parse-error 'error-message "Parse error")
(defun parse-error (&rest args)
(signal 'parse-error (apply 'format args)))
(defmacro on-parse-error (except &rest body)
`(condition-case parse-error-string
(progn ,@body)
(parse-error
,except
(message "%s" (cdr parse-error-string)))))
(defun kill-indented-line (&optional arg)
"`kill-line' for indented text.
Preserves indentation and removes extra whitespace"
(interactive "P")
(let ((col (current-column))
(old-point (point)))
(cond ((or (and (numberp arg) (< arg 0))
(and (not (looking-at "[ \t]*$"))
(or (not (numberp arg)) (zerop arg))))
;use default behavior when calling with a negative argument
;or killing (once) from the middle of a line
(kill-line arg))
((and (skip-chars-backward " \t") ;always true
(bolp)
(save-excursion
(forward-line arg)
(not (looking-at "[ \t]*$"))))
; killing from an empty line:
; preserve indentation of the next line
(kill-region (point)
(save-excursion
(forward-line arg)
(point)))
(skip-chars-forward " \t")
(if (> (current-column) col)
(move-to-column col)))
(t ; killing from not empty line:
; kill all indentation
(goto-char old-point)
(kill-region (point)
(save-excursion
(forward-line arg)
(skip-chars-forward " \t")
(point)))))))
(defun haskell-indentation-auto-fill-function ()
(when (> (current-column) fill-column)
(while (> (current-column) fill-column)
(skip-syntax-backward "-")
(skip-syntax-backward "^-"))
(let ((auto-fill-function nil)
(indent (car (last (haskell-indentation-find-indentations)))))
(newline)
(indent-to indent)
(end-of-line))))
(defun haskell-indentation-reindent (col)
(beginning-of-line)
(delete-region (point)
(progn (skip-syntax-forward "-")
(point)))
(indent-to col))
(defun haskell-newline-and-indent ()
(interactive)
(on-parse-error (newline)
(let* ((cc (current-column))
(ci (current-indentation))
(indentations (haskell-indentation-find-indentations)))
(skip-syntax-forward "-")
(if (prog1 (and (eolp)
(not (= (current-column) ci)))
(newline))
(haskell-indentation-reindent
(max (haskell-indentation-butlast indentations)
(haskell-indentation-matching-indentation
ci indentations)))
(haskell-indentation-reindent (haskell-indentation-matching-indentation
cc indentations))))))
(defun haskell-indentation-one-indentation (col indentations)
(let* ((last-pair (last indentations)))
(cond ((null indentations)
col)
((null (cdr indentations))
(car indentations))
((<= col (car last-pair))
col)
(t (car last-pair)))))
(defun haskell-indentation-butlast (indentations)
(when (consp (cdr indentations))
(while (cddr indentations)
(setq indentations (cdr indentations))))
(car indentations))
(defun haskell-indentation-next-indentation (col indentations)
"Find the lefmost indentation which is greater than COL."
(catch 'return
(while indentations
(if (or (< col (car indentations))
(null (cdr indentations)))
(throw 'return (car indentations))
(setq indentations (cdr indentations))))
col))
(defun haskell-indentation-previous-indentation (col indentations)
"Find the rightmost indentation which is less than COL."
(and indentations
(> col (car indentations))
(catch 'return
(while indentations
(if (or (null (cdr indentations))
(<= col (cadr indentations)))
(throw 'return (car indentations))
(setq indentations (cdr indentations))))
col)))
(defun haskell-indentation-matching-indentation (col indentations)
"Find the leftmost indentation which is greater than or equal to COL."
(catch 'return
(while indentations
(if (or (<= col (car indentations))
(null (cdr indentations)))
(throw 'return (car indentations))
(setq indentations (cdr indentations))))
col))
(defun haskell-indentation-indent-line ()
(when (save-excursion
(beginning-of-line)
(not (nth 8 (syntax-ppss))))
(let ((ci (current-indentation))
(start-column (current-column)))
(cond ((> (current-column) ci)
(save-excursion
(move-to-column ci)
(haskell-indentation-reindent
(haskell-indentation-one-indentation
ci (haskell-indentation-find-indentations)))))
((= (current-column) ci)
(haskell-indentation-reindent
(haskell-indentation-next-indentation
ci (haskell-indentation-find-indentations))))
(t (move-to-column ci)
(haskell-indentation-reindent
(haskell-indentation-matching-indentation
ci (haskell-indentation-find-indentations)))))
(cond ((not (= (current-column) start-column))
(setq haskell-indent-last-position nil))
((not haskell-indentation-cycle-warn)
(haskell-indentation-reindent
(haskell-indentation-next-indentation
-1
(haskell-indentation-find-indentations))))
((not (eql (point) haskell-indent-last-position))
(message "Press TAB again to go to the leftmost indentation")
(setq haskell-indent-last-position (point)))
(t
(haskell-indentation-reindent
(haskell-indentation-next-indentation
-1
(haskell-indentation-find-indentations))))))))
(defun haskell-indentation-delete-backward-char (n)
(interactive "p")
(on-parse-error (backward-delete-char 1)
(cond
((and delete-selection-mode
mark-active
(not (= (point) (mark))))
(delete-region (mark) (point)))
((or (= (current-column) 0)
(> (current-column) (current-indentation))
(nth 8 (syntax-ppss)))
(delete-backward-char n))
(t (let* ((ci (current-indentation))
(pi (haskell-indentation-previous-indentation
ci (haskell-indentation-find-indentations))))
(save-excursion
(cond (pi
(move-to-column pi)
(delete-region (point)
(progn (move-to-column ci)
(point))))
(t
(beginning-of-line)
(delete-region (max (point-min) (- (point) 1))
(progn (move-to-column ci)
(point)))))))))))
(defun haskell-indentation-delete-char (n)
(interactive "p")
(on-parse-error (delete-char 1)
(cond
((and delete-selection-mode
mark-active
(not (= (point) (mark))))
(delete-region (mark) (point)))
((or (eolp)
(>= (current-column) (current-indentation))
(nth 8 (syntax-ppss)))
(delete-char n))
(t
(let* ((ci (current-indentation))
(pi (haskell-indentation-previous-indentation
ci (haskell-indentation-find-indentations))))
(save-excursion
(if (and pi (> pi (current-column)))
(move-to-column pi))
(delete-region (point)
(progn (move-to-column ci)
(point)))))))))
(defun haskell-indentation-goto-least-indentation ()
(beginning-of-line)
(catch 'return
(while (not (bobp))
(forward-comment (- (buffer-size)))
(beginning-of-line)
(let ((ps (nth 8 (syntax-ppss))))
(when ps ;; inside comment or string
(goto-char ps)))
(when (= 0 (current-indentation))
(throw 'return nil))))
(beginning-of-line)
(when (bobp)
(forward-comment (buffer-size))))
;; Dynamically scoped variables.
(defvar following-token)
(defvar current-token)
(defvar left-indent)
(defvar starter-indent)
(defvar current-indent)
(defvar layout-indent)
(defvar parse-line-number)
(defvar possible-indentations)
(defvar indentation-point)
(defun haskell-indentation-parse-to-indentations ()
(save-excursion
(skip-syntax-forward "-")
(let ((indentation-point (point))
(layout-indent 0)
(parse-line-number 0)
(current-indent haskell-indentation-layout-offset)
(starter-indent haskell-indentation-layout-offset)
(left-indent haskell-indentation-layout-offset)
(case-fold-search nil)
current-token
following-token
possible-indentations)
(haskell-indentation-goto-least-indentation)
(if (<= indentation-point (point))
'(0)
(setq current-token (haskell-indentation-peek-token))
(catch 'parse-end
(haskell-indentation-toplevel)
(when (not (equal current-token 'end-tokens))
(parse-error "illegal token: %s" current-token)))
possible-indentations))))
(defun haskell-indentation-find-indentations ()
(let ((ppss (syntax-ppss)))
(cond
((nth 3 ppss) '(0))
((nth 4 ppss)
(if (save-excursion
(and (skip-syntax-forward "-")
(eolp)
(not (> (forward-line 1) 0))
(not (nth 4 (syntax-ppss)))))
(haskell-indentation-parse-to-indentations)
'(0)))
(t
(haskell-indentation-parse-to-indentations)))))
(defconst haskell-indentation-toplevel-list
'(("module" . haskell-indentation-module)
("data" . haskell-indentation-data)
("type" . haskell-indentation-data)
("newtype" . haskell-indentation-data)
("class" . haskell-indentation-class-declaration)
("instance" . haskell-indentation-class-declaration )))
(defconst haskell-indentation-type-list
'(("::" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-type)))
("(" . (lambda () (haskell-indentation-list #'haskell-indentation-type
")" "," nil)))
("[" . (lambda () (haskell-indentation-list #'haskell-indentation-type
"]" "," nil)))
("{" . (lambda () (haskell-indentation-list #'haskell-indentation-type
"}" "," nil)))))
(defconst haskell-indentation-expression-list
'(("data" . haskell-indentation-data)
("type" . haskell-indentation-data)
("newtype" . haskell-indentation-data)
("if" . (lambda () (haskell-indentation-phrase
'(haskell-indentation-expression
"then" haskell-indentation-expression
"else" haskell-indentation-expression))))
("let" . (lambda () (haskell-indentation-phrase
'(haskell-indentation-declaration-layout
"in" haskell-indentation-expression))))
("do" . (lambda () (haskell-indentation-with-starter
#'haskell-indentation-expression-layout nil)))
("case" . (lambda () (haskell-indentation-phrase
'(haskell-indentation-expression
"of" haskell-indentation-case-layout))))
("\\" . (lambda () (haskell-indentation-phrase
'(haskell-indentation-expression
"->" haskell-indentation-expression))))
("where" . (lambda () (haskell-indentation-with-starter
#'haskell-indentation-declaration-layout nil)))
("::" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-type)))
("=" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-expression)))
("<-" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-expression)))
("(" . (lambda () (haskell-indentation-list #'haskell-indentation-expression
")" '(list "," "->") nil)))
("[" . (lambda () (haskell-indentation-list #'haskell-indentation-expression
"]" "," "|")))
("{" . (lambda () (haskell-indentation-list #'haskell-indentation-expression
"}" "," nil)))))
(defun haskell-indentation-expression-layout ()
(haskell-indentation-layout #'haskell-indentation-expression))
(defun haskell-indentation-declaration-layout ()
(haskell-indentation-layout #'haskell-indentation-declaration))
(defun haskell-indentation-case-layout ()
(haskell-indentation-layout #'haskell-indentation-case))
(defun haskell-indentation-fundep ()
(haskell-indentation-with-starter
(lambda () (haskell-indentation-separated
#'haskell-indentation-fundep1 "," nil))
nil))
(defun haskell-indentation-fundep1 ()
(let ((current-indent (current-column)))
(while (member current-token '(value "->"))
(haskell-indentation-read-next-token))
(when (and (equal current-token 'end-tokens)
(member following-token '(value "->")))
(haskell-indentation-add-indentation current-indent))))
(defun haskell-indentation-toplevel ()
(haskell-indentation-layout
(lambda ()
(let ((parser (assoc current-token haskell-indentation-toplevel-list)))
(if parser
(funcall (cdr parser))
(haskell-indentation-declaration))))))
(defun haskell-indentation-type ()
(let ((current-indent (current-column)))
(catch 'return
(while t
(cond
((member current-token '(value operator "->"))
(haskell-indentation-read-next-token))
((equal current-token 'end-tokens)
(when (member following-token
'(value operator no-following-token
"->" "(" "[" "{" "::"))
(haskell-indentation-add-indentation current-indent))
(throw 'return nil))
(t (let ((parser (assoc current-token haskell-indentation-type-list)))
(if (not parser)
(throw 'return nil)
(funcall (cdr parser))))))))))
(defun haskell-indentation-data ()
(haskell-indentation-with-starter
(lambda ()
(when (equal current-token "instance")
(haskell-indentation-read-next-token))
(haskell-indentation-type)
(cond ((equal current-token "=")
(haskell-indentation-with-starter
(lambda () (haskell-indentation-separated #'haskell-indentation-type "|" "deriving"))
nil))
((equal current-token "where")
(haskell-indentation-with-starter
#'haskell-indentation-expression-layout nil))))
nil))
(defun haskell-indentation-class-declaration ()
(haskell-indentation-with-starter
(lambda ()
(haskell-indentation-type)
(when (equal current-token "|")
(haskell-indentation-fundep))
(when (equal current-token "where")
(haskell-indentation-with-starter
#'haskell-indentation-expression-layout nil)))
nil))
(defun haskell-indentation-module ()
(haskell-indentation-with-starter
(lambda ()
(let ((current-indent (current-column)))
(haskell-indentation-read-next-token)
(when (equal current-token "(")
(haskell-indentation-list
#'haskell-indentation-module-export
")" "," nil))
(when (equal current-token 'end-tokens)
(haskell-indentation-add-indentation current-indent)
(throw 'parse-end nil))
(when (equal current-token "where")
(haskell-indentation-read-next-token)
(when (equal current-token 'end-tokens)
(haskell-indentation-add-layout-indent)
(throw 'parse-end nil))
(haskell-indentation-layout #'haskell-indentation-toplevel))))
nil))
(defun haskell-indentation-module-export ()
(cond ((equal current-token "module")
(let ((current-indent (current-column)))
(haskell-indentation-read-next-token)
(cond ((equal current-token 'end-tokens)
(haskell-indentation-add-indentation current-indent))
((equal current-token 'value)
(haskell-indentation-read-next-token)))))
(t (haskell-indentation-type))))
(defun haskell-indentation-list (parser end sep stmt-sep)
(haskell-indentation-with-starter
`(lambda () (haskell-indentation-separated #',parser
,sep
,stmt-sep))
end))
(defun haskell-indentation-with-starter (parser end)
(let ((starter-column (current-column))
(current-indent current-indent)
(left-indent (if (= (current-column) (current-indentation))
(current-column) left-indent)))
(haskell-indentation-read-next-token)
(when (equal current-token 'end-tokens)
(if (equal following-token end)
(haskell-indentation-add-indentation starter-column)
(haskell-indentation-add-indentation
(+ left-indent haskell-indentation-left-offset)))
(throw 'parse-end nil))
(let* ((current-indent (current-column))
(starter-indent (min starter-column current-indent))
(left-indent (if end (+ current-indent haskell-indentation-starter-offset)
left-indent)))
(funcall parser)
(cond ((equal current-token 'end-tokens)
(when (equal following-token end)
(haskell-indentation-add-indentation starter-indent))
(when end (throw 'parse-end nil))) ;; add no indentations
((equal current-token end)
(haskell-indentation-read-next-token)) ;; continue
(end (parse-error "Illegal token: %s" current-token))))))
(defun haskell-indentation-case ()
(haskell-indentation-expression)
(cond ((equal current-token 'end-tokens)
(haskell-indentation-add-indentation current-indent))
((equal current-token "|")
(haskell-indentation-with-starter
(lambda () (haskell-indentation-separated #'haskell-indentation-case "|" nil))
nil))
((equal current-token "->")
(haskell-indentation-statement-right #'haskell-indentation-expression))
;; otherwise fallthrough
))
(defun haskell-indentation-statement-right (parser)
(haskell-indentation-read-next-token)
(when (equal current-token 'end-tokens)
(haskell-indentation-add-indentation
(+ left-indent haskell-indentation-left-offset))
(throw 'parse-end nil))
(let ((current-indent (current-column)))
(funcall parser)))
(defun haskell-indentation-simple-declaration ()
(haskell-indentation-expression)
(cond ((equal current-token "=")
(haskell-indentation-statement-right #'haskell-indentation-expression))
((equal current-token "::")
(haskell-indentation-statement-right #'haskell-indentation-type))
((and (equal current-token 'end-tokens)
(equal following-token "="))
(haskell-indentation-add-indentation current-indent)
(throw 'parse-end nil))))
(defun haskell-indentation-declaration ()
(haskell-indentation-expression)
(cond ((equal current-token "|")
(haskell-indentation-with-starter
(lambda () (haskell-indentation-separated #'haskell-indentation-expression "," "|"))
nil))
((equal current-token 'end-tokens)
(when (member following-token '("|" "=" "::" ","))
(haskell-indentation-add-indentation current-indent)
(throw 'parse-end nil)))))
(defun haskell-indentation-layout (parser)
(if (equal current-token "{")
(haskell-indentation-list parser "}" ";" nil)
(haskell-indentation-implicit-layout-list parser)))
(defun haskell-indentation-expression-token (token)
(member token '("if" "let" "do" "case" "\\" "(" "[" "::"
value operator no-following-token)))
(defun haskell-indentation-expression ()
(let ((current-indent (current-column)))
(catch 'return
(while t
(cond
((member current-token '(value operator))
(haskell-indentation-read-next-token))
((equal current-token 'end-tokens)
(cond ((equal following-token "where")
(haskell-indentation-add-indentation
(+ left-indent haskell-indentation-left-offset)))
((haskell-indentation-expression-token following-token)
(haskell-indentation-add-indentation
current-indent)))
(throw 'return nil))
(t (let ((parser (assoc current-token haskell-indentation-expression-list)))
(when (null parser)
(throw 'return nil))
(funcall (cdr parser))
(when (and (equal current-token 'end-tokens)
(equal (car parser) "let")
(= haskell-indentation-layout-offset current-indent)
(haskell-indentation-expression-token following-token))
;; inside a layout, after a let construct
(haskell-indentation-add-layout-indent)
(throw 'parse-end nil))
(unless (member (car parser) '("(" "[" "{" "do" "case"))
(throw 'return nil)))))))))
(defun haskell-indentation-test-indentations ()
(interactive)
(let ((indentations (save-excursion (haskell-indentation-find-indentations)))
(str "")
(pos 0))
(while indentations
(when (>= (car indentations) pos)
(setq str (concat str (make-string (- (car indentations) pos) ?\ )
"|"))
(setq pos (+ 1 (car indentations))))
(setq indentations (cdr indentations)))
(end-of-line)
(newline)
(insert str)))
(defun haskell-indentation-separated (parser separator stmt-separator)
(catch 'return
(while t
(funcall parser)
(cond ((if (listp separator) (member current-token separator) (equal current-token separator))
(haskell-indentation-at-separator))
((equal current-token stmt-separator)
(setq starter-indent (current-column))
(haskell-indentation-at-separator))
((equal current-token 'end-tokens)
(cond ((or (equal following-token separator)
(equal following-token stmt-separator))
(haskell-indentation-add-indentation starter-indent)
(throw 'parse-end nil)))
(throw 'return nil))
(t (throw 'return nil))))))
(defun haskell-indentation-at-separator ()
(let ((separator-column
(and (= (current-column) (current-indentation))
(current-column))))
(haskell-indentation-read-next-token)
(cond ((eq current-token 'end-tokens)
(haskell-indentation-add-indentation current-indent)
(throw 'return nil))
(separator-column ;; on the beginning of the line
(setq current-indent (current-column))
(setq starter-indent separator-column)))))
(defun haskell-indentation-implicit-layout-list (parser)
(let* ((layout-indent (current-column))
(current-indent (current-column))
(left-indent (current-column)))
(catch 'return
(while t
(let ((left-indent left-indent))
(funcall parser))
(cond ((member current-token '(layout-next ";"))
(haskell-indentation-read-next-token))
((equal current-token 'end-tokens)
(when (or (haskell-indentation-expression-token following-token)
(equal following-token ";"))
(haskell-indentation-add-layout-indent))
(throw 'return nil))
(t (throw 'return nil))))))
;; put haskell-indentation-read-next-token outside the current-indent definition
;; so it will not return 'layout-end again
(when (eq current-token 'layout-end)
(haskell-indentation-read-next-token))) ;; leave layout at 'layout-end or illegal token
(defun haskell-indentation-phrase (phrase)
(haskell-indentation-with-starter
`(lambda () (haskell-indentation-phrase-rest ',phrase))
nil))
(defun haskell-indentation-phrase-rest (phrase)
(let ((starter-line parse-line-number))
(let ((current-indent (current-column)))
(funcall (car phrase)))
(cond
((equal current-token 'end-tokens)
(cond ((null (cdr phrase))) ;; fallthrough
((equal following-token (cadr phrase))
(haskell-indentation-add-indentation starter-indent)
(throw 'parse-end nil))
((equal (cadr phrase) "in")
(when (= left-indent layout-indent)
(haskell-indentation-add-layout-indent)
(throw 'parse-end nil)))
(t (throw 'parse-end nil))))
((null (cdr phrase)))
((equal (cadr phrase) current-token)
(let* ((on-new-line (= (current-column) (current-indentation)))
(lines-between (- parse-line-number starter-line))
(left-indent (if (<= lines-between 0)
left-indent
starter-indent)))
(haskell-indentation-read-next-token)
(when (equal current-token 'end-tokens)
(haskell-indentation-add-indentation
(cond ((member (cadr phrase) '("then" "else"))
(+ starter-indent haskell-indentation-ifte-offset))
((member (cadr phrase) '("in" "->"))
;; expression ending in another expression
(if on-new-line
(+ left-indent haskell-indentation-starter-offset)
left-indent))
(t (+ left-indent haskell-indentation-left-offset))))
(throw 'parse-end nil))
(haskell-indentation-phrase-rest (cddr phrase))))
((equal (cadr phrase) "in")) ;; fallthrough
(t (parse-error "Expecting %s" (cadr phrase))))))
(defun haskell-indentation-add-indentation (indent)
(haskell-indentation-push-indentation
(if (<= indent layout-indent)
(+ layout-indent haskell-indentation-layout-offset)
indent)))
(defun haskell-indentation-add-layout-indent ()
(haskell-indentation-push-indentation layout-indent))
(defun haskell-indentation-push-indentation (indent)
(when (or (null possible-indentations)
(< indent (car possible-indentations)))
(setq possible-indentations
(cons indent possible-indentations))))
(defun haskell-indentation-token-test ()
(let ((current-token nil)
(following-token nil)
(layout-indent 0)
(indentation-point (mark)))
(haskell-indentation-read-next-token)))
(defun haskell-indentation-read-next-token ()
(cond ((eq current-token 'end-tokens)
'end-tokens)
((eq current-token 'layout-end)
(cond ((> layout-indent (current-column))
'layout-end)
((= layout-indent (current-column))
(setq current-token 'layout-next))
((< layout-indent (current-column))
(setq current-token (haskell-indentation-peek-token)))))
((eq current-token 'layout-next)
(setq current-token (haskell-indentation-peek-token)))
((> layout-indent (current-column))
(setq current-token 'layout-end))
(t
(haskell-indentation-skip-token)
(if (>= (point) indentation-point)
(progn
(setq following-token
(if (= (point) indentation-point)
(haskell-indentation-peek-token)
'no-following-token))
(setq current-token 'end-tokens))
(when (= (current-column) (current-indentation))
;; on a new line
(setq current-indent (current-column))
(setq left-indent (current-column))
(setq parse-line-number (+ parse-line-number 1)))
(cond ((> layout-indent (current-column))
(setq current-token 'layout-end))
((= layout-indent (current-column))
(setq current-token 'layout-next))
(t (setq current-token (haskell-indentation-peek-token))))))))
(defun haskell-indentation-peek-token ()
(cond ((looking-at "\\(if\\|then\\|else\\|let\\|in\\|do\\|case\\|of\\|where\\|module\\|deriving\\|data\\|type\\|newtype\\|class\\|instance\\)\\([^A-Za-z']\\|$\\)")
(match-string 1))
((looking-at "[][(){}[,;]")
(match-string 0))
((looking-at "\\(\\\\\\|->\\|<-\\|::\\|=\\||\\)\\([^-:!#$%&*+./<=>?@\\\\^|~]\\|$\\)")
(match-string 1))
((looking-at"[-:!#$%&*+./<=>?@\\\\^|~`]" )
'operator)
(t 'value)))
(defun haskell-indentation-skip-token ()
"Skip to the next token."
(if (or (looking-at "'\\([^\\']\\|\\\\.\\)*'")
(looking-at "\"\\([^\\\"]\\|\\\\.\\)*\"")
(looking-at "[A-Z][A-Z_a-z0-9']*\\(\\.[A-Z_a-z][A-Z_a-z0-9']*\\)*") ; Allows hierarchical modules
(looking-at "[A-Z_a-z][A-Z_a-z0-9']*") ; Only unqualified vars can start with lowercase
(looking-at "[0-9][0-9oOxXeE+-]*")
(looking-at "[-:!#$%&*+./<=>?@\\\\^|~]+")
(looking-at "[](){}[,;]")
(looking-at "`[A-Za-z0-9']*`"))
(goto-char (match-end 0))
;; otherwise skip until space found
(skip-syntax-forward "^-"))
(forward-comment (buffer-size)))
(provide 'haskell-indentation)
;;; haskell-indentation.el ends here

View file

@ -1,532 +0,0 @@
;;; haskell-mode.el --- A Haskell editing mode -*-coding: iso-8859-1;-*-
;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc
;; Copyright (C) 1992, 1997-1998 Simon Marlow, Graeme E Moss, and Tommy Thorn
;; Authors: 1992 Simon Marlow
;; 1997-1998 Graeme E Moss <gem@cs.york.ac.uk> and
;; Tommy Thorn <thorn@irisa.fr>,
;; 2001-2002 Reuben Thomas (>=v1.4)
;; 2003 Dave Love <fx@gnu.org>
;; Keywords: faces files Haskell
;; Version: v2.6.4
;; URL: http://www.haskell.org/haskell-mode/
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Purpose:
;;
;; To provide a pleasant mode to browse and edit Haskell files, linking
;; into the following supported modules:
;;
;; `haskell-font-lock', Graeme E Moss and Tommy Thorn
;; Fontifies standard Haskell keywords, symbols, functions, etc.
;;
;; `haskell-decl-scan', Graeme E Moss
;; Scans top-level declarations, and places them in a menu.
;;
;; `haskell-doc', Hans-Wolfgang Loidl
;; Echoes types of functions or syntax of keywords when the cursor is idle.
;;
;; `haskell-indentation', Kristof Bastiaensen
;; Intelligent semi-automatic indentation, mark two.
;;
;; `haskell-indent', Guy Lapalme
;; Intelligent semi-automatic indentation.
;;
;; `haskell-simple-indent', Graeme E Moss and Heribert Schuetz
;; Simple indentation.
;;
;; `inf-haskell'
;; Interaction with an inferior Haskell process.
;; It replaces the previous two modules:
;; `haskell-hugs', Guy Lapalme
;; `haskell-ghci', Chris Web
;;
;;
;; This mode supports full Haskell 1.4 including literate scripts.
;; In some versions of (X)Emacs it may only support Latin-1, not Unicode.
;;
;; History:
;;
;; This mode is based on an editing mode by Simon Marlow 11/1/92
;; and heavily modified by Graeme E Moss and Tommy Thorn 7/11/98.
;;
;; If you have any problems or suggestions specific to a supported
;; module, consult that module for a list of known bugs, and an
;; author to contact via email. For general problems or suggestions,
;; consult the list below, then email gem@cs.york.ac.uk and
;; thorn@irisa.fr quoting the version of the mode you are using, the
;; version of Emacs you are using, and a small example of the problem
;; or suggestion.
;;
;; Version 1.5
;; Added autoload for haskell-indentation
;;
;; Version 1.43:
;; Various tweaks to doc strings and customization support from
;; Ville Skyttä <scop@xemacs.org>.
;;
;; Version 1.42:
;; Added autoload for GHCi inferior mode (thanks to Scott
;; Williams for the bug report and fix).
;;
;; Version 1.41:
;; Improved packaging, and made a couple more variables
;; interactively settable.
;;
;; Version 1.4:
;; Added GHCi mode from Chris Webb, and tidied up a little.
;;
;; Version 1.3:
;; The literate or non-literate style of a buffer is now indicated
;; by just the variable haskell-literate: nil, `bird', or `tex'.
;; For literate buffers with ambiguous style, the value of
;; haskell-literate-default is used.
;;
;; Version 1.2:
;; Separated off font locking, declaration scanning and simple
;; indentation, and made them separate modules. Modules can be
;; added easily now. Support for modules haskell-doc,
;; haskell-indent, and haskell-hugs. Literate and non-literate
;; modes integrated into one mode, and literate buffer indicated by
;; value of haskell-literate(-bird-style).
;;
;; Version 1.1:
;; Added support for declaration scanning under XEmacs via
;; func-menu. Moved operators to level two fontification.
;;
;; Version 1.0:
;; Added a nice indention support from Heribert Schuetz
;; <Heribert.Schuetz@informatik.uni-muenchen.de>:
;;
;; I have just hacked an Emacs Lisp function which you might prefer
;; to `indent-relative' in haskell-mode.el. See below. It is not
;; really Haskell-specific because it does not take into account
;; keywords like `do', `of', and `let' (where the layout rule
;; applies), but I already find it useful.
;;
;; Cleaned up the imenu support. Added support for literate scripts.
;;
;; Version 0.103 [HWL]:
;; From Hans Wolfgang Loidl <hwloidl@dcs.gla.ac.uk>:
;;
;; I (HWL) added imenu support by copying the appropriate functions
;; from hugs-mode. A menu-bar item "Declarations" is now added in
;; haskell mode. The new code, however, needs some clean-up.
;;
;; Version 0.102:
;;
;; Moved C-c C-c key binding to comment-region. Leave M-g M-g to do
;; the work. comment-start-skip is changed to comply with comment-start.
;;
;; Version 0.101:
;;
;; Altered indent-line-function to indent-relative.
;;
;; Version 0.100:
;;
;; First official release.
;; Present Limitations/Future Work (contributions are most welcome!):
;;
;; . Would like RET in Bird-style literate mode to add a ">" at the
;; start of a line when previous line starts with ">". Or would
;; "> " be better?
;;
;; . Support for GreenCard?
;;
;;; Code:
(eval-when-compile (require 'cl))
;; All functions/variables start with `(literate-)haskell-'.
;; Version of mode.
(defconst haskell-version "v2.6.4"
"`haskell-mode' version number.")
(defun haskell-version ()
"Echo the current version of `haskell-mode' in the minibuffer."
(interactive)
(message "Using haskell-mode version %s" haskell-version))
(defgroup haskell nil
"Major mode for editing Haskell programs."
:group 'languages
:prefix "haskell-")
;; Set load-path
;;;###autoload
(add-to-list 'load-path
(or (file-name-directory load-file-name) (car load-path)))
;; Set up autoloads for the modules we supply
(autoload 'turn-on-haskell-decl-scan "haskell-decl-scan"
"Turn on Haskell declaration scanning." t)
(autoload 'turn-on-haskell-doc-mode "haskell-doc"
"Turn on Haskell Doc minor mode." t)
(autoload 'turn-on-haskell-indentation "haskell-indentation"
"Turn on advanced Haskell indentation." t)
(autoload 'turn-on-haskell-indent "haskell-indent"
"Turn on Haskell indentation." t)
(autoload 'turn-on-haskell-simple-indent "haskell-simple-indent"
"Turn on simple Haskell indentation." t)
;; Functionality provided in other files.
(autoload 'haskell-ds-create-imenu-index "haskell-decl-scan")
(autoload 'haskell-font-lock-choose-keywords "haskell-font-lock")
(autoload 'haskell-doc-current-info "haskell-doc")
;; Obsolete functions.
(defun turn-on-haskell-font-lock ()
(turn-on-font-lock)
(message "turn-on-haskell-font-lock is obsolete. Use turn-on-font-lock instead."))
(defun turn-on-haskell-hugs () (message "haskell-hugs is obsolete."))
(defun turn-on-haskell-ghci () (message "haskell-ghci is obsolete."))
;; Are we looking at a literate script?
(defvar haskell-literate nil
"*If not nil, the current buffer contains a literate Haskell script.
Possible values are: `bird' and `tex', for Bird-style and LaTeX-style
literate scripts respectively. Set by `haskell-mode' and
`literate-haskell-mode'. For an ambiguous literate buffer -- ie. does
not contain either \"\\begin{code}\" or \"\\end{code}\" on a line on
its own, nor does it contain \">\" at the start of a line -- the value
of `haskell-literate-default' is used.")
(make-variable-buffer-local 'haskell-literate)
(put 'haskell-literate 'safe-local-variable 'symbolp)
;; Default literate style for ambiguous literate buffers.
(defcustom haskell-literate-default 'bird
"Default value for `haskell-literate'.
Used if the style of a literate buffer is ambiguous. This variable should
be set to the preferred literate style."
:type '(choice (const bird) (const tex) (const nil)))
;; Mode maps.
(defvar haskell-mode-map
(let ((map (make-sparse-keymap)))
;; Bindings for the inferior haskell process:
;; (define-key map [?\M-C-x] 'inferior-haskell-send-defun)
;; (define-key map [?\C-x ?\C-e] 'inferior-haskell-send-last-sexp)
;; (define-key map [?\C-c ?\C-r] 'inferior-haskell-send-region)
(define-key map [?\C-c ?\C-z] 'switch-to-haskell)
(define-key map [?\C-c ?\C-l] 'inferior-haskell-load-file)
;; I think it makes sense to bind inferior-haskell-load-and-run to C-c
;; C-r, but since it used to be bound to `reload' until june 2007, I'm
;; going to leave it out for now.
;; (define-key map [?\C-c ?\C-r] 'inferior-haskell-load-and-run)
(define-key map [?\C-c ?\C-b] 'switch-to-haskell)
;; (define-key map [?\C-c ?\C-s] 'inferior-haskell-start-process)
;; That's what M-; is for.
;; (define-key map "\C-c\C-c" 'comment-region)
(define-key map (kbd "C-c C-t") 'inferior-haskell-type)
(define-key map (kbd "C-c C-i") 'inferior-haskell-info)
(define-key map (kbd "C-c M-.") 'inferior-haskell-find-definition)
(define-key map (kbd "C-c C-d") 'inferior-haskell-find-haddock)
(define-key map [remap delete-indentation] 'haskell-delete-indentation)
map)
"Keymap used in Haskell mode.")
(easy-menu-define haskell-mode-menu haskell-mode-map
"Menu for the Haskell major mode."
;; Suggestions from Pupeno <pupeno@pupeno.com>:
;; - choose the underlying interpreter
;; - look up docs
`("Haskell"
["Indent line" indent-according-to-mode]
["Indent region" indent-region mark-active]
["(Un)Comment region" comment-region mark-active]
"---"
["Start interpreter" switch-to-haskell]
["Load file" inferior-haskell-load-file]
"---"
,(if (default-boundp 'eldoc-documentation-function)
["Doc mode" eldoc-mode
:style toggle :selected (bound-and-true-p eldoc-mode)]
["Doc mode" haskell-doc-mode
:style toggle :selected (and (boundp 'haskell-doc-mode) haskell-doc-mode)])
["Customize" (customize-group 'haskell)]
))
;; Syntax table.
(defvar haskell-mode-syntax-table
(let ((table (make-syntax-table)))
(modify-syntax-entry ?\ " " table)
(modify-syntax-entry ?\t " " table)
(modify-syntax-entry ?\" "\"" table)
(modify-syntax-entry ?\' "\'" table)
(modify-syntax-entry ?_ "w" table)
(modify-syntax-entry ?\( "()" table)
(modify-syntax-entry ?\) ")(" table)
(modify-syntax-entry ?\[ "(]" table)
(modify-syntax-entry ?\] ")[" table)
(cond ((featurep 'xemacs)
;; I don't know whether this is equivalent to the below
;; (modulo nesting). -- fx
(modify-syntax-entry ?{ "(}5" table)
(modify-syntax-entry ?} "){8" table)
(modify-syntax-entry ?- "_ 1267" table))
(t
;; In Emacs 21, the `n' indicates that they nest.
;; The `b' annotation is actually ignored because it's only
;; meaningful on the second char of a comment-starter, so
;; on Emacs 20 and before we get wrong results. --Stef
(modify-syntax-entry ?\{ "(}1nb" table)
(modify-syntax-entry ?\} "){4nb" table)
(modify-syntax-entry ?- "_ 123" table)))
(modify-syntax-entry ?\n ">" table)
(let (i lim)
(map-char-table
(lambda (k v)
(when (equal v '(1))
;; The current Emacs 22 codebase can pass either a char
;; or a char range.
(if (consp k)
(setq i (car k)
lim (cdr k))
(setq i k
lim k))
(while (<= i lim)
(when (> i 127)
(modify-syntax-entry i "_" table))
(setq i (1+ i)))))
(standard-syntax-table)))
(modify-syntax-entry ?\` "$`" table)
(modify-syntax-entry ?\\ "\\" table)
(mapc (lambda (x)
(modify-syntax-entry x "_" table))
;; Some of these are actually OK by default.
"!#$%&*+./:<=>?@^|~")
(unless (featurep 'mule)
;; Non-ASCII syntax should be OK, at least in Emacs.
(mapc (lambda (x)
(modify-syntax-entry x "_" table))
(concat "¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿"
"×÷"))
(mapc (lambda (x)
(modify-syntax-entry x "w" table))
(concat "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ"
"ØÙÚÛÜÝÞß"
"àáâãäåæçèéêëìíîïðñòóôõö"
"øùúûüýþÿ")))
table)
"Syntax table used in Haskell mode.")
(defun haskell-ident-at-point ()
"Return the identifier under point, or nil if none found.
May return a qualified name."
(save-excursion
(let ((case-fold-search nil))
(multiple-value-bind (start end)
(if (looking-at "\\s_")
(values (progn (skip-syntax-backward "_") (point))
(progn (skip-syntax-forward "_") (point)))
(values
(progn (skip-syntax-backward "w'")
(skip-syntax-forward "'") (point))
(progn (skip-syntax-forward "w'") (point))))
;; If we're looking at a module ID that qualifies further IDs, add
;; those IDs.
(goto-char start)
(while (and (looking-at "[[:upper:]]") (eq (char-after end) ?.)
;; It's a module ID that qualifies further IDs.
(goto-char (1+ end))
(save-excursion
(when (not (zerop (skip-syntax-forward
(if (looking-at "\\s_") "_" "w'"))))
(setq end (point))))))
;; If we're looking at an ID that's itself qualified by previous
;; module IDs, add those too.
(goto-char start)
(if (eq (char-after) ?.) (forward-char 1)) ;Special case for "."
(while (and (eq (char-before) ?.)
(progn (forward-char -1)
(not (zerop (skip-syntax-backward "w'"))))
(skip-syntax-forward "'")
(looking-at "[[:upper:]]"))
(setq start (point)))
;; This is it.
(buffer-substring-no-properties start end)))))
(defun haskell-delete-indentation (&optional arg)
"Like `delete-indentation' but ignoring Bird-stlye \">\"."
(interactive "*P")
(let ((fill-prefix (or fill-prefix (if (eq haskell-literate 'bird) ">"))))
(delete-indentation arg)))
;; Various mode variables.
(defcustom haskell-mode-hook nil
"Hook run after entering Haskell mode. Do not select more than one of the three indentation modes."
:type 'hook
:options '(turn-on-haskell-indent turn-on-haskell-indentation turn-on-font-lock turn-on-eldoc-mode
turn-on-simple-indent turn-on-haskell-doc-mode imenu-add-menubar-index))
(defvar eldoc-print-current-symbol-info-function)
;; The main mode functions
;;;###autoload
(define-derived-mode haskell-mode fundamental-mode "Haskell"
"Major mode for editing Haskell programs.
Blank lines separate paragraphs, comments start with `-- '.
\\<haskell-mode-map>
Literate scripts are supported via `literate-haskell-mode'.
The variable `haskell-literate' indicates the style of the script in the
current buffer. See the documentation on this variable for more details.
Modules can hook in via `haskell-mode-hook'. The following modules
are supported with an `autoload' command:
`haskell-decl-scan', Graeme E Moss
Scans top-level declarations, and places them in a menu.
`haskell-doc', Hans-Wolfgang Loidl
Echoes types of functions or syntax of keywords when the cursor is idle.
`haskell-indentation', Kristof Bastiaensen
Intelligent semi-automatic indentation Mk2
`haskell-indent', Guy Lapalme
Intelligent semi-automatic indentation.
`haskell-simple-indent', Graeme E Moss and Heribert Schuetz
Simple indentation.
Module X is activated using the command `turn-on-X'. For example,
`haskell-indent' is activated using `turn-on-haskell-indent'.
For more information on a module, see the help for its `X-mode'
function. Some modules can be deactivated using `turn-off-X'. (Note
that `haskell-doc' is irregular in using `turn-(on/off)-haskell-doc-mode'.)
Use `haskell-version' to find out what version this is.
Invokes `haskell-mode-hook'."
(set (make-local-variable 'paragraph-start) (concat "^$\\|" page-delimiter))
(set (make-local-variable 'paragraph-separate) paragraph-start)
(set (make-local-variable 'comment-start) "-- ")
(set (make-local-variable 'comment-padding) 0)
(set (make-local-variable 'comment-start-skip) "[-{]-[ \t]*")
(set (make-local-variable 'comment-end) "")
(set (make-local-variable 'comment-end-skip) "[ \t]*\\(-}\\|\\s>\\)")
(set (make-local-variable 'parse-sexp-ignore-comments) t)
;; Set things up for eldoc-mode.
(set (make-local-variable 'eldoc-documentation-function)
'haskell-doc-current-info)
;; Set things up for imenu.
(set (make-local-variable 'imenu-create-index-function)
'haskell-ds-create-imenu-index)
;; Set things up for font-lock.
(set (make-local-variable 'font-lock-defaults)
'(haskell-font-lock-choose-keywords
nil nil ((?\' . "w") (?_ . "w")) nil
(font-lock-syntactic-keywords
. haskell-font-lock-choose-syntactic-keywords)
(font-lock-syntactic-face-function
. haskell-syntactic-face-function)
;; Get help from font-lock-syntactic-keywords.
(parse-sexp-lookup-properties . t)))
;; Haskell's layout rules mean that TABs have to be handled with extra care.
;; The safer option is to avoid TABs. The second best is to make sure
;; TABs stops are 8 chars apart, as mandated by the Haskell Report. --Stef
(set (make-local-variable 'indent-tabs-mode) nil)
(set (make-local-variable 'tab-width) 8)
(setq haskell-literate nil))
;;;###autoload
(define-derived-mode literate-haskell-mode haskell-mode "LitHaskell"
"As `haskell-mode' but for literate scripts."
(setq haskell-literate
(save-excursion
(goto-char (point-min))
(cond
((re-search-forward "^\\\\\\(begin\\|end\\){code}$" nil t) 'tex)
((re-search-forward "^>" nil t) 'bird)
(t haskell-literate-default))))
(if (eq haskell-literate 'bird)
;; fill-comment-paragraph isn't much use there, and even gets confused
;; by the syntax-table text-properties we add to mark the first char
;; of each line as a comment-starter.
(set (make-local-variable 'fill-paragraph-handle-comment) nil))
(set (make-local-variable 'mode-line-process)
'("/" (:eval (symbol-name haskell-literate)))))
;;;###autoload(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode))
;;;###autoload(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode))
(defcustom haskell-hoogle-command
(if (executable-find "hoogle") "hoogle")
"Name of the command to use to query Hoogle.
If nil, use the Hoogle web-site."
:type '(choice (const :tag "Use Web-site" nil)
string))
;;;###autoload
(defun haskell-hoogle (query)
"Do a Hoogle search for QUERY."
(interactive
(let ((def (haskell-ident-at-point)))
(if (and def (symbolp def)) (setq def (symbol-name def)))
(list (read-string (if def
(format "Hoogle query (default %s): " def)
"Hoogle query: ")
nil nil def))))
(if (null haskell-hoogle-command)
(browse-url (format "http://haskell.org/hoogle/?q=%s" query))
(if (fboundp 'help-setup-xref)
(help-setup-xref (list 'haskell-hoogle query) (interactive-p)))
(with-output-to-temp-buffer
(if (fboundp 'help-buffer) (help-buffer) "*Help*")
(with-current-buffer standard-output
(start-process "hoogle" (current-buffer) haskell-hoogle-command
query)))))
;;;###autoload
(defalias 'hoogle 'haskell-hoogle)
;;;###autoload
(defun haskell-hayoo (query)
"Do a Hayoo search for QUERY."
(interactive
(let ((def (haskell-ident-at-point)))
(if (and def (symbolp def)) (setq def (symbol-name def)))
(list (read-string (if def
(format "Hayoo query (default %s): " def)
"Hayoo query: ")
nil nil def))))
(browse-url (format "http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%s" query)))
;;;###autoload
(defalias 'hayoo 'haskell-hayoo)
;; Provide ourselves:
(provide 'haskell-mode)
;; arch-tag: b2237ec0-ddb0-4c86-9339-52d410264980
;;; haskell-mode.el ends here

View file

@ -1,154 +0,0 @@
;;; haskell-simple-indent.el --- Simple indentation module for Haskell Mode
;; Copyright (C) 1998 Heribert Schuetz, Graeme E Moss
;; Authors:
;; 1998 Heribert Schuetz <Heribert.Schuetz@informatik.uni-muenchen.de> and
;; Graeme E Moss <gem@cs.york.ac.uk>
;; Keywords: indentation files Haskell
;; Version: 1.0
;; URL: http://www.cs.york.ac.uk/~gem/haskell-mode/simple-indent.html
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Purpose:
;;
;; To support simple indentation of Haskell scripts.
;;
;;
;; Installation:
;;
;; To bind TAB to the indentation command for all Haskell buffers, add
;; this to .emacs:
;;
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;;
;; Otherwise, call `turn-on-haskell-simple-indent'.
;;
;;
;; Customisation:
;;
;; None supported.
;;
;;
;; History:
;;
;; If you have any problems or suggestions, after consulting the list
;; below, email gem@cs.york.ac.uk quoting the version of you are
;; using, the version of Emacs you are using, and a small example of
;; the problem or suggestion.
;;
;; Version 1.0:
;; Brought over from Haskell mode v1.1.
;;
;; Present Limitations/Future Work (contributions are most welcome!):
;;
;; (None so far.)
;;; Code:
;; All functions/variables start with
;; `(turn-(on/off)-)haskell-simple-indent'.
;; Version.
(defconst haskell-simple-indent-version "1.2"
"`haskell-simple-indent' version number.")
(defun haskell-simple-indent-version ()
"Echo the current version of `haskell-simple-indent' in the minibuffer."
(interactive)
(message "Using haskell-simple-indent version %s"
haskell-simple-indent-version))
;; Partly stolen from `indent-relative' in indent.el:
(defun haskell-simple-indent ()
"Space out to under next visible indent point.
Indent points are positions of non-whitespace following whitespace in
lines preceeding point. A position is visible if it is to the left of
the first non-whitespace of every nonblank line between the position and
the current line. If there is no visible indent point beyond the current
column, `tab-to-tab-stop' is done instead."
(interactive)
(let* ((start-column (current-column))
(invisible-from nil) ; `nil' means infinity here
(indent
(catch 'haskell-simple-indent-break
(save-excursion
(while (progn (beginning-of-line)
(not (bobp)))
(forward-line -1)
(if (not (looking-at "[ \t]*\n"))
(let ((this-indentation (current-indentation)))
(if (or (not invisible-from)
(< this-indentation invisible-from))
(if (> this-indentation start-column)
(setq invisible-from this-indentation)
(let ((end (line-beginning-position 2)))
(move-to-column start-column)
;; Is start-column inside a tab on this line?
(if (> (current-column) start-column)
(backward-char 1))
(or (looking-at "[ \t]")
(skip-chars-forward "^ \t" end))
(skip-chars-forward " \t" end)
(let ((col (current-column)))
(throw 'haskell-simple-indent-break
(if (or (= (point) end)
(and invisible-from
(> col invisible-from)))
invisible-from
col)))))))))))))
(if indent
(let ((opoint (point-marker)))
(indent-line-to indent)
(if (> opoint (point))
(goto-char opoint))
(set-marker opoint nil))
(tab-to-tab-stop))))
(defvar haskell-simple-indent-old)
;; The main functions.
(defun turn-on-haskell-simple-indent ()
"Set `indent-line-function' to a simple indentation function.
TAB will now move the cursor to the next indent point in the previous
nonblank line. An indent point is a non-whitespace character following
whitespace.
Runs `haskell-simple-indent-hook'.
Use `haskell-simple-indent-version' to find out what version this is."
(set (make-local-variable 'haskell-simple-indent-old) indent-line-function)
(set (make-local-variable 'indent-line-function) 'haskell-simple-indent)
(run-hooks 'haskell-simple-indent-hook))
(defun turn-off-haskell-simple-indent ()
"Return `indent-line-function' to original value.
I.e. the value before `turn-on-haskell-simple-indent' was called."
(when (local-variable-p 'haskell-simple-indent-old)
(setq indent-line-function haskell-simple-indent-old)
(kill-local-variable 'haskell-simple-indent-old)))
;; Provide ourselves:
(provide 'haskell-simple-indent)
;; arch-tag: 18a08122-723b-485e-b958-e1cf8218b816
;;; haskell-simple-indent.el ends here

View file

@ -1,274 +0,0 @@
;;;### (autoloads (haskell-c-mode) "haskell-c" "haskell-c.el" (19189
;;;;;; 21847))
;;; Generated autoloads from haskell-c.el
(add-to-list 'auto-mode-alist '("\\.hsc\\'" . haskell-c-mode))
(autoload 'haskell-c-mode "haskell-c" "\
Major mode for Haskell FFI files.
\(fn)" t nil)
;;;***
;;;### (autoloads (haskell-cabal-mode) "haskell-cabal" "haskell-cabal.el"
;;;;;; (19189 21847))
;;; Generated autoloads from haskell-cabal.el
(add-to-list 'auto-mode-alist '("\\.cabal\\'" . haskell-cabal-mode))
(autoload 'haskell-cabal-mode "haskell-cabal" "\
Major mode for Cabal package description files.
\(fn)" t nil)
;;;***
;;;### (autoloads (haskell-decl-scan-mode) "haskell-decl-scan" "haskell-decl-scan.el"
;;;;;; (19189 21847))
;;; Generated autoloads from haskell-decl-scan.el
(autoload 'haskell-decl-scan-mode "haskell-decl-scan" "\
Minor mode for declaration scanning for Haskell mode.
Top-level declarations are scanned and listed in the menu item \"Declarations\".
Selecting an item from this menu will take point to the start of the
declaration.
\\[haskell-ds-forward-decl] and \\[haskell-ds-backward-decl] move forward and backward to the start of a declaration.
Under XEmacs, the following keys are also defined:
\\[fume-list-functions] lists the declarations of the current buffer,
\\[fume-prompt-function-goto] prompts for a declaration to move to, and
\\[fume-mouse-function-goto] moves to the declaration whose name is at point.
This may link with `haskell-doc' (only for Emacs currently).
For non-literate and LaTeX-style literate scripts, we assume the
common convention that top-level declarations start at the first
column. For Bird-style literate scripts, we assume the common
convention that top-level declarations start at the third column,
ie. after \"> \".
Anything in `font-lock-comment-face' is not considered for a
declaration. Therefore, using Haskell font locking with comments
coloured in `font-lock-comment-face' improves declaration scanning.
To turn on declaration scanning for all Haskell buffers, add this to
.emacs:
(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
To turn declaration scanning on for the current buffer, call
`turn-on-haskell-decl-scan'.
Literate Haskell scripts are supported: If the value of
`haskell-literate' (automatically set by the Haskell mode of
Moss&Thorn) is `bird', a Bird-style literate script is assumed. If it
is nil or `tex', a non-literate or LaTeX-style literate script is
assumed, respectively.
Invokes `haskell-decl-scan-mode-hook'.
\(fn &optional ARG)" t nil)
;;;***
;;;### (autoloads (haskell-doc-show-type haskell-doc-mode) "haskell-doc"
;;;;;; "haskell-doc.el" (19189 21847))
;;; Generated autoloads from haskell-doc.el
(autoload 'haskell-doc-mode "haskell-doc" "\
Enter `haskell-doc-mode' for showing fct types in the echo area.
See variable docstring.
\(fn &optional ARG)" t nil)
(defalias 'turn-on-haskell-doc-mode 'haskell-doc-mode)
(autoload 'haskell-doc-show-type "haskell-doc" "\
Show the type of the function near point.
For the function under point, show the type in the echo area.
This information is extracted from the `haskell-doc-prelude-types' alist
of prelude functions and their types, or from the local functions in the
current buffer.
\(fn &optional SYM)" t nil)
;;;***
;;;### (autoloads (haskell-indent-mode) "haskell-indent" "haskell-indent.el"
;;;;;; (19189 21847))
;;; Generated autoloads from haskell-indent.el
(autoload 'haskell-indent-mode "haskell-indent" "\
``intelligent'' Haskell indentation mode that deals with
the layout rule of Haskell. \\[haskell-indent-cycle] starts the cycle
which proposes new possibilities as long as the TAB key is pressed.
Any other key or mouse click terminates the cycle and is interpreted
except for RET which merely exits the cycle.
Other special keys are:
\\[haskell-indent-insert-equal]
inserts an =
\\[haskell-indent-insert-guard]
inserts an |
\\[haskell-indent-insert-otherwise]
inserts an | otherwise =
these functions also align the guards and rhs of the current definition
\\[haskell-indent-insert-where]
inserts a where keyword
\\[haskell-indent-align-guards-and-rhs]
aligns the guards and rhs of the region
\\[haskell-indent-put-region-in-literate]
makes the region a piece of literate code in a literate script
Invokes `haskell-indent-hook' if not nil.
\(fn &optional ARG)" t nil)
;;;***
;;;### (autoloads (haskell-indentation-mode) "haskell-indentation"
;;;;;; "haskell-indentation.el" (19189 21847))
;;; Generated autoloads from haskell-indentation.el
(autoload 'haskell-indentation-mode "haskell-indentation" "\
Haskell indentation mode that deals with the layout rule.
It rebinds RET, DEL and BACKSPACE, so that indentations can be
set and deleted as if they were real tabs. It supports
autofill-mode.
\(fn &optional ARG)" t nil)
;;;***
;;;### (autoloads (haskell-hayoo haskell-hoogle literate-haskell-mode
;;;;;; haskell-mode) "haskell-mode" "haskell-mode.el" (19189 21847))
;;; Generated autoloads from haskell-mode.el
(add-to-list 'load-path (or (file-name-directory load-file-name) (car load-path)))
(autoload 'haskell-mode "haskell-mode" "\
Major mode for editing Haskell programs.
Blank lines separate paragraphs, comments start with `-- '.
\\<haskell-mode-map>
Literate scripts are supported via `literate-haskell-mode'.
The variable `haskell-literate' indicates the style of the script in the
current buffer. See the documentation on this variable for more details.
Modules can hook in via `haskell-mode-hook'. The following modules
are supported with an `autoload' command:
`haskell-decl-scan', Graeme E Moss
Scans top-level declarations, and places them in a menu.
`haskell-doc', Hans-Wolfgang Loidl
Echoes types of functions or syntax of keywords when the cursor is idle.
`haskell-indentation', Kristof Bastiaensen
Intelligent semi-automatic indentation Mk2
`haskell-indent', Guy Lapalme
Intelligent semi-automatic indentation.
`haskell-simple-indent', Graeme E Moss and Heribert Schuetz
Simple indentation.
Module X is activated using the command `turn-on-X'. For example,
`haskell-indent' is activated using `turn-on-haskell-indent'.
For more information on a module, see the help for its `X-mode'
function. Some modules can be deactivated using `turn-off-X'. (Note
that `haskell-doc' is irregular in using `turn-(on/off)-haskell-doc-mode'.)
Use `haskell-version' to find out what version this is.
Invokes `haskell-mode-hook'.
\(fn)" t nil)
(autoload 'literate-haskell-mode "haskell-mode" "\
As `haskell-mode' but for literate scripts.
\(fn)" t nil)
(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode))
(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode))
(autoload 'haskell-hoogle "haskell-mode" "\
Do a Hoogle search for QUERY.
\(fn QUERY)" t nil)
(defalias 'hoogle 'haskell-hoogle)
(autoload 'haskell-hayoo "haskell-mode" "\
Do a Hayoo search for QUERY.
\(fn QUERY)" t nil)
(defalias 'hayoo 'haskell-hayoo)
;;;***
;;;### (autoloads (inferior-haskell-find-haddock inferior-haskell-find-definition
;;;;;; inferior-haskell-info inferior-haskell-type inferior-haskell-load-file
;;;;;; switch-to-haskell) "inf-haskell" "inf-haskell.el" (19189
;;;;;; 21847))
;;; Generated autoloads from inf-haskell.el
(defalias 'run-haskell 'switch-to-haskell)
(autoload 'switch-to-haskell "inf-haskell" "\
Show the inferior-haskell buffer. Start the process if needed.
\(fn &optional ARG)" t nil)
(autoload 'inferior-haskell-load-file "inf-haskell" "\
Pass the current buffer's file to the inferior haskell process.
If prefix arg \\[universal-argument] is given, just reload the previous file.
\(fn &optional RELOAD)" t nil)
(autoload 'inferior-haskell-type "inf-haskell" "\
Query the haskell process for the type of the given expression.
If optional argument `insert-value' is non-nil, insert the type above point
in the buffer. This can be done interactively with the \\[universal-argument] prefix.
The returned info is cached for reuse by `haskell-doc-mode'.
\(fn EXPR &optional INSERT-VALUE)" t nil)
(autoload 'inferior-haskell-info "inf-haskell" "\
Query the haskell process for the info of the given expression.
\(fn SYM)" t nil)
(autoload 'inferior-haskell-find-definition "inf-haskell" "\
Attempt to locate and jump to the definition of the given expression.
\(fn SYM)" t nil)
(autoload 'inferior-haskell-find-haddock "inf-haskell" "\
Find and open the Haddock documentation of SYM.
Make sure to load the file into GHCi or Hugs first by using C-c C-l.
Only works for functions in a package installed with ghc-pkg, or
whatever the value of `haskell-package-manager-name' is.
This function needs to find which package a given module belongs
to. In order to do this, it computes a module-to-package lookup
alist, which is expensive to compute (it takes upwards of five
seconds with more than about thirty installed packages). As a
result, we cache it across sessions using the cache file
referenced by `inferior-haskell-module-alist-file'. We test to
see if this is newer than `haskell-package-conf-file' every time
we load it.
\(fn SYM)" t nil)
;;;***
;;;### (autoloads nil nil ("haskell-font-lock.el" "haskell-ghci.el"
;;;;;; "haskell-hugs.el" "haskell-simple-indent.el") (19189 21847
;;;;;; 934450))
;;;***

View file

@ -1,157 +0,0 @@
-------------------------------------------------------------------------
-- Comments with allcaps `FIXME' indicate places where the indentation --
-- fails to find the correct indentation, whereas comments with --
-- lowercase `fixme' indicate places where impossible indentations --
-- are uselessly proposed. --
-------------------------------------------------------------------------
-- compute the list of binary digits corresponding to an integer
-- Note: the least significant bit is the first element of the list
bdigits :: Int -> [Int]
bdigits 0 = [0]
bdigits 1 = [1]
bdigits n | n>1 = n `mod` 2 :
bdigits (n `div` 2)
| otherwise = error "bdigits of a negative number"
-- compute the value of an integer given its list of binary digits
-- Note: the least significant bit is the first element of the list
bvalue :: [Int]->Int
bvalue [] = error "bvalue of []"
bvalue s = bval 1 s
where
bval e [] = 0
bval e [] = 0 -- fixme: can't align with `where'.
bval e (b:bs) | b==0 || b=="dd of " = b*e + bval (2*e) bs
| otherwise = error "ill digit" -- Spurious 3rd step.
foo
-- fixme: tab on the line above should insert `bvalue' at some point.
{- text
indentation
inside comments
-}
toto a = ( hello
, there -- indentation of leading , and ;
-- indentation of this comment.
, my friends )
lili x = do let ofs x = 1
print x
titi b =
let -- fixme: can't indent at column 0
x = let toto = 1
tata = 2 -- fixme: can't indent lower than `toto'.
in
toto in
do expr1
{- text
- indentation
- inside comments
-}
let foo s = let fro = 1
fri = 2 -- fixme: can't indent lower than `fro'.
in
hello
foo2 = bar2 -- fixme: can't align with arg `s' in foo.
foo1 = bar2 -- fixme: Can't be column 0.
expr2
tata c =
let bar = case foo -- fixme: can't be col 0.
of 1 -> blabla
2 -> blibli -- fixme: only one possible indentation here.
bar = case foo of
_ -> blabla
bar' = case foo
of _ -> blabla
toto -> plulu
turlu d = if test
then
ifturl
else
adfaf
turlu d = if test then
ifturl
else
sg
turly fg = toto
where
hello = 2
-- test from John Goerzen
x myVariableThing = case myVariablething of
Just z -> z
Nothing -> 0 -- fixme: "spurious" additional indents.
foo = let x = 1 in toto
titi -- FIXME
foo = let foo x y = toto
where
toto = 2
instance Show Toto where
foo x 4 = 50
data Toto = Foo
| Bar
deriving (Show) -- FIXME
foo = let toto x = do let bar = 2
return 1
in 3
eval env (Llambda x e) = -- FIXME: sole indentation is self???
Vfun (\v -> eval (\y -> if (x == y) then v else env y) -- FIXME
e) -- FIXME
foo = case findprop attr props of
Just x -> x
data T = T { granularity :: (Int, Int, Int, Int) -- FIXME: self indentation?
, items :: Map (Int, Int, Int, Int) [Item] }
foo = case foo of
[] ->
case bar of
[] ->
return ()
(x:xs) -> -- FIXME
bar = do toto
if titi
then tutu -- FIXME
else tata -- FIXME
insert :: Ord a => a -> b -> TreeMap a b -> TreeMap a b
insert x v Empty = Node 0 x v Empty Empty
insert x v (Node d x' v' t1 t2)
| x == x' = Node d x v t1 t2
| x < x' = Node ? x' v' (insert x v t1 Empty) t2
| -- FIXME: wrong indent *if at EOB*
tinsertb x v (Node x' v' d1 t1 d2 t2)
| x == x' = (1 + max d1 d2, Node x v d1 t1 d2 t2)
| x < x' =
case () of
_ | d1' <= d2 + 1 => (1 + max d1' d2, Node x' v' d1' t1' d2 t2)
-- d1' == d2 + 2: Need to rotate to rebalance. FIXME CRASH
else let (Node x'' v'' d1'' t1'' d2'' t2'') = t1'
test = if True then
toto
else if False then
tata -- FIXME
else -- FIXME
titi
-- arch-tag: de0069e3-c0a0-495c-b441-d4ff6e0509b1

View file

@ -1,720 +0,0 @@
;;; inf-haskell.el --- Interaction with an inferior Haskell process.
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: Haskell
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; The code is made of 2 parts: a major mode for the buffer that holds the
;; inferior process's session and a minor mode for use in source buffers.
;; Todo:
;; - Check out Shim for ideas.
;; - i-h-load-buffer and i-h-send-region.
;;; Code:
(require 'comint)
(require 'shell) ;For directory tracking.
(require 'compile)
(require 'haskell-mode)
(eval-when-compile (require 'cl))
;; XEmacs compatibility.
(unless (fboundp 'subst-char-in-string)
(defun subst-char-in-string (fromchar tochar string &optional inplace)
;; This is Haskell-mode, we don't want no stinkin' `aset'.
(apply 'string (mapcar (lambda (c) (if (eq c fromchar) tochar c)) string))))
(unless (fboundp 'make-temp-file)
(defun make-temp-file (prefix &optional dir-flag)
(catch 'done
(while t
(let ((f (make-temp-name (expand-file-name prefix (temp-directory)))))
(condition-case ()
(progn
(if dir-flag (make-directory f)
(write-region "" nil f nil 'silent nil))
(throw 'done f))
(file-already-exists t)))))))
(unless (fboundp 'replace-regexp-in-string)
(defun replace-regexp-in-string (regexp rep string)
(replace-in-string string regexp rep)))
;; Here I depart from the inferior-haskell- prefix.
;; Not sure if it's a good idea.
(defcustom haskell-program-name
;; Arbitrarily give preference to hugs over ghci.
(or (cond
((not (fboundp 'executable-find)) nil)
((executable-find "hugs") "hugs \"+.\"")
((executable-find "ghci") "ghci"))
"hugs \"+.\"")
"The name of the command to start the inferior Haskell process.
The command can include arguments."
;; Custom only supports the :options keyword for a few types, e.g. not
;; for string.
;; :options '("hugs \"+.\"" "ghci")
:group 'haskell
:type '(choice string (repeat string)))
(defconst inferior-haskell-info-xref-re
"\t-- Defined at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?$")
(defconst inferior-haskell-module-re
"\t-- Defined in \\(.+\\)$"
"Regular expression for matching module names in :info.")
(defconst inferior-haskell-error-regexp-alist
;; The format of error messages used by Hugs.
`(("^ERROR \"\\(.+?\\)\"\\(:\\| line \\)\\([0-9]+\\) - " 1 3)
;; Format of error messages used by GHCi.
("^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n *\\)\\(Warning\\)?"
1 2 4 ,@(if (fboundp 'compilation-fake-loc)
'((6) nil (5 '(face nil font-lock-multiline t)))))
;; Runtime exceptions, from ghci.
("^\\*\\*\\* Exception: \\(.+?\\):(\\([0-9]+\\),\\([0-9]+\\))-(\\([0-9]+\\),\\([0-9]+\\)): .*"
1 ,@(if (fboundp 'compilation-fake-loc) '((2 . 4) (3 . 5)) '(2 3)))
;; GHCi uses two different forms for line/col ranges, depending on
;; whether it's all on the same line or not :-( In Emacs-23, I could use
;; explicitly numbered subgroups to merge the two patterns.
("^\\*\\*\\* Exception: \\(.+?\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\): .*"
1 2 ,(if (fboundp 'compilation-fake-loc) '(3 . 4) 3))
;; Info messages. Not errors per se.
,@(when (fboundp 'compilation-fake-loc)
`(;; Other GHCi patterns used in type errors.
("^[ \t]+at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\)$"
1 2 (3 . 4) 0)
;; Foo.hs:318:80:
;; Ambiguous occurrence `Bar'
;; It could refer to either `Bar', defined at Zork.hs:311:5
;; or `Bar', imported from Bars at Frob.hs:32:0-16
;; (defined at Location.hs:97:5)
("[ (]defined at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\))?$" 1 2 3 0)
("imported from .* at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\)$"
1 2 (3 . 4) 0)
;; Info xrefs.
(,inferior-haskell-info-xref-re 1 2 (3 . 4) 0))))
"Regexps for error messages generated by inferior Haskell processes.
The format should be the same as for `compilation-error-regexp-alist'.")
(defcustom inferior-haskell-find-project-root t
"If non-nil, try and find the project root directory of this file.
This will either look for a Cabal file or a \"module\" statement in the file."
:type 'boolean)
(define-derived-mode inferior-haskell-mode comint-mode "Inf-Haskell"
"Major mode for interacting with an inferior Haskell process."
(set (make-local-variable 'comint-prompt-regexp)
"^\\*?[A-Z][\\._a-zA-Z0-9]*\\( \\*?[A-Z][\\._a-zA-Z0-9]*\\)*> ")
(set (make-local-variable 'comint-input-autoexpand) nil)
(add-hook 'comint-output-filter-functions 'inferior-haskell-spot-prompt nil t)
;; Setup directory tracking.
(set (make-local-variable 'shell-cd-regexp) ":cd")
(condition-case nil
(shell-dirtrack-mode 1)
(error ;The minor mode function may not exist or not accept an arg.
(set (make-local-variable 'shell-dirtrackp) t)
(add-hook 'comint-input-filter-functions 'shell-directory-tracker
nil 'local)))
;; Setup `compile' support so you can just use C-x ` and friends.
(set (make-local-variable 'compilation-error-regexp-alist)
inferior-haskell-error-regexp-alist)
(set (make-local-variable 'compilation-first-column) 0) ;GHCI counts from 0.
(if (and (not (boundp 'minor-mode-overriding-map-alist))
(fboundp 'compilation-shell-minor-mode))
;; If we can't remove compilation-minor-mode bindings, at least try to
;; use compilation-shell-minor-mode, so there are fewer
;; annoying bindings.
(compilation-shell-minor-mode 1)
;; Else just use compilation-minor-mode but without its bindings because
;; things like mouse-2 are simply too annoying.
(compilation-minor-mode 1)
(let ((map (make-sparse-keymap)))
(dolist (keys '([menu-bar] [follow-link]))
;; Preserve some of the bindings.
(define-key map keys (lookup-key compilation-minor-mode-map keys)))
(add-to-list 'minor-mode-overriding-map-alist
(cons 'compilation-minor-mode map)))))
(defun inferior-haskell-string-to-strings (string)
"Split the STRING into a list of strings."
(let ((i (string-match "[\"]" string)))
(if (null i) (split-string string) ; no quoting: easy
(append (unless (eq i 0) (split-string (substring string 0 i)))
(let ((rfs (read-from-string string i)))
(cons (car rfs)
(inferior-haskell-string-to-strings
(substring string (cdr rfs)))))))))
(defun inferior-haskell-command (arg)
(inferior-haskell-string-to-strings
(if (null arg) haskell-program-name
(read-string "Command to run haskell: " haskell-program-name))))
(defvar inferior-haskell-buffer nil
"The buffer in which the inferior process is running.")
(defun inferior-haskell-start-process (command)
"Start an inferior haskell process.
With universal prefix \\[universal-argument], prompts for a COMMAND,
otherwise uses `haskell-program-name'.
It runs the hook `inferior-haskell-hook' after starting the process and
setting up the inferior-haskell buffer."
(interactive (list (inferior-haskell-command current-prefix-arg)))
(setq inferior-haskell-buffer
(apply 'make-comint "haskell" (car command) nil (cdr command)))
(with-current-buffer inferior-haskell-buffer
(inferior-haskell-mode)
(run-hooks 'inferior-haskell-hook)))
(defun inferior-haskell-process (&optional arg)
(or (if (buffer-live-p inferior-haskell-buffer)
(get-buffer-process inferior-haskell-buffer))
(progn
(let ((current-prefix-arg arg))
(call-interactively 'inferior-haskell-start-process))
;; Try again.
(inferior-haskell-process arg))))
;;;###autoload
(defalias 'run-haskell 'switch-to-haskell)
;;;###autoload
(defun switch-to-haskell (&optional arg)
"Show the inferior-haskell buffer. Start the process if needed."
(interactive "P")
(let ((proc (inferior-haskell-process arg)))
(pop-to-buffer (process-buffer proc))))
(eval-when-compile
(unless (fboundp 'with-selected-window)
(defmacro with-selected-window (win &rest body)
`(save-selected-window
(select-window ,win)
,@body))))
(defcustom inferior-haskell-wait-and-jump nil
"If non-nil, wait for file loading to terminate and jump to the error."
:type 'boolean
:group 'haskell)
(defvar inferior-haskell-seen-prompt nil)
(make-variable-buffer-local 'inferior-haskell-seen-prompt)
(defun inferior-haskell-spot-prompt (string)
(let ((proc (get-buffer-process (current-buffer))))
(when proc
(save-excursion
(goto-char (process-mark proc))
(if (re-search-backward comint-prompt-regexp
(line-beginning-position) t)
(setq inferior-haskell-seen-prompt t))))))
(defun inferior-haskell-wait-for-prompt (proc &optional timeout)
"Wait until PROC sends us a prompt.
The process PROC should be associated to a comint buffer."
(with-current-buffer (process-buffer proc)
(while (progn
(goto-char comint-last-input-end)
(not (or inferior-haskell-seen-prompt
(setq inferior-haskell-seen-prompt
(re-search-forward comint-prompt-regexp nil t))
(not (accept-process-output proc timeout))))))
(unless inferior-haskell-seen-prompt
(error "Can't find the prompt."))))
(defvar inferior-haskell-cabal-buffer nil)
(defun inferior-haskell-cabal-of-buf (buf)
(require 'haskell-cabal)
(with-current-buffer buf
(or (and (buffer-live-p inferior-haskell-cabal-buffer)
inferior-haskell-cabal-buffer)
(and (not (local-variable-p 'inferior-haskell-cabal-buffer
;; XEmacs needs this argument.
(current-buffer)))
(set (make-local-variable 'inferior-haskell-cabal-buffer)
(haskell-cabal-find-file))))))
(defun inferior-haskell-find-project-root (buf)
(with-current-buffer buf
(let ((cabal (inferior-haskell-cabal-of-buf buf)))
(or (when cabal
(with-current-buffer cabal
(let ((hsd (haskell-cabal-get-setting "hs-source-dirs")))
(if (null hsd)
;; If there's a Cabal file with no Hs-Source-Dirs, then
;; just use the Cabal file's directory.
default-directory
;; If there is an HSD, then check that it's an existing
;; dir (otherwise, it may be a list of dirs and we don't
;; know what to do with those). If it doesn't exist, then
;; give up.
(if (file-directory-p hsd) (expand-file-name hsd))))))
;; If there's no Cabal file or it's not helpful, try to look for
;; a "module" statement and count the number of "." in the
;; module name.
(save-excursion
(goto-char (point-min))
(let ((case-fold-search nil))
(when (re-search-forward
"^module[ \t]+\\([^- \t\n]+\\.[^- \t\n]+\\)[ \t]+where\\>" nil t)
(let* ((dir default-directory)
(module (match-string 1))
(pos 0))
(while (string-match "\\." module pos)
(setq pos (match-end 0))
(setq dir (expand-file-name ".." dir)))
;; Let's check that the module name matches the file name,
;; otherwise the project root is probably not what we think.
(if (eq t (compare-strings
(file-name-sans-extension buffer-file-name)
nil nil
(expand-file-name
(replace-regexp-in-string "\\." "/" module)
dir)
nil nil t))
dir
;; If they're not equal, it means the local directory
;; hierarchy doesn't match the module name. This seems
;; odd, so let's warn the user about it. May help us
;; debug this code as well.
(message "Ignoring inconsistent `module' info: %s in %s"
module buffer-file-name)
nil)))))))))
;;;###autoload
(defun inferior-haskell-load-file (&optional reload)
"Pass the current buffer's file to the inferior haskell process.
If prefix arg \\[universal-argument] is given, just reload the previous file."
(interactive "P")
;; Save first, so we're sure that `buffer-file-name' is non-nil afterward.
(save-buffer)
(let ((buf (current-buffer))
(file buffer-file-name)
(proc (inferior-haskell-process)))
(with-current-buffer (process-buffer proc)
(compilation-forget-errors)
(let ((parsing-end (marker-position (process-mark proc)))
root)
;; Go to the root of the Cabal project, if applicable.
(when (and inferior-haskell-find-project-root
(setq root (inferior-haskell-find-project-root buf)))
;; Not sure if it's useful/needed and if it actually works.
(unless (equal default-directory root)
(setq default-directory root)
(inferior-haskell-send-command
proc (concat ":cd " default-directory)))
(setq file (file-relative-name file)))
(inferior-haskell-send-command
proc (if reload ":reload"
(concat ":load \""
;; Espace the backslashes that may occur in file names.
(replace-regexp-in-string "[\\\"]" "\\\\\&" file)
"\"")))
;; Move the parsing-end marker *after* sending the command so
;; that it doesn't point just to the insertion point.
;; Otherwise insertion may move the marker (if done with
;; insert-before-markers) and we'd then miss some errors.
(if (boundp 'compilation-parsing-end)
(if (markerp compilation-parsing-end)
(set-marker compilation-parsing-end parsing-end)
(setq compilation-parsing-end parsing-end))))
(with-selected-window (display-buffer (current-buffer))
(goto-char (point-max)))
;; Use compilation-auto-jump-to-first-error if available.
;; (if (and (boundp 'compilation-auto-jump-to-first-error)
;; compilation-auto-jump-to-first-error
;; (boundp 'compilation-auto-jump-to-next))
;; (setq compilation-auto-jump-to-next t)
(when inferior-haskell-wait-and-jump
(inferior-haskell-wait-for-prompt proc)
(ignore-errors ;Don't beep if there were no errors.
(next-error)))))) ;; )
(defvar inferior-haskell-run-command ":main")
(defun inferior-haskell-load-and-run (command)
"Pass the current buffer's file to haskell and then run a COMMAND."
(interactive
(list
(if (and inferior-haskell-run-command (not current-prefix-arg))
inferior-haskell-run-command
(read-string "Command to run: " nil nil inferior-haskell-run-command))))
(setq inferior-haskell-run-command command)
(let* ((inferior-haskell-errors nil)
(neh (lambda () (setq inferior-haskell-errors t))))
(unwind-protect
(let ((inferior-haskell-wait-and-jump t))
(add-hook 'next-error-hook neh)
(inferior-haskell-load-file))
(remove-hook 'next-error-hook neh))
(unless inferior-haskell-errors
(inferior-haskell-send-command (inferior-haskell-process) command)
(switch-to-haskell))))
(defun inferior-haskell-send-command (proc str)
(setq str (concat str "\n"))
(with-current-buffer (process-buffer proc)
(inferior-haskell-wait-for-prompt proc)
(goto-char (process-mark proc))
(insert-before-markers str)
(move-marker comint-last-input-end (point))
(setq inferior-haskell-seen-prompt nil)
(comint-send-string proc str)))
(defun inferior-haskell-reload-file ()
"Tell the inferior haskell process to reread the current buffer's file."
(interactive)
(inferior-haskell-load-file 'reload))
;;;###autoload
(defun inferior-haskell-type (expr &optional insert-value)
"Query the haskell process for the type of the given expression.
If optional argument `insert-value' is non-nil, insert the type above point
in the buffer. This can be done interactively with the \\[universal-argument] prefix.
The returned info is cached for reuse by `haskell-doc-mode'."
(interactive
(let ((sym (haskell-ident-at-point)))
(list (read-string (if (> (length sym) 0)
(format "Show type of (default %s): " sym)
"Show type of: ")
nil nil sym)
current-prefix-arg)))
(if (string-match "\\`\\s_+\\'" expr) (setq expr (concat "(" expr ")")))
(let* ((proc (inferior-haskell-process))
(type
(with-current-buffer (process-buffer proc)
(let ((parsing-end ; Remember previous spot.
(marker-position (process-mark proc))))
(inferior-haskell-send-command proc (concat ":type " expr))
;; Find new point.
(inferior-haskell-wait-for-prompt proc)
(goto-char (point-max))
;; Back up to the previous end-of-line.
(end-of-line 0)
;; Extract the type output
(buffer-substring-no-properties
(save-excursion (goto-char parsing-end)
(line-beginning-position 2))
(point))))))
(if (not (string-match (concat "^\\(" (regexp-quote expr) "[ \t\n]+::[ \t\n]*\\(.\\|\n\\)*\\)")
type))
(error "No type info: %s" type)
(progn
(setf type (match-string 1 type))
;; Cache for reuse by haskell-doc.
(when (and (boundp 'haskell-doc-mode) haskell-doc-mode
(boundp 'haskell-doc-user-defined-ids)
;; Haskell-doc only works for idents, not arbitrary expr.
(string-match "\\`(?\\(\\s_+\\|\\(\\sw\\|\\s'\\)+\\)?[ \t]*::[ \t]*"
type))
(let ((sym (match-string 1 type)))
(setq haskell-doc-user-defined-ids
(cons (cons sym (substring type (match-end 0)))
(delq (assoc sym haskell-doc-user-defined-ids)
haskell-doc-user-defined-ids)))))
(if (interactive-p) (message "%s" type))
(when insert-value
(beginning-of-line)
(insert type "\n"))
type))))
;;;###autoload
(defun inferior-haskell-info (sym)
"Query the haskell process for the info of the given expression."
(interactive
(let ((sym (haskell-ident-at-point)))
(list (read-string (if (> (length sym) 0)
(format "Show info of (default %s): " sym)
"Show info of: ")
nil nil sym))))
(let ((proc (inferior-haskell-process)))
(with-current-buffer (process-buffer proc)
(let ((parsing-end ; Remember previous spot.
(marker-position (process-mark proc))))
(inferior-haskell-send-command proc (concat ":info " sym))
;; Find new point.
(inferior-haskell-wait-for-prompt proc)
(goto-char (point-max))
;; Move to previous end-of-line
(end-of-line 0)
(let ((result
(buffer-substring-no-properties
(save-excursion (goto-char parsing-end)
(line-beginning-position 2))
(point))))
;; Move back to end of process buffer
(goto-char (point-max))
(if (interactive-p) (message "%s" result))
result)))))
;;;###autoload
(defun inferior-haskell-find-definition (sym)
"Attempt to locate and jump to the definition of the given expression."
(interactive
(let ((sym (haskell-ident-at-point)))
(list (read-string (if (> (length sym) 0)
(format "Find definition of (default %s): " sym)
"Find definition of: ")
nil nil sym))))
(let ((info (inferior-haskell-info sym)))
(if (not (string-match inferior-haskell-info-xref-re info))
(error "No source information available")
(let ((file (match-string-no-properties 1 info))
(line (string-to-number
(match-string-no-properties 2 info)))
(col (string-to-number
(match-string-no-properties 3 info))))
(when file
(with-current-buffer (process-buffer (inferior-haskell-process))
;; The file name is relative to the process's cwd.
(setq file (expand-file-name file)))
;; Push current location marker on the ring used by `find-tag'
(require 'etags)
(ring-insert find-tag-marker-ring (point-marker))
(pop-to-buffer (find-file-noselect file))
(when line
(goto-line line)
(when col (move-to-column col))))))))
;;; Functions to find the documentation of a given function.
;;
;; TODO for this section:
;;
;; * Support fetching of local Haddock docs pulled directly from source files.
;; * Display docs locally? w3m?
(defcustom inferior-haskell-use-web-docs
'fallback
"Whether to use the online documentation. Possible values:
`never', meaning always use local documentation, unless the local
file doesn't exist, when do nothing, `fallback', which means only
use the online documentation when the local file doesn't exist,
or `always', meaning always use the online documentation,
regardless of existance of local files. Default is `fallback'."
:group 'haskell
:type '(choice (const :tag "Never" never)
(const :tag "As fallback" fallback)
(const :tag "Always" always)))
(defcustom inferior-haskell-web-docs-base
"http://haskell.org/ghc/docs/latest/html/libraries/"
"The base URL of the online libraries documentation. This will
only be used if the value of `inferior-haskell-use-web-docs' is
`always' or `fallback'."
:group 'haskell
:type 'string)
(defcustom haskell-package-manager-name "ghc-pkg"
"Name of the program to consult regarding package details."
:group 'haskell
:type 'string)
(defcustom haskell-package-conf-file
(condition-case nil
(with-temp-buffer
(call-process "ghc" nil t nil "--print-libdir")
(expand-file-name "package.conf"
(buffer-substring (point-min) (1- (point-max)))))
;; Don't use `ignore-errors' because this form is not byte-compiled :-(
(error nil))
"Where the package configuration file for the package manager resides.
By default this is set to `ghc --print-libdir`/package.conf."
:group 'haskell
:type 'string)
(defun inferior-haskell-get-module (sym)
"Fetch the module in which SYM is defined."
(let ((info (inferior-haskell-info sym)))
(unless (string-match inferior-haskell-module-re info)
(error
"No documentation information available. Did you forget to C-c C-l?"))
(match-string-no-properties 1 info)))
(defun inferior-haskell-query-ghc-pkg (&rest args)
"Send ARGS to ghc-pkg, or whatever the value of
`haskell-package-manager' is. Insert the output into the current
buffer."
(apply 'call-process haskell-package-manager-name nil t nil args))
(defun inferior-haskell-get-package-list ()
"Get the list of packages from ghc-pkg, or whatever
`haskell-package-manager-name' is."
(with-temp-buffer
(inferior-haskell-query-ghc-pkg "--simple-output" "list")
(split-string (buffer-substring (point-min) (point-max)))))
(defun inferior-haskell-compute-module-alist ()
"Compute a list mapping modules to package names and haddock URLs using ghc-pkg."
(message "Generating module alist...")
(let ((module-alist ()))
(with-temp-buffer
(dolist (package (inferior-haskell-get-package-list))
(erase-buffer)
(inferior-haskell-query-ghc-pkg "describe" package)
(let ((package-w/o-version
(replace-regexp-in-string "[-.0-9]*\\'" "" package))
;; Find the Haddock documentation URL for this package
(haddock
(progn
(goto-char (point-min))
(when (re-search-forward "haddock-html:[ \t]+\\(.*[^ \t\n]\\)"
nil t)
(match-string 1)))))
;; Fetch the list of exposed modules for this package
(goto-char (point-min))
(when (re-search-forward "^exposed-modules:\\(.*\\(\n[ \t].*\\)*\\)"
nil t)
(dolist (module (split-string (match-string 1)))
(push (list module package-w/o-version haddock)
module-alist)))))
(message "Generating module alist... done")
module-alist)))
(defcustom inferior-haskell-module-alist-file
;; (expand-file-name "~/.inf-haskell-module-alist")
(expand-file-name (concat "inf-haskell-module-alist-"
(number-to-string (user-uid)))
(if (fboundp 'temp-directory)
(temp-directory)
temporary-file-directory))
"Where to save the module -> package lookup table.
Set this to `nil' to never cache to a file."
:group 'haskell
:type '(choice (const :tag "Don't cache to file" nil) string))
(defvar inferior-haskell-module-alist nil
"Association list of modules to their packages.
Each element is of the form (MODULE PACKAGE HADDOCK), where
MODULE is the name of a module,
PACKAGE is the package it belongs to, and
HADDOCK is the path to that package's Haddock documentation.
This is calculated on-demand using `inferior-haskell-compute-module-alist'.
It's also cached in the file `inferior-haskell-module-alist-file',
so that it can be obtained more quickly next time.")
(defun inferior-haskell-module-alist ()
"Get the module alist from cache or ghc-pkg's info."
(or
;; If we already have computed the alist, use it...
inferior-haskell-module-alist
(setq inferior-haskell-module-alist
(or
;; ...otherwise try to read it from the cache file...
(and
inferior-haskell-module-alist-file
(file-readable-p inferior-haskell-module-alist-file)
(file-newer-than-file-p inferior-haskell-module-alist-file
haskell-package-conf-file)
(with-temp-buffer
(insert-file-contents inferior-haskell-module-alist-file)
(goto-char (point-min))
(prog1 (read (current-buffer))
(message "Read module alist from file cache."))))
;; ...or generate it again and save it in a file for later.
(let ((alist (inferior-haskell-compute-module-alist)))
(when inferior-haskell-module-alist-file
(with-temp-buffer
(print alist (current-buffer))
;; Do the write to a temp file first, then rename it.
;; This makes it more atomic, and suffers from fewer security
;; holes related to race conditions if the file is in /tmp.
(let ((tmp (make-temp-file inferior-haskell-module-alist-file)))
(write-region (point-min) (point-max) tmp)
(rename-file tmp inferior-haskell-module-alist-file
'ok-if-already-exists))))
alist)))))
(defvar inferior-haskell-ghc-internal-ident-alist
;; FIXME: Fill this table, ideally semi-automatically.
'(("GHC.Base.return" . "Control.Monad.return")
("GHC.List" . "Data.List")))
(defun inferior-haskell-map-internal-ghc-ident (ident)
"Try to translate some internal GHC identifier to its alter ego in haskell docs."
(let ((head ident)
(tail "")
remapped)
(while (and (not
(setq remapped
(cdr (assoc head
inferior-haskell-ghc-internal-ident-alist))))
(string-match "\\.[^.]+\\'" head))
(setq tail (concat (match-string 0 head) tail))
(setq head (substring head 0 (match-beginning 0))))
(concat (or remapped head) tail)))
;;;###autoload
(defun inferior-haskell-find-haddock (sym)
"Find and open the Haddock documentation of SYM.
Make sure to load the file into GHCi or Hugs first by using C-c C-l.
Only works for functions in a package installed with ghc-pkg, or
whatever the value of `haskell-package-manager-name' is.
This function needs to find which package a given module belongs
to. In order to do this, it computes a module-to-package lookup
alist, which is expensive to compute (it takes upwards of five
seconds with more than about thirty installed packages). As a
result, we cache it across sessions using the cache file
referenced by `inferior-haskell-module-alist-file'. We test to
see if this is newer than `haskell-package-conf-file' every time
we load it."
(interactive
(let ((sym (haskell-ident-at-point)))
(list (read-string (if (> (length sym) 0)
(format "Find documentation of (default %s): " sym)
"Find documentation of: ")
nil nil sym))))
(setq sym (inferior-haskell-map-internal-ghc-ident sym))
(let* (;; Find the module and look it up in the alist
(module (inferior-haskell-get-module sym))
(alist-record (assoc module (inferior-haskell-module-alist)))
(package (nth 1 alist-record))
(file-name (concat (subst-char-in-string ?. ?- module) ".html"))
(local-path (concat (nth 2 alist-record) "/" file-name))
(url (if (or (eq inferior-haskell-use-web-docs 'always)
(and (not (file-exists-p local-path))
(eq inferior-haskell-use-web-docs 'fallback)))
(concat inferior-haskell-web-docs-base package "/" file-name
;; Jump to the symbol anchor within Haddock.
"#v:" sym)
(and (file-exists-p local-path)
(concat "file://" local-path)))))
(if url (browse-url url) (error "Local file doesn't exist."))))
(provide 'inf-haskell)
;; arch-tag: 61804287-63dd-4052-bc0e-90f691b34b40
;;; inf-haskell.el ends here

View file

@ -1,157 +0,0 @@
;;; highlight-parentheses.el --- highlight surrounding parentheses
;;
;; Copyright (C) 2007, 2009 Nikolaj Schumacher
;;
;; Author: Nikolaj Schumacher <bugs * nschum de>
;; Version: 1.0.1
;; Keywords: faces, matching
;; URL: http://nschum.de/src/emacs/highlight-parentheses/
;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x
;;
;; This file is NOT part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;
;;; Commentary:
;;
;; Add the following to your .emacs file:
;; (require 'highlight-parentheses)
;;
;; Enable `highlight-parentheses-mode'.
;;
;;; Change Log:
;;
;; 2009-03-19 (1.0.1)
;; Added setter for color variables.
;;
;; 2007-07-30 (1.0)
;; Added background highlighting and faces.
;;
;; 2007-05-15 (0.9.1)
;; Support for defcustom.
;;
;; 2007-04-26 (0.9)
;; Initial Release.
;;
;;; Code:
(eval-when-compile (require 'cl))
(defgroup highlight-parentheses nil
"Highlight surrounding parentheses"
:group 'faces
:group 'matching)
(defun hl-paren-set (variable value)
(set variable value)
(when (fboundp 'hl-paren-color-update)
(hl-paren-color-update)))
(defcustom hl-paren-colors
'("firebrick1" "IndianRed1" "IndianRed3" "IndianRed4")
"*List of colors for the highlighted parentheses.
The list starts with the the inside parentheses and moves outwards."
:type '(repeat color)
:set 'hl-paren-set
:group 'highlight-parentheses)
(defcustom hl-paren-background-colors nil
"*List of colors for the background highlighted parentheses.
The list starts with the the inside parentheses and moves outwards."
:type '(repeat color)
:set 'hl-paren-set
:group 'highlight-parentheses)
(defface hl-paren-face nil
"*Face used for highlighting parentheses.
Color attributes might be overriden by `hl-paren-colors' and
`hl-paren-background-colors'."
:group 'highlight-parentheses)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar hl-paren-overlays nil
"This buffers currently active overlays.")
(make-variable-buffer-local 'hl-paren-overlays)
(defvar hl-paren-last-point 0
"The last point for which parentheses were highlighted.
This is used to prevent analyzing the same context over and over.")
(make-variable-buffer-local 'hl-paren-last-point)
(defun hl-paren-highlight ()
"Highlight the parentheses around point."
(unless (= (point) hl-paren-last-point)
(setq hl-paren-last-point (point))
(let ((overlays hl-paren-overlays)
pos1 pos2
(pos (point)))
(save-excursion
(condition-case err
(while (and (setq pos1 (cadr (syntax-ppss pos1)))
(cddr overlays))
(move-overlay (pop overlays) pos1 (1+ pos1))
(when (setq pos2 (scan-sexps pos1 1))
(move-overlay (pop overlays) (1- pos2) pos2)
))
(error nil))
(goto-char pos))
(dolist (ov overlays)
(move-overlay ov 1 1)))))
;;;###autoload
(define-minor-mode highlight-parentheses-mode
"Minor mode to highlight the surrounding parentheses."
nil " hl-p" nil
(if highlight-parentheses-mode
(progn
(hl-paren-create-overlays)
(add-hook 'post-command-hook 'hl-paren-highlight nil t))
(mapc 'delete-overlay hl-paren-overlays)
(kill-local-variable 'hl-paren-overlays)
(kill-local-variable 'hl-paren-point)
(remove-hook 'post-command-hook 'hl-paren-highlight t)))
;;; overlays ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun hl-paren-create-overlays ()
(let ((fg hl-paren-colors)
(bg hl-paren-background-colors)
attributes)
(while (or fg bg)
(setq attributes (face-attr-construct 'hl-paren-face))
(when (car fg)
(setq attributes (plist-put attributes :foreground (car fg))))
(pop fg)
(when (car bg)
(setq attributes (plist-put attributes :background (car bg))))
(pop bg)
(dotimes (i 2) ;; front and back
(push (make-overlay 0 0) hl-paren-overlays)
(overlay-put (car hl-paren-overlays) 'face attributes)))
(setq hl-paren-overlays (nreverse hl-paren-overlays))))
(defun hl-paren-color-update ()
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(when hl-paren-overlays
(mapc 'delete-overlay hl-paren-overlays)
(setq hl-paren-overlays nil)
(hl-paren-create-overlays)
(let ((hl-paren-last-point -1)) ;; force update
(hl-paren-highlight))))))
(provide 'highlight-parentheses)
;;; highlight-parentheses.el ends here

View file

@ -1,118 +0,0 @@
;; IR_Black Color Theme for Emacs.
;;
;; David Zhou
;;
;; The IR_Black theme is originally from:
;;
;; http://blog.infinitered.com/entries/show/8
;;
(require 'color-theme)
;; White #EEEEEE #FFFFFF
;; Black #4E4E4E #7C7C7C ? / dim gray
;; Blue #96CBFE #FFFFCB slate blue
;; Green #A8FF60 #CEFFAB DarkOliveGreen2
;; Cyan #C6C5FE #DFDFFE steel blue
;; Red #FF6C60 #FFB6B0
;; Magenta #FF73FD #FF9CFE
;; Yellow #FFFFB6 #FFFFCB pale goldenrod
(defun color-theme-irblack ()
"IR_black theme taken from Vim"
(interactive)
(color-theme-install
'(color-theme-irblack
((background-color . "black")
(background-mode . dark)
(border-color . "gray10")
(cursor-color . "DarkOliveGreen2")
(foreground-color . "#F6F3E8")
(mouse-color . "DarkOliveGreen2"))
(default ((t (:foreground "#F6F3E8"))))
(vertical-border ((t (:background "gray20"))))
(blue ((t (:foreground "blue"))))
(border-glyph ((t (nil))))
(buffers-tab ((t (:background "#141414" :foreground "#cacaca"))))
(font-lock-comment-face ((t (:foreground "dim gray"))))
(font-lock-constant-face ((t (:foreground "light green"))))
(font-lock-doc-string-face ((t (:foreground "DarkOliveGreen2"))))
(font-lock-function-name-face ((t (:foreground "burlywood"))))
(font-lock-builtin-face ((t (:foreground "slate blue"))))
(font-lock-keyword-face ((t (:foreground "slate blue"))))
(font-lock-preprocessor-face ((t (:foreground "slate blue"))))
(font-lock-reference-face ((t (:foreground "steel blue"))))
(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062"))))
(font-lock-regexp-grouping-construct ((t (:foreground "red"))))
(linum ((t (:background "black" :foreground "dim gray"))))
(minibuffer-prompt ((t (:foreground "#888888"))))
(ido-subdir ((t (:foreground "#CF6A4C"))))
(ido-first-match ((t (:foreground "#8F9D6A"))))
(ido-only-match ((t (:foreground "#8F9D6A"))))
(font-lock-string-face ((t (:foreground "DarkOliveGreen2"))))
(font-lock-type-face ((t (:foreground "pale goldenrod"))))
(font-lock-variable-name-face ((t (:foreground "steel blue"))))
(font-lock-warning-face ((t (:background "#CC1503" :foreground "#FFFFFF"))))
(gui-element ((t (:background "#D4D0C8" :foreground "black"))))
(fringe ((t (:background "grey10"))))
(region ((t (:background "dark red"))))
(mode-line ((t (:background "dim gray" :foreground "dark gray"))))
(mode-line-buffer-id ((t (:bold t :background "dim gray" : foreground "dark gray" :weight bold))))
(highlight ((t (:background "#111111"))))
(highline-face ((t (:background "SeaGreen"))))
(left-margin ((t (nil))))
(text-cursor ((t (:background "yellow" :foreground "black"))))
(toolbar ((t (nil))))
(show-paren-mismatch ((t (:background "#FF1100"))))
(underline ((nil (:underline nil))))
;; whitespace
(trailing-whitespace ((t (:background "gray22"))))
;; mumamo
;(mumamo-background-chunk-major ((t (:background "#000000"))))
;(mumamo-background-chunk-submode ((t (:background "#222222"))))
;(mumamo-background-chunk-submode1 ((t (:background "#0A0A0A"))))
;(mumamo-background-chunk-submode2 ((t (:background "#0A0A0A"))))
;(mumamo-background-chunk-submode3 ((t (:background "#0A0A0A"))))
;(mumamo-background-chunk-submode4 ((t (:background "#0A0A0A"))))
;; diff-mode
(diff-added ((t (:background "#253B22" :foreground "#F8F8F8"))))
(diff-removed ((t (:background "#420E09" :foreground "#F8F8F8"))))
(diff-content ((t nil)))
(diff-header ((t (:background "#0E2231" :foreground "#F8F8F8"))))
;; nxml
;(nxml-delimiter ((t (:foreground "#96CBFE"))))
;(nxml-name ((t (:foreground "#96CBFE"))))
;(nxml-element-local-name ((t (:foreground "#96CBFE"))))
;(nxml-attribute-local-name ((t (:foreground "#FFD7B1"))))
;; erc
;(erc-default-face ((t (nil))))
;(erc-direct-msg-face ((t (:foreground "#007998"))))
;(erc-input-face ((t (:foreground "#feffff"))))
;(erc-bold-face ((t (:bold t :weight bold))))
;(erc-inverse-face ((t (:background "Black" :foreground "White"))))
;(erc-underline-face ((t (:underline t))))
;(erc-prompt-face ((t (:foreground "#c3c6c8"))))
;(erc-notice-face ((t (:foreground "#7c7c7c"))))
;(erc-action-face ((t (:bold t :weight bold))))
;(erc-error-face ((t (:foreground "#007998"))))
;(erc-timestamp-face ((t (:foreground "#7c7c7c"))))
;(erc-nick-default-face ((t (:foreground "#feffff"))))
;(erc-nick-msg-face ((t (:bold t :foreground "#007998" :weight bold))))
;; erc-dangerous-host-face
;; erc-keyword-face
(erc-current-nick-face ((t (:foreground "#007998"))))
;; (erc-command-indicator-face ((t (:bold t :weight bold))))
;; (erc-header-line ((t (:background "grey90" :foreground "grey20"))))
;; (erc-my-nick-face ((t (:bold t :foreground "brown" :weight bold))))
)))
(provide 'irblack)

View file

@ -1,38 +0,0 @@
;;; parenface.el --- Provide a face for parens in lisp modes.
;; By Dave Pearson <davep@davep.org>
;; $Revision: 1.1 $
;; Add a paren-face to emacs and add support for it to the various lisp modes.
;;
;; Based on some code that Boris Schaefer <boris@uncommon-sense.net> posted
;; to comp.lang.scheme in message <87hf8g9nw5.fsf@qiwi.uncommon-sense.net>.
(defvar paren-face 'paren-face)
(defface paren-face
'((((class color))
(:foreground "DimGray")))
"Face for displaying a paren."
:group 'faces)
(defmacro paren-face-add-support (keywords)
"Generate a lambda expression for use in a hook."
`(lambda ()
(let* ((regexp "(\\|)")
(match (assoc regexp ,keywords)))
(unless (eq (cdr match) paren-face)
(setq ,keywords (append (list (cons regexp paren-face)) ,keywords))))))
;; Keep the compiler quiet.
(eval-when-compile
(defvar scheme-font-lock-keywords-2 nil)
(defvar lisp-font-lock-keywords-2 nil))
(add-hook 'scheme-mode-hook (paren-face-add-support scheme-font-lock-keywords-2))
(add-hook 'lisp-mode-hook (paren-face-add-support lisp-font-lock-keywords-2))
(add-hook 'emacs-lisp-mode-hook (paren-face-add-support lisp-font-lock-keywords-2))
(add-hook 'lisp-interaction-mode-hook (paren-face-add-support lisp-font-lock-keywords-2))
(provide 'parenface)
;; parenface.el ends here

View file

@ -1,22 +0,0 @@
(eval-when-compile
(require 'color-theme))
(defun color-theme-example ()
"Example theme. Carbon copy of color-theme-gnome contributed by Jonadab."
(interactive)
(color-theme-install
'(color-theme-example
((foreground-color . "wheat")
(background-color . "darkslategrey")
(background-mode . dark))
(default ((t (nil))))
(region ((t (:foreground "cyan" :background "dark cyan"))))
(underline ((t (:foreground "yellow" :underline t))))
(modeline ((t (:foreground "dark cyan" :background "wheat"))))
(modeline-buffer-id ((t (:foreground "dark cyan" :background "wheat"))))
(modeline-mousable ((t (:foreground "dark cyan" :background "wheat"))))
(modeline-mousable-minor-mode ((t (:foreground "dark cyan" :background "wheat"))))
(italic ((t (:foreground "dark red" :italic t))))
(bold-italic ((t (:foreground "dark red" :bold t :italic t))))
(font-lock-comment-face ((t (:foreground "Firebrick"))))
(bold ((t (:bold)))))))

File diff suppressed because it is too large Load diff

View file

@ -1,378 +0,0 @@
;; (require 'cl)
(mapc (lambda (x) (add-to-list 'load-path (expand-file-name x)))
'("~/.emacs.d"
))
(defun require-all (packages)
(mapcar #'require packages))
(require-all '(
color-theme
irblack
parenface
bar-cursor
tls
erc
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GLOBAL
(color-theme-initialize)
;; (if window-system
;; (set-background-color "black")
;; ())
(color-theme-irblack)
;(if window-system
; (color-theme-gentooish)
; (color-theme-dark-laptop))
;(load-file "~/.emacs.d/color-theme-twilight.el")
;(color-theme-twilight)
;(load-file "~/.emacs.d/color-theme-inkpot.el")
;(color-theme-inkpot)
;; OS X settings
;; (setq mac-option-key-is-meta nil)
;; (setq mac-command-key-is-meta t)
;; (setq mac-command-modifier 'meta)
;; (setq mac-option-modifier nil)
(bar-cursor-mode 1)
(menu-bar-mode 0)
(scroll-bar-mode -1)
(tool-bar-mode 0)
(setq linum-format "%3d ")
(setq-default indent-tabs-mode nil)
(setq indent-tabs-mode nil)
(setq make-backup-files nil)
(set-language-environment "UTF-8")
(set-input-method "japanese-ascii") ; C-x C-m C-\
(winner-mode t)
;;(display-battery-mode t) ;; broken on 10.9.2
(setq display-time-24hr-format t)
(display-time-mode t)
(line-number-mode 1)
(column-number-mode 1)
(tooltip-mode nil)
(setq midnight-mode t)
(setq column-number-mode nil)
(setq size-indication-mode nil)
(setq mode-line-position nil)
(mouse-avoidance-mode 'animate)
(ido-mode t)
;; Ido and uniquify options from http://curiousprogrammer.wordpress.com/2009/07/13/my-emacs-defaults/
(setq ido-enable-flex-matching t)
(setq ido-create-new-buffer 'always)
(setq uniquify-buffer-name-style 'reverse)
(setq uniquify-separator "|")
(setq uniquify-after-kill-buffer-p t)
(setq uniquify-ignore-buffers-re "^\\*")
(global-set-key "\C-m" 'reindent-then-newline-and-indent) ;No tabs
(global-set-key "\C-a" 'beginning-of-line-text)
(defun indent-or-expand (arg)
"Either indent according to mode, or expand the word preceding
point."
(interactive "*P")
(if (and
(or (bobp) (= ?w (char-syntax (char-before))))
(or (eobp) (not (= ?w (char-syntax (char-after))))))
(dabbrev-expand arg)
(indent-according-to-mode)))
(global-set-key [C-tab] 'indent-according-to-mode)
(autoload 'copy-from-above-command "misc"
"Copy characters from previous nonblank line, starting just above point.
\(fn &optional arg)"
'interactive)
(global-set-key [up] 'copy-from-above-command)
(global-set-key [down] (lambda ()
(interactive)
(forward-line 1)
(open-line 1)
(copy-from-above-command)))
(global-set-key [right] (lambda ()
(interactive)
(copy-from-above-command 1)))
(global-set-key [left] (lambda ()
(interactive)
(copy-from-above-command -1)
(forward-char -1)
(delete-char -1)))
;; Proxy for ssh tunnel + privoxy
;; (setq url-proxy-services '(("no_proxy" . "localhost")
;; ("http" . "localhost:8118")))
(setq save-place-file "~/.emacs.d/saveplace") ;; keep my ~/ clean
(setq-default save-place t) ;; activate it for all buffers
(require 'saveplace) ;; Need to require after setq
(setq backup-directory-alist
`((".*" . "~/.emacs.d/backups/")))
(setq auto-save-file-name-transforms
`((".*" "~/.emacs.d/backups/" t)))
;; Enable ergoemacs layout
;; (setenv "ERGOEMACS_KEYBOARD_LAYOUT" "dv") ; US Dvorak layout
;; (load "~/.emacs.d/ergoemacs-keybindings-5.1/ergoemacs-mode")
;; (ergoemacs-mode 1)
;; Highlight bad whitespace
(global-whitespace-mode t)
(setq whitespace-style (quote (tabs tab-mark)))
(setq-default show-trailing-whitespace t)
;; Make % work like vi
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
"Go to the matching paren if on a paren; otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(t (self-insert-command (or arg 1)))))
;; Prevent Emacs from stupidly auto-changing my working directory
;; (defun find-file-save-default-directory ()
;; (interactive)
;; (setq saved-default-directory default-directory)
;; (ido-find-file)
;; (setq default-directory saved-default-directory))
;; (global-set-key "\C-x\C-f" 'find-file-save-default-directory)
;; Enable mit-scheme
(setq scheme-program-name
"/opt/boxen/homebrew/bin/mit-scheme")
(require 'xscheme)
;; Give killing lines advice
(defadvice kill-ring-save (before slick-copy activate compile)
"When called interactively with no active region, copy a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(message "Copied line")
(list (line-beginning-position)
(line-beginning-position 2)))))
(defadvice kill-region (before slick-cut activate compile)
"When called interactively with no active region, kill a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(list (line-beginning-position)
(line-beginning-position 2)))))
;; Tip of the day!
(defun totd ()
(interactive)
(random t) ;; seed with time-of-day
(with-output-to-temp-buffer "*Tip of the day*"
(let* ((commands (loop for s being the symbols
when (commandp s) collect s))
(command (nth (random (length commands)) commands)))
(princ
(concat "Your tip for the day is:\n"
"========================\n\n"
(describe-function command)
"\n\nInvoke with:\n\n"
(with-temp-buffer
(where-is command t)
(buffer-string)))))))
;; Set my location sunrise-sunset
(setq calendar-latitude 45.4)
(setq calendar-longitude -122.6)
(setq calendar-location-name "Portland, OR")
;; (setq calendar-latitude 17.5)
;; (setq calendar-longitude 78.5)
;; (setq calendar-location-name "Hyderabad, India")
;; Start the server for emacsclient
;(server-start)
;; Custom key maps
(defun set-keys (commands)
(mapcar (lambda (x)
(global-set-key (read-kbd-macro (first x)) (second x)))
commands))
(set-keys '(
("C-c t" totd)
("C-c n" global-linum-mode)
("C-c s p" (lambda () (interactive)
(if (shellfm-running-p)
(shellfm-pause)
((shellfm 1) (shellfm-station-recommended 1)))))
("C-c s n" shellfm-skip-track)
("C-c s r" shellfm-station-recommended)
("C-c s s" shellfm-station-artist)
("C-c s m" shellfm-station-playlist)
("C-c s l" shellfm-love-track)
("C-c s a" shellfm-add-to-playlist)
("C-c s q" shellfm 0)
("C-c s i" shellfm-track-info)
("C-c e" ido-erc-buffer)
("C-S-<left>" shrink-window-horizontally)
("C-S-<right>" enlarge-window-horizontally)
("C-S-<down>" shrink-window)
("C-S-<up>" enlarge-window)
("M-s" save-buffer)
("M-p" ctrl-y-in-vi)
("M-n" ctrl-e-in-vi)
("M-N" make-frame)
("M-W" delete-frame)
("M-w" ido-kill-buffer)
("M-1" delete-other-windows)
("M-!" delete-window)
("M-2" split-window-horizontally)
("M-@" split-window-vertically)
("M-a" beginning-of-line)
("M-o" other-window)
("M-O" other-window)
("M-`" next-window)
("M-~" previous-window)
("M-RET" toggle-fullscreen)
))
;;toggle full-screen
(defun toggle-fullscreen ()
(interactive)
(set-frame-parameter
nil
'fullscreen
(if (frame-parameter nil 'fullscreen)
nil
'fullboth)))
;; (global-set-key [(meta return)] 'toggle-fullscreen)
;; Transparency
(set-frame-parameter (selected-frame) 'alpha '(85 85))
(add-to-list 'default-frame-alist '(alpha 85 85))
;; (set-frame-font "Droid Sans Mono Dotted-12")
(eval-when-compile (require 'cl))
(defun toggle-transparency ()
(interactive)
(if (/=
(cadr (find 'alpha (frame-parameters nil) :key #'car))
40)
(set-frame-parameter nil 'alpha '(40 40))
(set-frame-parameter nil 'alpha '(85 85))))
(global-set-key (kbd "C-c T") 'toggle-transparency)
;; Vim-like scrolling
(defun ctrl-e-in-vi (n)
(interactive "p")
(scroll-up n))
(defun ctrl-y-in-vi (n)
(interactive "p")
(scroll-down n))
;; (global-set-key (kbd "<XF86AudioPlay>")
;; (lambda () (interactive)
;; (if (shellfm-running-p)
;; (shellfm-skip-track)
;; (shellfm 1))))
;; ERC stuff
;; (setq erc-encoding-coding-alist (quote (("#lisp" . utf-8)
;; ("#nihongo" . iso-2022-jp)
;; ("#" . iso-latin-1)
;; ("#" . iso-latin-1))))
;; (autoload 'erc "erc")
;; (add-hook 'erc-mode-hook
;; '(lambda ()
;; (setq scroll-margin 0)
;; (setq erc-scrolltobottom-mode 1)))
;; (load "~/.emacs.d/erc-bip") ;; Passwords here
;; (defun ido-erc-buffer()
;; (interactive)
;; (switch-to-buffer
;; (ido-completing-read "Channel:"
;; (save-excursion
;; (delq
;; nil
;; (mapcar (lambda (buf)
;; (when (buffer-live-p buf)
;; (with-current-buffer buf
;; (and (eq major-mode 'erc-mode)
;; (buffer-name buf)))))
;; (buffer-list)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Haskell mode
;;
(load "~/.emacs.d/haskell-mode/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Generic Lisp / Emacs Lisp
;; from http://www.emacswiki.org/emacs/AutoIndentation
(defadvice yank (after indent-region activate)
(if (member major-mode '(clojure-mode emacs-lisp-mode lisp-mode))
(let ((mark-even-if-inactive t))
(indent-region (region-beginning) (region-end) nil))))
(defun tab-fix ()
(local-set-key [tab] 'indent-or-expand))
(defun slime-tab-fix ()
(local-set-key [tab] 'slime-complete-symbol))
(add-hook 'emacs-lisp-mode-hook 'tab-fix)
(add-hook 'lisp-mode-hook 'slime-tab-fix)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Translation
(autoload 'babel "babel"
"Use a web translation service to translate the message MSG." t)
(autoload 'babel-region "babel"
"Use a web translation service to translate the current region." t)
(autoload 'babel-as-string "babel"
"Use a web translation service to translate MSG, returning a string." t)
(autoload 'babel-buffer "babel"
"Use a web translation service to translate the current buffer." t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Custom
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode nil)
'(case-fold-search t)
'(comint-scroll-to-bottom-on-input t)
'(fancy-splash-image "")
;; '(frame-background-mode (quote dark))
'(ido-decorations (quote ("" "" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))
'(ido-everywhere t)
'(inhibit-startup-screen t)
'(lisp-loop-forms-indentation 6)
'(lisp-loop-keyword-indentation 6)
'(lisp-simple-loop-indentation 6)
'(mode-line-format (quote ("%e--[" mode-line-buffer-identification "]" (vc-mode vc-mode) " " mode-line-modes " " global-mode-string " %-")))
'(mode-line-in-non-selected-windows t)
'(mode-line-modes (quote ("%[" "(" (:propertize ("" mode-name)) ("" mode-line-process) (:propertize ("" minor-mode-alist)) "%n" ")" "%]")))
'(mumamo-background-colors nil)
'(require-final-newline t)
'(savehist-mode t nil (savehist))
'(scroll-conservatively 100000)
'(scroll-down-aggressively 0.0)
'(scroll-margin 4)
'(scroll-step 1)
'(scroll-up-aggressively 0.0)
'(show-paren-mode t nil (paren)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(mumamo-border-face-in ((t nil)))
'(mumamo-border-face-out ((t nil))))

1
.gemrc
View file

@ -1 +0,0 @@
gem: --no-ri --no-rdoc --no-document

View file

@ -1,32 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIFizCCA3OgAwIBAgIJAK9zyLTPn4CPMA0GCSqGSIb3DQEBBQUAMFwxCzAJBgNV
BAYTAk5PMQ0wCwYDVQQIDARPc2xvMR4wHAYDVQQKDBVza3Mta2V5c2VydmVycy5u
ZXQgQ0ExHjAcBgNVBAMMFXNrcy1rZXlzZXJ2ZXJzLm5ldCBDQTAeFw0xMjEwMDkw
MDMzMzdaFw0yMjEwMDcwMDMzMzdaMFwxCzAJBgNVBAYTAk5PMQ0wCwYDVQQIDARP
c2xvMR4wHAYDVQQKDBVza3Mta2V5c2VydmVycy5uZXQgQ0ExHjAcBgNVBAMMFXNr
cy1rZXlzZXJ2ZXJzLm5ldCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
ggIBANdsWy4PXWNUCkS3L//nrd0GqN3dVwoBGZ6w94Tw2jPDPifegwxQozFXkG6I
6A4TK1CJLXPvfz0UP0aBYyPmTNadDinaB9T4jIwd4rnxl+59GiEmqkN3IfPsv5Jj
MkKUmJnvOT0DEVlEaO1UZIwx5WpfprB3mR81/qm4XkAgmYrmgnLXd/pJDAMk7y1F
45b5zWofiD5l677lplcIPRbFhpJ6kDTODXh/XEdtF71EAeaOdEGOvyGDmCO0GWqS
FDkMMPTlieLA/0rgFTcz4xwUYj/cD5e0ZBuSkYsYFAU3hd1cGfBue0cPZaQH2HYx
Qk4zXD8S3F4690fRhr+tki5gyG6JDR67aKp3BIGLqm7f45WkX1hYp+YXywmEziM4
aSbGYhx8hoFGfq9UcfPEvp2aoc8u5sdqjDslhyUzM1v3m3ZGbhwEOnVjljY6JJLx
MxagxnZZSAY424ZZ3t71E/Mn27dm2w+xFRuoy8JEjv1d+BT3eChM5KaNwrj0IO/y
u8kFIgWYA1vZ/15qMT+tyJTfyrNVV/7Df7TNeWyNqjJ5rBmt0M6NpHG7CrUSkBy9
p8JhimgjP5r0FlEkgg+lyD+V79H98gQfVgP3pbJICz0SpBQf2F/2tyS4rLm+49rP
fcOajiXEuyhpcmzgusAj/1FjrtlynH1r9mnNaX4e+rLWzvU5AgMBAAGjUDBOMB0G
A1UdDgQWBBTkwyoJFGfYTVISTpM8E+igjdq28zAfBgNVHSMEGDAWgBTkwyoJFGfY
TVISTpM8E+igjdq28zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4ICAQAR
OXnYwu3g1ZjHyley3fZI5aLPsaE17cOImVTehC8DcIphm2HOMR/hYTTL+V0G4P+u
gH+6xeRLKSHMHZTtSBIa6GDL03434y9CBuwGvAFCMU2GV8w92/Z7apkAhdLToZA/
X/iWP2jeaVJhxgEcH8uPrnSlqoPBcKC9PrgUzQYfSZJkLmB+3jEa3HKruy1abJP5
gAdQvwvcPpvYRnIzUc9fZODsVmlHVFBCl2dlu/iHh2h4GmL4Da2rRkUMlbVTdioB
UYIvMycdOkpH5wJftzw7cpjsudGas0PARDXCFfGyKhwBRFY7Xp7lbjtU5Rz0Gc04
lPrhDf0pFE98Aw4jJRpFeWMjpXUEaG1cq7D641RpgcMfPFvOHY47rvDTS7XJOaUT
BwRjmDt896s6vMDcaG/uXJbQjuzmmx3W2Idyh3s5SI0GTHb0IwMKYb4eBUIpQOnB
cE77VnCYqKvN1NVYAqhWjXbY7XasZvszCRcOG+W3FqNaHOK/n/0ueb0uijdLan+U
f4p1bjbAox8eAOQS/8a3bzkJzdyBNUKGx1BIK2IBL9bn/HravSDOiNRSnZ/R3l9G
ZauX0tu7IIDlRCILXSyeazu0aj/vdT3YFQXPcvt5Fkf5wiNTo53f72/jYEJd6qph
WrpoKqrwGwTpRUCMhYIUt65hsTxCiJJ5nKe39h46sg==
-----END CERTIFICATE-----

View file

@ -1,5 +0,0 @@
if has("gui_macvim")
set transp=2
set fuoptions=maxvert,maxhorz
nmap <silent> <D-F> :set invfullscreen<CR>
endif

View file

@ -1,59 +0,0 @@
hs.grid.GRIDHEIGHT = 2
hs.grid.GRIDWIDTH = 2
hs.grid.MARGINX = 0
hs.grid.MARGINY = 0
k = hs.hotkey.modal.new({"cmd","shift"}, "space")
function k:entered() hs.alert.show('') end
function k:exited() hs.alert.show('') end
local top = {x=0,y=0,w=2,h=1}
local bottom = {x=0,y=1,w=2,h=1}
local left = {x=0,y=0,w=1,h=2}
local right = {x=1,y=0,w=1,h=2}
local topleft = {x=0,y=0,w=1,h=1}
local topright = {x=1,y=0,w=1,h=1}
local bottomleft = {x=0,y=1,w=1,h=1}
local bottomright = {x=1,y=1,w=1,h=1}
local full = {x=0,y=0,w=2,h=2}
local first = hs.screen.allScreens()[3]
local second = hs.screen.allScreens()[2]
local third = hs.screen.allScreens()[1]
function sendTo(area)
local win = hs.window.focusedWindow()
local screen = win:screen()
hs.grid.set(win,area,screen)
end
function selectWindow()
hs.hints.windowHints()
end
function moveToScreen(screen)
local win = hs.window.focusedWindow()
win:moveToScreen(screen)
end
k:bind({}, 'escape', function() k:exit() end)
k:bind({}, 'h', function() sendTo(left) end)
k:bind({}, 'j', function() sendTo(bottom) end)
k:bind({}, 'k', function() sendTo(top) end)
k:bind({}, 'l', function() sendTo(right) end)
k:bind({}, 'y', function() sendTo(topleft) end)
k:bind({}, 'u', function() sendTo(topright) end)
k:bind({}, 'b', function() sendTo(bottomleft) end)
k:bind({}, 'n', function() sendTo(bottomright) end)
k:bind({}, 'f', function() sendTo(full) end)
hs.hotkey.bind({"cmd","ctrl"}, 'f', function() selectWindow() end)
k:bind({"shift"}, 'a', function() moveToScreen(first) end)
k:bind({"shift"}, 'o', function() moveToScreen(second) end)
k:bind({"shift"}, 'e', function() moveToScreen(third) end)
function reload_config(files)
hs.reload()
end
hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", reload_config):start()
hs.alert.show("Config loaded")

4
.irbrc
View file

@ -1,4 +0,0 @@
require 'rubygems'
require 'interactive_editor'
require 'utility_belt'

166
.khdrc
View file

@ -1,166 +0,0 @@
# sample config for khd
# set border color for different modes
khd mode default on_enter chunkc border::color 0xddbdd322
khd mode switcher on_enter chunkc border::color 0xddd5c4a1
khd mode ytd on_enter chunkc border::color 0xddd75f5f
khd mode swap on_enter chunkc border::color 0xdd458588
khd mode tree on_enter chunkc border::color 0xddfabd2f
khd mode space on_enter chunkc border::color 0xddb16286
khd mode info on_enter chunkc border::color 0xddcd950c
# 0x2A is \
# toggle between modes
ctrl - 0x2A : khd -e "mode activate switcher"
switcher + ctrl - 0x2A : khd -e "mode activate default"
ytd + ctrl - 0x2A : khd -e "mode activate default"
swap + ctrl - 0x2A : khd -e "mode activate default"
space + ctrl - 0x2A : khd -e "mode activate default"
tree + ctrl - 0x2A : khd -e "mode activate default"
info + ctrl - 0x2A : khd -e "mode activate default"
switcher - y : khd -e "mode activate ytd"
switcher - m : khd -e "mode activate swap"
switcher - s : khd -e "mode activate space"
switcher - t : khd -e "mode activate tree"
switcher - i : khd -e "mode activate info"
# switcher mode
switcher - r : khd -e "reload" # reload config
#switcher - return : open -na /Applications/Hyper.app;\
# khd -e "mode activate default"
cmd - return : osascript /Users/hunner/local/bin/terminal.scpt
#cmd - return : osascript /Users/hunner/local/bin/iterm_window.scpt
cmd + ctrl + alt - 9 : osascript /Users/hunner/local/bin/grayscale.scpt
cmd + alt - h : chunkc tiling::window --focus west
cmd + alt - j : chunkc tiling::window --focus south
cmd + alt - k : chunkc tiling::window --focus north
cmd + alt - l : chunkc tiling::window --focus east
ctrl + shift - 1 : chunkc tiling::window --send-to-desktop 1
ctrl + shift - 2 : chunkc tiling::window --send-to-desktop 2
ctrl + shift - 3 : chunkc tiling::window --send-to-desktop 3
ctrl + shift - 4 : chunkc tiling::window --send-to-desktop 4
ctrl + shift - 5 : chunkc tiling::window --send-to-desktop 5
ctrl + shift - 6 : chunkc tiling::window --send-to-desktop 6
ctrl + shift - 7 : chunkc tiling::window --send-to-desktop 7
ctrl + shift - 8 : chunkc tiling::window --send-to-desktop 8
ctrl + shift - 9 : chunkc tiling::window --send-to-desktop 9
ctrl + shift - 0 : chunkc tiling::window --send-to-desktop 10
ctrl + shift + alt - 1 : chunkc tiling::window --send-to-desktop 11
ctrl + shift + alt - 2 : chunkc tiling::window --send-to-desktop 12
ctrl + shift + alt - 3 : chunkc tiling::window --send-to-desktop 13
ctrl + shift + alt - 4 : chunkc tiling::window --send-to-desktop 14
ctrl + shift + alt - 5 : chunkc tiling::window --send-to-desktop 15
ctrl + shift + alt - 6 : chunkc tiling::window --send-to-desktop 16
# Focus display
switcher - 1 : chunkc tiling::monitor -f 1 ; khd -e "mode activate default"
switcher - 2 : chunkc tiling::monitor -f 2 ; khd -e "mode activate default"
switcher - 3 : chunkc tiling::monitor -f 3 ; khd -e "mode activate default"
# Move window to display
swap + shift - 1 : chunkc tiling::window --send-to-monitor 1 ; khd -e "mode activate default"
swap + shift - 2 : chunkc tiling::window --send-to-monitor 2 ; khd -e "mode activate default"
swap + shift - 3 : chunkc tiling::window --send-to-monitor 3 ; khd -e "mode activate default"
## ytd mode
#ytd - x : ytc play;\
# khd -e "mode activate default"
#
#ytd - s : ytc mkfav;\
# khd -e "mode activate default"
#
## 0x32 == <
#ytd - 0x32 : ytc fav
#ytd - z : ytc prev
#ytd - c : ytc next
#ytd - v : ytc stop
#ytd - a : ytc volup
#ytd - d : ytc voldown
#ytd - right : ytc seekfw
#ytd - left : ytc seekbk
# Swap windows around
swap - h : chunkc tiling::window --swap west
swap - j : chunkc tiling::window --swap south
swap - k : chunkc tiling::window --swap north
swap - l : chunkc tiling::window --swap east
# Move windows around
swap + shift - h : chunkc tiling::window --warp west
swap + shift - j : chunkc tiling::window --warp south
swap + shift - k : chunkc tiling::window --warp north
swap + shift - l : chunkc tiling::window --warp east
# toggle window float
swap - t : chunkc tiling::window --toggle float
# toggle window native fullscreen
swap - f : chunkc tiling::window --toggle native-fullscreen
# toggle sticky, float and resize to picture-in-picture size
swap - s : chunkc tiling::window --toggle sticky;\
chunkc tiling::window --warp-floating pip-right
# Change space mode
space - a : chunkc tiling::desktop --layout bsp
space - s : chunkc tiling::desktop --layout monocle
space - d : chunkc tiling::desktop --layout float
# Change padding
space - p : chunkc tiling::desktop --padding inc
space + shift - p : chunkc tiling::desktop --padding dec
# Change gap
space - g : chunkc tiling::desktop --gap inc
space + shift - g : chunkc tiling::desktop --gap dec
space + shift - x : kwmc space -g decrease horizontal
space + shift - y : kwmc space -g decrease vertical
# Increase window padding
space - h : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge west
space - j : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge south
space - k : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge south
space - l : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge south
# Decrease window padding
space + shift - h : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge west
space + shift - j : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge south
space + shift - k : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge south
space + shift - l : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge south
# tree mode
tree - f : chunkc tiling::window -z fullscreen
tree - d : chunkc tiling::window -z parent
tree - w : chunkc tiling::window -t focused
tree - r : chunkc tree rotate 90
tree - s : kwmc window -c split - mode toggle;\
khd -e "mode activate default"
tree - c : kwmc window -c type toggle;\
khd -e "mode activate default"
tree - h : kwmc window -c expand 0.05 west
tree - j : kwmc window -c expand 0.05 south
tree - k : kwmc window -c expand 0.05 north
tree - l : kwmc window -c expand 0.05 east
tree + shift - h : kwmc window -c reduce 0.05 west
tree + shift - j : kwmc window -c reduce 0.05 south
tree + shift - k : kwmc window -c reduce 0.05 north
tree + shift - l : kwmc window -c reduce 0.05 east
tree - p : kwmc tree -pseudo create
tree + shift - p : kwmc tree -pseudo destroy
tree - o : kwmc window -s prev
tree + shift - o : kwmc window -s next

View file

@ -1,156 +0,0 @@
/*
This is a sample config for Kwm
The following statements can be used to set Kwms internal directory structure.
This is the root folder for Kwms files, the only thing this actually
specifies is the location of the 'init' script which Kwm runs upon startup.
Defaults to $HOME/.kwm
kwm_home /path/to/.kwm
This is the root folder in which all files included using 'include' must reside.
Defaults to $HOME/.kwm
kwm_include /path/to/.kwm/include
This is the folder in which all bsp-layouts managed by 'tree load' and 'tree save'
is loaded from / saved to. Defaults to $HOME/.kwm/layouts
kwm_layouts /path/to/.kwm/layouts
Commands prefixed with 'kwmc' will call
local functions corresponding to the
kwmc syntax.
To run an external program or command,
use the prefix 'exec' followed by command.
e.g 'exec mvim' would open macvim
Read file and execute commands as
if they were written inside kwmrc.
include filename
e.g: window-rules in a separate file called 'rules'
include rules
*/
# Set default values for screen padding
kwmc config padding 30 10 10 10
# Set default values for container gaps
kwmc config gap 10 10
# Default tiling mode for Kwm (bsp | monocle | float)
kwmc config tiling monocle
# Automatically float windows that fail to resize
kwmc config float-non-resizable on
# Automatically resize the window to its container
kwmc config lock-to-container on
# Set focus-follows-mouse-mode to autoraise
kwmc config focus-follows-mouse on
/*
Focus-follows-mouse is temporarily disabled when
a floating window has focus
*/
kwmc config standby-on-float on
# Center window when made floating
kwmc config center-on-float on
/*
The mouse will automatically move to the center
of the focused window
*/
kwmc config mouse-follows-focus on
/*
Allows a window to be moved by dragging,
when a modifier key and left-click is held down.
Allows a window to be resized by dragging
when a modifier key and right-click is held down.
*/
kwmc config mouse-drag on
# The modifier keys to be held down to initiate mouse-drag
kwmc config mouse-drag mod shift+ctrl
# Allow window focus to wrap-around
kwmc config cycle-focus on
/*
Override default settings for space 1 on screen 0
kwmc config space 0 1 mode monocle
kwmc config space 0 1 padding 100 100 100 100
kwmc config space 0 1 gap 40 40
*/
/*
Override default settings for screen 1
kwmc config display 1 mode bsp
kwmc config display 1 padding 100 100 100 100
kwmc config display 1 gap 40 40
*/
# Set default container split-ratio
kwmc config split-ratio 0.5
# New splits become the left leaf-node
kwmc config spawn left
/*
Add custom tiling rules for applications that
does not get tiled by Kwm by default.
This is because some applications do not have the
AXWindowRole and AXStandardWindowSubRole
*/
kwmc rule owner="iTerm2" properties={role="AXDialog"}
// Emacs is special?
kwmc config add-role AXWindow Emacs
kwmc rule owner="Emacs" properties={role="AXStandardWindow"}
/*
The following commands create rules that
blacklists an application from Kwms tiling
kwmc rule owner="Steam" properties={float="true"}
kwmc rule owner="Photoshop" properties={float="true"}
kwmc rule owner="VOX" properties={float="true"}
*/
kwmc rule owner="Lightroom" properties={float="true"}
kwmc rule owner="Adobe Lightroom CC" properties={float="true"}
kwmc rule owner="Stickies" properties={float="true"}
kwmc rule owner="Steam" properties={float="true"}
kwmc rule owner="App Store" properties={float="true"}
kwmc rule owner="Finder" properties={role="AXDialog"}
kwmc rule owner="Finder" role="AXDialog" properties={float="true"}
kwmc rule owner="System Preferences" properties={float="true"}
kwmc rule owner="Arq" properties={float="true"}
kwmc rule owner="Hyper" properties={role="AXDialog"}
/*
The following command creates a rule that
captures an application to the given screen,
if the screen exists.
kwmc rule owner="iTunes" properties={display="1"}
*/
# Enable border for focused window
kwmc config border focused on
kwmc config border focused size 2
kwmc config border focused color 0xFFBDD322
kwmc config border focused radius 6
# Enable border for marked window
kwmc config border marked on
kwmc config border marked size 2
kwmc config border marked color 0xFFCC5577
kwmc config border marked radius 6

View file

@ -1,84 +0,0 @@
# Account information
set from="hunter@puppet.com"
set imap_user="hunter@puppet.com"
source '~/.muttpassword.sh|'
set realname="Hunter Haugen"
set folder="imaps://imap.gmail.com:993"
set spoolfile="+INBOX"
set postponed="+[Gmail]/Drafts"
# Cache message headers for quick retrieval
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
# ?
set imap_keepalive=280
# Sort like gmail sorts it: freshest-thread first
set sort=threads
set sort_aux=reverse-last-date-received
# Automatically poll subscribed mailboxes for new mail
set imap_check_subscribed=yes
# Display download progress every 5K
set net_inc=5
# Don't skip past end of message on <space>
set pager_stop=yes
# Don't copy sent mail; gmail does it
unset record
set copy=no
# Don't move mail out of inbox on delete; gmail does it
set move=no
# Pretty it up
# ----
# default list of header fields to weed out when displaying mail
# ignore them all and then unignore what you want to see
ignore *
unignore Date To From: Cc Subject X-Tts X-Label
unignore x-mailing-list: posted-to:
unignore x-mailer:
hdr_order Date To From: Cc Subject X-Tts X-Label
color normal default default
color header color148 default '^(Cc|Date|To|From|Subject):'
color header brightwhite default '^(X-Mailer|X-Label|X-Tts):'
color hdrdefault cyan default
color index white default ~N
color index brightwhite default ~O
color index magenta default ~F
color index brightblack default ~D
color tree magenta default
color quoted magenta default
color quoted1 white default
color quoted2 brightred default
color quoted3 brightmagenta default
#color body cyan default "((ftp|http|https)://|news:)[^ >)\"\t]+"
color body magenta default "[-a-z_0-9.+]+@[-a-z_0-9.]+\.[a-z]{2,3}"
color error color88 default
color indicator black color148
color signature brightblack default
color status color148 black
color tilde blue default
# Key bindings
bind pager h display-toggle-weed
bind pager J next-thread
bind pager K previous-thread
bind pager R group-reply
# Macros
macro index,pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro index ,cu "T.*\n;WN;WO^T.*\n" "catch up"
macro generic,pager ,sm ":source $HOME/.muttrc\r" "Resource .muttrc without restart"
# Gmail macros
macro index,pager y "<enter-command>unset trash\n<delete-message>" "Archive message"
macro index,pager gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index,pager ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
macro index,pager gs "<change-folder>=[Gmail]/Sent Mail<enter>" "Go to sent mail"
macro index,pager gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"

View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

@ -1,217 +0,0 @@
" Vim color file
" Name: inkpot.vim
" Maintainer: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
" Homepage: http://github.com/ciaranm/inkpot/
"
" This should work in the GUI, rxvt-unicode (88 colour mode) and xterm (256
" colour mode). It won't work in 8/16 colour terminals.
"
" To use a black background, :let g:inkpot_black_background = 1
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "inkpot"
" map a urxvt cube number to an xterm-256 cube number
fun! <SID>M(a)
return strpart("0135", a:a, 1) + 0
endfun
" map a urxvt colour to an xterm-256 colour
fun! <SID>X(a)
if &t_Co == 88
return a:a
else
if a:a == 8
return 237
elseif a:a < 16
return a:a
elseif a:a > 79
return 232 + (3 * (a:a - 80))
else
let l:b = a:a - 16
let l:x = l:b % 4
let l:y = (l:b / 4) % 4
let l:z = (l:b / 16)
return 16 + <SID>M(l:x) + (6 * <SID>M(l:y)) + (36 * <SID>M(l:z))
endif
endif
endfun
if ! exists("g:inkpot_black_background")
let g:inkpot_black_background = 0
endif
if has("gui_running")
if ! g:inkpot_black_background
hi Normal gui=NONE guifg=#cfbfad guibg=#1e1e27
else
hi Normal gui=NONE guifg=#cfbfad guibg=#000000
endif
hi CursorLine guibg=#2e2e37
hi CursorColumn guibg=#2e2e37
hi IncSearch gui=BOLD guifg=#303030 guibg=#cd8b60
hi Search gui=NONE guifg=#303030 guibg=#ad7b57
hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ce4e4e
hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ce8e4e
hi ModeMsg gui=BOLD guifg=#7e7eae guibg=NONE
hi MoreMsg gui=BOLD guifg=#7e7eae guibg=NONE
hi Question gui=BOLD guifg=#ffcd00 guibg=NONE
hi StatusLine gui=BOLD guifg=#b9b9b9 guibg=#3e3e5e
hi User1 gui=BOLD guifg=#00ff8b guibg=#3e3e5e
hi User2 gui=BOLD guifg=#7070a0 guibg=#3e3e5e
hi StatusLineNC gui=NONE guifg=#b9b9b9 guibg=#3e3e5e
hi VertSplit gui=NONE guifg=#b9b9b9 guibg=#3e3e5e
hi WildMenu gui=BOLD guifg=#eeeeee guibg=#6e6eaf
hi MBENormal guifg=#cfbfad guibg=#2e2e3f
hi MBEChanged guifg=#eeeeee guibg=#2e2e3f
hi MBEVisibleNormal guifg=#cfcfcd guibg=#4e4e8f
hi MBEVisibleChanged guifg=#eeeeee guibg=#4e4e8f
hi DiffText gui=NONE guifg=#ffffcd guibg=#4a2a4a
hi DiffChange gui=NONE guifg=#ffffcd guibg=#306b8f
hi DiffDelete gui=NONE guifg=#ffffcd guibg=#6d3030
hi DiffAdd gui=NONE guifg=#ffffcd guibg=#306d30
hi Cursor gui=NONE guifg=#404040 guibg=#8b8bff
hi lCursor gui=NONE guifg=#404040 guibg=#8fff8b
hi CursorIM gui=NONE guifg=#404040 guibg=#8b8bff
hi Folded gui=NONE guifg=#cfcfcd guibg=#4b208f
hi FoldColumn gui=NONE guifg=#8b8bcd guibg=#2e2e2e
hi Directory gui=NONE guifg=#00ff8b guibg=NONE
hi LineNr gui=NONE guifg=#8b8bcd guibg=#2e2e2e
hi NonText gui=BOLD guifg=#8b8bcd guibg=NONE
hi SpecialKey gui=BOLD guifg=#ab60ed guibg=NONE
hi Title gui=BOLD guifg=#af4f4b guibg=NONE
hi Visual gui=NONE guifg=#eeeeee guibg=#4e4e8f
hi Comment gui=NONE guifg=#cd8b00 guibg=NONE
hi Constant gui=NONE guifg=#ffcd8b guibg=NONE
hi String gui=NONE guifg=#ffcd8b guibg=#404040
hi Error gui=NONE guifg=#ffffff guibg=#6e2e2e
hi Identifier gui=NONE guifg=#ff8bff guibg=NONE
hi Ignore gui=NONE
hi Number gui=NONE guifg=#f0ad6d guibg=NONE
hi PreProc gui=NONE guifg=#409090 guibg=NONE
hi Special gui=NONE guifg=#c080d0 guibg=NONE
hi SpecialChar gui=NONE guifg=#c080d0 guibg=#404040
hi Statement gui=NONE guifg=#808bed guibg=NONE
hi Todo gui=BOLD guifg=#303030 guibg=#d0a060
hi Type gui=NONE guifg=#ff8bff guibg=NONE
hi Underlined gui=BOLD guifg=#df9f2d guibg=NONE
hi TaglistTagName gui=BOLD guifg=#808bed guibg=NONE
hi perlSpecialMatch gui=NONE guifg=#c080d0 guibg=#404040
hi perlSpecialString gui=NONE guifg=#c080d0 guibg=#404040
hi cSpecialCharacter gui=NONE guifg=#c080d0 guibg=#404040
hi cFormat gui=NONE guifg=#c080d0 guibg=#404040
hi doxygenBrief gui=NONE guifg=#fdab60 guibg=NONE
hi doxygenParam gui=NONE guifg=#fdd090 guibg=NONE
hi doxygenPrev gui=NONE guifg=#fdd090 guibg=NONE
hi doxygenSmallSpecial gui=NONE guifg=#fdd090 guibg=NONE
hi doxygenSpecial gui=NONE guifg=#fdd090 guibg=NONE
hi doxygenComment gui=NONE guifg=#ad7b20 guibg=NONE
hi doxygenSpecial gui=NONE guifg=#fdab60 guibg=NONE
hi doxygenSpecialMultilineDesc gui=NONE guifg=#ad600b guibg=NONE
hi doxygenSpecialOnelineDesc gui=NONE guifg=#ad600b guibg=NONE
if v:version >= 700
hi Pmenu gui=NONE guifg=#eeeeee guibg=#4e4e8f
hi PmenuSel gui=BOLD guifg=#eeeeee guibg=#2e2e3f
hi PmenuSbar gui=BOLD guifg=#eeeeee guibg=#6e6eaf
hi PmenuThumb gui=BOLD guifg=#eeeeee guibg=#6e6eaf
hi SpellBad gui=undercurl guisp=#cc6666
hi SpellRare gui=undercurl guisp=#cc66cc
hi SpellLocal gui=undercurl guisp=#cccc66
hi SpellCap gui=undercurl guisp=#66cccc
hi MatchParen gui=NONE guifg=#cfbfad guibg=#4e4e8f
endif
else
if ! g:inkpot_black_background
"exec "hi Normal cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(80)
else
exec "hi Normal cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(16)
endif
exec "hi IncSearch cterm=BOLD ctermfg=" . <SID>X(80) . " ctermbg=" . <SID>X(73)
exec "hi Search cterm=NONE ctermfg=" . <SID>X(80) . " ctermbg=" . <SID>X(52)
exec "hi ErrorMsg cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(48)
exec "hi WarningMsg cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(68)
exec "hi ModeMsg cterm=BOLD ctermfg=" . <SID>X(38) . " ctermbg=" . "NONE"
exec "hi MoreMsg cterm=BOLD ctermfg=" . <SID>X(38) . " ctermbg=" . "NONE"
exec "hi Question cterm=BOLD ctermfg=" . <SID>X(52) . " ctermbg=" . "NONE"
exec "hi StatusLine cterm=BOLD ctermfg=" . <SID>X(85) . " ctermbg=" . <SID>X(81)
exec "hi User1 cterm=BOLD ctermfg=" . <SID>X(28) . " ctermbg=" . <SID>X(81)
exec "hi User2 cterm=BOLD ctermfg=" . <SID>X(39) . " ctermbg=" . <SID>X(81)
exec "hi StatusLineNC cterm=NONE ctermfg=" . <SID>X(84) . " ctermbg=" . <SID>X(81)
exec "hi VertSplit cterm=NONE ctermfg=" . <SID>X(84) . " ctermbg=" . <SID>X(81)
exec "hi WildMenu cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(38)
exec "hi MBENormal ctermfg=" . <SID>X(85) . " ctermbg=" . <SID>X(81)
exec "hi MBEChanged ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(81)
exec "hi MBEVisibleNormal ctermfg=" . <SID>X(85) . " ctermbg=" . <SID>X(82)
exec "hi MBEVisibleChanged ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(82)
exec "hi DiffText cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(34)
exec "hi DiffChange cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(17)
exec "hi DiffDelete cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(32)
exec "hi DiffAdd cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(20)
exec "hi Folded cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(35)
exec "hi FoldColumn cterm=NONE ctermfg=" . <SID>X(39) . " ctermbg=" . <SID>X(80)
exec "hi Directory cterm=NONE ctermfg=" . <SID>X(28) . " ctermbg=" . "NONE"
exec "hi LineNr cterm=NONE ctermfg=" . <SID>X(39) . " ctermbg=" . <SID>X(80)
exec "hi NonText cterm=BOLD ctermfg=" . <SID>X(39) . " ctermbg=" . "NONE"
exec "hi SpecialKey cterm=BOLD ctermfg=" . <SID>X(55) . " ctermbg=" . "NONE"
exec "hi Title cterm=BOLD ctermfg=" . <SID>X(48) . " ctermbg=" . "NONE"
exec "hi Visual cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(38)
exec "hi Comment cterm=NONE ctermfg=" . <SID>X(52) . " ctermbg=" . "NONE"
exec "hi Constant cterm=NONE ctermfg=" . <SID>X(73) . " ctermbg=" . "NONE"
exec "hi String cterm=NONE ctermfg=" . <SID>X(73) . " ctermbg=" . <SID>X(81)
exec "hi Error cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(32)
exec "hi Identifier cterm=NONE ctermfg=" . <SID>X(53) . " ctermbg=" . "NONE"
exec "hi Ignore cterm=NONE"
exec "hi Number cterm=NONE ctermfg=" . <SID>X(69) . " ctermbg=" . "NONE"
exec "hi PreProc cterm=NONE ctermfg=" . <SID>X(25) . " ctermbg=" . "NONE"
exec "hi Special cterm=NONE ctermfg=" . <SID>X(55) . " ctermbg=" . "NONE"
exec "hi SpecialChar cterm=NONE ctermfg=" . <SID>X(55) . " ctermbg=" . <SID>X(81)
exec "hi Statement cterm=NONE ctermfg=" . <SID>X(27) . " ctermbg=" . "NONE"
exec "hi Todo cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(57)
exec "hi Type cterm=NONE ctermfg=" . <SID>X(71) . " ctermbg=" . "NONE"
exec "hi Underlined cterm=BOLD ctermfg=" . <SID>X(77) . " ctermbg=" . "NONE"
exec "hi TaglistTagName cterm=BOLD ctermfg=" . <SID>X(39) . " ctermbg=" . "NONE"
if v:version >= 700
exec "hi Pmenu cterm=NONE ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(82)
exec "hi PmenuSel cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(38)
exec "hi PmenuSbar cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(39)
exec "hi PmenuThumb cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(39)
exec "hi SpellBad cterm=NONE ctermbg=" . <SID>X(32)
exec "hi SpellRare cterm=NONE ctermbg=" . <SID>X(33)
exec "hi SpellLocal cterm=NONE ctermbg=" . <SID>X(36)
exec "hi SpellCap cterm=NONE ctermbg=" . <SID>X(21)
exec "hi MatchParen cterm=NONE ctermbg=" . <SID>X(14) . "ctermfg=" . <SID>X(25)
endif
endif
" vim: set et :

View file

@ -1,220 +0,0 @@
" ir_black color scheme
" More at: http://blog.infinitered.com/entries/show/8
" ********************************************************************************
" Standard colors used in all ir_black themes:
" Note, x:x:x are RGB values
"
" normal: #f6f3e8
"
" string: #A8FF60 168:255:96
" string inner (punc, code, etc): #00A0A0 0:160:160
" number: #FF73FD 255:115:253
" comments: #7C7C7C 124:124:124
" keywords: #96CBFE 150:203:254
" operators: white
" class: #FFFFB6 255:255:182
" method declaration name: #FFD2A7 255:210:167
" regular expression: #E9C062 233:192:98
" regexp alternate: #FF8000 255:128:0
" regexp alternate 2: #B18A3D 177:138:61
" variable: #C6C5FE 198:197:254
"
" Misc colors:
" red color (used for whatever): #FF6C60 255:108:96
" light red: #FFB6B0 255:182:176
"
" brown: #E18964 good for special
"
" lightpurpleish: #FFCCFF
"
" Interface colors:
" background color: black
" cursor (where underscore is used): #FFA560 255:165:96
" cursor (where block is used): white
" visual selection: #1D1E2C
" current line: #151515 21:21:21
" search selection: #07281C 7:40:28
" line number: #3D3D3D 61:61:61
" ********************************************************************************
" The following are the preferred 16 colors for your terminal
" Colors Bright Colors
" Black #4E4E4E #7C7C7C
" Red #FF6C60 #FFB6B0
" Green #A8FF60 #CEFFAB
" Yellow #FFFFB6 #FFFFCB
" Blue #96CBFE #FFFFCB
" Magenta #FF73FD #FF9CFE
" Cyan #C6C5FE #DFDFFE
" White #EEEEEE #FFFFFF
" ********************************************************************************
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "ir_black"
"hi Example guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
" General colors
hi Normal guifg=#f6f3e8 guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi NonText guifg=#070707 guibg=black gui=NONE ctermfg=black ctermbg=NONE cterm=NONE
hi Cursor guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=reverse
hi LineNr guifg=#3D3D3D guibg=black gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
hi VertSplit guifg=#202020 guibg=#202020 gui=NONE ctermfg=darkgray ctermbg=darkgray cterm=NONE
hi StatusLine guifg=#202020 guibg=#CCCCCC gui=italic ctermfg=white ctermbg=darkgray cterm=NONE
hi StatusLineNC guifg=#CCCCCC guibg=#202020 gui=NONE ctermfg=blue ctermbg=darkgray cterm=NONE
hi Folded guifg=#a0a8b0 guibg=#384048 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi FoldColumn guifg=#a0a8b0 guibg=#384048 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=NONE
hi Visual guifg=NONE guibg=#262D51 gui=NONE ctermfg=NONE ctermbg=darkgray cterm=NONE
hi SpecialKey guifg=#808080 guibg=#343434 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi WildMenu guifg=green guibg=yellow gui=NONE ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuSbar guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=NONE
"hi Ignore guifg=gray guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error guifg=NONE guibg=NONE gui=undercurl ctermfg=white ctermbg=red cterm=NONE guisp=#FF6C60 " undercurl color
hi ErrorMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE
hi WarningMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE
" Message displayed in lower left, such as --INSERT--
hi ModeMsg guifg=black guibg=#C6C5FE gui=BOLD ctermfg=black ctermbg=cyan cterm=BOLD
" Diff colors
hi DiffAdd guifg=NONE guibg=#26512D gui=NONE ctermfg=NONE ctermbg=darkgray cterm=NONE
hi DiffChange guifg=NONE guibg=#262D51 gui=NONE ctermfg=NONE ctermbg=darkgray cterm=NONE
hi DiffText guifg=NONE guibg=#384048 gui=NONE ctermfg=NONE ctermbg=darkgray cterm=NONE
hi DiffDelete guifg=NONE guibg=#512D26 gui=NONE ctermfg=NONE ctermbg=darkgray cterm=NONE
if version >= 700 " Vim 7.x specific colors
hi Cursor guifg=NONE guibg=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=BOLD
hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD
hi CursorColumn guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD
hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=BOLD ctermfg=white ctermbg=darkgray cterm=NONE
hi Pmenu guifg=#f6f3e8 guibg=#444444 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#cae682 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Search guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
endif
" Syntax highlighting
hi Comment guifg=#7C7C7C guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
hi String guifg=#A8FF60 guibg=NONE gui=NONE ctermfg=green ctermbg=NONE cterm=NONE
hi Number guifg=#FF73FD guibg=NONE gui=NONE ctermfg=magenta ctermbg=NONE cterm=NONE
hi Keyword guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE
hi PreProc guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE
hi Conditional guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE " if else end
hi Todo guifg=#8f8f8f guibg=NONE gui=NONE ctermfg=red ctermbg=NONE cterm=NONE
hi Constant guifg=#99CC99 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi Identifier guifg=#C6C5FE guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE
hi Type guifg=#FFFFB6 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE
hi Statement guifg=#6699CC guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE
hi Special guifg=#E18964 guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE
hi Delimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi Operator guifg=white guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE
hi link Character Constant
hi link Boolean Constant
hi link Float Number
hi link Repeat Statement
hi link Label Statement
hi link Exception Statement
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi link StorageClass Type
hi link Structure Type
hi link Typedef Type
hi link Tag Special
hi link SpecialChar Special
hi link SpecialComment Special
hi link Debug Special
" Special for Ruby
hi rubyRegexp guifg=#B18A3D guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE
hi rubyRegexpDelimiter guifg=#FF8000 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE
hi rubyEscape guifg=white guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi rubyInterpolationDelimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE
hi rubyControl guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE "and break, etc
"hi rubyGlobalVariable guifg=#FFCCFF guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE "yield
hi rubyStringDelimiter guifg=#336633 guibg=NONE gui=NONE ctermfg=lightgreen ctermbg=NONE cterm=NONE
"rubyInclude
"rubySharpBang
"rubyAccess
"rubyPredefinedVariable
"rubyBoolean
"rubyClassVariable
"rubyBeginEnd
"rubyRepeatModifier
"hi link rubyArrayDelimiter Special " [ , , ]
"rubyCurlyBlock { , , }
hi link rubyClass Keyword
hi link rubyModule Keyword
hi link rubyKeyword Keyword
hi link rubyOperator Operator
hi link rubyIdentifier Identifier
hi link rubyInstanceVariable Identifier
hi link rubyGlobalVariable Identifier
hi link rubyClassVariable Identifier
hi link rubyConstant Type
" Special for Java
" hi link javaClassDecl Type
hi link javaScopeDecl Identifier
hi link javaCommentTitle javaDocSeeTag
hi link javaDocTags javaDocSeeTag
hi link javaDocParam javaDocSeeTag
hi link javaDocSeeTagParam javaDocSeeTag
hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
"hi javaClassDecl guifg=#CCFFCC guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE
" Special for XML
hi link xmlTag Keyword
hi link xmlTagName Conditional
hi link xmlEndTag Identifier
" Special for HTML
hi link htmlTag Keyword
hi link htmlTagName Conditional
hi link htmlEndTag Identifier
" Special for Javascript
hi link javaScriptNumber Number
" Special for Python
"hi link pythonEscape Keyword
" Special for CSharp
hi link csXmlTag Keyword
" Special for PHP

View file

@ -1,112 +0,0 @@
" ----------------------------------------------------------------------------------------------------------------------------------
" Filename: relaxedgreen.vim
" Last Modified: 13 Feb 2007 09:57:24 PM by Dave V
" Maintainer: Dave Vehrs (dvehrs at gmail.com)
" Copyright: 2002,2003,2004,2005,2006,2007 Dave Vehrs
" This script is free software; you can redistribute it and/or
" modify it under the terms of the GNU General Public License as
" published by the Free Software Foundation; either version 2 of
" the License, or (at your option) any later version.
" Description: Vim colorscheme file.
" Install: Place this file in the users colors directory (~/.vim/colors) or
" in the shared colors directory (/usr/shared/vim/vim<version>/colors/),
" then load it with :colorscheme relaxedgreen
" ----------------------------------------------------------------------------------------------------------------------------------
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "relaxedgreen"
highlight Cursor term=reverse ctermfg=green ctermbg=blue guifg=#000000 guibg=#559955
highlight CursorIM term=reverse ctermfg=black ctermbg=darkgreen guifg=#000000 guibg=#336633
highlight CursorColumn term=none ctermbg=darkred guibg=#663333
highlight CursorLine term=none ctermbg=darkblue guibg=#333366
highlight Comment term=italic ctermfg=darkcyan ctermbg=black guifg=#00a594
highlight Constant term=underline ctermfg=blue guifg=#0099dd
highlight Debug term=bold ctermfg=red ctermbg=black guifg=#dc0000 guibg=#000000
highlight DiffAdd term=reverse ctermfg=black ctermbg=cyan guifg=#000000 guibg=#007200
highlight DiffChange term=underline cterm=reverse ctermfg=darkgreen ctermbg=black guifg=#000000 guibg=#006700
highlight DiffDelete term=standout ctermfg=black ctermbg=cyan guifg=#000000 guibg=#007200
highlight DiffText term=bold ctermfg=green ctermbg=black guifg=#00ac00 guibg=#000000
highlight Directory term=underline ctermfg=green ctermbg=black guifg=#336633 guibg=#000000
highlight Error term=reverse,bold ctermfg=black ctermbg=red guifg=#000000 guibg=#dc0000
highlight ErrorMsg term=reverse,bold ctermfg=white ctermbg=red guifg=#ffffff guibg=#dc0000
highlight Folded ctermfg=darkgreen ctermbg=black guifg=#20de20 guibg=#000000
highlight FoldColumn ctermfg=darkgreen ctermbg=black guifg=#20de20 guibg=#000000
highlight Function term=standout ctermfg=darkgreen guifg=#22bb22
highlight Identifier term=underline ctermfg=darkcyan gui=underline guifg=#008800
highlight Ignore ctermfg=lightgreen guifg=#33bb33
highlight IncSearch term=reverse ctermfg=black ctermbg=darkgreen guifg=#000000 guibg=#336633
highlight LineNr term=bold ctermfg=green guifg=#00ff00
highlight MatchParen term=bold ctermbg=green guifg=#009900
highlight ModeMsg term=bold cterm=bold gui=bold
highlight MoreMsg term=bold cterm=bold gui=bold
highlight NonText ctermfg=brown guifg=#b26818
highlight Normal ctermfg=gray ctermbg=black guifg=#aaaaaa guibg=#000000
highlight Pmenu term=reverse ctermfg=black ctermbg=green guifg=#000000 guibg=#337733
highlight PmenuSel term=bold ctermfg=black ctermbg=gray guifg=#000000 guibg=#999999
highlight PmenuSbar term=reverse ctermfg=black ctermbg=green guifg=#000000 guibg=#337733
highlight PmenuThumb term=reverse ctermfg=gray ctermbg=black guifg=#999999 guibg=#000000
highlight PreProc term=standout ctermfg=darkgreen guifg=#22bb22
highlight Question term=standout ctermfg=red guifg=#ff0000
highlight Search term=reverse ctermfg=black ctermbg=darkgreen guifg=#000000 guibg=#228822
highlight SignColumn ctermfg=darkgreen guifg=#20de20 guibg=#000000
highlight Special term=bold ctermfg=green guifg=#00ff00
highlight SpecialKey term=bold ctermfg=green guifg=#00ff00
highlight SpellBad term=reverse cterm=underline ctermfg=red ctermbg=black gui=undercurl guisp=#ff0000
highlight SpellCap term=reverse cterm=underline ctermfg=yellow ctermbg=black gui=undercurl guisp=#00ffff
highlight SpellLocal term=reverse cterm=underline ctermfg=blue ctermbg=black gui=undercurl guisp=#0000ff
highlight SpellRare term=reverse cterm=underline ctermfg=darkgreen ctermbg=black gui=undercurl guisp=#00ff00
highlight Statement term=standout ctermfg=darkred guifg=#ac0000
highlight StatusLine term=reverse ctermfg=darkgreen ctermbg=black gui=none guibg=#228822 guifg=#000000
highlight StatusLineNC term=reverse ctermfg=darkgreen ctermbg=blue gui=none guibg=#336633 guifg=#000000
highlight TabLine term=reverse cterm=reverse ctermfg=black ctermbg=green guibg=#222222 guifg=#228822
highlight TabLineFill term=reverse cterm=reverse ctermfg=green ctermbg=black guibg=#222222 guifg=#226622
highlight TabLineSel ctermfg=black ctermbg=green guibg=#228822 guifg=#222222
highlight Title term=reverse ctermfg=black ctermbg=green guifg=#000000 guibg=#00ff00
highlight Todo term=reverse cterm=reverse ctermfg=darkgreen ctermbg=black guibg=#336633 guifg=#000000
highlight Type term=standout ctermfg=green guifg=#559955
highlight Visual term=reverse cterm=reverse ctermfg=darkgreen guifg=#000000 guibg=#336633
highlight VisualNOS term=reverse,bold cterm=reverse ctermbg=darkgreen guifg=#000000 guibg=#228822
highlight VertSplit term=reverse ctermfg=darkgreen guifg=#336633
highlight User1 term=standout cterm=bold ctermbg=darkgreen ctermfg=red gui=bold guibg=#228822 guifg=#FF0000
highlight WarningMsg term=reverse ctermfg=black ctermbg=yellow guifg=#000000 guibg=#007a7a
highlight WildMenu term=reverse ctermfg=blue ctermbg=darkgreen guifg=#000099 guibg=#00ac00
" ----------------------------------------------------------------------------------------------------------------------------------
" Common groups that link to other highlight definitions.
highlight link Character Constant
highlight link Number Constant
highlight link Boolean Constant
highlight link String Constant
highlight link Operator LineNr
highlight link Float Number
highlight link Define PreProc
highlight link Include PreProc
highlight link Macro PreProc
highlight link PreCondit PreProc
highlight link Repeat Question
highlight link Conditional Repeat
highlight link Delimiter Special
highlight link SpecialChar Special
highlight link SpecialComment Special
highlight link Tag Special
highlight link Exception Statement
highlight link Keyword Statement
highlight link Label Statement
highlight link StorageClass Type
highlight link Structure Type
highlight link Typedef Type
" ----------------------------------------------------------------------------------------------------------------------------------
" vim:tw=132:ts=4:sw=4

View file

@ -1,95 +0,0 @@
" ----------------------------------------------------------------------------
" Vim color file
" Maintainer: John-Paul Bader <contact@smyck.org>
" Last Change: 2012 April
" License: Beer Ware
" ----------------------------------------------------------------------------
" Reset Highlighting
hi clear
if exists("syntax_on")
syntax reset
endif
set background=dark
set linespace=3
let g:colors_name = "smyck"
hi Normal cterm=none ctermbg=none ctermfg=15 gui=none guibg=#282828 guifg=#F7F7F7
hi LineNr cterm=none ctermbg=none ctermfg=8 gui=none guibg=#282828 guifg=#8F8F8F
hi StatusLine cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#5D5D5D guifg=#FBFBFB
hi StatusLineNC cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#5D5D5D guifg=#FBFBFB
hi Search cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
hi IncSearch cterm=none ctermbg=3 ctermfg=8 gui=none guibg=#F6DC69 guifg=#8F8F8F
hi ColumnMargin cterm=none ctermbg=0 gui=none guibg=#000000
hi Error cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi ErrorMsg cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi Folded cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41
hi FoldColumn cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41
hi NonText cterm=bold ctermbg=none ctermfg=8 gui=bold guifg=#8F8F8F
hi ModeMsg cterm=bold ctermbg=none ctermfg=10 gui=none
hi Pmenu cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#8F8F8F guifg=#F7F7F7
hi PmenuSel cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi PmenuSbar cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi SpellBad cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellCap cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellRare cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellLocal cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi Visual cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi Directory cterm=none ctermbg=none ctermfg=4 gui=none guibg=#242424 guifg=#88CCE7
hi SpecialKey cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
hi DiffAdd cterm=bold ctermbg=2 ctermfg=15
hi DiffChange cterm=bold ctermbg=4 ctermfg=15
hi DiffDelete cterm=bold ctermbg=1 ctermfg=15
hi DiffText cterm=bold ctermbg=3 ctermfg=8
hi MatchParen cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
hi CursorLine cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242
hi CursorColumn cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242
hi Title cterm=none ctermbg=none ctermfg=4 gui=none guifg=#88CCE7
" ----------------------------------------------------------------------------
" Syntax Highlighting
" ----------------------------------------------------------------------------
hi Keyword cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Comment cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
hi Delimiter cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
hi Identifier cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi Structure cterm=none ctermbg=none ctermfg=12 gui=none guifg=#9DEEF2
hi Ignore cterm=none ctermbg=none ctermfg=8 gui=none guifg=bg
hi Constant cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi PreProc cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Type cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi Statement cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Special cterm=none ctermbg=none ctermfg=6 gui=none guifg=#d7d7d7
hi String cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
hi Number cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
hi Underlined cterm=none ctermbg=none ctermfg=magenta gui=underline guibg=#272727
hi Symbol cterm=none ctermbg=none ctermfg=9 gui=none guifg=#FAB1AB
hi Method cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
hi Interpolation cterm=none ctermbg=none ctermfg=6 gui=none guifg=#2EB5C1
" Erlang
hi link erlangAtom Keyword
hi link erlangBitType Keyword
hi link rubyBeginend Keyword
hi link rubyClass Keyword
hi link rubyModule Keyword
hi link rubyKeyword Keyword
hi link rubyOperator Method
hi link rubyIdentifier Keyword
hi link rubyClassVariable Symbol
hi link rubyInstanceVariable Constant
hi link rubyGlobalVariable Constant
hi link rubyClassVariable Method
hi link rubyConstant Constant
hi link rubySymbol Symbol
hi link rubyFunction Constant
hi link rubyControl Keyword
hi link rubyConditional Keyword
hi link rubyInterpolation Interpolation
hi link rubyInterpolationDelimiter Interpolation
hi link rubyRailsMethod Method

View file

@ -1,17 +0,0 @@
" detect puppet filetypes
if exists("did_load_filetypes")
finish
endif
augroup filetypedetect
au! BufRead,BufNewFile *.pp setfiletype puppet
"au! BufNewFile,BufRead *.rhtml set syn=eruby
"au! BufNewFile,BufRead *.haml setfiletype haml
"au! BufNewFile,BufRead *.rhtml setfiletype rhtml
au! BufNewFile,BufRead Vagrantfile setfiletype ruby
au! BufNewFile,BufRead *.rhtml setfiletype eruby
au! BufNewFile,BufRead *.s setfiletype asmx86
au! BufNewFile,BufRead *.rl setfiletype ragel
au! BufRead,BufNewFile *.ijs,*.ijt,*.ijp,*.ijx setfiletype j
augroup END

View file

@ -1 +0,0 @@
/Users/hunner/.vimrc

View file

@ -1,110 +0,0 @@
" Mapping the unified APL keyboard to emit the apl385 unicode characters
" Original Author: Peter Keller <psilord@cs.wisc.edu>
" Maintainer: Peter Keller <psilord@cs.wisc.edu>
" Last Changed: 2008 Oct 23
" This file is under the BSD license.
let b:keymap_name = "uniapl385"
loadkeymap
" row 1 of keyboard, lowercase and uppercase
<M-`> <char-0x22c4> " {diamond}
<M-~> <char-0x235e> " {quotequad}
<M-1> <char-0x00a8> " {each}
<M-!> <char-0x2336> " {ibeam}
<M-2> <char-0x00af> " {negative}
<M-@> <char-0x236b> " {deltilde}
<M-3> <char-0x003c> " {lessthan}
<M-#> <char-0x2352> " {gradedown}
<M-4> <char-0x2264> " {lessthanequal}
<M-$> <char-0x234b> " {gradeup}
<M-5> <char-0x003d> " {equal}
<M-%> <char-0x233d> " {reverse}
<M-6> <char-0x2265> " {greaterorequal}
<M-^> <char-0x2349> " {transpose}
<M-7> <char-0x003e> " {morethan}
<M-&> <char-0x2296> " {rotatefirstaxis}
<M-8> <char-0x2260> " {notequalto}
<M-*> <char-0x235f> " {log}
<M-9> <char-0x2228> " {logicalor}
<M-(> <char-0x2371> " {aplnor}
<M-0> <char-0x005e> " {logicaland}
<M-)> <char-0x2372> " {aplnand}
<M--> <char-0x00d7> " {multiply}
<M-_> <char-0x0021> " {factorial}
<M-+> <char-0x2339> " {domino}
<M-=> <char-0x00f7> " {divide}
" row 2 of keyboard, lowercase and uppercase
<M-q> <char-0x003f> " {random}
<M-Q> <char-0x0051> " letter Q
<M-w> <char-0x2375> " {omega}
<M-W> <char-0x2364> " {hoot}
<M-e> <char-0x220a> " {membership}
<M-E> <char-0x2377> " {find}
<M-r> <char-0x2374> " {rho}
<M-R> <char-0x0052> " letter R
<M-t> <char-0x007e> " {tilde}
<M-T> <char-0x0054> " letter T
<M-y> <char-0x2191> " {take}
<M-Y> <char-0x2350> " {quadup}
<M-u> <char-0x2193> " {drop}
<M-U> <char-0x2357> " {quaddown}
<M-i> <char-0x2373> " {iota}
<M-I> <char-0x2378> " {iotaunderbar}
<M-o> <char-0x25cb> " {circle}
<M-O> <char-0x2337> " {squad}
<M-p> <char-0x002a> " {power}
<M-P> <char-0x0050> " letter P
<M-[> <char-0x2190> " {assign}
<M-{> <char-0x2347> " {quadleft}
<M-]> <char-0x2192> " {goto}
<M-}> <char-0x2348> " {quadright}
<M-\> <char-0x22a2> " {right tack}
<M-|> <char-0x22a3> " {left tack}
" row 3 of keyboard, lowercase and uppercase
<M-a> <char-0x237a> " {alpha}
<M-A> <char-0x0041> " letter A
<M-s> <char-0x2308> " {max}
<M-S> <char-0x0053> " letter S
<M-d> <char-0x230A> " {min}
<M-D> <char-0x0044> " letter D
<M-f> <char-0x005f> " {underbar}
<M-F> <char-0x0046> " letter F
<M-g> <char-0x2207> " {del}
<M-G> <char-0x0047> " letter G
<M-h> <char-0x2206> " {delta}
<M-H> <char-0x2359> " {deltaunderbar}
<M-j> <char-0x2218> " {jot}
<M-J> <char-0x233b> " {quadjot}
<M-k> <char-0x0027> " {quote}
<M-K> <char-0x2337> " {squad}
<M-l> <char-0x25af> " {quad}
<M-L> <char-0x2342> " {sandwich}
<M-;> <char-0x234e> " {execute}
<M-:> <char-0x2261> " {match}
<M-'> <char-0x2355> " {format}
<M-"> <char-0x2262> " {notmatch}
" row 4 of keyboard, lowercase and uppercase
<M-z> <char-0x2282> " {enclose}
<M-Z> <char-0x005a> " letter Z
<M-x> <char-0x2283> " {disclose}
<M-X> <char-0x0058> " letter X
<M-c> <char-0x2229> " {intersect}
<M-C> <char-0x0043> " letter C
<M-v> <char-0x222a> " {union}
<M-V> <char-0x0056> " letter V
<M-b> <char-0x22a5> " {decode}
<M-B> <char-0x0042> " letter B
<M-n> <char-0x22a4> " {encode}
<M-N> <char-0x004e> " letter N
<M-m> <char-0x007c> " {remainder}
<M-M> <char-0x004d> " letter M
<M-,> <char-0x235d> " {lamp}
<M-<> <char-0x236a> " {commabar}
<M-.> <char-0x2340> " {slopebar}
<M->> <char-0x2235> " {paw}
<M-/> <char-0x233f> " {slashbar}
<M-?> <char-0x003f> " {random}

Binary file not shown.

View file

@ -1,595 +0,0 @@
" Vim syntax file
" Hacked by Adam, from the 68000 asm syntax....
" x Language: Motorola 68000 Assembler
" x Maintainer: Steve Wall
" Last change: 2001 May 01
"
" This is incomplete. In particular, support for 68020 and
" up and 68851/68881 co-processors is partial or non-existant.
" Feel free to contribute...
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case ignore
" syn region asmx86Comment start="#\(\(\(include\)\|\(define\)\|\(if\)\|\(ifndef\)\|\(endif\)\|\(end\)\|\(ifdef\)\)\s\)\!" end="$"
syn region asmx86Commenthash start="#\(\(define\)\|\(if\(n\=\(def\)\)\=\)\|\(include\)\|\(error\)\|\(end\(if\)\=\)\)\!" end="$" contains=asmx86Todo
syn region asmx86Commenthash start="#" end="$" contains=asmx86Todo
syn match asmx86Operator "[-+*/]" " Must occur before Comments
syn match asmx86PreProc "^\s*#\s*\(\(if\(n\=\(def\)\)\=\)\|\(end\(if\)\=\)\|\(define\)\|\(error\)\|\(else\)\)\>"
syn region asmx86Commentcpp start="\s*#\s*if\s\+0\+\>" end="\s*#\s*endif\>" contains=asmx86Todo
syn region asmx86Commentcxx start="//" end="$" contains=asmx86Todo
syn region asmx86Commentc start="/\*" end="\*/" contains=asmx86Todo
" Preprocessor, basics:
" First make ALL things that are behind #'s and the endline as comments. Then
" boil out the stuff that is vaild, like #defines, and such.... It's
" kinda tough, since we're allowing two conflicting syntaxes. But when we
" consider that the "#" mechanism in the pre-processor isn't ever seen by the
" underlying language, it begins to show itself, on why it is so weird.
" There's going to be "#"'es left behind by the cpp, so we need to remember
" that the assembler will see those as commments. We provide this commenting
" Segment Registers --
syn match asmx86Reg "%[cdefgs]s"
" Partial list of register symbols
" General Purpose Registers --
"syn keyword asmx86Reg eax ax al ah
syn match asmx86Reg "%[abcd][xhl]"
syn match asmx86Reg "%e[abcd]x"
" syn keyword asmx86Reg ebx bx bl bh
" syn keyword asmx86Reg ecx cx cl ch
" syn keyword asmx86Reg edx dx dl dh
" "Special" Registers --
"syn keyword asmx86Reg ebp bp edi di esi si esp sp
syn match asmx86Reg "%[bs]p"
syn match asmx86Reg "%e[bs]p"
syn match asmx86Reg "%[ds]i"
syn match asmx86Reg "%e[ds]i"
" Protection, extra, and magic registers for all the OS-type fun stuff --
syn match asmx86Reg "%[cd]r[0-3]"
syn match asmx86Reg "%[td]r[3-7]"
" syn keyword asmx86Reg cr0 cr1 cr2 cr3
" syn keyword asmx86Reg tr3 tr4 tr5 tr6 tr7
" syn keyword asmx86Reg dr0 dr1 dr2 dr3 dr4 dr5 dr6 dr7
syn keyword asmx86Reg gdtr ldtr idtr tr msw pdbr pfla
" Page descriptor base register and page fault linear address
" MC68010
"syn keyword asmx86Reg vbr sfc sfcr dfc dfcr
" MC68020
"syn keyword asmx86Reg msp isp zpc cacr caar
"syn keyword asmx86Reg za0 za1 za2 za3 za4 za5 za6 za7
"syn keyword asmx86Reg zd0 zd1 zd2 zd3 zd4 zd5 zd6 zd7
" MC68030
"syn keyword asmx86Reg crp srp tc ac0 ac1 acusr tt0 tt1 mmusr
" MC68040
"syn keyword asmx86Reg dtt0 dtt1 itt0 itt1 urp
" MC68851 registers
"syn keyword asmx86Reg cal val scc crp srp drp tc ac psr pcsr
"syn keyword asmx86Reg bac0 bac1 bac2 bac3 bac4 bac5 bac6 bac7
"syn keyword asmx86Reg bad0 bad1 bad2 bad3 bad4 bad5 bad6 bad7
" MC68881/82 registers
"syn keyword asmx86Reg fp0 fp1 fp2 fp3 fp4 fp5 fp6 fp7
"syn keyword asmx86Reg control status iaddr fpcr fpsr fpiar
"Not sure if this is the case for x86......
" M68000 opcodes - order is important!
syn match asmx86Opcode "\<aa[asdm][bwl]\=\s"
syn match asmx86Opcode "\<ad[cd][bwl]\=\s"
syn match asmx86Opcode "\<and[bwl]\=\s"
syn match asmx86Opcode "\<arpl\s"
syn match asmx86Opcode_br "\<bound[lw]\=\s"
syn match asmx86Opcode "\<bs[rf][lw]\=\s"
syn match asmx86Opcode "\<bswap[lw]\=\s"
syn match asmx86Opcode "\<bt[rcs]\=[lw]\=\s"
syn match asmx86Opcode_br "\<call[f]\=\s"
syn match asmx86Opcode "\<cbw\s"
syn match asmx86Opcode "\<cwde\s"
syn match asmx86Opcode "\<cl\([cdi]\|\(ts\)\)\>"
syn match asmx86Opcode "\<cmc\s"
syn match asmx86Opcode "\<cmp\(xchg\)\=[bwl]\=\s"
syn match asmx86Opcode "\<cmps[bwdl]\=\>"
syn match asmx86Opcode "\<c\(\(wd\)\|\(dq\)\)\s"
syn match asmx86Opcode "\<da[sd]\=\s"
syn match asmx86Opcode "\<dec[bwl]\=\s"
syn match asmx86Opcode "\<div[bwl]\=\s"
syn match asmx86Opcode "\<enter[bwl]\=\s"
" Skipping all FPU instructions.....
syn match asmx86Opcode_br "\<hlt\>"
syn match asmx86Opcode "\<idiv[bwl]\=\s"
syn match asmx86Opcode "\<imul[bwl]\=\s"
syn match asmx86Opcode_io "\<in[bwl]\=\s"
syn match asmx86Opcode_io "\<ins[bwdl]\=\>"
syn match asmx86Opcode "\<inc[bwl]\=\s"
syn match asmx86Opcode_br "\<int\s"
syn match asmx86Opcode_br "\<int[o3]\>"
syn match asmx86Opcode "\<inv\(\(d\)\|\(lpg\)\)\s"
syn match asmx86Opcode_br "\<iretd\=\>"
"" Main x86 branch instructions...
syn match asmx86Opcode_br "\<j.\{,4}\s"
" This is, above, the hack. It will not show valid/invalid jcc opcodes, now...
" This will be fixed later, this is just to have working j???? working now....
syn match asmx86Opcode_br "\<l\=jmp[fblwd]\=\s"
syn match asmx86Opcode "\<lahf\s"
syn match asmx86Opcode "\<lar\s"
syn match asmx86Opcode_mv "\<lea[lw]\=\s"
syn match asmx86Opcode "\<leave\>"
syn match asmx86Opcode_mv "\<l[gil]dtl\=\s"
syn match asmx86Opcode_mv "\<l[defgs]s\s"
syn match asmx86Opcode_mv "\<lmsw\s"
syn match asmx86Opcode "\<lock\>"
syn match asmx86Opcode_mv "\<lods[lwdb]\=\>"
syn match asmx86Opcode_br "\<loopn\=[ez]\=\s"
syn match asmx86Opcode_mv "\<lsl\s"
syn match asmx86Opcode_mv "\<ltr\s"
syn match asmx86Opcode_mv "\<mov[bwl]\=\s"
syn match asmx86Opcode_mv "\<movs[lwdb]\=\>"
syn match asmx86Opcode_mv "\<movsx[bwl]\=\s"
syn match asmx86Opcode_mv "\<movzx[bwl]\=\s"
syn match asmx86Opcode "\<mul[bwl]\=\s"
syn match asmx86Opcode "\<neg[bwl]\=\s"
syn match asmx86Opcode "\<nop\>"
syn match asmx86Opcode "\<not[bwl]\=\s"
syn match asmx86Opcode "\<or[bwl]\=\s"
syn match asmx86Opcode_io "\<out[bwl]\=\s"
syn match asmx86Opcode_io "\<outs[dbwl]\=\>"
syn match asmx86Opcode_mv "\<pop[bwl]\=\s"
syn match asmx86Opcode_mv "\<pop[af][wld]\=\>"
syn match asmx86Opcode_mv "\<push[bwl]\=\s"
syn match asmx86Opcode_mv "\<push[af][wld]\=\>"
syn match asmx86Opcode "\<r[co][rl][bwl]\=\s"
syn match asmx86Opcode_pre "\<repn\=[ez]\=\s"
syn match asmx86Opcode_br "\<retf\=\>"
syn match asmx86Opcode "\<sahf\>"
syn match asmx86Opcode "\<s[ah][rl][bwl]\=\s"
syn match asmx86Opcode "\<sbb[bwl]\=\s"
syn match asmx86Opcode "\<scas[bwld]\=\s"
syn match asmx86Opcode "\<set.\{,3}\s"
" We do the same hack as a jmp here. We'll only allow the valid ones, later.
syn match asmx86Opcode_mv "\<s[gil]dtl\=\s"
syn match asmx86Opcode "\<sh[lr][dbwl]\=\s"
syn match asmx86Opcode_mv "\<smsw\s"
syn match asmx86Opcode "\<st[cdi]\>"
syn match asmx86Opcode_mv "\<stos[bwld]\=\>"
syn match asmx86Opcode_mv "\<str\s"
syn match asmx86Opcode "\<sub[bwl]\=\s"
syn match asmx86Opcode "\<test[bwl]\=\s"
syn match asmx86Opcode "\<ver[rw]\s"
syn match asmx86Opcode "\<wait\>"
syn match asmx86Opcode "\<wbinvd\>"
syn match asmx86Opcode_mv "\<xadd[bwl]\=\s"
syn match asmx86Opcode_mv "\<xchg[bwl]\=\s"
syn match asmx86Opcode_mv "\<xlatb\=\>"
syn match asmx86Opcode "\<xor[bwl]\=\s"
" 68k instructions... here, because they are sometimes matching, and we haven't
" gotten the x86 ones up to speed yet....
" syn match asmx86Opcode "\<abcd\(\.b\)\=\s"
" syn match asmx86Opcode "\<adda\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<addi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<addq\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<addx\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<add\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<andi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<and\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<as[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<b[vc][cs]\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<beq\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bg[et]\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<b[hm]i\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bl[est]\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bne\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bpl\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bchg\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<bclr\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<bfchg\s"
" syn match asmx86Opcode "\<bfclr\s"
" syn match asmx86Opcode "\<bfexts\s"
" syn match asmx86Opcode "\<bfextu\s"
" syn match asmx86Opcode "\<bfffo\s"
" syn match asmx86Opcode "\<bfins\s"
" syn match asmx86Opcode "\<bfset\s"
" syn match asmx86Opcode "\<bftst\s"
" syn match asmx86Opcode "\<bkpt\s"
" syn match asmx86Opcode "\<bra\(\.[bwls]\)\=\s"
" syn match asmx86Opcode "\<bset\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<bsr\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<btst\(\.[bl]\)\=\s"
" syn match asmx86Opcode "\<callm\s"
" syn match asmx86Opcode "\<cas2\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<cas\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<chk2\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<chk\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<clr\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmpa\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<cmpi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmpm\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmp2\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<cmp\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<db[cv][cs]\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbeq\(\.w\)\=\s"
" syn match asmx86Opcode "\<db[ft]\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbg[et]\(\.w\)\=\s"
" syn match asmx86Opcode "\<db[hm]i\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbl[est]\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbne\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbpl\(\.w\)\=\s"
" syn match asmx86Opcode "\<dbra\(\.w\)\=\s"
" syn match asmx86Opcode "\<div[su]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<div[su]l\(\.l\)\=\s"
" syn match asmx86Opcode "\<eori\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<eor\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<exg\(\.l\)\=\s"
" syn match asmx86Opcode "\<extb\(\.l\)\=\s"
" syn match asmx86Opcode "\<ext\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<illegal\>"
" syn match asmx86Opcode "\<jmp\(\.[ls]\)\=\s"
" syn match asmx86Opcode "\<jsr\(\.[ls]\)\=\s"
" syn match asmx86Opcode "\<lea\(\.l\)\=\s"
" syn match asmx86Opcode "\<link\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<ls[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<movea\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<movec\(\.l\)\=\s"
" syn match asmx86Opcode "\<movem\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<movep\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<moveq\(\.l\)\=\s"
" syn match asmx86Opcode "\<moves\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<move\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<mul[su]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<nbcd\(\.b\)\=\s"
" syn match asmx86Opcode "\<negx\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<neg\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<nop\>"
" syn match asmx86Opcode "\<not\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<ori\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<or\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<pack\s"
" syn match asmx86Opcode "\<pea\(\.l\)\=\s"
" syn match asmx86Opcode "\<reset\>"
" syn match asmx86Opcode "\<ro[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<rox[lr]\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<rt[dm]\s"
" syn match asmx86Opcode "\<rt[ers]\>"
" syn match asmx86Opcode "\<sbcd\(\.b\)\=\s"
" syn match asmx86Opcode "\<s[cv][cs]\(\.b\)\=\s"
" syn match asmx86Opcode "\<seq\(\.b\)\=\s"
" syn match asmx86Opcode "\<s[ft]\(\.b\)\=\s"
" syn match asmx86Opcode "\<sg[et]\(\.b\)\=\s"
" syn match asmx86Opcode "\<s[hm]i\(\.b\)\=\s"
" syn match asmx86Opcode "\<sl[est]\(\.b\)\=\s"
" syn match asmx86Opcode "\<sne\(\.b\)\=\s"
" syn match asmx86Opcode "\<spl\(\.b\)\=\s"
" syn match asmx86Opcode "\<suba\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<subi\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<subq\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<subx\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<sub\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<swap\(\.w\)\=\s"
" syn match asmx86Opcode "\<tas\(\.b\)\=\s"
" syn match asmx86Opcode "\<tdiv[su]\(\.l\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=[cv][cs]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=eq\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=[ft]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=g[et]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=[hm]i\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=l[est]\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=ne\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=pl\(\.[wl]\)\=\s"
" syn match asmx86Opcode "\<t\(rap\)\=v\>"
" syn match asmx86Opcode "\<t\(rap\)\=[cv][cs]\>"
" syn match asmx86Opcode "\<t\(rap\)\=eq\>"
" syn match asmx86Opcode "\<t\(rap\)\=[ft]\>"
" syn match asmx86Opcode "\<t\(rap\)\=g[et]\>"
" syn match asmx86Opcode "\<t\(rap\)\=[hm]i\>"
" syn match asmx86Opcode "\<t\(rap\)\=l[est]\>"
" syn match asmx86Opcode "\<t\(rap\)\=ne\>"
" syn match asmx86Opcode "\<t\(rap\)\=pl\>"
" syn match asmx86Opcode "\<trap\s"
" syn match asmx86Opcode "\<tst\(\.[bwl]\)\=\s"
" syn match asmx86Opcode "\<unlk\s"
" syn match asmx86Opcode "\<unpk\s"
" Valid labels
syn match asmx86Label "^[a-z_?.][a-z0-9_?.$]*$"
syn match asmx86Label "^[a-z_?.][a-z0-9_?.$]*\s"he=e-1
syn match asmx86Label "^\s*[a-z_?.][a-z0-9_?.$]*:"he=e-1
" Various number formats
syn match hexNumber "\$[0-9a-fA-F]\+\>"
syn match hexNumber "$0x[0-9a-fA-F]\+\>"
syn match hexNumber "0x[0-9a-fA-F]\+\>"
syn match hexNumber "\<[0-9][0-9a-fA-F]*H\>"
syn match octNumber "@[0-7]\+\>"
syn match octNumber "\<[0-7]\+[QO]\>"
syn match binNumber "%[01]\+\>"
syn match binNumber "\<[01]\+B\>"
syn match decNumber "\<[0-9]\+D\=\>"
syn match floatE "_*E_*" contained
syn match floatExponent "_*E_*[-+]\=[0-9]\+" contained contains=floatE
syn match floatNumber "[-+]\=[0-9]\+_*E_*[-+]\=[0-9]\+" contains=floatExponent
syn match floatNumber "[-+]\=[0-9]\+\.[0-9]\+\(E[-+]\=[0-9]\+\)\=" contains=floatExponent
syn match floatNumber ":\([0-9a-f]\+_*\)\+"
" Character string constants
"syn match asmx86StringError "'[ -~]*'"
"syn match asmx86StringError "'[ -~]*$"
"syn region asmx86String start="'" skip="''" end="'" oneline contains=asmx86CharError
syn match asmx86CharError "[^ -~]" contained
" Immediate data
" syn match asmx86Immediate "#\$[0-9a-fA-F]\+" contains=hexNumber
" syn match asmx86Immediate "#[0-9][0-9a-fA-F]*H" contains=hexNumber
" syn match asmx86Immediate "#@[0-7]\+" contains=octNumber
" syn match asmx86Immediate "#[0-7]\+[QO]" contains=octNumber
" syn match asmx86Immediate "#%[01]\+" contains=binNumber
" syn match asmx86Immediate "#[01]\+B" contains=binNumber
" syn match asmx86Immediate "#[0-9]\+D\=" contains=decNumber
syn match asmx86Symbol "[a-z_?.][a-z0-9_?.$]*" contained
" syn match asmx86Immediate "#[a-z_?.][a-z0-9_?.]*" contains=asmx86Symbol
" Special items for comments
syn keyword asmx86Todo contained TODO XXX FIXME CHANGED
" Operators
syn match asmx86Operator "\.SIZEOF\."
syn match asmx86Operator "\.STARTOF\."
syn match asmx86Operator "<<" " shift left
syn match asmx86Operator ">>" " shift right
syn match asmx86Operator "&" " bit-wise logical and
syn match asmx86Operator "!" " bit-wise logical or
syn match asmx86Operator "!!" " exclusive or
syn match asmx86Operator "<>" " inequality
syn match asmx86Operator "=" " must be before other ops containing '='
syn match asmx86Operator ">="
syn match asmx86Operator "<="
syn match asmx86Operator "==" " operand existance - used in macro definitions
" Condition code style operators
syn match asmx86Operator "<[CV][CS]>"
syn match asmx86Operator "<EQ>"
syn match asmx86Operator "<G[TE]>"
syn match asmx86Operator "<[HM]I>"
syn match asmx86Operator "<L[SET]>"
syn match asmx86Operator "<NE>"
syn match asmx86Operator "<PL>"
" Include
syn match asmx86Include "\<INCLUDE\s"
syn region asmIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match asmx86Included display contained "<[^"]*>"
syn match asmx86Include display "^\s*#\s*include\>\s*["<]" contains=asmx86Included
" Comments
" syn match asmx86Comment ";.*" contains=asmx86Todo
" syn match asmx86Comment "#.*" contains=asmx86Todo
" syn match asmx86Comment "\s!.*"ms=s+1 contains=asmx86Todo
" syn match asmx86Comment "^\s*[*!].*" contains=asmx86Todo
" Standard macros
syn match asmx86Cond "\<IF\(\.[BWL]\)\=\s"
syn match asmx86Cond "\<THEN\(\.[SL]\)\=\>"
syn match asmx86Cond "\<ELSE\(\.[SL]\)\=\>"
syn match asmx86Cond "\<ENDI\>"
syn match asmx86Cond "\<BREAK\(\.[SL]\)\=\>"
syn match asmx86Repeat "\<FOR\(\.[BWL]\)\=\s"
syn match asmx86Repeat "\<DOWNTO\s"
syn match asmx86Repeat "\<TO\s"
syn match asmx86Repeat "\<BY\s"
syn match asmx86Repeat "\<DO\(\.[SL]\)\=\>"
syn match asmx86Repeat "\<ENDF\>"
syn match asmx86Repeat "\<NEXT\(\.[SL]\)\=\>"
syn match asmx86Repeat "\<REPEAT\>"
syn match asmx86Repeat "\<UNTIL\(\.[BWL]\)\=\s"
syn match asmx86Repeat "\<WHILE\(\.[BWL]\)\=\s"
syn match asmx86Repeat "\<ENDW\>"
" Macro definition
syn match asmx86Macro "\<MACRO\>"
syn match asmx86Macro "\<LOCAL\s"
syn match asmx86Macro "\<MEXIT\>"
syn match asmx86Macro "\<ENDM\>"
syn match asmx86MacroParam "\\[0-9]"
" Conditional assembly
syn match asmx86PreCond "\<IFC\s"
syn match asmx86PreCond "\<IFDEF\s"
syn match asmx86PreCond "\<IFEQ\s"
syn match asmx86PreCond "\<IFGE\s"
syn match asmx86PreCond "\<IFGT\s"
syn match asmx86PreCond "\<IFLE\s"
syn match asmx86PreCond "\<IFLT\s"
syn match asmx86PreCond "\<IFNC\>"
syn match asmx86PreCond "\<IFNDEF\s"
syn match asmx86PreCond "\<IFNE\s"
syn match asmx86PreCond "\<ELSEC\>"
syn match asmx86PreCond "\<ENDC\>"
" Loop control
syn match asmx86PreCond "\<REPT\s"
syn match asmx86PreCond "\<IRP\s"
syn match asmx86PreCond "\<IRPC\s"
syn match asmx86PreCond "\<ENDR\>"
" Directives
syn match asmx86Directive "\<ALIGN\s"
syn match asmx86Directive "\<CHIP\s"
syn match asmx86Directive "\<COMLINE\s"
syn match asmx86Directive "\<COMMON\(\.S\)\=\s"
syn match asmx86Directive "\<DC\(\.[BWLSDXP]\)\=\s"
syn match asmx86Directive "\<DC\.\\[0-9]\s"me=e-3 " Special use in a macro def
syn match asmx86Directive "\<DCB\(\.[BWLSDXP]\)\=\s"
syn match asmx86Directive "\<DS\(\.[BWLSDXP]\)\=\s"
syn match asmx86Directive "\<END\>"
syn match asmx86Directive "\<EQU\s"
syn match asmx86Directive "\<FEQU\(\.[SDXP]\)\=\s"
syn match asmx86Directive "\<FAIL\>"
syn match asmx86Directive "\<FOPT\s"
syn match asmx86Directive "\<\(NO\)\=FORMAT\>"
syn match asmx86Directive "\<IDNT\>"
syn match asmx86Directive "\<\(NO\)\=LIST\>"
syn match asmx86Directive "\<LLEN\s"
syn match asmx86Directive "\<MASK2\>"
syn match asmx86Directive "\<NAME\s"
syn match asmx86Directive "\<NOOBJ\>"
syn match asmx86Directive "\<OFFSET\s"
syn match asmx86Directive "\<OPT\>"
syn match asmx86Directive "\<ORG\(\.[SL]\)\=\>"
syn match asmx86Directive "\<\(NO\)\=PAGE\>"
syn match asmx86Directive "\<PLEN\s"
syn match asmx86Directive "\<REG\s"
syn match asmx86Directive "\<RESTORE\>"
syn match asmx86Directive "\<SAVE\>"
syn match asmx86Directive "\<SECT\(\.S\)\=\s"
syn match asmx86Directive "\<SECTION\(\.S\)\=\s"
syn match asmx86Directive "\<SET\s"
syn match asmx86Directive "\<SPC\s"
syn match asmx86Directive "\<TTL\s"
syn match asmx86Directive "\<XCOM\s"
syn match asmx86Directive "\<XDEF\s"
syn match asmx86Directive "\<XREF\(\.S\)\=\s"
syn match asmx86Constraint "\.[a-z]\+[a-z0-9]*\>"
syn match asmx86Constraintconst "\.\(\(byte\)\|\(d\=word\)\)\>"
syn case match
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_asmx86_syntax_inits")
if version < 508
let did_asmx86_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later
" Comment Constant Error Identifier PreProc Special Statement Todo Type
"
" Constant Boolean Character Number String
" Identifier Function
" PreProc Define Include Macro PreCondit
" Special Debug Delimiter SpecialChar SpecialComment Tag
" Statement Conditional Exception Keyword Label Operator Repeat
" Type StorageClass Structure Typedef
HiLink asmx86Comment DarkGrey
HiLink asmx86Commentcpp DarkGrey
HiLink asmx86Commentc DarkGrey
HiLink asmx86Commentcxx DarkGrey
HiLink asmx86Commenthash DarkGrey
HiLink asmx86Todo Todo
HiLink hexNumber Number " Constant
HiLink octNumber Number " Constant
HiLink binNumber Number " Constant
HiLink decNumber Number " Constant
HiLink floatNumber Number " Constant
HiLink floatExponent Number " Constant
HiLink floatE SpecialChar " Statement
"HiLink floatE Number " Constant
HiLink asmx86Immediate Identifier " Statement
"HiLink asmx86Symbol Constant
HiLink asmx86String String " Constant
HiLink asmx86Included String " Constant
HiLink asmx86CharError Error
HiLink asmx86StringError Error
HiLink asmx86Reg Identifier
HiLink asmx86Operator Identifier
HiLink asmx86Include Include " PreProc
HiLink asmx86Macro Macro " PreProc
HiLink asmx86PreProc PreProc " PreProc
HiLink asmx86MacroParam Keyword " Statement
HiLink asmx86Directive Special
HiLink asmx86PreCond Special
HiLink asmx86Constraint Keyword
HiLink asmx86Constraintconst Type
HiLink asmx86Opcode Keyword
HiLink asmx86Opcode_mv Special
HiLink asmx86Opcode_pre Todo
HiLink asmx86Opcode_br Macro
HiLink asmx86Opcode_io String
HiLink asmx86Opcode_o2 String
" We have "normal" opcodes, "move" opcodes, "prefix" opcodes, and "branch"
" opcodes..... Prefixes are rare, and we should alert them VERY specially
HiLink asmx86Cond Conditional " Statement
HiLink asmx86Repeat Repeat " Statement
HiLink asmx86Label Type
delcommand HiLink
endif
let b:current_syntax = "asmx86"
" vim: ts=8 sw=2

View file

@ -1,113 +0,0 @@
" Vim syntax file
" Language: Haml (XHTML Abstraction Markup Language)
" Maintainer: Dmitry A. Ilyashevich <dmitry.ilyashevich@gmail.com>
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
"
" Version: 0.3
" Last Change: 2008-03-16
" Notes: Last synced with Haml 1.8
" TODO: Support for indented multiline sections
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
"
" Changes:
" - David Bushong added support for Haml 1.8's == syntax for ruby strings;
" - Lasse Jansen make syntax highlighting of multiline ruby commands work
" ("|" at the end of the line).
"
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'haml'
endif
if version < 600
so <sfile>:p:h/html.vim
syn include @rubyTop <sfile>:p:h/ruby.vim
else
runtime! syntax/html.vim
unlet b:current_syntax
syn include @rubyTop syntax/ruby.vim
endif
syn region hamlLineTag start="^\s*%[a-zA-Z0-9\-_\:]\+" end="$" oneline keepend contains=hamlHtmlTag,hamlCssClassIncluded,hamlCssIdIncluded,hamlHtmlTagEnd,hamlRubyCodeIncluded,hamlRubyHash,hamlSpecialChar
syn region hamlLineTag start="^\s*%[a-zA-Z0-9\-_\:]\+" end="$" oneline keepend contains=hamlHtmlTag,hamlCssClassIncluded,hamlCssIdIncluded,hamlHtmlTagEnd,hamlRubyCodeIncluded,hamlRubyHash,hamlRubyStringIncluded
syn match hamlHtmlTagEnd "/$" contained
syn match hamlHtmlTag "^\s*%[a-zA-Z0-9\-_\:]\+" contained contains=htmlTagName
syn match hamlCssClassIncluded "\.[a-zA-Z0-9\-_\:]\+" contained
syn match hamlCssIdIncluded "\#[a-zA-Z0-9\-_\:]\+" contained
syn region hamlLineClass start="^\s*\.[a-zA-Z0-9\-_\:]*" end="$" oneline keepend contains=hamlCssClass,hamlCssClassIncluded,hamlCssIdIncluded,hamlRubyCodeIncluded,hamlRubyStringIncluded
syn region hamlLineId start="^\s*\#[a-zA-Z0-9\-_\:]*" end="$" oneline keepend contains=hamlCssId,hamlCssClassIncluded,hamlCssIdIncluded,hamlRubyCodeIncluded,hamlRubyStringIncluded
syn match hamlCssId "^\s*#[a-zA-Z0-9\-_\:]*" contained
syn match hamlCssClass "^\s*\.[a-zA-Z0-9\-_\:]*" contained
syn region hamlRubyCodeIncluded matchgroup=Delimiter start="[=~-] " end="$" contained contains=@rubyTop,hamlRubyHash keepend
syn region hamlRubyHash matchgroup=Delimiter start="{" end="}" contained contains=@rubyTop keepend
syn region hamlRubyCode matchgroup=Delimiter start="^\s*[=~-]" end="$" contains=@rubyTop,hamlRubyHash keepend
syn region hamlRubyStringIncluded matchgroup=Delimiter start="== " end="$" contained contains=@rubyStringSpecial keepend
syn region hamlRubyString matchgroup=Delimiter start="^\s*==" end="$" contains=@rubyStringSpecial
syn match hamlPreDef "^\s*:[a-zA-Z0-9\-_\:]\+"
syn region hamlPreProc start="^\s*\\" end="$"
syn match hamlPreProc " |$"
syn match hamlComment "^!!!.*$"
syn match hamlComment "^\s*/.*$" contains=hamlTodo,@Spell
syn keyword hamlTodo TODO FIXME XXX contained
" special characters
syn match hamlSpecialChar contained "&#\=[0-9A-Za-z]\{1,8};"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_haml_syntax_inits")
if version < 508
let did_haml_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink hamlLineClass hamlLineTag
HiLink hamlLineId hamlLineTag
HiLink hamlCssClassIncluded hamlCssClass
HiLink hamlCssIdIncluded Type
HiLink hamlCssId Type
HiLink hamlHtmlTagEnd hamlHtmlTag
HiLink hamlPreDef hamlHtmlTag
HiLink hamlRubyHash hamlLineTag
HiLink hamlRubyCode hamlLineTag
HiLink hamlRubyCodeIncluded hamlLineTag
HiLink hamlRubyString hamlLineTag
HiLink hamlRubyStringIncluded hamlLineTag
HiLink hamlLineTag Text
HiLink hamlHtmlTag Statement
HiLink hamlCssClass Type
HiLink hamlPreProc PreProc
HiLink hamlComment Comment
HiLink hamlTodo Todo
HiLink hamlSpecialChar Special
delcommand HiLink
endif
let b:current_syntax = "haml"
if main_syntax == 'haml'
unlet main_syntax
endif
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:

View file

@ -1,134 +0,0 @@
" Vim syntax file
" Language: J
" Maintainer: Bill Lam<bbill.lam@gmail.com>
" Last Change:
" 2008 Apr 04 Initial commit
" 2009 Feb 13 UPload to jwiki
" It is by no means complete.
" Send comments, suggestions and requests to the maintainer.
if exists("b:current_syntax")
finish
endif
if exists("j_minlines")
let b:j_minlines = j_minlines
else
let b:j_minlines = 15
endif
exec "syn sync linebreaks=1 minlines=" . b:j_minlines
" jVerb
" = < <. <: > >. >: _: + +. +: * *. *: - -. -: % %. %: ^ ^. $ $. $: ~. ~: | |. |:
" , ,. ,: ; ;: # #. #: ! /: \: [ [: ] { {. {: {:: }. }: ". ": ? ?.
" A. c. C. e. E. i. i: I. j. L. o. p. p: q: r. s: u: x:
" _9: _8: _7: _6: _5: _4: _3: _2: _1: 0: 1: 2: 3: 4: 5: 6: 7: 8: 9:
" jNoun
" a. a: _. _:
" jConjuction
" ^: . .. .: : :. :: ;. !. !: " ` `: @ @. @: & &. &: &.: d. D. D: H. L: S: T.
" jAdverb
" ~ / \ /. \. } b. f. M. t. t:
syn match jName "\a\w*"
syn match jArgument "\<[xymnuv]\.\=\>" contained
syn match jNumber "[_0-9][_0-9\.a-zA-Z]*"
syn match jConjunction "\."
syn match jConjunction ":"
syn match jVerb "[-!#$%\*+,;<=>\?[\]^{|]"
syn match jConjunction "[\"&@`]"
syn match jAdverb "[/\\}~]"
syn match jVerb "[-\"#\$%\*+,<>\?^{|}~]\."
syn match jConjunction "[!&@;:\.]\."
syn match jAdverb "[/\\]\."
syn match jVerb "p\.\."
syn match jVerb "[-\"#\$%\*+,;<>\?\[{|}~/\\]:"
syn match jConjunction "[!&@^\.:]:"
syn match jConjunction "&\.:"
syn match jVerb "{::"
syn match jVerb "_\=\d:"
syn match jVerb "[AcCeEiIjLopr]\."
syn match jConjunction "[dDHT]\."
syn match jAdverb "[bfMt]\."
syn match jVerb "[ipqsux]:"
syn match jConjunction "[DLS]:"
syn match jAdverb "t:"
syn match jNoun "[a_][\.:]"
syn match jCopula "=[\.:]"
syn match jParenthesis "[()]"
syn match jControl "\<assert\." contained
syn match jControl "\<break\." contained
syn match jControl "\<case\." contained
syn match jControl "\<catch\." contained
syn match jControl "\<catchd\." contained
syn match jControl "\<catcht\." contained
syn match jControl "\<continue\." contained
syn match jControl "\<do\." contained
syn match jControl "\<else\." contained
syn match jControl "\<elseif\." contained
syn match jControl "\<end\." contained
syn match jControl "\<fcase\." contained
syn match jControl "\<for_\%(\a\w*\)\=\." contained
syn match jControl "\<goto_\%(\a\w*\)\." contained
syn match jControl "\<if\." contained
syn match jControl "\<label_\%(\a\w*\)\." contained
syn match jControl "\<return\." contained
syn match jControl "\<select\." contained
syn match jControl "\<throw\." contained
syn match jControl "\<try\." contained
syn match jControl "\<while\." contained
syn match jControl "\<whilst\." contained
syn match jError "\%('.*'\)*'"
" String and Character contstants
syn region jString oneline start="'" skip="''" end="'"
syn keyword jTodo FIXME contained
syn keyword jTodo TODO contained
syn keyword jTodo XXX contained
syn region jComment oneline start="NB\." end="$" contains=jTodo
" enable syntax folding with
setlocal foldmethod=syntax
setlocal nofoldenable
syntax region jDef start="\<\%([1-4]\|13\)\s\+:\s*0\>" end="^)\s*$" contains=ALLBUT,jTodo transparent keepend fold
syntax region jDef start="\<adverb\s\+define\>" end="^)\s*$" contains=ALLBUT,jTodo transparent keepend fold
syntax region jDef start="\<conjunction\s\+define\>" end="^)\s*$" contains=ALLBUT,jTodo transparent keepend fold
syntax region jDef start="\<verb\s\+define\>" end="^)\s*$" contains=ALLBUT,jTodo transparent keepend fold
syntax region jDef start="\<monad\s\+define\>" end="^)\s*$" contains=ALLBUT,jTodo transparent keepend fold
syntax region jDef start="\<dyad\s\+define\>" end="^)\s*$" contains=ALLBUT,jTodo transparent keepend fold
" syntax region jBlock start="\<\%(if\|select\|try\|\%(for_\%(\a\w*\)\=\)\|while\|whilst\)\." end="\<end\." contained contains=ALLBUT,jDef,jNounDef,jTodo transparent fold
syntax region jNounDef start="\<0\s\+:\s*0\s*$" end="^)\s*$" keepend fold
syntax region jNounDef start="\<noun\s\+define\s*$" end="^)\s*$" keepend fold
" Define the default highlighting.
if !exists("did_j_syntax_inits")
hi link jAdverb Type
hi link jArgument Operator
hi link jComment Comment
hi link jConjunction Macro
hi link jControl Keyword
hi link jCopula Special
hi link jError Error
hi link jName Identifier
hi link jNoun String
hi link jNounDef Define
hi link jNumber Number
hi link jParenthesis Delimiter
hi link jString String
hi link jTodo Todo
hi link jVerb Operator
endif
let b:current_syntax = "j"

View file

@ -1,149 +0,0 @@
" Vim syntax file
" Language: JFlex
" Maintainer: Gerwin Klein <lsf@jflex.de>
" Last Change: $Revision: 50 $, $Date: 2003-06-08 21:01:12 +1000 (Sun, 08 Jun 2003) $
" Thanks to Michael Brailsford for help and suggestions
" Quit when a syntax file was already loaded {{{
if exists("b:current_syntax")
finish
endif
"}}}
" Include java syntax {{{
if version >= 600
runtime! syntax/java.vim
unlet b:current_syntax
else
so $VIMRUNTIME/syntax/java.vim
endif
"}}}
syn cluster jflexOptions contains=jflexOption,jflexCodeInclude,jflexComment,jflexMacroIdent,jflexMacroRegExp,jflexOptionError
syn cluster jflexRules contains=jflexRule,jflexComment,jflexActionCode,jflexRuleStates,jflexRegExp
" java code section
syn region jflexStart start="/\*\|//\|import\|package\|class"me=s end="^%%"me=e-2 contains=@javaTop nextgroup=jflexOptionReg
" %%
" options
syn region jflexOptionReg matchgroup=jflexSectionSep start="^%%" end="^%%"me=e-2 contains=@jflexOptions nextgroup=jflexRulesReg
syn match jflexOptionError "%\i*" contained
syn match jflexOption "^\(%s\|%x\)" contained
syn match jflexOption "^%state" contained
syn match jflexOption "^%states" contained
syn match jflexOption "^%xstate" contained
syn match jflexOption "^%xstates" contained
syn match jflexOption "^%char" contained
syn match jflexOption "^%line" contained
syn match jflexOption "^%column" contained
syn match jflexOption "^%byaccj" contained
syn match jflexOption "^%cup" contained
syn match jflexOption "^%cupsym" contained
syn match jflexOption "^%cupdebug" contained
syn match jflexOption "^%eofclose" contained
syn match jflexOption "^%class" contained
syn match jflexOption "^%function" contained
syn match jflexOption "^%type" contained
syn match jflexOption "^%integer" contained
syn match jflexOption "^%int" contained
syn match jflexOption "^%intwrap" contained
syn match jflexOption "^%yyeof" contained
syn match jflexOption "^%notunix" contained
syn match jflexOption "^%7bit" contained
syn match jflexOption "^%8bit" contained
syn match jflexOption "^%full" contained
syn match jflexOption "^%16bit" contained
syn match jflexOption "^%unicode" contained
syn match jflexOption "^%caseless" contained
syn match jflexOption "^%ignorecase" contained
syn match jflexOption "^%implements" contained
syn match jflexOption "^%extends" contained
syn match jflexOption "^%public" contained
syn match jflexOption "^%apiprivate" contained
syn match jflexOption "^%final" contained
syn match jflexOption "^%abstract" contained
syn match jflexOption "^%debug" contained
syn match jflexOption "^%standalone" contained
syn match jflexOption "^%switch" contained
syn match jflexOption "^%table" contained
syn match jflexOption "^%pack" contained
syn match jflexOption "^%include" contained
syn match jflexOption "^%buffer" contained
syn match jflexOption "^%initthrow" contained
syn match jflexOption "^%eofthrow" contained
syn match jflexOption "^%yylexthrow" contained
syn match jflexOption "^%throws" contained
syn match jflexOption "^%scannerror" contained
syn match jflexMacroIdent "\I\i*\s*="me=e-1 contained nextgroup=jflexMacroRegExp
syn region jflexMacroRegExp matchgroup=jflexOperator start="=" end="^\(%\|\I\|\i\|/\)"me=e-1 contains=NONE contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%{" end="^%}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%init{" end="^%init}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%initthrow{" end="^%initthrow}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%eof{" end="^%eof}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%eofthrow{" end="^%eofthrow}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%yylexthrow{" end="^%yylexthrow}" contains=@javaTop contained
syn region jflexCodeInclude matchgroup=jflexCodeIncludeMark start="^%eofval{" end="^%eofval}" contains=@javaTop contained
" rules (end pattern shouldn't occur, if it does anyway we just stay in jflexRulesReg)
syn region jflexRulesReg matchgroup=jflexSectionSep start="^%%" end="^%%"me=e-2 contains=@jflexRules
" at first everything but strings is a regexp
syn match jflexRegExp "\([^\" \t]\|\\\"\)\+" contained
" take out comments
syn match jflexComment "//.*" contained
syn region jflexComment start="/\*" end="\*/" contained contains=jflexComment
" lex states
syn match jflexRuleStates "<\s*\I\i*\(\s*,\s*\I\i*\)*\s*>" contained skipnl skipwhite nextgroup=jflexStateGroup
" action code (only after states braces and macro use)
syn region jflexActionCode matchgroup=Delimiter start="{" end="}" contained contains=@javaTop,jflexJavaBraces
" macro use
syn match jflexRegExp "{\s*\I\i*\s*}" contained
" state braces (only active after <state>)
syn region jflexStateGroup matchgroup=jflexRuleStates start="{$" start="{\s" end="}" contained contains=@jflexRules
" string
syn region jflexRegExp matchgroup=String start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
" not to be confused with a state
syn match jflexRegExp "<<EOF>>" contained
" escape sequence
syn match jflexRegExp "\\." contained
" keep braces in actions balanced
syn region jflexJavaBraces start="{" end="}" contained contains=@javaTop,jflexJavaBraces
" syncing
syn sync clear
syn sync minlines=10
syn sync match jflexSync grouphere jflexOptionReg "^%[a-z]"
syn sync match jflexSync grouphere jflexRulesReg "^<"
" highlighting
hi link jflexOption Special
hi link jflexMacroIdent Ident
hi link jflexMacroRegExp Macro
hi link jflexOptionError Error
hi link jflexComment Comment
hi link jflexOperator Operator
hi link jflexRuleStates Special
hi link jflexRegExp Function
hi jflexSectionSep guifg=yellow ctermfg=yellow guibg=blue ctermbg=blue gui=bold cterm=bold
hi link jflexCodeIncludeMark jflexSectionSep
let b:current_syntax="jflex"

View file

@ -1,74 +0,0 @@
" Vim syntax file
" Language: KPL
" Maintainer: Adam Blinkinsop <blinks@acm.org>
" Last Change: 2007 Apr 17
" Remark: A Kernel Programming Language used by the BLITZ tools.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Comments
syntax region kplSingleLineComment start=/--/ end=/$/ contained
syntax region kplMultiLineComment start=/\/\*/ end=/\*\// contained
syntax cluster kplComment contains=kplSingleLineComment,kplMultiLineComment
" Types
syntax keyword kplType char int double bool void typeOfNull anyType ptr to array of function returns
syntax region kplRecord matchgroup=kplType start=/record/ end=/endRecord/ contains=ALL
" Expressions
syntax keyword kplOperator asPtrTo asInteger arraySize isInstanceOf isKindOf new alloc sizeOf
syntax match kplOp /[][.()<=>|&^!+*/%]/ contained
syntax keyword kplConstant null self super
syntax keyword kplBoolean true false
syntax match kplCharacter /'\\?.'/
syntax match kplInteger /[0-9]+/
syntax match kplHex /0x[0-9a-fA-F]+/
syntax match kplFloat /[0-9]+\.[0-9]+(e[0-9]+)?/
syntax region kplString start=/"/ end=/"/ skip=/\\"/
" Statements
syntax keyword kplConditional if elseIf else endIf switch endSwitch
syntax keyword kplRepeat while endWhile do until for endFor
syntax keyword kplStatement break continue free debug
syntax keyword kplLabel case default
syntax keyword kplException try catch throw endTry
" Block Definitions
syntax keyword kplKeyword extends messages implements superclass fields uses renaming to const var errors type enum returns function[s] external endFunction infix prefix method[s] endMethod
syntax region kplInterface matchgroup=kplDefBlock start=/interface/ end=/endInterface/ contains=ALL
syntax region kplClass matchgroup=kplDefBlock start=/class/ end=/endClass/ contains=ALL
syntax region kplBehavior matchgroup=kplDefBlock start=/behavior/ end=/endBehavior/ contains=ALL
" File Blocks
syntax region kplHeader matchgroup=kplFile start=/header/ end=/endHeader/ contains=ALLBUT,kplHeader,kplCode
syntax region kplCode matchgroup=kplFile start=/code/ end=/endCode/ contains=ALLBUT,kplHeader,kplCode
syntax sync match kplCode grouphere kplCode 'code'
syntax sync match kplCode groupthere kplCode 'endCode'
syntax sync match kplHeader grouphere kplHeader 'region'
syntax sync match kplHeader groupthere kplHeader 'endRegion'
hi def link kplSingleLineComment Comment
hi def link kplMultiLineComment Comment
hi def link kplType Type
hi def link kplOperator Operator
hi def link kplOp Operator
hi def link kplConstant Constant
hi def link kplBoolean Boolean
hi def link kplString String
hi def link kplCharacter Character
hi def link kplInteger Number
hi def link kplHex Number
hi def link kplFloat Float
hi def link kplConditional Conditional
hi def link kplRepeat Repeat
hi def link kplStatement Statement
hi def link kplLabel Label
hi def link kplException Exception
hi def link kplKeyword Keyword
hi def link kplFile Special
hi def link kplDefBlock Structure

View file

@ -1,144 +0,0 @@
" Vim syntax file
" Language: Haskell with literate comments, Bird style,
" TeX style and plain text surrounding
" \begin{code} \end{code} blocks
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl>
" Last Change: Jan 05, 2008 by Kalman Noel
" Version: 1.02
"
" Thanks to Ian Lynagh for thoughtful comments on initial versions and
" for the inspiration for writing this in the first place.
"
" This style guesses as to the type of markup used in a literate haskell
" file and will highlight (La)TeX markup if it finds any
" This behaviour can be overridden, both glabally and locally using
" the lhs_markup variable or b:lhs_markup variable respectively.
"
" lhs_markup must be set to either tex or none to indicate that
" you always want (La)TeX highlighting or no highlighting
" must not be set to let the highlighting be guessed
" b:lhs_markup must be set to eiterh tex or none to indicate that
" you want (La)TeX highlighting or no highlighting for
" this particular buffer
" must not be set to let the highlighting be guessed
"
"
" 2004 February 18: New version, based on Ian Lynagh's TeX guessing
" lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim
" 2004 February 20: Cleaned up the guessing and overriding a bit
" 2004 February 23: Cleaned up syntax highlighting for \begin{code} and
" \end{code}, added some clarification to the attributions
" 2008 January 05: Fixed broken highlighting when some totally common TeX
" environments or commands are used (document, section, ...)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" First off, see if we can inherit a user preference for lhs_markup
if !exists("b:lhs_markup")
if exists("lhs_markup")
if lhs_markup =~ '\<\%(tex\|none\)\>'
let b:lhs_markup = matchstr(lhs_markup,'\<\%(tex\|none\)\>')
else
echohl WarningMsg | echo "Unknown value of lhs_markup" | echohl None
let b:lhs_markup = "unknown"
endif
else
let b:lhs_markup = "unknown"
endif
else
if b:lhs_markup !~ '\<\%(tex\|none\)\>'
let b:lhs_markup = "unknown"
endif
endif
" Remember where the cursor is, and go to upperleft
let s:oldline=line(".")
let s:oldcolumn=col(".")
call cursor(1,1)
" If no user preference, scan buffer for our guess of the markup to
" highlight. We only differentiate between TeX and plain markup, where
" plain is not highlighted. The heuristic for finding TeX markup is if
" one of the following occurs anywhere in the file:
" - \documentclass
" - \begin{env} (for env != code)
" - \part, \chapter, \section, \subsection, \subsubsection, etc
if b:lhs_markup == "unknown"
if search('%\|\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0
let b:lhs_markup = "tex"
else
let b:lhs_markup = "plain"
endif
endif
" If user wants us to highlight TeX syntax, read it.
if b:lhs_markup == "tex"
if version < 600
source <sfile>:p:h/tex.vim
set isk+=_
else
runtime! syntax/tex.vim
unlet b:current_syntax
" Tex.vim removes "_" from 'iskeyword', but we need it for Haskell.
setlocal isk+=_
endif
endif
" Literate Haskell is Haskell in between text, so at least read Haskell
" highlighting
if version < 600
syntax include @haskellTop <sfile>:p:h/haskell.vim
else
syntax include @haskellTop syntax/haskell.vim
endif
" Where Haskell is nested within TeX
syntax cluster lhstex contains=tex.*Zone,texAbstract
syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedIn=@lhstex
syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,@beginCode containedIn=@lhstex
syntax match lhsBirdTrack "^>" contained
syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained
syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}"
syntax cluster beginCode contains=beginCodeBegin,beginCodeCode
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_tex_syntax_inits")
if version < 508
let did_tex_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink lhsBirdTrack Comment
HiLink beginCodeBegin texCmdName
HiLink beginCodeCode texSection
delcommand HiLink
endif
" Restore cursor to original position, as it may have been disturbed
" by the searches in our guessing code
call cursor (s:oldline, s:oldcolumn)
unlet s:oldline
unlet s:oldcolumn
let b:current_syntax = "lhaskell"
" vim: ts=8

View file

@ -1,39 +0,0 @@
" Vim syntax file
" Language: eruby
" Maintainer: Michael Brailsford <brailsmt@yahoo.com>
" Installation:
" To automatilcally load this file when a .rhtml file is opened, add the
" following lines to ~/.vim/filetype.vim:
"
" augroup filetypedetect
" au! BufRead,BufNewFile *.rhtml setfiletype eruby
" augroup END
"
" You will have to restart vim for this to take effect. In any case it
" is a good idea to read ":he new-filetype" so that you know what is going
" on, and why the above lines work.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
"Source the html syntax file
ru! syntax/html.vim
"Set the filetype to html to load the html ftplugins
"set ft=html
unlet b:current_syntax
"Put the ruby syntax file in @rubyTop
syn include @rubyTop syntax/ruby.vim
syn region erubyBlock matchgroup=erubyRubyDelim start=#<%=\?# end=#%># keepend containedin=ALL contains=@rubyTop,erubyEnd
syn region erubyComment start=+<%#+ end=#%># keepend
syn match erubyEnd #\<end\>#
hi link erubyRubyDelim todo
hi link erubyComment comment
hi link erubyEnd rubyControl
" vim: set ts=4 sw=4:

View file

@ -1,11 +0,0 @@
" load all of the HTML info
"source $VIMRUNTIME/syntax/html.vim
runtime! syntax/html.vim
unlet b:current_syntax
" load all of the ruby info into @Ruby
syntax include @Ruby $VIMRUNTIME/syntax/ruby.vim
unlet b:current_syntax
syntax region rhtmlRuby start="<%" end="%" contains=@Ruby,rhtmlRuby
let b:current_syntax = "rhtml"

View file

@ -1,25 +0,0 @@
" HTML with embedded Ruby
" Language: HTML + Ruby
" Maintainer: Tobias DiPasquale <anany / ece.villanova.edu>
" Last Modified: 2002 Mar 07
" Location: http://cbcg.net/rhtml.vim
" for portability
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" load all of the HTML info
source $VIMRUNTIME/syntax/html.vim
unlet b:current_syntax
" load all of the ruby info into @Ruby
syntax include @Ruby $VIMRUNTIME/syntax/ruby.vim
syntax region rhtmlRuby
\ start=/<%/
\ end=/%>/
\ contains=@Ruby, rhtmlRuby
let b:current_syntax = "rhtml"

View file

@ -1,6 +0,0 @@
" load all of the HTML info
source $VIMRUNTIME/syntax/html.vim
unlet b:current_syntax
syntax include @Ruby runtime! syntax/ruby.vim
syntax region rhtmlRuby start=+<%+ end=+%>+ contains=@Ruby,rhtmlRuby
let b:current_syntax="rhtml"

View file

@ -1,149 +0,0 @@
" Vim syntax file
"
" Language: Ragel
" Author: Adrian Thurston
syntax clear
"
" Outside code
"
" Comments
syntax region ocComment start="\/\*" end="\*\/"
syntax match ocComment "\/\/.*$"
" Anything preprocessor
syntax match ocPreproc "#\(.\|\\\n\)*$"
syntax region ocPreproc start="#" end="[^\\]$"
" Strings
syntax match ocLiteral "'\(\\.\|[^'\\]\)*'"
syntax match ocLiteral "\"\(\\.\|[^\"\\]\)*\""
" C/C++ Keywords
syntax keyword ocType unsigned signed void char short int long float double bool
syntax keyword ocType inline static extern register const volatile auto
syntax keyword ocType union enum struct class typedef
syntax keyword ocType namespace template typename mutable
syntax keyword ocKeyword break continue default do else for
syntax keyword ocKeyword goto if return switch while
syntax keyword ocKeyword new delete this using friend public private protected sizeof
syntax keyword ocKeyword throw try catch operator typeid
syntax keyword ocKeyword and bitor xor compl bitand and_eq or_eq xor_eq not not_eq
syntax keyword ocKeyword static_cast dynamic_cast
" Numbers
syntax match ocNumber "[0-9][0-9]*"
syntax match ocNumber "0x[0-9a-fA-F][0-9a-fA-F]*"
" Booleans
syntax keyword ocBoolean true false
" Identifiers
syntax match anyId "[a-zA-Z_][a-zA-Z_0-9]*"
" Inline code only
syntax keyword fsmType fpc fc fcurs fbuf fblen ftargs fstack
syntax keyword fsmKeyword fhold fgoto fcall fret fentry fnext fexec fbreak
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords
syntax region machineSpec1 matchgroup=beginRL start="%%{" end="}%%" contains=@rlItems
syntax region machineSpec2 matchgroup=beginRL start="%%[^{]"rs=e-1 end="$" keepend contains=@rlItems
syntax region machineSpec2 matchgroup=beginRL start="%%$" end="$" keepend contains=@rlItems
" Comments
syntax match rlComment "#.*$" contained
" Literals
syntax match rlLiteral "'\(\\.\|[^'\\]\)*'[i]*" contained
syntax match rlLiteral "\"\(\\.\|[^\"\\]\)*\"[i]*" contained
syntax match rlLiteral /\/\(\\.\|[^\/\\]\)*\/[i]*/ contained
syntax match rlLiteral "\[\(\\.\|[^\]\\]\)*\]" contained
" Numbers
syntax match rlNumber "[0-9][0-9]*" contained
syntax match rlNumber "0x[0-9a-fA-F][0-9a-fA-F]*" contained
" Operators
syntax match rlAugmentOps "[>$%@]" contained
syntax match rlAugmentOps "<>\|<" contained
syntax match rlAugmentOps "[>\<$%@][!\^/*~]" contained
syntax match rlAugmentOps "[>$%]?" contained
syntax match rlAugmentOps "<>[!\^/*~]" contained
syntax match rlAugmentOps "=>" contained
syntax match rlOtherOps "->" contained
syntax match rlOtherOps ":>" contained
syntax match rlOtherOps ":>>" contained
syntax match rlOtherOps "<:" contained
" Keywords
" FIXME: Enable the range keyword post 5.17.
" syntax keyword rlKeywords machine action context include range contained
syntax keyword rlKeywords machine action context include import export prepush postpop contained
syntax keyword rlExprKeywords when inwhen outwhen err lerr eof from to contained
" Case Labels
syntax keyword caseLabelKeyword case contained
syntax cluster caseLabelItems contains=ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,caseLabelKeyword,ocNumber,ocBoolean,anyId,fsmType,fsmKeyword
syntax match caseLabelColon "case" contains=@caseLabelItems
syntax match caseLabelColon "case[\t ]\+.*:$" contains=@caseLabelItems
syntax match caseLabelColon "case[\t ]\+.*:[^=:]"me=e-1 contains=@caseLabelItems
" Labels
syntax match ocLabelColon "^[\t ]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:$" contains=anyLabel
syntax match ocLabelColon "^[\t ]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:[^=:]"me=e-1 contains=anyLabel
syntax match rlLabelColon "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:$" contained contains=anyLabel
syntax match rlLabelColon "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:[^=:>]"me=e-1 contained contains=anyLabel
syntax match anyLabel "[a-zA-Z_][a-zA-Z_0-9]*" contained
" All items that can go in a code block.
syntax cluster inlineItems contains=rlCodeCurly,ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,ocNumber,ocBoolean,ocLabelColon,anyId,fsmType,fsmKeyword,caseLabelColon
" Blocks of code. rlCodeCurly is recursive.
syntax region rlCodeCurly matchgroup=NONE start="{" end="}" contained contains=@inlineItems
syntax region rlCodeSemi matchgroup=Type start="\<alphtype\>" start="\<getkey\>" start="\<access\>" start="\<variable\>" matchgroup=NONE end=";" contained contains=@inlineItems
syntax region rlWrite matchgroup=Type start="\<write\>" matchgroup=NONE end="[;)]" contained contains=rlWriteKeywords,rlWriteOptions
syntax keyword rlWriteKeywords init data exec exports start error first_final contained
syntax keyword rlWriteOptions noerror nofinal noprefix noend nocs contained
"
" Sync at the start of machine specs.
"
" Match The ragel delimiters only if there quotes no ahead on the same line.
" On the open marker, use & to consume the leader.
syntax sync match ragelSyncPat grouphere NONE "^[^\'\"%]*%%{&^[^\'\"%]*"
syntax sync match ragelSyncPat grouphere NONE "^[^\'\"%]*%%[^{]&^[^\'\"%]*"
syntax sync match ragelSyncPat grouphere NONE "^[^\'\"]*}%%"
"
" Specifying Groups
"
hi link ocComment Comment
hi link ocPreproc Macro
hi link ocLiteral String
hi link ocType Type
hi link ocKeyword Keyword
hi link ocNumber Number
hi link ocBoolean Boolean
hi link rlComment Comment
hi link rlNumber Number
hi link rlLiteral String
hi link rlAugmentOps Keyword
hi link rlExprKeywords Keyword
hi link rlWriteKeywords Keyword
hi link rlWriteOptions Keyword
hi link rlKeywords Type
hi link fsmType Type
hi link fsmKeyword Keyword
hi link anyLabel Label
hi link caseLabelKeyword Keyword
hi link beginRL Type
let b:current_syntax = "ragel"

View file

@ -1,102 +0,0 @@
" Vim syntax file
" Language: tmux(1) configuration file
" Maintainer: Tiago Cunha <me@tiagocunha.org>
" Last Change: $Date: 2010/02/26 13:33:22 $
" License: This file is placed in the public domain.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
setlocal iskeyword+=-
syntax case match
syn keyword tmuxAction any current none
syn keyword tmuxBoolean off on
syn keyword tmuxCmds detach[-client] ls list-sessions neww new-window
syn keyword tmuxCmds bind[-key] unbind[-key] prev[ious-window] last[-window]
syn keyword tmuxCmds lsk list-keys set[-option] renamew rename-window selectw
syn keyword tmuxCmds select-window lsw list-windows attach[-session]
syn keyword tmuxCmds send-prefix refresh[-client] killw kill-window lsc
syn keyword tmuxCmds list-clients linkw link-window unlinkw unlink-window
syn keyword tmuxCmds next[-window] send[-keys] swapw swap-window
syn keyword tmuxCmds rename[-session] kill-session switchc switch-client
syn keyword tmuxCmds has[-session] copy-mode pasteb paste-buffer
syn keyword tmuxCmds new[-session] start[-server] kill-server setw
syn keyword tmuxCmds set-window-option show[-options] showw show-window-options
syn keyword tmuxCmds command-prompt setb set-buffer showb show-buffer lsb
syn keyword tmuxCmds list-buffers deleteb delete-buffer lscm list-commands
syn keyword tmuxCmds movew move-window select-prompt respawnw respawn-window
syn keyword tmuxCmds source[-file] info server-info clock-mode lock[-server]
syn keyword tmuxCmds saveb save-buffer downp down-pane killp
syn keyword tmuxCmds kill-pane resizep resize-pane selectp select-pane swapp
syn keyword tmuxCmds swap-pane splitw split-window upp up-pane choose-session
syn keyword tmuxCmds choose-window loadb load-buffer copyb copy-buffer suspendc
syn keyword tmuxCmds suspend-client findw find-window breakp break-pane nextl
syn keyword tmuxCmds next-layout rotatew rotate-window confirm[-before]
syn keyword tmuxCmds clearhist clear-history selectl select-layout if[-shell]
syn keyword tmuxCmds display[-message] setenv set-environment showenv
syn keyword tmuxCmds show-environment choose-client displayp display-panes
syn keyword tmuxCmds run[-shell] lockc lock-client locks lock-session lsp
syn keyword tmuxCmds list-panes pipep pipe-pane showmsgs show-messages capturep
syn keyword tmuxCmds capture-pane joinp join-pane
syn keyword tmuxOptsSet prefix status status-fg status-bg bell-action
syn keyword tmuxOptsSet default-command history-limit status-left status-right
syn keyword tmuxOptsSet status-interval set-titles display-time buffer-limit
syn keyword tmuxOptsSet status-left-length status-right-length message-fg
syn keyword tmuxOptsSet message-bg lock-after-time default-path repeat-time
syn keyword tmuxOptsSet message-attr status-attr status-keys set-remain-on-exit
syn keyword tmuxOptsSet status-utf8 default-terminal visual-activity
syn keyword tmuxOptsSet visual-bell visual-content status-justify
syn keyword tmuxOptsSet terminal-overrides status-left-attr status-left-bg
syn keyword tmuxOptsSet status-left-fg status-right-attr status-right-bg
syn keyword tmuxOptsSet status-right-fg update-environment base-index
syn keyword tmuxOptsSet display-panes-colour display-panes-time default-shell
syn keyword tmuxOptsSet set-titles-string lock-command lock-server
syn keyword tmuxOptsSet mouse-select-pane message-limit quiet escape-time
syn keyword tmuxOptsSet pane-active-border-bg pane-active-border-fg
syn keyword tmuxOptsSet pane-border-bg pane-border-fg
syn keyword tmuxOptsSet display-panes-active-colour alternate-screen
syn keyword tmuxOptsSetw monitor-activity aggressive-resize force-width
syn keyword tmuxOptsSetw force-height remain-on-exit uft8 mode-fg mode-bg
syn keyword tmuxOptsSetw mode-keys clock-mode-colour clock-mode-style
syn keyword tmuxOptsSetw xterm-keys mode-attr window-status-attr
syn keyword tmuxOptsSetw window-status-bg window-status-fg automatic-rename
syn keyword tmuxOptsSetw main-pane-width main-pane-height monitor-content
syn keyword tmuxOptsSetw window-status-current-attr window-status-current-bg
syn keyword tmuxOptsSetw window-status-current-fg mode-mouse synchronize-panes
syn keyword tmuxOptsSetw window-status-format window-status-current-format
syn keyword tmuxOptsSetw word-separators
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
syn match tmuxKey /\(C-\|M-\|\^\)\p/ display
syn match tmuxNumber /\d\+/ display
syn match tmuxOptions /\s-\a\+/ display
syn match tmuxVariable /\w\+=/ display
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
syn region tmuxComment start=/#/ end=/$/ contains=tmuxTodo display oneline
syn region tmuxString start=/"/ end=/"/ display oneline
syn region tmuxString start=/'/ end=/'/ display oneline
hi def link tmuxAction Boolean
hi def link tmuxBoolean Boolean
hi def link tmuxCmds Keyword
hi def link tmuxComment Comment
hi def link tmuxKey Special
hi def link tmuxNumber Number
hi def link tmuxOptions Identifier
hi def link tmuxOptsSet Function
hi def link tmuxOptsSetw Function
hi def link tmuxString String
hi def link tmuxTodo Todo
hi def link tmuxVariable Constant
hi def link tmuxVariableExpansion Constant
let b:current_syntax = "tmux"

File diff suppressed because it is too large Load diff

View file

@ -1,3 +0,0 @@
set autolist
set autoeval
set autoreload

1
.rspec
View file

@ -1 +0,0 @@
--color

613
.skhdrc
View file

@ -1,613 +0,0 @@
#### Default contents preserved for future reading
#### # NOTE(koekeishiya): A list of all built-in modifier and literal keywords can
#### # be found at https://github.com/koekeishiya/skhd/issues/1
#### #
#### # A hotkey is written according to the following rules:
#### #
#### # hotkey = <mode> '<' <action> | <action>
#### #
#### # mode = 'name of mode' | <mode> ',' <mode>
#### #
#### # action = <keysym> '[' <proc_map_lst> ']' | <keysym> '->' '[' <proc_map_lst> ']'
#### # <keysym> ':' <command> | <keysym> '->' ':' <command>
#### # <keysym> ';' <mode> | <keysym> '->' ';' <mode>
#### #
#### # keysym = <mod> '-' <key> | <key>
#### #
#### # mod = 'modifier keyword' | <mod> '+' <mod>
#### #
#### # key = <literal> | <keycode>
#### #
#### # literal = 'single letter or built-in keyword'
#### #
#### # keycode = 'apple keyboard kVK_<Key> values (0x3C)'
#### #
#### # proc_map_lst = * <proc_map>
#### #
#### # proc_map = <string> ':' <command>
#### #
#### # string = '"' 'sequence of characters' '"'
#### #
#### # command = command is executed through '$SHELL -c' and
#### # follows valid shell syntax. if the $SHELL environment
#### # variable is not set, it will default to '/bin/bash'.
#### # when bash is used, the ';' delimeter can be specified
#### # to chain commands.
#### #
#### # to allow a command to extend into multiple lines,
#### # prepend '\' at the end of the previous line.
#### #
#### # an EOL character signifies the end of the bind.
#### #
#### # -> = keypress is not consumed by skhd
#### #
#### # NOTE(koekeishiya): A mode is declared according to the following rules:
#### #
#### # mode_decl = '::' <name> '@' ':' <command> | '::' <name> ':' <command> |
#### # '::' <name> '@' | '::' <name>
#### #
#### # name = desired name for this mode,
#### #
#### # @ = capture keypresses regardless of being bound to an action
#### #
#### # command = command is executed through '$SHELL -c' and
#### # follows valid shell syntax. if the $SHELL environment
#### # variable is not set, it will default to '/bin/bash'.
#### # when bash is used, the ';' delimeter can be specified
#### # to chain commands.
#### #
#### # to allow a command to extend into multiple lines,
#### # prepend '\' at the end of the previous line.
#### #
#### # an EOL character signifies the end of the bind.
####
#### # add an on_enter command to the default mode
#### # :: default : chunkc border::color 0xff775759
#### #
#### # defines a new mode 'test' with an on_enter command, that captures keypresses
#### # :: test @ : chunkc border::color 0xff24ccaa
#### #
#### # from 'default' mode, activate mode 'test'
#### # cmd - x ; test
#### #
#### # from 'test' mode, activate mode 'default'
#### # test < cmd - x ; default
#### #
#### # launch a new terminal instance when in either 'default' or 'test' mode
#### # default, test < cmd - return : open -na /Applications/Terminal.app
####
#### # application specific bindings
#### #
#### # cmd - n [
#### # "kitty" : echo "hello kitty"
#### # "qutebrowser" : echo "hello qutebrowser"
#### # "finder" : false
#### # ]
####
#### # open terminal, blazingly fast compared to iTerm/Hyper
#### cmd - return : /Applications/Kitty.app/Contents/MacOS/kitty --single-instance -d ~
####
#### # open qutebrowser
#### cmd + shift - return : ~/Scripts/qtb.sh
####
#### # open mpv
#### cmd - m : open -na /Applications/mpv.app $(pbpaste)
####
#### # close focused window
#### alt - w : chunkc tiling::window --close
####
#### # focus window
#### alt - h : chunkc tiling::window --focus west
#### alt - j : chunkc tiling::window --focus south
#### alt - k : chunkc tiling::window --focus north
#### alt - l : chunkc tiling::window --focus east
####
#### cmd - j : chunkc tiling::window --focus prev
#### cmd - k : chunkc tiling::window --focus next
####
#### # equalize size of windows
#### shift + alt - 0 : chunkc tiling::desktop --equalize
####
#### # swap window
#### shift + alt - h : chunkc tiling::window --swap west
#### shift + alt - j : chunkc tiling::window --swap south
#### shift + alt - k : chunkc tiling::window --swap north
#### shift + alt - l : chunkc tiling::window --swap east
####
#### # move window
#### shift + cmd - h : chunkc tiling::window --warp west
#### shift + cmd - j : chunkc tiling::window --warp south
#### shift + cmd - k : chunkc tiling::window --warp north
#### shift + cmd - l : chunkc tiling::window --warp east
####
#### # make floating window fill screen
#### shift + alt - up : chunkc tiling::window --grid-layout 1:1:0:0:1:1
####
#### # make floating window fill left-half of screen
#### shift + alt - left : chunkc tiling::window --grid-layout 1:2:0:0:1:1
####
#### # make floating window fill right-half of screen
#### shift + alt - right : chunkc tiling::window --grid-layout 1:2:1:0:1:1
####
#### # create desktop, move window and follow focus
#### shift + cmd - n : chunkc tiling::desktop --create;\
#### id=$(chunkc tiling::query --desktops-for-monitor $(chunkc tiling::query --monitor-for-desktop $(chunkc tiling::query --desktop id)));\
#### chunkc tiling::window --send-to-desktop $(echo ${id##* });\
#### chunkc tiling::desktop --focus $(echo ${id##* })
####
#### # create desktop and follow focus
#### cmd + alt - n : chunkc tiling::desktop --create;\
#### id=$(chunkc tiling::query --desktops-for-monitor $(chunkc tiling::query --monitor-for-desktop $(chunkc tiling::query --desktop id)));\
#### chunkc tiling::desktop --focus $(echo ${id##* })
#### # destroy desktop
#### cmd + alt - w : chunkc tiling::desktop --annihilate
####
#### # fast focus desktop
#### cmd + alt - x : chunkc tiling::desktop --focus $(chunkc get _last_active_desktop)
#### cmd + alt - z : chunkc tiling::desktop --focus prev
#### cmd + alt - c : chunkc tiling::desktop --focus next
#### cmd + alt - 1 : chunkc tiling::desktop --focus 1
#### cmd + alt - 2 : chunkc tiling::desktop --focus 2
#### cmd + alt - 3 : chunkc tiling::desktop --focus 3
#### cmd + alt - 4 : chunkc tiling::desktop --focus 4
#### cmd + alt - 5 : chunkc tiling::desktop --focus 5
#### cmd + alt - 6 : chunkc tiling::desktop --focus 6
#### # cmd + alt - 7 : chunkc tiling::desktop --focus 7
####
#### # send window to desktop
#### shift + alt - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop)
#### shift + alt - z : chunkc tiling::window --send-to-desktop prev
#### shift + alt - c : chunkc tiling::window --send-to-desktop next
#### shift + alt - 1 : chunkc tiling::window --send-to-desktop 1
#### shift + alt - 2 : chunkc tiling::window --send-to-desktop 2
#### shift + alt - 3 : chunkc tiling::window --send-to-desktop 3
#### shift + alt - 4 : chunkc tiling::window --send-to-desktop 4
#### shift + alt - 5 : chunkc tiling::window --send-to-desktop 5
#### shift + alt - 6 : chunkc tiling::window --send-to-desktop 6
#### # shift + alt - 7 : chunkc tiling::window --send-to-desktop 7
####
#### # send window to desktop and follow focus
#### shift + cmd - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop); chunkc tiling::desktop --focus $(chunkc get _last_active_desktop)
#### shift + cmd - z : chunkc tiling::window --send-to-desktop prev; chunkc tiling::desktop --focus prev
#### shift + cmd - c : chunkc tiling::window --send-to-desktop next; chunkc tiling::desktop --focus next
#### shift + cmd - 1 : chunkc tiling::window --send-to-desktop 1; chunkc tiling::desktop --focus 1
#### shift + cmd - 2 : chunkc tiling::window --send-to-desktop 2; chunkc tiling::desktop --focus 2
#### shift + cmd - 3 : chunkc tiling::window --send-to-desktop 3; chunkc tiling::desktop --focus 3
#### shift + cmd - 4 : chunkc tiling::window --send-to-desktop 4; chunkc tiling::desktop --focus 4
#### shift + cmd - 5 : chunkc tiling::window --send-to-desktop 5; chunkc tiling::desktop --focus 5
#### shift + cmd - 6 : chunkc tiling::window --send-to-desktop 6; chunkc tiling::desktop --focus 6
#### # shift + cmd - 7 : chunkc tiling::window --send-to-desktop 7; chunkc tiling::desktop --focus 7
####
#### # focus monitor
#### ctrl + alt - z : chunkc tiling::monitor -f prev
#### ctrl + alt - c : chunkc tiling::monitor -f next
#### ctrl + alt - 1 : chunkc tiling::monitor -f 1
#### ctrl + alt - 2 : chunkc tiling::monitor -f 2
#### ctrl + alt - 3 : chunkc tiling::monitor -f 3
####
#### # send window to monitor and follow focus
#### ctrl + cmd - z : chunkc tiling::window --send-to-monitor prev; chunkc tiling::monitor -f prev
#### ctrl + cmd - c : chunkc tiling::window --send-to-monitor next; chunkc tiling::monitor -f next
#### ctrl + cmd - 1 : chunkc tiling::window --send-to-monitor 1; chunkc tiling::monitor -f 1
#### ctrl + cmd - 2 : chunkc tiling::window --send-to-monitor 2; chunkc tiling::monitor -f 2
#### ctrl + cmd - 3 : chunkc tiling::window --send-to-monitor 3; chunkc tiling::monitor -f 3
####
#### # increase region size
#### shift + alt - a : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge west
#### shift + alt - s : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge south
#### shift + alt - w : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge north
#### shift + alt - d : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge east
####
#### # decrease region size
#### shift + cmd - a : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge west
#### shift + cmd - s : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge south
#### shift + cmd - w : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge north
#### shift + cmd - d : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge east
####
#### # set insertion point for focused container
#### ctrl + alt - f : chunkc tiling::window --use-insertion-point cancel
#### ctrl + alt - h : chunkc tiling::window --use-insertion-point west
#### ctrl + alt - j : chunkc tiling::window --use-insertion-point south
#### ctrl + alt - k : chunkc tiling::window --use-insertion-point north
#### ctrl + alt - l : chunkc tiling::window --use-insertion-point east
####
#### # rotate tree
#### alt - r : chunkc tiling::desktop --rotate 90
####
#### # mirror tree y-axis
#### alt - y : chunkc tiling::desktop --mirror vertical
####
#### # mirror tree x-axis
#### alt - x : chunkc tiling::desktop --mirror horizontal
####
#### # toggle desktop offset
#### alt - a : chunkc tiling::desktop --toggle offset
####
#### # toggle window fullscreen
#### alt - f : chunkc tiling::window --toggle fullscreen
####
#### # toggle window native fullscreen
#### shift + alt - f : chunkc tiling::window --toggle native-fullscreen
####
#### # toggle window parent zoom
#### alt - d : chunkc tiling::window --toggle parent
####
#### # toggle window split type
#### alt - e : chunkc tiling::window --toggle split
####
#### # toggle window fade
#### alt - q : chunkc tiling::window --toggle fade
####
#### # float / unfloat window and center on screen
#### alt - t : chunkc tiling::window --toggle float;\
#### chunkc tiling::window --grid-layout 4:4:1:1:2:2
####
#### # toggle sticky
#### alt - s : chunkc tiling::window --toggle sticky
####
#### # toggle sticky, float and resize to picture-in-picture size
#### alt - p : chunkc tiling::window --toggle sticky;\
#### chunkc tiling::window --grid-layout 5:5:4:0:1:1
####
#### # float next window to be tiled
#### shift + alt - t : chunkc set window_float_next 1
####
#### # change layout of desktop
#### ctrl + alt - a : chunkc tiling::desktop --layout bsp
#### ctrl + alt - s : chunkc tiling::desktop --layout monocle
#### ctrl + alt - d : chunkc tiling::desktop --layout float
####
#### ctrl + alt - w : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/dev_1
# set border color for different modes
:: default : yabai -m config active_window_border_color 0xddbdd322
:: switcher @ : yabai -m config active_window_border_color 0xddd5c4a1
:: ytd @ : yabai -m config active_window_border_color 0xddd75f5f
:: move @ : yabai -m config active_window_border_color 0xdd458588
:: tree @ : yabai -m config active_window_border_color 0xddfabd2f
:: spacey @ : yabai -m config active_window_border_color 0xddb16286
:: info @ : yabai -m config active_window_border_color 0xddcd950c
# 0x2A is \
# toggle between modes
ctrl - 0x2A ; switcher
switcher < ctrl - 0x2A ; default
ytd < ctrl - 0x2A ; default
move < ctrl - 0x2A ; default
spacey < ctrl - 0x2A ; default
tree < ctrl - 0x2A ; default
info < ctrl - 0x2A ; default
switcher < y ; ytd
switcher < m ; move
switcher < s ; spacey
switcher < t ; tree
switcher < i ; info
#cmd - return : osascript /Users/hunner/local/bin/terminal.scpt
#cmd - return : /Applications/Kitty.app/Contents/MacOS/kitty --single-instance -d ~
#cmd - return : osascript /Users/hunner/local/bin/iterm_window.scpt
cmd + shift - return : ~/local/bin/open_iterm.sh
cmd + ctrl + alt - 9 : osascript /Users/hunner/local/bin/grayscale.scpt
cmd + alt - h : yabai -m window --focus west
cmd + alt - j : yabai -m window --focus south
cmd + alt - k : yabai -m window --focus north
cmd + alt - l : yabai -m window --focus east
cmd + alt + shift - h : yabai -m window --warp west
cmd + alt + shift - j : yabai -m window --warp south
cmd + alt + shift - k : yabai -m window --warp north
cmd + alt + shift - l : yabai -m window --warp east
cmd + alt - 1 : yabai -m space --focus 1
cmd + alt - 2 : yabai -m space --focus 2
cmd + alt - 3 : yabai -m space --focus 3
cmd + alt - 4 : yabai -m space --focus 4
cmd + alt - 5 : yabai -m space --focus 5
cmd + alt - 6 : yabai -m space --focus 6
cmd + alt - 7 : yabai -m space --focus 7
cmd + alt - 8 : yabai -m space --focus 8
cmd + alt - 9 : yabai -m space --focus 9
cmd + alt - 0 : yabai -m space --focus 10
cmd + alt + shift - 1 : yabai -m window --space 1
cmd + alt + shift - 2 : yabai -m window --space 2
cmd + alt + shift - 3 : yabai -m window --space 3
cmd + alt + shift - 4 : yabai -m window --space 4
cmd + alt + shift - 5 : yabai -m window --space 5
cmd + alt + shift - 6 : yabai -m window --space 6
cmd + alt + shift - 7 : yabai -m window --space 7
cmd + alt + shift - 8 : yabai -m window --space 8
cmd + alt + shift - 9 : yabai -m window --space 9
cmd + alt + shift - 0 : yabai -m window --space 10
# Focus display
cmd + alt - o : yabai -m display --focus 2
cmd + alt - e : yabai -m display --focus 1
cmd + alt - u : yabai -m display --focus 3
# Move window to display
cmd + alt + shift - o : yabai -m window --display 2
cmd + alt + shift - e : yabai -m window --display 1
cmd + alt + shift - u : yabai -m window --display 3
# Move space to display
cmd + alt + shift + ctrl - o : yabai -m space --display 2
cmd + alt + shift + ctrl - e : yabai -m space --display 1
cmd + alt + shift + ctrl - u : yabai -m space --display 3
# Focus spaces
cmd + alt - left : yabai -m space --focus prev
cmd + alt - right : yabai -m space --focus next
# Swap spaces
cmd + alt + shift - 1 : yabai -m space --focus 1; yabai -m space --swap 1
cmd + alt + shift - 2 : yabai -m space --focus 2; yabai -m space --swap 2
cmd + alt + shift - 3 : yabai -m space --focus 3; yabai -m space --swap 3
cmd + alt + shift - 4 : yabai -m space --focus 4; yabai -m space --swap 4
cmd + alt + shift - 5 : yabai -m space --focus 5; yabai -m space --swap 5
cmd + alt + shift - 6 : yabai -m space --focus 6; yabai -m space --swap 6
cmd + alt + shift - 7 : yabai -m space --focus 7; yabai -m space --swap 7
cmd + alt + shift - 8 : yabai -m space --focus 8; yabai -m space --swap 8
cmd + alt + shift - 9 : yabai -m space --focus 9; yabai -m space --swap 9
cmd + alt + shift - 0 : yabai -m space --focus 10; yabai -m space --swap 10
# Reorder spaces
cmd + alt + shift - left : yabai -m space --move prev
cmd + alt + shift - right : yabai -m space --move next
## ytd mode
#ytd - x : ytc play;\
# khd -e "mode activate default"
#
#ytd - s : ytc mkfav;\
# khd -e "mode activate default"
#
## 0x32 == <
#ytd - 0x32 : ytc fav
#ytd - z : ytc prev
#ytd - c : ytc next
#ytd - v : ytc stop
#ytd - a : ytc volup
#ytd - d : ytc voldown
#ytd - right : ytc seekfw
#ytd - left : ytc seekbk
# Swap windows around
move < h : yabai -m window --swap west
move < j : yabai -m window --swap south
move < k : yabai -m window --swap north
move < l : yabai -m window --swap east
# Move windows around
move < shift - h : yabai -m window --warp west
move < shift - j : yabai -m window --warp south
move < shift - k : yabai -m window --warp north
move < shift - l : yabai -m window --warp east
# toggle window float
move < t : yabai -m window --toggle float;\
yabai -m window --grid 4:4:1:1:2:2
# toggle window fullscreen
move < f : yabai -m window --toggle zoom-fullscreen
# toggle window parent zoom
move < d : yabai -m window --toggle zoom-parent
# toggle sticky, float and resize to picture-in-picture size
move < s : yabai -m window --toggle sticky;\
yabai -m window --grid 5:5:4:0:1:1
# Change spacey mode
spacey < a : yabai -m space --layout bsp
spacey < s : yabai -m space --layout monocle
spacey < d : yabai -m space --layout float
# Change padding
spacey < p : yabai -m space --padding inc
spacey < shift - p : yabai -m space --padding dec
# Change gap
spacey < g : yabai -m space --gap inc
spacey < shift - g : yabai -m space --gap dec
# toggle padding and gap
spacey < shift - a : yabai -m space --toggle padding; yabai -m space --toggle gap
# from https://anuj-chandra.medium.com/using-i3-like-tiling-window-managers-in-macos-with-yabai-ebf0e002b992
cmd + alt - space : yabai -m space --layout "$(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "stack" else "bsp" end')"
# forward
cmd + alt - up : yabai -m query --windows --space \
| jq -sre 'add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(."has-focus"))) - 1).id' \
| xargs -I{} yabai -m window --focus {}
# backward
cmd + alt - down: yabai -m query --windows --space \
| jq -sre 'add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(."has-focus"))) - 1).id' \
| xargs -I{} yabai -m window --focus {}
#spacey < shift - x : kwmc spacey -g decrease horizontal
#spacey < shift - y : kwmc spacey -g decrease vertical
# Increase window padding
#spacey < h : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge west
#spacey < j : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge south
#spacey < k : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge south
#spacey < l : chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge south
# Decrease window padding
#spacey < shift - h : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge west
#spacey < shift - j : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge south
#spacey < shift - k : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge south
#spacey < shift - l : chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge south
# tree mode
#tree < f : chunkc tiling::window -z fullscreen
#tree < d : chunkc tiling::window -z parent
#tree < w : chunkc tiling::window -t focused
#tree < r : chunkc tiling::tree rotate 90
# And from yabai's skhdrc:
#### # open terminal
#### cmd - return : /Applications/Kitty.app/Contents/MacOS/kitty --single-instance -d ~
####
#### # focus window
#### alt - h : yabai -m window --focus west
#### alt - j : yabai -m window --focus south
#### alt - k : yabai -m window --focus north
#### alt - l : yabai -m window --focus east
####
#### # swap window
#### shift + alt - h : yabai -m window --swap west
#### shift + alt - j : yabai -m window --swap south
#### shift + alt - k : yabai -m window --swap north
#### shift + alt - l : yabai -m window --swap east
####
#### # move window
#### shift + cmd - h : yabai -m window --warp west
#### shift + cmd - j : yabai -m window --warp south
#### shift + cmd - k : yabai -m window --warp north
#### shift + cmd - l : yabai -m window --warp east
####
#### # balance size of windows
#### shift + alt - 0 : yabai -m space --balance
####
#### # make floating window fill screen
#### shift + alt - up : yabai -m window --grid 1:1:0:0:1:1
####
#### # make floating window fill left-half of screen
#### shift + alt - left : yabai -m window --grid 1:2:0:0:1:1
####
#### # make floating window fill right-half of screen
#### shift + alt - right : yabai -m window --grid 1:2:1:0:1:1
####
#### # create desktop, move window and follow focus
#### shift + cmd - n : yabai -m space --create;\
#### id=$(yabai -m query --displays --display | grep "spaces");\
#### yabai -m window --space $(echo ${id:10:${#id}-10});\
#### yabai -m space --focus $(echo ${id:10:${#id}-10})
####
#### # create desktop and follow focus
#### cmd + alt - n : yabai -m space --create;\
#### id=$(yabai -m query --displays --display | grep "spaces");\
#### yabai -m space --focus $(echo ${id:10:${#id}-10})
####
#### # destroy desktop
#### cmd + alt - w : yabai -m space --destroy
####
#### # fast focus desktop
#### cmd + alt - x : yabai -m space --focus recent
#### cmd + alt - z : yabai -m space --focus prev
#### cmd + alt - c : yabai -m space --focus next
#### cmd + alt - 1 : yabai -m space --focus 1
#### cmd + alt - 2 : yabai -m space --focus 2
#### cmd + alt - 3 : yabai -m space --focus 3
#### cmd + alt - 4 : yabai -m space --focus 4
#### cmd + alt - 5 : yabai -m space --focus 5
#### cmd + alt - 6 : yabai -m space --focus 6
#### cmd + alt - 7 : yabai -m space --focus 7
#### cmd + alt - 8 : yabai -m space --focus 8
#### cmd + alt - 9 : yabai -m space --focus 9
#### cmd + alt - 0 : yabai -m space --focus 10
####
#### # send window to desktop and follow focus
#### shift + cmd - x : yabai -m window --space recent; yabai -m space --focus recent
#### shift + cmd - z : yabai -m window --space prev; yabai -m space --focus prev
#### shift + cmd - c : yabai -m window --space next; yabai -m space --focus next
#### shift + cmd - 1 : yabai -m window --space 1; yabai -m space --focus 1
#### shift + cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2
#### shift + cmd - 3 : yabai -m window --space 3; yabai -m space --focus 3
#### shift + cmd - 4 : yabai -m window --space 4; yabai -m space --focus 4
#### shift + cmd - 5 : yabai -m window --space 5; yabai -m space --focus 5
#### shift + cmd - 6 : yabai -m window --space 6; yabai -m space --focus 6
#### shift + cmd - 7 : yabai -m window --space 7; yabai -m space --focus 7
#### shift + cmd - 8 : yabai -m window --space 8; yabai -m space --focus 8
#### shift + cmd - 9 : yabai -m window --space 9; yabai -m space --focus 9
#### shift + cmd - 0 : yabai -m window --space 10; yabai -m space --focus 10
####
#### # focus monitor
#### ctrl + alt - x : yabai -m display --focus recent
#### ctrl + alt - z : yabai -m display --focus prev
#### ctrl + alt - c : yabai -m display --focus next
#### ctrl + alt - 1 : yabai -m display --focus 1
#### ctrl + alt - 2 : yabai -m display --focus 2
#### ctrl + alt - 3 : yabai -m display --focus 3
####
#### # send window to monitor and follow focus
#### ctrl + cmd - x : yabai -m window --display recent; yabai -m display --focus recent
#### ctrl + cmd - z : yabai -m window --display prev; yabai -m display --focus prev
#### ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next
#### ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1
#### ctrl + cmd - 2 : yabai -m window --display 2; yabai -m display --focus 2
#### ctrl + cmd - 3 : yabai -m window --display 3; yabai -m display --focus 3
####
#### # move window
#### shift + ctrl - a : yabai -m window --move rel:-20:0
#### shift + ctrl - s : yabai -m window --move rel:0:20
#### shift + ctrl - w : yabai -m window --move rel:0:-20
#### shift + ctrl - d : yabai -m window --move rel:20:0
####
#### # increase window size
#### shift + alt - a : yabai -m window --resize left:-20:0
#### shift + alt - s : yabai -m window --resize bottom:0:20
#### shift + alt - w : yabai -m window --resize top:0:-20
#### shift + alt - d : yabai -m window --resize right:20:0
####
#### # decrease window size
#### shift + cmd - a : yabai -m window --resize left:20:0
#### shift + cmd - s : yabai -m window --resize bottom:0:-20
#### shift + cmd - w : yabai -m window --resize top:0:20
#### shift + cmd - d : yabai -m window --resize right:-20:0
####
#### # set insertion point in focused container
#### ctrl + alt - h : yabai -m window --insert west
#### ctrl + alt - j : yabai -m window --insert south
#### ctrl + alt - k : yabai -m window --insert north
#### ctrl + alt - l : yabai -m window --insert east
####
#### # rotate tree
#### alt - r : yabai -m space --rotate 90
####
#### # mirror tree y-axis
#### alt - y : yabai -m space --mirror y-axis
####
#### # mirror tree x-axis
#### alt - x : yabai -m space --mirror x-axis
####
#### # toggle desktop offset
#### alt - a : yabai -m space --toggle padding; yabai -m space --toggle gap
####
#### # toggle window parent zoom
#### alt - d : yabai -m window --toggle zoom-parent
####
#### # toggle window fullscreen zoom
#### alt - f : yabai -m window --toggle zoom-fullscreen
####
#### # toggle window native fullscreen
#### shift + alt - f : yabai -m window --toggle native-fullscreen
####
#### # toggle window border
#### shift + alt - b : yabai -m window --toggle border
####
#### # toggle window split type
#### alt - e : yabai -m window --toggle split
####
#### # float / unfloat window and center on screen
#### alt - t : yabai -m window --toggle float;\
#### yabai -m window --grid 4:4:1:1:2:2
####
#### # toggle sticky
#### alt - s : yabai -m window --toggle sticky
####
#### # toggle sticky, float and resize to picture-in-picture size
#### alt - p : yabai -m window --toggle sticky;\
#### yabai -m window --grid 5:5:4:0:1:1
####
#### # change layout of desktop
#### ctrl + alt - a : yabai -m space --layout bsp
#### ctrl + alt - d : yabai -m space --layout float

108
.slate
View file

@ -1,108 +0,0 @@
# Configuration options
config keyboardLayout dvorak
config defaultToCurrentScreen true
config modalEscapeKey esc
config nudgePercentOf screenSize
config resizePercentOf screenSize
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
config windowHintsSpreadSearchWidth 200
config windowHintsSpreadSearchHeight 200
#--------------------------------------------------------------------
# Aliases
#--------------------------------------------------------------------
# Modal key
alias modal-key cmd,space
# Some apps
alias app-browser 'Google Chrome'
alias app-editor 'MacVim'
alias app-irc 'Textual'
alias app-music 'Spotify'
alias app-terminal 'iTerm'
# Easy helpers for long variable names...
alias sox screenOriginX
alias soy screenOriginY
alias ssx screenSizeX
alias ssy screenSizeY
# Positioning aliases
alias full move ${sox};${soy} ${ssx};${ssy}
alias left-half move ${sox};${soy} ${ssx}/2+1;${ssy}
alias right-half move ${sox}+${ssx}/2;${soy} ${ssx}/2;${ssy}
alias top-half move ${sox};${soy} ${ssx};${ssy}/2
alias bot-half move ${sox};${soy}+${ssy}/2 ${ssx};${ssy}/2
alias top-left-corner move ${sox};${soy} ${ssx}/2;${ssy}/2
alias top-right-corner move ${sox}+${ssx}/2;${soy} ${ssx}/2;${ssy}/2
alias bot-left-corner move ${sox};${soy}+${ssy}/2 ${ssx}/2;${ssy}/2
alias bot-right-corner move ${sox}+${ssx}/2;${soy}+${ssy}/2 ${ssx}/2;${ssy}/2
#--------------------------------------------------------------------
# Layouts
#--------------------------------------------------------------------
# This layout is used with one screen
layout 1coding 'Google Chrome':REPEAT ${full}
layout 1coding 'iTerm':REPEAT ${full}
layout 1coding 'MacVim':REPEAT ${full}
layout 1coding 'Spotify':REPEAT ${full}
layout 1coding 'Textual':REPEAT move ${sox}+550;${soy}+75 800;575
layout 1coding 'Tweetbot' move ${ssx}-480-40;${soy} 480;${ssy}
# This layout is used with two screens
layout 2coding 'Google Chrome':REPEAT move ${sox}+387;${soy}+100 1800;1200 0
layout 2coding 'iTerm':REPEAT ${full} 0
layout 2coding 'MacVim':REPEAT ${full} 0
layout 2coding 'Spotify':REPEAT ${full} 1
layout 2coding 'Textual':REPEAT move ${sox}+1200;${soy}+20 800;575 0
layout 2coding 'Tweetbot' move ${ssx}-480-40;${soy}+20 480;1000 0
#--------------------------------------------------------------------
# Bindings
#--------------------------------------------------------------------
# Activate layouts, this is all done via modal-keys
bind 1:${modal-key} sequence layout 1coding
bind 2:${modal-key} sequence layout 2coding
# Focus windows in certain directions
bind h:cmd,alt focus left
bind l:cmd,alt focus right
bind j:cmd,alt focus down
bind k:cmd,alt focus up
# Move windows to certain locations on the screen
bind f:${modal-key}:toggle ${full}
bind h:${modal-key}:toggle ${left-half}
bind l:${modal-key}:toggle ${right-half}
bind j:${modal-key}:toggle ${bot-half}
bind k:${modal-key}:toggle ${top-half}
bind y:${modal-key}:toggle ${top-left-corner}
bind u:${modal-key}:toggle ${top-right-corner}
bind b:${modal-key}:toggle ${bot-left-corner}
bind n:${modal-key}:toggle ${bot-right-corner}
# Resize Bindings
bind right:alt resize +8% +0
bind left:alt resize -8% +0
bind up:alt resize +0 -8%
bind down:alt resize +0 +8%
bind right:ctrl;alt resize -8% +0 bottom-right
bind left:ctrl;alt resize +8% +0 bottom-right
bind up:ctrl;alt resize +0 +8% bottom-right
bind down:ctrl;alt resize +0 -8% bottom-right
# Nudge Bindings
bind right:shift;alt nudge +8% +0
bind left:shift;alt nudge -8% +0
bind up:shift;alt nudge +0 -8%
bind down:shift;alt nudge +0 +8%
# Focus helpers
bind b:e,cmd focus ${app-browser}
bind e:e,cmd focus ${app-editor}
bind i:e,cmd focus ${app-irc}
bind m:e,cmd focus ${app-music}
bind t:e,cmd focus ${app-terminal}
bind /:e,cmd hint

View file

@ -1,514 +0,0 @@
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; Lazy installation of layers (i.e. layers are installed only when a file
;; with a supported type is opened). Possible values are `all', `unused'
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
;; lazy install any layer that support lazy installation even the layers
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
;; installation feature and you have to explicitly list a layer in the
;; variable `dotspacemacs-configuration-layers' to install it.
;; (default 'unused)
dotspacemacs-enable-lazy-installation 'unused
;; If non-nil then Spacemacs will ask for confirmation before installing
;; a layer lazily. (default t)
dotspacemacs-ask-for-lazy-installation t
;; If non-nil layers with lazy install support are lazy installed.
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '("~/.spacemacs.d/private/")
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
;; `M-m f e R' (Emacs style) to install them.
;; ----------------------------------------------------------------
(auto-completion :variables
auto-completion-enable-help-tooltip t
auto-completion-enable-snippets-in-popup t)
better-defaults
deft
emacs-lisp
git
github
hoon
javascript
markdown
org
puppet
(ruby :variables
ruby-enable-enh-ruby-mode t
ruby-version-manager 'rbenv)
(shell :variables
shell-default-shell 'multi-term)
;; shell-default-height 30
;; shell-default-position 'bottom)
spacemacs-layouts
spell-checking
syntax-checking
(rcirc :variables rcirc-enable-znc-support t)
themes-megapack
vagrant
vimscript
yaml
)
;; List of additional packages that will be installed without being
;; wrapped in a layer. If you need some configuration for these
;; packages, then consider creating a layer. You can also put the
;; configuration in `dotspacemacs/user-config'.
;; To use a local version of a package, use the `:location' property:
;; '(your-package :location "~/path/to/your-package/")
;; Also include the dependencies as they will not be resolved automatically.
dotspacemacs-additional-packages '()
;; A list of packages that cannot be updated.
dotspacemacs-frozen-packages '()
;; A list of packages that will not be installed and loaded.
dotspacemacs-excluded-packages '()
;; Defines the behaviour of Spacemacs when installing packages.
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
;; `used-only' installs only explicitly used packages and deletes any unused
;; packages as well as their unused dependencies. `used-but-keep-unused'
;; installs only the used packages but won't delete unused ones. `all'
;; installs *all* packages supported by Spacemacs and never uninstalls them.
;; (default is `used-only')
dotspacemacs-install-packages 'used-only))
(defun dotspacemacs/init ()
"Initialization:
This function is called at the very beginning of Spacemacs startup,
before layer configuration.
It should only modify the values of Spacemacs settings."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
;; (default 5)
dotspacemacs-elpa-timeout 5
;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
;; This is an advanced option and should not be changed unless you suspect
;; performance issues due to garbage collection operations.
;; (default '(100000000 0.1))
dotspacemacs-gc-cons '(100000000 0.1)
;; If non-nil then Spacelpa repository is the primary source to install
;; a locked version of packages. If nil then Spacemacs will install the
;; lastest version of packages from MELPA. (default nil)
dotspacemacs-use-spacelpa nil
;; If non-nil then verify the signature for downloaded Spacelpa archives.
;; (default nil)
dotspacemacs-verify-spacelpa-archives nil
;; If non-nil then spacemacs will check for updates at startup
;; when the current branch is not `develop'. Note that checking for
;; new versions works via git commands, thus it calls GitHub services
;; whenever you start Emacs. (default nil)
dotspacemacs-check-for-update nil
;; If non-nil, a form that evaluates to a package directory. For example, to
;; use different package directories for different Emacs versions, set this
;; to `emacs-version'. (default 'emacs-version)
dotspacemacs-elpa-subdirectory 'emacs-version
;; One of `vim', `emacs' or `hybrid'.
;; `hybrid' is like `vim' except that `insert state' is replaced by the
;; `hybrid state' with `emacs' key bindings. The value can also be a list
;; with `:variables' keyword (similar to layers). Check the editing styles
;; section of the documentation for details on available variables.
;; (default 'vim)
dotspacemacs-editing-style 'vim
;; If non-nil output loading progress in `*Messages*' buffer. (default nil)
dotspacemacs-verbose-loading nil
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'official
;; List of items to show in startup buffer or an association list of
;; the form `(list-type . list-size)`. If nil then it is disabled.
;; Possible values for list-type are:
;; `recents' `bookmarks' `projects' `agenda' `todos'.
;; List sizes may be nil, in which case
;; `spacemacs-buffer-startup-lists-length' takes effect.
dotspacemacs-startup-lists '((recents . 5)
(projects . 7))
;; True if the home buffer should respond to resize events. (default t)
dotspacemacs-startup-buffer-responsive t
;; Default major mode of the scratch buffer (default `text-mode')
dotspacemacs-scratch-mode 'puppet-mode
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press `SPC T n' to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(monokai
molokai
smyx)
;; If non-nil the cursor color matches the state color in GUI Emacs.
;; (default t)
dotspacemacs-colorize-cursor-according-to-state t
;; Default font, or prioritized list of fonts. `powerline-scale' allows to
;; quickly tweak the mode-line size to make separators look not too crappy.
dotspacemacs-default-font '("Droid Sans Mono Dotted for Powerline"
:size 26
:weight normal
:width normal
:powerline-scale 1.1)
;; The leader key (default "SPC")
dotspacemacs-leader-key "SPC"
;; The key used for Emacs commands `M-x' (after pressing on the leader key).
;; (default "SPC")
dotspacemacs-emacs-command-key "SPC"
;; The key used for Vim Ex commands (default ":")
dotspacemacs-ex-command-key ":"
;; The leader key accessible in `emacs state' and `insert state'
;; (default "M-m")
dotspacemacs-emacs-leader-key "M-m"
;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
dotspacemacs-major-mode-leader-key ","
;; Major mode leader key accessible in `emacs state' and `insert state'.
;; (default "C-M-m")
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
;; These variables control whether separate commands are bound in the GUI to
;; the key pairs `C-i', `TAB' and `C-m', `RET'.
;; Setting it to a non-nil value, allows for separate commands under `C-i'
;; and TAB or `C-m' and `RET'.
;; In the terminal, these pairs are generally indistinguishable, so this only
;; works in the GUI. (default nil)
dotspacemacs-distinguish-gui-tab nil
;; If non-nil `Y' is remapped to `y$' in Evil states. (default nil)
dotspacemacs-remap-Y-to-y$ nil
;; If non-nil, the shift mappings `<' and `>' retain visual state if used
;; there. (default t)
dotspacemacs-retain-visual-state-on-shift t
;; If non-nil, `J' and `K' move lines up and down when in visual mode.
;; (default nil)
dotspacemacs-visual-line-move-text nil
;; If non-nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
;; (default nil)
dotspacemacs-ex-substitute-global nil
;; Name of the default layout (default "Default")
dotspacemacs-default-layout-name "Default"
;; If non-nil the default layout name is displayed in the mode-line.
;; (default nil)
dotspacemacs-display-default-layout nil
;; If non-nil then the last auto saved layouts are resumed automatically upon
;; start. (default nil)
dotspacemacs-auto-resume-layouts nil
;; If non-nil, auto-generate layout name when creating new layouts. Only has
;; effect when using the "jump to layout by number" commands. (default nil)
dotspacemacs-auto-generate-layout-names nil
;; Size (in MB) above which spacemacs will prompt to open the large file
;; literally to avoid performance issues. Opening a file literally means that
;; no major mode or minor modes are active. (default is 1)
dotspacemacs-large-file-size 1
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; (default 'cache)
dotspacemacs-auto-save-file-location 'cache
;; Maximum number of rollback slots to keep in the cache. (default 5)
dotspacemacs-max-rollback-slots 5
;; If non-nil, `helm' will try to minimize the space it uses. (default nil)
dotspacemacs-helm-resize nil
;; if non-nil, the helm header is hidden when there is only one source.
;; (default nil)
dotspacemacs-helm-no-header nil
;; define the position to display `helm', options are `bottom', `top',
;; `left', or `right'. (default 'bottom)
dotspacemacs-helm-position 'bottom
;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
;; in all non-asynchronous sources. If set to `source', preserve individual
;; source settings. Else, disable fuzzy matching in all sources.
;; (default 'always)
dotspacemacs-helm-use-fuzzy 'always
;; If non-nil, the paste transient-state is enabled. While enabled, pressing
;; `p' several times cycles through the elements in the `kill-ring'.
;; (default nil)
dotspacemacs-enable-paste-transient-state nil
;; Which-key delay in seconds. The which-key buffer is the popup listing
;; the commands bound to the current keystroke sequence. (default 0.4)
dotspacemacs-which-key-delay 0.4
;; Which-key frame position. Possible values are `right', `bottom' and
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
;; right; if there is insufficient space it displays it at the bottom.
;; (default 'bottom)
dotspacemacs-which-key-position 'right
;; Control where `switch-to-buffer' displays the buffer. If nil,
;; `switch-to-buffer' displays the buffer in the current window even if
;; another same-purpose window is available. If non-nil, `switch-to-buffer'
;; displays the buffer in a same-purpose window even if the buffer can be
;; displayed in the current window. (default nil)
dotspacemacs-switch-to-buffer-prefers-purpose nil
;; If non-nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil to boost the loading time. (default t)
dotspacemacs-loading-progress-bar t
;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
;; (Emacs 24.4+ only)
dotspacemacs-fullscreen-at-startup nil
;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
;; Use to disable fullscreen animations in OSX. (default nil)
dotspacemacs-fullscreen-use-non-native nil
;; If non-nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (default nil) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's active or selected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-active-transparency 90
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-inactive-transparency 90
;; If non-nil show the titles of transient states. (default t)
dotspacemacs-show-transient-state-title t
;; If non-nil show the color guide hint for transient state keys. (default t)
dotspacemacs-show-transient-state-color-guide t
;; If non-nil unicode symbols are displayed in the mode line. (default t)
dotspacemacs-mode-line-unicode-symbols t
;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
;; scrolling overrides the default behavior of Emacs which recenters point
;; when it reaches the top or bottom of the screen. (default t)
dotspacemacs-smooth-scrolling t
;; Control line numbers activation.
;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
;; `text-mode' derivatives. If set to `relative', line numbers are relative.
;; This variable can also be set to a property list for finer control:
;; '(:relative nil
;; :disabled-for-modes dired-mode
;; doc-view-mode
;; markdown-mode
;; org-mode
;; pdf-view-mode
;; text-mode
;; :size-limit-kb 1000)
;; (default nil)
dotspacemacs-line-numbers nil
;; Code folding method. Possible values are `evil' and `origami'.
;; (default 'evil)
dotspacemacs-folding-method 'evil
;; If non-nil `smartparens-strict-mode' will be enabled in programming modes.
;; (default nil)
dotspacemacs-smartparens-strict-mode nil
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
;; over any automatically added closing parenthesis, bracket, quote, etc…
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
dotspacemacs-smart-closing-parenthesis nil
;; Select a scope to highlight delimiters. Possible values are `any',
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
;; emphasis the current one). (default 'all)
dotspacemacs-highlight-delimiters 'all
;; If non-nil, advise quit functions to keep server open when quitting.
;; (default nil)
dotspacemacs-persistent-server nil
;; List of search tool executable names. Spacemacs uses the first installed
;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
;; (default '("rg" "ag" "pt" "ack" "grep"))
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
;; Format specification for setting the frame title.
;; %a - the `abbreviated-file-name', or `buffer-name'
;; %t - `projectile-project-name'
;; %I - `invocation-name'
;; %S - `system-name'
;; %U - contents of $USER
;; %b - buffer name
;; %f - visited file name
;; %F - frame name
;; %s - process status
;; %p - percent of buffer above top of window, or Top, Bot or All
;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
;; %m - mode name
;; %n - Narrow if appropriate
;; %z - mnemonics of buffer, terminal, and keyboard coding systems
;; %Z - like %z, but including the end-of-line format
;; (default "%I@%S")
dotspacemacs-frame-title-format "%I@%S"
;; Format specification for setting the icon title format
;; (default nil - same as frame-title-format)
dotspacemacs-icon-title-format nil
;; Delete whitespace while saving buffer. Possible values are `all'
;; to aggressively delete empty line and long sequences of whitespace,
;; `trailing' to delete only the whitespace at end of lines, `changed' to
;; delete only whitespace for changed lines or `nil' to disable cleanup.
;; (default nil)
dotspacemacs-whitespace-cleanup 'changed
;; Either nil or a number of seconds. If non-nil zone out after the specified
;; number of seconds. (default nil)
dotspacemacs-zone-out-when-idle nil
;; Run `spacemacs/prettify-org-buffer' when
;; visiting README.org files of Spacemacs.
;; (default nil)
dotspacemacs-pretty-docs nil))
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init'. You are free to put almost
any user code here. The exception is org related code, which should be placed
in `dotspacemacs/user-config'."
;; (setq-default
;; Custom font
;; dotspacemacs-default-font `("Liberation Mono for Powerline"
;; :size ,(if (eq window-system 'x)
;; 26
;; 13
;; )
;; :weight normal
;; :width normal
;; :powerline-scale 1.4)
;; )
;; Set to the location of your Org files on your local system
(setq org-directory "~/Dropbox/org")
(setq org-mobile-inbox-for-pull "~/Dropbox/org/inbox.org")
(setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")
(setq org-mobile-files '("~/Dropbox/org"))
;; ;; Stuff for eshell
;; (require 'em-smart)
;; (setq eshell-where-to-jump 'begin)
;; (setq eshell-review-quick-commands nil)
;; (setq eshell-smart-space-goes-to-end t)
;; (setq eshell-scroll-to-bottom-on-input t)
;; Configure colors for the powerline
;(setq ns-use-srgb-colorspace t)
;; undo-tree history across restarts
(setq undo-tree-history-directory-alist
`((".*" . ,(concat spacemacs-cache-directory "undo-tree-history"))))
(setq undo-tree-auto-save-history t)
;; Allow vim-like undo
(setq evil-want-fine-undo "No")
;; Don't use the clipboard please
;; (setq select-enable-clipboard nil)
;; Don't show the menu bar on the terminal
;; (setq menu-bar-mode nil)
(setq rcirc-server-alist
;; This will replace :auth with the correct thing, see the doc for that function
'(("freenode"
:host "destiny.cat.pdx.edu"
:port "2300"
:auth "hunner/freenode"
:channels ("#voxpupuli"))
("sithmail"
:host "destiny.cat.pdx.edu"
:auth "hunner/sithmail"
:port "2300"
:encryption tls
:channels ("#social"))))
)
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
;; Make C-g work like <esc>
;(define-key evil-normal-state-map "\C-g" 'evil-normal-state)
;(define-key evil-visual-state-map "\C-g" 'evil-normal-state)
;(define-key evil-insert-state-map "\C-g" 'evil-normal-state)
(define-key evil-visual-state-map "\C-c" 'evil-normal-state)
(define-key evil-insert-state-map "\C-c" 'evil-normal-state)
(define-key evil-hybrid-state-map "\C-c" 'evil-normal-state)
(define-key evil-normal-state-map "\C-h" 'evil-window-left)
(define-key evil-normal-state-map "\C-j" 'evil-window-down)
(define-key evil-normal-state-map "\C-k" 'evil-window-up)
(define-key evil-normal-state-map "\C-l" 'evil-window-right)
(spacemacs/toggle-mode-line-battery-on)
;(define-key global-map "\\" nil)
;(define-key global-map "\\f" 'ido-find-file)
;(define-key global-map "\\v" 'helm-projectile-find-file)
;(define-key global-map "\\c" 'helm-projectile-switch-project)
;(define-key global-map "\\b" 'helm-mini)
(setq powerline-default-separator (if (eq window-system 'x)
'arrow
'utf-8
))
;;(smartparens-global-mode f)
;; Relative line numbers by default
;(linum-relative-toggle)
;(global-linum-mode t)
)
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.

View file

@ -1,24 +0,0 @@
#+TITLE: hoon layer
# The maximum height of the logo should be 200 pixels.
[[img/urbit.png]]
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#install][Install]]
- [[#key-bindings][Key bindings]]
* Description
This layer does wonderful things:
- thing01
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =hoon= to the existing =dotspacemacs-configuration-layers= list in this
file.
* Key bindings
| Key Binding | Description |
|-----------------+----------------|
| ~<SPC> x x x~ | Does thing01 |

View file

@ -1,71 +0,0 @@
;;; packages.el --- hoon layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: <hunner@ae>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;;; Commentary:
;; See the Spacemacs documentation and FAQs for instructions on how to implement
;; a new layer:
;;
;; SPC h SPC layers RET
;;
;;
;; Briefly, each package to be installed or configured by this layer should be
;; added to `hoon-packages'. Then, for each package PACKAGE:
;;
;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
;; function `hoon/init-PACKAGE' to load and initialize the package.
;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
;; define the functions `hoon/pre-init-PACKAGE' and/or
;; `hoon/post-init-PACKAGE' to customize the package as it is loaded.
;;; Code:
(defconst hoon-packages
'(
(hoon-mode :location (recipe :fetcher github
:repo "urbit/hoon-mode.el")))
"The list of Lisp packages required by the hoon layer.
Each entry is either:
1. A symbol, which is interpreted as a package to be installed, or
2. A list of the form (PACKAGE KEYS...), where PACKAGE is the
name of the package to be installed or loaded, and KEYS are
any number of keyword-value-pairs.
The following keys are accepted:
- :excluded (t or nil): Prevent the package from being loaded
if value is non-nil
- :location: Specify a custom installation location.
The following values are legal:
- The symbol `elpa' (default) means PACKAGE will be
installed using the Emacs package manager.
- The symbol `local' directs Spacemacs to load the file at
`./local/PACKAGE/PACKAGE.el'
- A list beginning with the symbol `recipe' is a melpa
recipe. See: https://github.com/milkypostman/melpa#recipe-format")
(defun hoon/init-hoon-mode ()
(use-package hoon-mode))
;; :defer t
;; :init
;; (progn
;; (setq hoon-extensions '("hoon","hook")
;; hoon-text-mode 'hoon-mode))))
;;; packages.el ends here

41
.xsession Normal file
View file

@ -0,0 +1,41 @@
export PATH=/home/hunner/local/bin:$PATH
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?* ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
#export GDK_DPI_SCALE=0.5
systemctl --user import-environment DISPLAY
#setxkbmap us dvorak ctrl:nocaps
# remap powerkey to insert
#xmodmap -e "keycode 124 = NoSymbol Insert"
#xmodmap -e "keycode 62 = Scroll_Lock Scroll_Lock"
#xmodmap -e "keycode 37 = Control_R Control_R"
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Tapping Enabled' 1
xsetroot -cursor_name right_ptr
redshift &
CM_DIR=~/.config/clipmenu clipmenud &
#picom -b
hsetroot -solid '#000000'
#xrdb -merge ~/.Xresources
#feh --bg-fill ~/Dropbox/Photos/Adventurous\ Kate.jpg
eval `ssh-agent -s`
xrandr --dpi 100
battery.sh &
xset r rate 200 30
xset s on
xset s 1200
#xss-lock -- i3lock &
#xss-lock -- slock &
#xss-lock -- xlock -echokeys -usefirst &
#xscreensaver &
exec xmonad

View file

@ -1,45 +0,0 @@
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa
# bsp or float (default: float)
yabai -m config layout bsp
# set mouse interaction modifier key (default: fn)
yabai -m config mouse_modifier fn
# set modifier + left-click drag to move window (default: move)
yabai -m config mouse_action1 move
# set modifier + right-click drag to resize window (default: resize)
yabai -m config mouse_action2 resize
# set focus follows mouse mode (default: off, options: off, autoraise, autofocus)
yabai -m config focus_follows_mouse autoraise
# set mouse follows focus mode (default: off)
yabai -m config mouse_follows_focus off
# modify window shadows (default: on, options: on, off, float)
# example: show shadows only for floating windows
yabai -m config window_shadow float
# window opacity (default: off)
# example: render all unfocused windows with 90% opacity
yabai -m config window_opacity on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.9
yabai -m space 1 --label work
yabai -m space 2 --label zoom
yabai -m space 3 --label mail
yabai -m space 5 --label rdp
yabai -m space 7 --label slack
yabai -m space 8 --label emacs
yabai -m space 9 --label music
yabai -m config window_border on
yabai -m config window_border_width 1
yabai -m config active_window_border_color 0xff775759
yabai -m config external_bar all:33:0
yabai -m config top_padding 1 [master][10:03]
yabai -m config bottom_padding 1
yabai -m config left_padding 1
yabai -m config right_padding 1
yabai -m config window_gap 1

View file

@ -1,273 +0,0 @@
! xmodmap for the Colemak layout.
! 2006-01-01 Shai Coleman, http://colemak.com/ . Public domain.
keycode 49 = grave asciitilde dead_tilde asciitilde
keycode 10 = 1 exclam exclamdown onesuperior
keycode 11 = 2 at masculine twosuperior
keycode 12 = 3 numbersign ordfeminine threesuperior
keycode 13 = 4 dollar cent sterling
keycode 14 = 5 percent EuroSign yen
keycode 15 = 6 asciicircum hstroke Hstroke
keycode 16 = 7 ampersand eth ETH
keycode 17 = 8 asterisk thorn THORN
keycode 18 = 9 parenleft leftsinglequotemark leftdoublequotemark
keycode 19 = 0 parenright rightsinglequotemark rightdoublequotemark
keycode 20 = minus underscore endash emdash
keycode 21 = equal plus multiply division
keycode 24 = q Q adiaeresis Adiaeresis
keycode 25 = w W aring Aring
keycode 26 = f F atilde Atilde
keycode 27 = p P oslash Ooblique
keycode 28 = g G dead_ogonek asciitilde
keycode 29 = j J dstroke Dstroke
keycode 30 = l L lstroke Lstroke
keycode 31 = u U uacute Uacute
keycode 32 = y Y udiaeresis Udiaeresis
keycode 33 = semicolon colon odiaeresis Odiaeresis
keycode 34 = bracketleft braceleft guillemotleft U2039
keycode 35 = bracketright braceright guillemotright U203a
keycode 51 = backslash bar asciitilde asciitilde
keycode 38 = a A aacute Aacute
keycode 39 = r R dead_grave asciitilde
keycode 40 = s S ssharp asciitilde
keycode 41 = t T dead_acute dead_doubleacute
keycode 42 = d D dead_diaeresis asciitilde
keycode 43 = h H dead_caron asciitilde
keycode 44 = n N ntilde Ntilde
keycode 45 = e E eacute Eacute
keycode 46 = i I iacute Iacute
keycode 47 = o O oacute Oacute
keycode 48 = apostrophe quotedbl otilde Otilde
keycode 52 = z Z ae AE
keycode 53 = x X dead_circumflex asciitilde
keycode 54 = c C ccedilla Ccedilla
keycode 55 = v V oe OE
keycode 56 = b B dead_breve asciitilde
keycode 57 = k K dead_abovering asciitilde
keycode 58 = m M dead_macron asciitilde
keycode 59 = comma less dead_cedilla asciitilde
keycode 60 = period greater dead_abovedot asciitilde
keycode 61 = slash question questiondown asciitilde
keycode 66 = BackSpace BackSpace BackSpace BackSpace
keycode 94 = minus underscore endash emdash
keycode 65 = space space space nobreakspace
keycode 113 = Mode_switch Mode_switch
clear Lock
!clear Shift
!clear Control
!clear Mod1
!clear Mod2
!clear Mod3
!clear Mod4
!clear Mod5
!add Shift = Shift_L Shift_R
!add Control = Control_L Control_R
!add Mod1 = Alt_L Alt_R
!add Mod2 = Num_Lock
!add Mod4 = Meta_L Meta_R
!add Mod5 = Scroll_Lock
!keycode 9 = Escape
!keycode 22 = BackSpace Terminate_Server
!keycode 23 = Tab ISO_Left_Tab
!keycode 36 = Return
!keycode 37 = Control_L
!keycode 50 = Shift_L
!keycode 62 = Shift_R
!keycode 63 = KP_Multiply XF86_ClearGrab
!keycode 64 = Alt_L Meta_L
!keycode 67 = F1 XF86_Switch_VT_1
!keycode 68 = F2 XF86_Switch_VT_2
!keycode 69 = F3 XF86_Switch_VT_3
!keycode 70 = F4 XF86_Switch_VT_4
!keycode 71 = F5 XF86_Switch_VT_5
!keycode 72 = F6 XF86_Switch_VT_6
!keycode 73 = F7 XF86_Switch_VT_7
!keycode 74 = F8 XF86_Switch_VT_8
!keycode 75 = F9 XF86_Switch_VT_9
!keycode 76 = F10 XF86_Switch_VT_10
!keycode 95 = F11 XF86_Switch_VT_11
!keycode 96 = F12 XF86_Switch_VT_12
!keycode 77 = Num_Lock Pointer_EnableKeys
!keycode 78 = Scroll_Lock
!keycode 79 = KP_Home KP_7
!keycode 80 = KP_Up KP_8
!keycode 81 = KP_Prior KP_9
!keycode 82 = KP_Subtract XF86_Prev_VMode
!keycode 83 = KP_Left KP_4
!keycode 84 = KP_Begin KP_5
!keycode 85 = KP_Right KP_6
!keycode 86 = KP_Add XF86_Next_VMode
!keycode 87 = KP_End KP_1
!keycode 88 = KP_Down KP_2
!keycode 89 = KP_Next KP_3
!keycode 90 = KP_Insert KP_0
!keycode 91 = KP_Delete KP_Decimal
!keycode 92 = Print Sys_Req
!keycode 93 = Mode_switch
!keycode 97 = Home
!keycode 98 = Up
!keycode 99 = Prior
!keycode 100 = Left
!keycode 102 = Right
!keycode 103 = End
!keycode 104 = Down
!keycode 105 = Next
!keycode 106 = Insert
!keycode 107 = Delete
!keycode 108 = KP_Enter
!keycode 109 = Control_R
!keycode 110 = Pause Break
!keycode 111 = Print Sys_Req
!keycode 112 = KP_Divide XF86_Ungrab
!keycode 114 = Pause Break
!keycode 115 = Super_L
!keycode 116 = Super_R
!keycode 117 = Menu
!keycode 124 = ISO_Level3_Shift
!keycode 125 = NoSymbol Alt_L
!keycode 126 = KP_Equal
!keycode 127 = NoSymbol Super_L
!keycode 128 = NoSymbol Hyper_L
!keycode 156 = NoSymbol Meta_L
!keycode 8 =
!keycode 101 =
!keycode 118 =
!keycode 119 =
!keycode 120 =
!keycode 121 =
!keycode 122 =
!keycode 123 =
!keycode 129 =
!keycode 130 =
!keycode 131 =
!keycode 132 =
!keycode 133 =
!keycode 134 =
!keycode 135 =
!keycode 136 =
!keycode 137 =
!keycode 138 =
!keycode 139 =
!keycode 140 =
!keycode 141 =
!keycode 142 =
!keycode 143 =
!keycode 144 =
!keycode 145 =
!keycode 146 =
!keycode 147 =
!keycode 148 =
!keycode 149 =
!keycode 150 =
!keycode 151 =
!keycode 152 =
!keycode 153 =
!keycode 154 =
!keycode 155 =
!keycode 157 =
!keycode 158 =
!keycode 159 =
!keycode 160 =
!keycode 161 =
!keycode 162 =
!keycode 163 =
!keycode 164 =
!keycode 165 =
!keycode 166 =
!keycode 167 =
!keycode 168 =
!keycode 169 =
!keycode 170 =
!keycode 171 =
!keycode 172 =
!keycode 173 =
!keycode 174 =
!keycode 175 =
!keycode 176 =
!keycode 177 =
!keycode 178 =
!keycode 179 =
!keycode 180 =
!keycode 181 =
!keycode 182 =
!keycode 183 =
!keycode 184 =
!keycode 185 =
!keycode 186 =
!keycode 187 =
!keycode 188 =
!keycode 189 =
!keycode 190 =
!keycode 191 =
!keycode 192 =
!keycode 193 =
!keycode 194 =
!keycode 195 =
!keycode 196 =
!keycode 197 =
!keycode 198 =
!keycode 199 =
!keycode 200 =
!keycode 201 =
!keycode 202 =
!keycode 203 =
!keycode 204 =
!keycode 205 =
!keycode 206 =
!keycode 207 =
!keycode 208 =
!keycode 209 =
!keycode 210 =
!keycode 211 =
!keycode 212 =
!keycode 213 =
!keycode 214 =
!keycode 215 =
!keycode 216 =
!keycode 217 =
!keycode 218 =
!keycode 219 =
!keycode 220 =
!keycode 221 =
!keycode 222 =
!keycode 223 =
!keycode 224 =
!keycode 225 =
!keycode 226 =
!keycode 227 =
!keycode 228 =
!keycode 229 =
!keycode 230 =
!keycode 231 =
!keycode 232 =
!keycode 233 =
!keycode 234 =
!keycode 235 =
!keycode 236 =
!keycode 237 =
!keycode 238 =
!keycode 239 =
!keycode 240 =
!keycode 241 =
!keycode 242 =
!keycode 243 =
!keycode 244 =
!keycode 245 =
!keycode 246 =
!keycode 247 =
!keycode 248 =
!keycode 249 =
!keycode 250 =
!keycode 251 =
!keycode 252 =
!keycode 253 =
!keycode 254 =
!keycode 255 =

View file

@ -1,248 +0,0 @@
keycode 8 =
keycode 9 = Escape NoSymbol Escape NoSymbol Escape
keycode 10 = 1 exclam 1 exclam 1 exclam
keycode 11 = 2 at 2 at 2 at
keycode 12 = 3 numbersign 3 numbersign 3 numbersign
keycode 13 = 4 dollar 4 dollar 4 dollar
keycode 14 = 5 percent 5 percent 5 percent
keycode 15 = 6 asciicircum 6 asciicircum 6 asciicircum
keycode 16 = 7 ampersand 7 ampersand 7 ampersand
keycode 17 = 8 asterisk 8 asterisk 8 asterisk
keycode 18 = 9 parenleft 9 parenleft 9 parenleft
keycode 19 = 0 parenright 0 parenright 0 parenright
keycode 20 = minus underscore minus underscore minus underscore
keycode 21 = equal plus equal plus equal plus
keycode 22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = q Q q Q q Q
keycode 25 = w W w W w W
keycode 26 = e E e E e E
keycode 27 = r R r R r R
keycode 28 = t T t T t T
keycode 29 = y Y y Y y Y
keycode 30 = u U u U u U
keycode 31 = i I i I i I
keycode 32 = o O o O o O
keycode 33 = p P p P p P
keycode 34 = bracketleft braceleft bracketleft braceleft bracketleft braceleft
keycode 35 = bracketright braceright bracketright braceright bracketright braceright
keycode 36 = Return NoSymbol Return NoSymbol Return
keycode 37 = Control_L NoSymbol Control_L NoSymbol Control_L
keycode 38 = a A a A a A
keycode 39 = s S s S s S
keycode 40 = d D d D d D
keycode 41 = f F f F f F
keycode 42 = g G g G g G
keycode 43 = h H h H h H
keycode 44 = j J j J j J
keycode 45 = k K k K k K
keycode 46 = l L l L l L
keycode 47 = semicolon colon semicolon colon semicolon colon
keycode 48 = apostrophe quotedbl apostrophe quotedbl apostrophe quotedbl
keycode 49 = grave asciitilde grave asciitilde grave asciitilde
keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L
keycode 51 = backslash bar backslash bar backslash bar
keycode 52 = z Z z Z z Z
keycode 53 = x X x X x X
keycode 54 = c C c C c C
keycode 55 = v V v V v V
keycode 56 = b B b B b B
keycode 57 = n N n N n N
keycode 58 = m M m M m M
keycode 59 = comma less comma less comma less
keycode 60 = period greater period greater period greater
keycode 61 = slash question slash question slash question
keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space NoSymbol space
keycode 66 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 93 = Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku
keycode 94 = less greater less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12
keycode 97 =
keycode 98 = Katakana NoSymbol Katakana NoSymbol Katakana
keycode 99 = Hiragana NoSymbol Hiragana NoSymbol Hiragana
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode NoSymbol Henkan_Mode
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana NoSymbol Hiragana_Katakana
keycode 102 = Muhenkan NoSymbol Muhenkan NoSymbol Muhenkan
keycode 103 =
keycode 104 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter
keycode 105 = Control_R NoSymbol Control_R NoSymbol Control_R
keycode 106 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 107 = Print Sys_Req Print Sys_Req Print Sys_Req
keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R
keycode 109 = Linefeed NoSymbol Linefeed NoSymbol Linefeed
keycode 110 = Home NoSymbol Home NoSymbol Home
keycode 111 = Up NoSymbol Up NoSymbol Up
keycode 112 = Prior NoSymbol Prior NoSymbol Prior
keycode 113 = Left NoSymbol Left NoSymbol Left
keycode 114 = Right NoSymbol Right NoSymbol Right
keycode 115 = End NoSymbol End NoSymbol End
keycode 116 = Down NoSymbol Down NoSymbol Down
keycode 117 = Next NoSymbol Next NoSymbol Next
keycode 118 = Insert NoSymbol Insert NoSymbol Insert
keycode 119 = Delete NoSymbol Delete NoSymbol Delete
keycode 120 =
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute NoSymbol XF86AudioMute
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff NoSymbol XF86PowerOff
keycode 125 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal
keycode 126 = plusminus NoSymbol plusminus NoSymbol plusminus
keycode 127 = Pause Break Pause Break Pause Break
keycode 128 =
keycode 129 = KP_Separator NoSymbol KP_Separator NoSymbol KP_Separator
keycode 130 = Hangul NoSymbol Hangul NoSymbol Hangul
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja NoSymbol Hangul_Hanja
keycode 132 =
keycode 133 = Super_L NoSymbol Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R NoSymbol Super_R
keycode 135 = Menu NoSymbol Menu NoSymbol Menu
keycode 136 = Cancel NoSymbol Cancel NoSymbol Cancel
keycode 137 = Redo NoSymbol Redo NoSymbol Redo
keycode 138 = SunProps NoSymbol SunProps NoSymbol SunProps
keycode 139 = Undo NoSymbol Undo NoSymbol Undo
keycode 140 = SunFront NoSymbol SunFront NoSymbol SunFront
keycode 141 = XF86Copy NoSymbol XF86Copy NoSymbol XF86Copy
keycode 142 = SunOpen NoSymbol SunOpen NoSymbol SunOpen
keycode 143 = XF86Paste NoSymbol XF86Paste NoSymbol XF86Paste
keycode 144 = Find NoSymbol Find NoSymbol Find
keycode 145 = XF86Cut NoSymbol XF86Cut NoSymbol XF86Cut
keycode 146 = Help NoSymbol Help NoSymbol Help
keycode 147 = XF86MenuKB NoSymbol XF86MenuKB NoSymbol XF86MenuKB
keycode 148 = XF86Calculator NoSymbol XF86Calculator NoSymbol XF86Calculator
keycode 149 =
keycode 150 = XF86Sleep NoSymbol XF86Sleep NoSymbol XF86Sleep
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp NoSymbol XF86WakeUp
keycode 152 = XF86Explorer NoSymbol XF86Explorer NoSymbol XF86Explorer
keycode 153 = XF86Send NoSymbol XF86Send NoSymbol XF86Send
keycode 154 =
keycode 155 = XF86Xfer NoSymbol XF86Xfer NoSymbol XF86Xfer
keycode 156 = XF86Launch1 NoSymbol XF86Launch1 NoSymbol XF86Launch1
keycode 157 = XF86Launch2 NoSymbol XF86Launch2 NoSymbol XF86Launch2
keycode 158 = XF86WWW NoSymbol XF86WWW NoSymbol XF86WWW
keycode 159 = XF86DOS NoSymbol XF86DOS NoSymbol XF86DOS
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver NoSymbol XF86ScreenSaver
keycode 161 =
keycode 162 = XF86RotateWindows NoSymbol XF86RotateWindows NoSymbol XF86RotateWindows
keycode 163 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail
keycode 164 = XF86Favorites NoSymbol XF86Favorites NoSymbol XF86Favorites
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer NoSymbol XF86MyComputer
keycode 166 = XF86Back NoSymbol XF86Back NoSymbol XF86Back
keycode 167 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward
keycode 168 =
keycode 169 = XF86Eject NoSymbol XF86Eject NoSymbol XF86Eject
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext NoSymbol XF86AudioNext
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev NoSymbol XF86AudioPrev
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord NoSymbol XF86AudioRecord
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind NoSymbol XF86AudioRewind
keycode 177 = XF86Phone NoSymbol XF86Phone NoSymbol XF86Phone
keycode 178 =
keycode 179 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools
keycode 180 = XF86HomePage NoSymbol XF86HomePage NoSymbol XF86HomePage
keycode 181 = XF86Reload NoSymbol XF86Reload NoSymbol XF86Reload
keycode 182 = XF86Close NoSymbol XF86Close NoSymbol XF86Close
keycode 183 =
keycode 184 =
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp NoSymbol XF86ScrollUp
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown NoSymbol XF86ScrollDown
keycode 187 = parenleft NoSymbol parenleft NoSymbol parenleft
keycode 188 = parenright NoSymbol parenright NoSymbol parenright
keycode 189 = XF86New NoSymbol XF86New NoSymbol XF86New
keycode 190 = Redo NoSymbol Redo NoSymbol Redo
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L
keycode 206 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause NoSymbol XF86AudioPause
keycode 210 = XF86Launch3 NoSymbol XF86Launch3 NoSymbol XF86Launch3
keycode 211 = XF86Launch4 NoSymbol XF86Launch4 NoSymbol XF86Launch4
keycode 212 =
keycode 213 = XF86Standby NoSymbol XF86Standby NoSymbol XF86Standby
keycode 214 = XF86Close NoSymbol XF86Close NoSymbol XF86Close
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay
keycode 216 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward
keycode 217 =
keycode 218 = Print NoSymbol Print NoSymbol Print
keycode 219 =
keycode 220 = XF86WebCam NoSymbol XF86WebCam NoSymbol XF86WebCam
keycode 221 =
keycode 222 =
keycode 223 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail
keycode 224 =
keycode 225 = XF86Search NoSymbol XF86Search NoSymbol XF86Search
keycode 226 =
keycode 227 = XF86Finance NoSymbol XF86Finance NoSymbol XF86Finance
keycode 228 =
keycode 229 = XF86Shop NoSymbol XF86Shop NoSymbol XF86Shop
keycode 230 =
keycode 231 = Cancel NoSymbol Cancel NoSymbol Cancel
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia NoSymbol XF86AudioMedia
keycode 235 = XF86Display NoSymbol XF86Display NoSymbol XF86Display
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 239 = XF86Send NoSymbol XF86Send NoSymbol XF86Send
keycode 240 = XF86Reply NoSymbol XF86Reply NoSymbol XF86Reply
keycode 241 = XF86MailForward NoSymbol XF86MailForward NoSymbol XF86MailForward
keycode 242 = XF86Save NoSymbol XF86Save NoSymbol XF86Save
keycode 243 = XF86Documents NoSymbol XF86Documents NoSymbol XF86Documents
keycode 244 = XF86Battery NoSymbol XF86Battery NoSymbol XF86Battery
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth NoSymbol XF86Bluetooth
keycode 246 = XF86WLAN NoSymbol XF86WLAN NoSymbol XF86WLAN
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

View file

@ -1,278 +0,0 @@
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
keycode 8 =
keycode 9 = grave asciitilde dead_grave dead_tilde grave asciitilde
keycode 10 = 7 ampersand 7 ampersand 7 ampersand
keycode 11 = 5 percent EuroSign sterling cent heart
keycode 12 = 3 numbersign 3 numbersign 3 numbersign
keycode 13 = 1 exclam 1 exclam 1 exclam
keycode 14 = 9 parenleft 9 parenleft 9 parenleft
keycode 15 = 0 parenright 0 parenright 0 parenright
keycode 16 = 2 at 2 at 2 at
keycode 17 = 4 dollar 4 dollar 4 dollar
keycode 18 = 6 asciicircum 6 asciicircum 6 asciicircum
keycode 19 = 8 asterisk 8 asterisk 8 asterisk
keycode 20 = bracketleft braceleft bracketleft braceleft bracketleft braceleft
keycode 21 = bracketright braceright bracketright braceright bracketright braceright
keycode 22 = backslash bar backslash bar backslash bar
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl apostrophe quotedbl apostrophe quotedbl
keycode 25 = comma less comma less comma less
keycode 26 = period greater period greater period greater
keycode 27 = p P p P p P
keycode 28 = y Y y Y y Y
keycode 29 = f F f F f F
keycode 30 = g G g G g G
keycode 31 = c C c C c C
keycode 32 = r R r R r R
keycode 33 = l L l L l L
keycode 34 = slash question slash question slash question
keycode 35 = equal plus equal plus equal plus
keycode 36 = Return NoSymbol Return NoSymbol Return
keycode 37 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 38 = a A a A a A
keycode 39 = o O o O o O
keycode 40 = e E e E e E
keycode 41 = u U u U u U
keycode 42 = i I i I i I
keycode 43 = d D d D d D
keycode 44 = h H h H h H
keycode 45 = t T t T t T
keycode 46 = n N n N n N
keycode 47 = s S s S s S
keycode 48 = minus underscore minus underscore minus underscore
keycode 49 = Escape NoSymbol Escape NoSymbol Escape
keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L
keycode 51 = BackSpace bar BackSpace brokenbar BackSpace Terminate_Server
keycode 52 = semicolon colon semicolon colon semicolon colon
keycode 53 = q Q q Q q Q
keycode 54 = j J j J j J
keycode 55 = k K k K k K
keycode 56 = x X x X x X
keycode 57 = b B b B b B
keycode 58 = m M m M m M
keycode 59 = w W w W w W
keycode 60 = v V v V v V
keycode 61 = z Z z Z z Z
keycode 62 = ISO_Level3_Shift NoSymbol Shift_R NoSymbol Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space NoSymbol space
keycode 66 = Control_L NoSymbol Control_L NoSymbol Control_L
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 93 = Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku
keycode 94 = less greater less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12
keycode 97 =
keycode 98 = Katakana NoSymbol Katakana NoSymbol Katakana
keycode 99 = Hiragana NoSymbol Hiragana NoSymbol Hiragana
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode NoSymbol Henkan_Mode
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana NoSymbol Hiragana_Katakana
keycode 102 = Muhenkan NoSymbol Muhenkan NoSymbol Muhenkan
keycode 103 =
keycode 104 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter
keycode 105 = Control_R NoSymbol Control_R NoSymbol Control_R
keycode 106 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 107 = Print Sys_Req Print Sys_Req Print Sys_Req
keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R
keycode 109 = Linefeed NoSymbol Linefeed NoSymbol Linefeed
keycode 110 = Home NoSymbol Home NoSymbol Home
keycode 111 = Up NoSymbol Up NoSymbol Up
keycode 112 = Prior NoSymbol Prior NoSymbol Prior
keycode 113 = Left NoSymbol Left NoSymbol Left
keycode 114 = Right NoSymbol Right NoSymbol Right
keycode 115 = End NoSymbol End NoSymbol End
keycode 116 = Down NoSymbol Down NoSymbol Down
keycode 117 = Next NoSymbol Next NoSymbol Next
keycode 118 = Insert NoSymbol Insert NoSymbol Insert
keycode 119 = Delete NoSymbol Delete NoSymbol Delete
keycode 120 =
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute NoSymbol XF86AudioMute
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff NoSymbol XF86PowerOff
keycode 125 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal
keycode 126 = plusminus NoSymbol plusminus NoSymbol plusminus
keycode 127 = Pause Break Pause Break Pause Break
keycode 128 =
keycode 129 = KP_Separator NoSymbol KP_Separator NoSymbol KP_Separator
keycode 130 = Hangul NoSymbol Hangul NoSymbol Hangul
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja NoSymbol Hangul_Hanja
keycode 132 =
keycode 133 = Super_L NoSymbol Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R NoSymbol Super_R
keycode 135 = Menu NoSymbol Menu NoSymbol Menu
keycode 136 = Cancel NoSymbol Cancel NoSymbol Cancel
keycode 137 = Redo NoSymbol Redo NoSymbol Redo
keycode 138 = SunProps NoSymbol SunProps NoSymbol SunProps
keycode 139 = Undo NoSymbol Undo NoSymbol Undo
keycode 140 = SunFront NoSymbol SunFront NoSymbol SunFront
keycode 141 = XF86Copy NoSymbol XF86Copy NoSymbol XF86Copy
keycode 142 = SunOpen NoSymbol SunOpen NoSymbol SunOpen
keycode 143 = XF86Paste NoSymbol XF86Paste NoSymbol XF86Paste
keycode 144 = Find NoSymbol Find NoSymbol Find
keycode 145 = XF86Cut NoSymbol XF86Cut NoSymbol XF86Cut
keycode 146 = Help NoSymbol Help NoSymbol Help
keycode 147 = XF86MenuKB NoSymbol XF86MenuKB NoSymbol XF86MenuKB
keycode 148 = XF86Calculator NoSymbol XF86Calculator NoSymbol XF86Calculator
keycode 149 =
keycode 150 = XF86Sleep NoSymbol XF86Sleep NoSymbol XF86Sleep
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp NoSymbol XF86WakeUp
keycode 152 = XF86Explorer NoSymbol XF86Explorer NoSymbol XF86Explorer
keycode 153 = XF86Send NoSymbol XF86Send NoSymbol XF86Send
keycode 154 =
keycode 155 = XF86Xfer NoSymbol XF86Xfer NoSymbol XF86Xfer
keycode 156 = XF86Launch1 NoSymbol XF86Launch1 NoSymbol XF86Launch1
keycode 157 = XF86Launch2 NoSymbol XF86Launch2 NoSymbol XF86Launch2
keycode 158 = XF86WWW NoSymbol XF86WWW NoSymbol XF86WWW
keycode 159 = XF86DOS NoSymbol XF86DOS NoSymbol XF86DOS
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver NoSymbol XF86ScreenSaver
keycode 161 =
keycode 162 = XF86RotateWindows NoSymbol XF86RotateWindows NoSymbol XF86RotateWindows
keycode 163 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail
keycode 164 = XF86Favorites NoSymbol XF86Favorites NoSymbol XF86Favorites
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer NoSymbol XF86MyComputer
keycode 166 = XF86Back NoSymbol XF86Back NoSymbol XF86Back
keycode 167 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward
keycode 168 =
keycode 169 = XF86Eject NoSymbol XF86Eject NoSymbol XF86Eject
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext NoSymbol XF86AudioNext
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev NoSymbol XF86AudioPrev
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord NoSymbol XF86AudioRecord
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind NoSymbol XF86AudioRewind
keycode 177 = XF86Phone NoSymbol XF86Phone NoSymbol XF86Phone
keycode 178 =
keycode 179 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools
keycode 180 = XF86HomePage NoSymbol XF86HomePage NoSymbol XF86HomePage
keycode 181 = XF86Reload NoSymbol XF86Reload NoSymbol XF86Reload
keycode 182 = XF86Close NoSymbol XF86Close NoSymbol XF86Close
keycode 183 =
keycode 184 =
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp NoSymbol XF86ScrollUp
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown NoSymbol XF86ScrollDown
keycode 187 = parenleft NoSymbol parenleft NoSymbol parenleft
keycode 188 = parenright NoSymbol parenright NoSymbol parenright
keycode 189 = XF86New NoSymbol XF86New NoSymbol XF86New
keycode 190 = Redo NoSymbol Redo NoSymbol Redo
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L
keycode 206 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause NoSymbol XF86AudioPause
keycode 210 = XF86Launch3 NoSymbol XF86Launch3 NoSymbol XF86Launch3
keycode 211 = XF86Launch4 NoSymbol XF86Launch4 NoSymbol XF86Launch4
keycode 212 =
keycode 213 = XF86Standby NoSymbol XF86Standby NoSymbol XF86Standby
keycode 214 = XF86Close NoSymbol XF86Close NoSymbol XF86Close
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay
keycode 216 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward
keycode 217 =
keycode 218 = Print NoSymbol Print NoSymbol Print
keycode 219 =
keycode 220 = XF86WebCam NoSymbol XF86WebCam NoSymbol XF86WebCam
keycode 221 =
keycode 222 =
keycode 223 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail
keycode 224 =
keycode 225 = XF86Search NoSymbol XF86Search NoSymbol XF86Search
keycode 226 =
keycode 227 = XF86Finance NoSymbol XF86Finance NoSymbol XF86Finance
keycode 228 =
keycode 229 = XF86Shop NoSymbol XF86Shop NoSymbol XF86Shop
keycode 230 =
keycode 231 = Cancel NoSymbol Cancel NoSymbol Cancel
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia NoSymbol XF86AudioMedia
keycode 235 = XF86Display NoSymbol XF86Display NoSymbol XF86Display
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 239 = XF86Send NoSymbol XF86Send NoSymbol XF86Send
keycode 240 = XF86Reply NoSymbol XF86Reply NoSymbol XF86Reply
keycode 241 = XF86MailForward NoSymbol XF86MailForward NoSymbol XF86MailForward
keycode 242 = XF86Save NoSymbol XF86Save NoSymbol XF86Save
keycode 243 = XF86Documents NoSymbol XF86Documents NoSymbol XF86Documents
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =
!Original
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Caps_Lock (0x42)
!control Control_L (0x25), Control_R (0x69)
!mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0xce), Hyper_L (0xcf)
!mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L Alt_R Meta_L Meta_R
add mod2 = Num_Lock
add mod3 = Mode_switch
add mod4 = Super_L Super_R Hyper_L Hyper_R
add mod5 = ISO_Level3_Shift
keysym Menu = Mode_switch
keysym Alt_R = Hyper_L

View file

@ -1,248 +0,0 @@
keycode 8 =
keycode 9 = grave asciitilde
keycode 10 = 7 ampersand
keycode 11 = 5 percent
keycode 12 = 3 numbersign
keycode 13 = 1 exclam
keycode 14 = 9 parenleft
keycode 15 = 0 parenright
keycode 16 = 2 at
keycode 17 = 4 dollar
keycode 18 = 6 asciicircum
keycode 19 = 8 asterisk
keycode 20 = bracketleft braceleft
keycode 21 = bracketright braceright
keycode 22 = backslash
keycode 23 = Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl
keycode 25 = comma less
keycode 26 = period greater
keycode 27 = p P
keycode 28 = y Y
keycode 29 = f F
keycode 30 = g G
keycode 31 = c C
keycode 32 = r R
keycode 33 = l L
keycode 34 = slash question
keycode 35 = equal plus
keycode 36 = Return
keycode 37 = Caps_Lock
keycode 38 = a A
keycode 39 = o O
keycode 40 = e E
keycode 41 = u U
keycode 42 = i I
keycode 43 = d D
keycode 44 = h H
keycode 45 = t T
keycode 46 = n N
keycode 47 = s S
keycode 48 = minus underscore
keycode 49 = Escape
keycode 50 = Shift_L
keycode 51 = BackSpace bar
keycode 52 = semicolon colon
keycode 53 = q Q
keycode 54 = j J
keycode 55 = k K
keycode 56 = x X
keycode 57 = b B
keycode 58 = m M
keycode 59 = w W
keycode 60 = v V
keycode 61 = z Z
keycode 62 = Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L
keycode 65 = space
keycode 66 = Control_L
keycode 67 = F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock
keycode 79 = KP_Home KP_7
keycode 80 = KP_Up KP_8
keycode 81 = KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4
keycode 84 = KP_Begin KP_5
keycode 85 = KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1
keycode 88 = KP_Down KP_2
keycode 89 = KP_Next KP_3
keycode 90 = KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal
keycode 92 =
keycode 93 = Mode_switch
keycode 94 = less greater bar brokenbar bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12
keycode 97 = Home
keycode 98 = Up
keycode 99 = Prior
keycode 100 = Left
keycode 101 =
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Pause Break
keycode 111 = Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab
keycode 113 = Alt_R Meta_R
keycode 114 =
keycode 115 = Super_L
keycode 116 = Super_R
keycode 117 = Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L
keycode 126 = KP_Equal
keycode 127 = NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

View file

@ -1,248 +0,0 @@
keycode 8 =
keycode 9 = grave asciitilde
keycode 10 = 1 exclam
keycode 11 = 2 at
keycode 12 = 3 numbersign
keycode 13 = 4 dollar
keycode 14 = 5 percent
keycode 15 = 6 asciicircum
keycode 16 = 7 ampersand
keycode 17 = 8 asterisk
keycode 18 = 9 parenleft
keycode 19 = 0 parenright
keycode 20 = bracketleft braceleft
keycode 21 = bracketright braceright
keycode 22 = backslash bar
keycode 23 = Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl
keycode 25 = comma less
keycode 26 = period greater
keycode 27 = p P
keycode 28 = y Y
keycode 29 = f F
keycode 30 = g G
keycode 31 = c C
keycode 32 = r R
keycode 33 = l L
keycode 34 = slash question
keycode 35 = equal plus
keycode 36 = Return
keycode 37 = Control_L
keycode 38 = a A
keycode 39 = o O
keycode 40 = e E
keycode 41 = u U
keycode 42 = i I
keycode 43 = d D
keycode 44 = h H
keycode 45 = t T
keycode 46 = n N
keycode 47 = s S
keycode 48 = minus underscore
keycode 49 = Escape
keycode 50 = Shift_L
keycode 51 = BackSpace Terminate_Server
keycode 52 = semicolon colon
keycode 53 = q Q
keycode 54 = j J
keycode 55 = k K
keycode 56 = x X
keycode 57 = b B
keycode 58 = m M
keycode 59 = w W
keycode 60 = v V
keycode 61 = z Z
keycode 62 = Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L
keycode 65 = space
keycode 66 = Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock
keycode 79 = KP_Home KP_7
keycode 80 = KP_Up KP_8
keycode 81 = KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4
keycode 84 = KP_Begin KP_5
keycode 85 = KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1
keycode 88 = KP_Down KP_2
keycode 89 = KP_Next KP_3
keycode 90 = KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal
keycode 92 =
keycode 93 = Mode_switch
keycode 94 = less greater bar brokenbar bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12
keycode 97 = Home
keycode 98 = Up
keycode 99 = Prior
keycode 100 = Left
keycode 101 =
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Pause Break
keycode 111 = Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab
keycode 113 = Alt_R Meta_R
keycode 114 =
keycode 115 = Super_L
keycode 116 = Super_R
keycode 117 = Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L
keycode 126 = KP_Equal
keycode 127 = NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

View file

@ -1,247 +0,0 @@
keycode 8 =
keycode 9 =
keycode 10 =
keycode 11 = A
keycode 12 = X
keycode 13 = J
keycode 14 = e E EuroSign
keycode 15 = period greater
keycode 16 = U
keycode 17 = I
keycode 18 = D
keycode 19 = C
keycode 20 = H
keycode 21 = T
keycode 22 = N
keycode 23 = M
keycode 24 = B
keycode 25 = R
keycode 26 = L
keycode 27 = apostrophe quotedbl
keycode 28 = P
keycode 29 = O
keycode 30 = Y
keycode 31 = G
keycode 32 = K
keycode 33 = comma less
keycode 34 = Q
keycode 35 = F
keycode 36 = semicolon colon
keycode 37 = 1 exclam
keycode 38 = 2 at
keycode 39 = 3 numbersign
keycode 40 = 4 dollar EuroSign
keycode 41 = 5 percent EuroSign
keycode 42 = 6 asciicircum
keycode 43 = 7 ampersand
keycode 44 = 8 asterisk
keycode 45 = 9 parenleft
keycode 46 = 0 parenright
keycode 47 = Return
keycode 48 = Escape
keycode 49 = BackSpace
keycode 50 = Tab
keycode 51 = space
keycode 52 = bracketleft braceleft
keycode 53 = bracketright braceright
keycode 54 = slash question
keycode 55 = equal plus
keycode 56 = backslash bar brokenbar
keycode 57 = backslash bar brokenbar
keycode 58 = S
keycode 59 = minus underscore
keycode 60 = grave asciitilde
keycode 61 = W
keycode 62 = V
keycode 63 = Z
keycode 64 = Caps_Lock
keycode 65 = F1
keycode 66 = F2
keycode 67 = F3
keycode 68 = F4
keycode 69 = F5
keycode 70 = F6
keycode 71 = F7
keycode 72 = F8
keycode 73 = F9
keycode 74 = F10
keycode 75 = SunF36
keycode 76 = SunF37
keycode 77 = F22 F22 Print SunSys_Req
keycode 78 = F23 F23 Scroll_Lock
keycode 79 = F21 F21 Pause Break
keycode 80 = Insert
keycode 81 = Home
keycode 82 = Prior
keycode 83 = Delete
keycode 84 = End
keycode 85 = Next
keycode 86 = Right
keycode 87 = Left
keycode 88 = Down
keycode 89 = Up
keycode 90 = Num_Lock
keycode 91 = F25 F25 KP_Divide
keycode 92 = F26 F26 KP_Multiply
keycode 93 = F24 F24 KP_Subtract
keycode 94 = KP_Add
keycode 95 = KP_Enter
keycode 96 = F33 F33 KP_1 End
keycode 97 = Down F34 KP_2
keycode 98 = F35 F35 KP_3 Next
keycode 99 = Left F30 KP_4
keycode 100 = F31 F31 KP_5
keycode 101 = Right F32 KP_6
keycode 102 = F27 F27 KP_7 Home
keycode 103 = Up F28 KP_8
keycode 104 = F29 F29 KP_9 Prior
keycode 105 = KP_Insert KP_Insert KP_0
keycode 106 = Delete Delete KP_Decimal
keycode 107 =
keycode 108 = Multi_key
keycode 109 = SunPowerSwitch SunPowerSwitchShift
keycode 110 =
keycode 111 =
keycode 112 =
keycode 113 =
keycode 114 =
keycode 115 =
keycode 116 =
keycode 117 =
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 = F17 F17 SunOpen
keycode 124 = Help
keycode 125 = F13 F13 SunProps
keycode 126 = F15 F15 SunFront
keycode 127 = F11 F11 Cancel
keycode 128 = F12 F12 Redo
keycode 129 = F14 F14 Undo
keycode 130 = F20 F20 SunCut
keycode 131 = F16 F16 SunCopy
keycode 132 = F18 F18 SunPaste
keycode 133 = F19 F19 Find
keycode 134 = SunAudioMute SunVideoDegauss
keycode 135 = SunAudioRaiseVolume SunVideoRaiseBrightness
keycode 136 = SunAudioLowerVolume SunVideoLowerBrightness
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 =
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 =
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 = Control_L
keycode 232 = Shift_L
keycode 233 = Alt_L
keycode 234 = Meta_L
keycode 235 = Control_R
keycode 236 = Shift_R
keycode 237 = Mode_switch
keycode 238 = Meta_R
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =

View file

@ -1,248 +0,0 @@
keycode 8 =
keycode 9 = Escape
keycode 10 = 7 ampersand
keycode 11 = 5 percent
keycode 12 = 3 numbersign
keycode 13 = 1 exclam
keycode 14 = 9 parenleft
keycode 15 = 0 parenright
keycode 16 = 2 at
keycode 17 = 4 dollar
keycode 18 = 6 asciicircum
keycode 19 = 8 asterisk
keycode 20 = bracketleft braceleft
keycode 21 = bracketright braceright
keycode 22 = BackSpace
keycode 23 = Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl
keycode 25 = comma less
keycode 26 = period greater
keycode 27 = p P
keycode 28 = y Y
keycode 29 = f F
keycode 30 = g G
keycode 31 = c C
keycode 32 = r R
keycode 33 = l L
keycode 34 = slash question
keycode 35 = equal plus
keycode 36 = Return
keycode 37 = Control_L
keycode 38 = a A
keycode 39 = o O
keycode 40 = e E
keycode 41 = u U
keycode 42 = i I
keycode 43 = d D
keycode 44 = h H
keycode 45 = t T
keycode 46 = n N
keycode 47 = s S
keycode 48 = minus underscore
keycode 49 = grave asciitilde
keycode 50 = Shift_L
keycode 51 = backslash bar
keycode 52 = semicolon colon
keycode 53 = q Q
keycode 54 = j J
keycode 55 = k K
keycode 56 = x X
keycode 57 = b B
keycode 58 = m M
keycode 59 = w W
keycode 60 = v V
keycode 61 = z Z
keycode 62 = Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L
keycode 65 = space
keycode 66 = Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock
keycode 79 = KP_Home KP_7
keycode 80 = KP_Up KP_8
keycode 81 = KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4
keycode 84 = KP_Begin KP_5
keycode 85 = KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1
keycode 88 = KP_Down KP_2
keycode 89 = KP_Next KP_3
keycode 90 = KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal
keycode 92 =
keycode 93 = Mode_switch
keycode 94 = less greater bar brokenbar bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12
keycode 97 = Home
keycode 98 = Up
keycode 99 = Prior
keycode 100 = Left
keycode 101 =
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Pause Break
keycode 111 = Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab
keycode 113 = Alt_R Meta_R
keycode 114 =
keycode 115 = Super_L
keycode 116 = Super_R
keycode 117 = Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L
keycode 126 = KP_Equal
keycode 127 = NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

View file

@ -1,248 +0,0 @@
keycode 8 =
keycode 9 = grave asciitilde
keycode 10 = 1 exclam
keycode 11 = 2 at
keycode 12 = 3 numbersign
keycode 13 = 4 dollar
keycode 14 = 5 percent
keycode 15 = 6 asciicircum
keycode 16 = 7 ampersand
keycode 17 = 8 asterisk
keycode 18 = 9 parenleft
keycode 19 = 0 parenright
keycode 20 = bracketleft braceleft
keycode 21 = bracketright braceright
keycode 22 = backslash Terminate_Server
keycode 23 = Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl
keycode 25 = comma less
keycode 26 = period greater
keycode 27 = p P
keycode 28 = y Y
keycode 29 = f F
keycode 30 = g G
keycode 31 = c C
keycode 32 = r R
keycode 33 = l L
keycode 34 = slash question
keycode 35 = equal plus
keycode 36 = Return
keycode 37 = Control_L
keycode 38 = a A
keycode 39 = o O
keycode 40 = e E
keycode 41 = u U
keycode 42 = i I
keycode 43 = d D
keycode 44 = h H
keycode 45 = t T
keycode 46 = n N
keycode 47 = s S
keycode 48 = minus underscore
keycode 49 = Escape
keycode 50 = Shift_L
keycode 51 = BackSpace bar
keycode 52 = semicolon colon
keycode 53 = q Q
keycode 54 = j J
keycode 55 = k K
keycode 56 = x X
keycode 57 = b B
keycode 58 = m M
keycode 59 = w W
keycode 60 = v V
keycode 61 = z Z
keycode 62 = Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L
keycode 65 = space
keycode 66 = Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock
keycode 79 = KP_Home KP_7
keycode 80 = KP_Up KP_8
keycode 81 = KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4
keycode 84 = KP_Begin KP_5
keycode 85 = KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1
keycode 88 = KP_Down KP_2
keycode 89 = KP_Next KP_3
keycode 90 = KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal
keycode 92 =
keycode 93 = Mode_switch
keycode 94 = less greater bar brokenbar bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12
keycode 97 = Home
keycode 98 = Up
keycode 99 = Prior
keycode 100 = Left
keycode 101 =
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Pause Break
keycode 111 = Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab
keycode 113 = Alt_R Meta_R
keycode 114 =
keycode 115 = Super_L
keycode 116 = Super_R
keycode 117 = Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L
keycode 126 = KP_Equal
keycode 127 = NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

View file

@ -1,248 +0,0 @@
keycode 8 =
keycode 9 = Escape NoSymbol Escape NoSymbol Escape
keycode 10 = 1 exclam 1 exclam 1 exclam
keycode 11 = 2 at 2 at 2 at
keycode 12 = 3 numbersign 3 numbersign 3 numbersign
keycode 13 = 4 dollar 4 dollar 4 dollar
keycode 14 = 5 percent 5 percent EuroSign
keycode 15 = 6 dead_circumflex 6 dead_circumflex asciicircum asciicircum
keycode 16 = 7 ampersand 7 ampersand 7 ampersand
keycode 17 = 8 asterisk 8 asterisk 8 asterisk
keycode 18 = 9 parenleft 9 parenleft leftsinglequotemark dead_breve
keycode 19 = 0 parenright 0 parenright rightsinglequotemark dead_abovering
keycode 20 = bracketleft braceleft bracketleft braceleft bracketleft braceleft
keycode 21 = bracketright braceright bracketright braceright bracketright braceright
keycode 22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = dead_acute dead_diaeresis dead_acute dead_diaeresis apostrophe quotedbl
keycode 25 = comma less comma less dead_cedilla dead_caron
keycode 26 = period greater period greater dead_abovedot dead_circumflex
keycode 27 = p P p P p P
keycode 28 = y Y y Y y Y
keycode 29 = f F f F f F
keycode 30 = g G g G g G
keycode 31 = c C c C c C
keycode 32 = r R r R r R
keycode 33 = l L l L l L
keycode 34 = slash question slash question dead_hook dead_hook
keycode 35 = equal plus equal plus dead_doubleacute dead_horn
keycode 36 = Return NoSymbol Return NoSymbol Return
keycode 37 = Control_L NoSymbol Control_L NoSymbol Control_L
keycode 38 = a A a A a A
keycode 39 = o O o O o O
keycode 40 = e E e E EuroSign cent
keycode 41 = u U u U u U
keycode 42 = i I i I i I
keycode 43 = d D d D d D
keycode 44 = h H h H h H
keycode 45 = t T t T t T
keycode 46 = n N n N n N
keycode 47 = s S s S s S
keycode 48 = minus underscore minus underscore dead_macron dead_belowdot
keycode 49 = dead_grave dead_tilde dead_grave dead_tilde grave asciitilde
keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L
keycode 51 = backslash bar backslash bar backslash bar
keycode 52 = semicolon colon semicolon colon dead_ogonek dead_diaeresis
keycode 53 = q Q q Q q Q
keycode 54 = j J j J j J
keycode 55 = k K k K k K
keycode 56 = x X x X x X
keycode 57 = b B b B b B
keycode 58 = m M m M m M
keycode 59 = w W w W w W
keycode 60 = v V v V v V
keycode 61 = z Z z Z z Z
keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space NoSymbol space
keycode 66 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 =
keycode 93 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch
keycode 94 = less greater less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12
keycode 97 = Home NoSymbol Home NoSymbol Home
keycode 98 = Up NoSymbol Up NoSymbol Up
keycode 99 = Prior NoSymbol Prior NoSymbol Prior
keycode 100 = Left NoSymbol Left NoSymbol Left
keycode 101 =
keycode 102 = Right NoSymbol Right NoSymbol Right
keycode 103 = End NoSymbol End NoSymbol End
keycode 104 = Down NoSymbol Down NoSymbol Down
keycode 105 = Next NoSymbol Next NoSymbol Next
keycode 106 = Insert NoSymbol Insert NoSymbol Insert
keycode 107 = Delete NoSymbol Delete NoSymbol Delete
keycode 108 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter
keycode 109 = Control_R NoSymbol Control_R NoSymbol Control_R
keycode 110 = Pause Break Pause Break Pause Break
keycode 111 = Print Sys_Req Print Sys_Req Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 113 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 114 =
keycode 115 = Super_L NoSymbol Super_L NoSymbol Super_L
keycode 116 = Super_R NoSymbol Super_R NoSymbol Super_R
keycode 117 = Menu NoSymbol Menu NoSymbol Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L
keycode 126 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal
keycode 127 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display NoSymbol XF86Display NoSymbol XF86Display
keycode 215 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 216 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 217 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

View file

@ -1,67 +0,0 @@
// based on a keyboard map from an 'xkb/symbols/dk' file
// Esperanto orthographics added by <andreas@unstable.nl>
// eg AltGr-j gives j^
//
// $XFree86: xc/programs/xkbcomp/symbols/dvorak,v 1.5 2004/01/03 16:35:07 herrb Exp $
partial alphanumeric_keys
xkb_symbols "dvorak" {
name[Group1]= "U.S. English - Dvorak";
// Alphanumeric section
key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
key <AE01> { [ 1, exclam ] };
key <AE02> { [ 2, at ] };
key <AE03> { [ 3, numbersign ] };
key <AE04> { [ 4, dollar ] };
key <AE05> { [ 5, percent ] };
key <AE06> { [ 6, asciicircum, dead_circumflex, dead_circumflex ] };
key <AE07> { [ 7, ampersand ] };
key <AE08> { [ 8, asterisk ] };
key <AE09> { [ 9, parenleft, dead_grave] };
key <AE10> { [ 0, parenright ] };
key <AE11> { [ bracketleft, braceleft ] };
key <AE12> { [ bracketright, braceright, dead_tilde] };
key <AD01> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
key <AD02> { [ comma, less, dead_cedilla, dead_caron ] };
key <AD03> { [ period, greater, dead_abovedot, periodcentered ] };
key <AD04> { [ p, P ] };
key <AD05> { [ y, Y ] };
key <AD06> { [ f, F ] };
key <AD07> { [ g, G, gcircumflex, Gcircumflex ] };
key <AD08> { [ c, C, ccircumflex, Ccircumflex ] };
key <AD09> { [ r, R ] };
key <AD10> { [ l, L ] };
key <AD11> { [ slash, question ] };
key <AD12> { [ equal, plus ] };
key <AC01> { [ a, A ] };
key <AC02> { [ o, O ] };
key <AC03> { [ e, E ] };
key <AC04> { [ u, U, ubreve, Ubreve ] };
key <AC05> { [ i, I ] };
key <AC06> { [ d, D ] };
key <AC07> { [ h, H, hcircumflex, Hcircumflex ] };
key <AC08> { [ t, T ] };
key <AC09> { [ n, N ] };
key <AC10> { [ s, S, scircumflex, Scircumflex ] };
key <AC11> { [ minus, underscore ] };
key <AB01> { [ semicolon, colon, dead_ogonek, dead_doubleacute ] };
key <AB02> { [ q, Q ] };
key <AB03> { [ j, J, jcircumflex, Jcircumflex ] };
key <AB04> { [ k, K ] };
key <AB05> { [ x, X ] };
key <AB06> { [ b, B ] };
key <AB07> { [ m, M ] };
key <AB08> { [ w, W ] };
key <AB09> { [ v, V ] };
key <AB10> { [ z, Z ] };
key <RWIN> { [ ISO_Level3_Shift ] };
};

View file

@ -1,292 +0,0 @@
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
keycode 8 =
keycode 9 = grave asciitilde dead_grave dead_tilde
keycode 10 = 7 ampersand 7 ampersand
keycode 11 = 5 percent EuroSign cent
keycode 12 = 3 numbersign 3 numbersign
keycode 13 = 1 exclam 1 exclam
keycode 14 = 9 parenleft leftsinglequotemark leftdoublequotemark
keycode 15 = 0 parenright rightsinglequotemark rightdoublequotemark
keycode 16 = 2 at 2 at
keycode 17 = 4 dollar 4 dollar
keycode 18 = 6 asciicircum dead_circumflex asciicircum
keycode 19 = 8 asterisk 8 asterisk
keycode 20 = bracketleft braceleft bracketleft braceleft
keycode 21 = bracketright braceright bracketright braceright
keycode 22 = backslash bar brokenbar brokenbar
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl dead_acute dead_diaeresis
keycode 25 = comma less dead_cedilla dead_caron
keycode 26 = period greater dead_breve dead_abovedot
keycode 27 = p P paragraph P
keycode 28 = y Y yen heart
keycode 29 = f F f F
keycode 30 = g G gcircumflex Gcircumflex
keycode 31 = c C ccircumflex Ccircumflex
keycode 32 = r R r R
keycode 33 = l L l L
keycode 34 = slash question dead_hook dead_hook
keycode 35 = equal plus dead_doubleacute dead_horn
keycode 36 = Return NoSymbol Return
keycode 37 = Caps_Lock NoSymbol Caps_Lock
keycode 38 = a A a A
keycode 39 = o O o O
keycode 40 = e E EuroSign cent
keycode 41 = u U U016D U016C
keycode 42 = i I i I
keycode 43 = d D d D
keycode 44 = h H hcircumflex Hcircumflex
keycode 45 = t T t T
keycode 46 = n N n N
keycode 47 = s S scircumflex Scircumflex
keycode 48 = minus underscore dead_macron dead_belowdot
keycode 49 = Escape dead_circumflex dead_grave dead_tilde
keycode 50 = Shift_L NoSymbol Shift_L
keycode 51 = BackSpace bar BackSpace brokenbar
keycode 52 = semicolon colon dead_ogonek dead_diaeresis
keycode 53 = q Q q Q
keycode 54 = j J jcircumflex Jcircumflex
keycode 55 = k K k K
keycode 56 = x X x X
keycode 57 = b B b B
keycode 58 = m M m M
keycode 59 = w W w W
keycode 60 = v V v V
keycode 61 = z Z z Z
keycode 62 = Shift_R NoSymbol Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space
keycode 66 = Control_L NoSymbol Control_L
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 =
keycode 93 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 94 = less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12
keycode 97 = Home NoSymbol Home
keycode 98 = Up NoSymbol Up
keycode 99 = Prior NoSymbol Prior
keycode 100 = Left NoSymbol Left
keycode 101 =
keycode 102 = Right NoSymbol Right
keycode 103 = End NoSymbol End
keycode 104 = Down NoSymbol Down
keycode 105 = Next NoSymbol Next
keycode 106 = Insert NoSymbol Insert
keycode 107 = Delete NoSymbol Delete
keycode 108 = KP_Enter NoSymbol KP_Enter
keycode 109 = Control_R NoSymbol Control_R
keycode 110 = Pause Break Pause Break
keycode 111 = Print Sys_Req Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 113 = Mode_switch Multi_key Mode_switch Multi_key
keycode 114 =
keycode 115 = Super_L Hyper_L Super_L Hyper_L
keycode 116 = Menu NoSymbol Menu
keycode 117 = Super_R Hyper_R Super_R Hyper_R
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L NoSymbol Alt_L
keycode 126 = KP_Equal NoSymbol KP_Equal
keycode 127 = NoSymbol Super_L NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display NoSymbol XF86Display
!keycode 215 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
!keycode 216 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
!keycode 217 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =
!Original
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Control_L (0x25)
!control , Control_R (0x6d), Caps_Lock (0x42)
!mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
!2nd
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Caps_Lock (0x25)
!control , Control_R (0x6d), Control_L (0x42)
!mod1 Alt_L (0x40), Alt_L (0x7d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x73), Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L Meta_L Alt_R Meta_R
add mod2 = Mode_switch
add mod3 = Num_Lock
add mod4 = Super_L Hyper_L Super_R Hyper_R
add mod5 = ISO_Level3_Shift
!remove Lock = Caps_Lock
!add Control = Caps_Lock
!remove Control = Control_L
!add Lock = Control_L
!keysym Caps_Lock = Mode_switch

View file

@ -1,292 +0,0 @@
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
keycode 8 =
keycode 9 = grave asciitilde dead_grave dead_tilde
keycode 10 = 1 exclam 1 exclam
keycode 11 = 2 at 2 at
keycode 12 = 3 numbersign 3 numbersign
keycode 13 = 4 dollar 4 dollar
keycode 14 = 5 percent EuroSign
keycode 15 = 6 asciicircum dead_circumflex asciicircum
keycode 16 = 7 ampersand 7 ampersand
keycode 17 = 8 asterisk 8 asterisk
keycode 18 = 9 parenleft leftsinglequotemark dead_breve
keycode 19 = 0 parenright rightsinglequotemark dead_abovering
keycode 20 = bracketleft braceleft bracketleft braceleft
keycode 21 = bracketright braceright bracketright braceright
keycode 22 = backslash bar backslash bar
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl dead_acute dead_diaeresis
keycode 25 = comma less dead_cedilla dead_caron
keycode 26 = period greater dead_circumflex dead_abovedot
keycode 27 = p P p P
keycode 28 = y Y y Y
keycode 29 = f F f F
keycode 30 = g G g G
keycode 31 = c C c C
keycode 32 = r R r R
keycode 33 = l L l L
keycode 34 = slash question dead_hook dead_hook
keycode 35 = equal plus dead_doubleacute dead_horn
keycode 36 = Return NoSymbol Return
keycode 37 = Caps_Lock NoSymbol Caps_Lock
keycode 38 = a A a A
keycode 39 = o O o O
keycode 40 = e E EuroSign cent
keycode 41 = u U u U
keycode 42 = i I i I
keycode 43 = d D d D
keycode 44 = h H h H
keycode 45 = t T t T
keycode 46 = n N n N
keycode 47 = s S s S
keycode 48 = minus underscore dead_macron dead_belowdot
keycode 49 = Escape dead_circumflex dead_grave dead_tilde
keycode 50 = Shift_L NoSymbol Shift_L
keycode 51 = BackSpace brokenbar BackSpace brokenbar
keycode 52 = semicolon colon dead_ogonek dead_diaeresis
keycode 53 = q Q q Q
keycode 54 = j J j J
keycode 55 = k K k K
keycode 56 = x X x X
keycode 57 = b B b B
keycode 58 = m M m M
keycode 59 = w W w W
keycode 60 = v V v V
keycode 61 = z Z z Z
keycode 62 = Shift_R NoSymbol Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space
keycode 66 = Control_L NoSymbol Control_L
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 =
keycode 93 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 94 = less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12
keycode 97 = Home NoSymbol Home
keycode 98 = Up NoSymbol Up
keycode 99 = Prior NoSymbol Prior
keycode 100 = Left NoSymbol Left
keycode 101 =
keycode 102 = Right NoSymbol Right
keycode 103 = End NoSymbol End
keycode 104 = Down NoSymbol Down
keycode 105 = Next NoSymbol Next
keycode 106 = Insert NoSymbol Insert
keycode 107 = Delete NoSymbol Delete
keycode 108 = KP_Enter NoSymbol KP_Enter
keycode 109 = Control_R NoSymbol Control_R
keycode 110 = Pause Break Pause Break
keycode 111 = Print Sys_Req Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 113 = Mode_switch Mode_switch Mode_switch Mode_switch
keycode 114 =
keycode 115 = Super_L Hyper_L Super_L Hyper_L
keycode 116 = Menu NoSymbol Menu
keycode 117 = Super_R Hyper_R Super_R Hyper_R
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L NoSymbol Alt_L
keycode 126 = KP_Equal NoSymbol KP_Equal
keycode 127 = NoSymbol Super_L NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display NoSymbol XF86Display
keycode 215 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 216 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 217 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =
!Original
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Control_L (0x25)
!control , Control_R (0x6d), Caps_Lock (0x42)
!mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
!2nd
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Caps_Lock (0x25)
!control , Control_R (0x6d), Control_L (0x42)
!mod1 Alt_L (0x40), Alt_L (0x7d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x73), Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L Meta_L Alt_R Meta_R
add mod2 = Mode_switch
add mod3 = Num_Lock
add mod4 = Super_L Hyper_L Super_R Hyper_R
add mod5 = ISO_Level3_Shift
!remove Lock = Caps_Lock
!add Control = Caps_Lock
!remove Control = Control_L
!add Lock = Control_L
!keysym Caps_Lock = Mode_switch

View file

@ -1,292 +0,0 @@
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
keycode 8 =
keycode 9 = Escape dead_circumflex dead_grave dead_tilde
keycode 10 = 7 ampersand 7 ampersand
keycode 11 = 5 percent EuroSign cent
keycode 12 = 3 numbersign 3 numbersign
keycode 13 = 1 exclam 1 exclam
keycode 14 = 9 parenleft leftsinglequotemark leftdoublequotemark
keycode 15 = 0 parenright rightsinglequotemark rightdoublequotemark
keycode 16 = 2 at 2 at
keycode 17 = 4 dollar 4 dollar
keycode 18 = 6 asciicircum dead_circumflex asciicircum
keycode 19 = 8 asterisk 8 asterisk
keycode 20 = bracketleft braceleft bracketleft braceleft
keycode 21 = bracketright braceright bracketright braceright
keycode 22 = BackSpace bar BackSpace brokenbar
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl dead_acute dead_diaeresis
keycode 25 = comma less dead_cedilla dead_caron
keycode 26 = period greater dead_breve dead_abovedot
keycode 27 = p P paragraph P
keycode 28 = y Y yen heart
keycode 29 = f F f F
keycode 30 = g G gcircumflex Gcircumflex
keycode 31 = c C ccircumflex Ccircumflex
keycode 32 = r R r R
keycode 33 = l L l L
keycode 34 = slash question dead_hook dead_hook
keycode 35 = equal plus dead_doubleacute dead_horn
keycode 36 = Return NoSymbol Return
keycode 37 = Control_L NoSymbol Control_L
keycode 38 = a A a A
keycode 39 = o O o O
keycode 40 = e E EuroSign cent
keycode 41 = u U U016D U016C
keycode 42 = i I i I
keycode 43 = d D d D
keycode 44 = h H hcircumflex Hcircumflex
keycode 45 = t T t T
keycode 46 = n N n N
keycode 47 = s S scircumflex Scircumflex
keycode 48 = minus underscore dead_macron dead_belowdot
keycode 49 = grave asciitilde dead_grave dead_tilde
keycode 50 = Shift_L NoSymbol Shift_L
keycode 51 = backslash bar brokenbar brokenbar
keycode 52 = semicolon colon dead_ogonek dead_diaeresis
keycode 53 = q Q q Q
keycode 54 = j J jcircumflex Jcircumflex
keycode 55 = k K k K
keycode 56 = x X x X
keycode 57 = b B b B
keycode 58 = m M m M
keycode 59 = w W w W
keycode 60 = v V v V
keycode 61 = z Z z Z
keycode 62 = Shift_R NoSymbol Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space
keycode 66 = Caps_Lock NoSymbol Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 =
keycode 93 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 94 = less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12
keycode 97 = Home NoSymbol Home
keycode 98 = Up NoSymbol Up
keycode 99 = Prior NoSymbol Prior
keycode 100 = Left NoSymbol Left
keycode 101 =
keycode 102 = Right NoSymbol Right
keycode 103 = End NoSymbol End
keycode 104 = Down NoSymbol Down
keycode 105 = Next NoSymbol Next
keycode 106 = Insert NoSymbol Insert
keycode 107 = Delete NoSymbol Delete
keycode 108 = KP_Enter NoSymbol KP_Enter
keycode 109 = Control_R NoSymbol Control_R
keycode 110 = Pause Break Pause Break
keycode 111 = Print Sys_Req Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 113 = Mode_switch Mode_switch Mode_switch Mode_switch
keycode 114 =
keycode 115 = Super_L Hyper_L Super_L Hyper_L
keycode 116 = Menu NoSymbol Menu
keycode 117 = Super_R Hyper_R Super_R Hyper_R
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L NoSymbol Alt_L
keycode 126 = KP_Equal NoSymbol KP_Equal
keycode 127 = NoSymbol Super_L NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display NoSymbol XF86Display
!keycode 215 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
!keycode 216 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
!keycode 217 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =
!Original
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Control_L (0x25)
!control , Control_R (0x6d), Caps_Lock (0x42)
!mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
!2nd
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Caps_Lock (0x25)
!control , Control_R (0x6d), Control_L (0x42)
!mod1 Alt_L (0x40), Alt_L (0x7d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x73), Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L Meta_L Alt_R Meta_R
add mod2 = Mode_switch
add mod3 = Num_Lock
add mod4 = Super_L Hyper_L Super_R Hyper_R
add mod5 = ISO_Level3_Shift
!remove Lock = Caps_Lock
!add Control = Caps_Lock
!remove Control = Control_L
!add Lock = Control_L
!keysym Caps_Lock = Mode_switch

View file

@ -1,275 +0,0 @@
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
keycode 8 =
keycode 9 =
keycode 10 =
keycode 11 = A
keycode 12 = X
keycode 13 = J
keycode 14 = e E EuroSign
keycode 15 = period greater
keycode 16 = U
keycode 17 = I
keycode 18 = D
keycode 19 = C
keycode 20 = H
keycode 21 = T
keycode 22 = N
keycode 23 = M
keycode 24 = B
keycode 25 = R
keycode 26 = L
keycode 27 = apostrophe quotedbl
keycode 28 = P
keycode 29 = O
keycode 30 = Y
keycode 31 = G
keycode 32 = K
keycode 33 = comma less
keycode 34 = Q
keycode 35 = F
keycode 36 = semicolon colon
keycode 37 = 7 ampersand
keycode 38 = 5 percent EuroSign
keycode 39 = 3 numbersign
keycode 40 = 1 exclam
keycode 41 = 9 parenleft
keycode 42 = 0 parenright
keycode 43 = 2 at
keycode 44 = 4 dollar EuroSign
keycode 45 = 6 asciicircum
keycode 46 = 8 asterisk
keycode 47 = Return
keycode 48 = Escape
keycode 49 = BackSpace
keycode 50 = Tab
keycode 51 = space
keycode 52 = bracketleft braceleft
keycode 53 = bracketright braceright
keycode 54 = slash question
keycode 55 = equal plus
keycode 56 = backslash bar brokenbar
keycode 57 = backslash bar brokenbar
keycode 58 = S
keycode 59 = minus underscore
keycode 60 = grave asciitilde
keycode 61 = W
keycode 62 = V
keycode 63 = Z
keycode 64 = Caps_Lock
keycode 65 = F1
keycode 66 = F2
keycode 67 = F3
keycode 68 = F4
keycode 69 = F5
keycode 70 = F6
keycode 71 = F7
keycode 72 = F8
keycode 73 = F9
keycode 74 = F10
keycode 75 = SunF36
keycode 76 = SunF37
keycode 77 = F22 F22 Print SunSys_Req
keycode 78 = F23 F23 Scroll_Lock
keycode 79 = F21 F21 Pause Break
keycode 80 = Insert
keycode 81 = Home
keycode 82 = Prior
keycode 83 = Delete
keycode 84 = End
keycode 85 = Next
keycode 86 = Right
keycode 87 = Left
keycode 88 = Down
keycode 89 = Up
keycode 90 = Num_Lock
keycode 91 = F25 F25 KP_Divide
keycode 92 = F26 F26 KP_Multiply
keycode 93 = F24 F24 KP_Subtract
keycode 94 = KP_Add
keycode 95 = KP_Enter
keycode 96 = F33 F33 KP_1 End
keycode 97 = Down F34 KP_2
keycode 98 = F35 F35 KP_3 Next
keycode 99 = Left F30 KP_4
keycode 100 = F31 F31 KP_5
keycode 101 = Right F32 KP_6
keycode 102 = F27 F27 KP_7 Home
keycode 103 = Up F28 KP_8
keycode 104 = F29 F29 KP_9 Prior
keycode 105 = KP_Insert KP_Insert KP_0
keycode 106 = Delete Delete KP_Decimal
keycode 107 =
keycode 108 = Multi_key
keycode 109 = SunPowerSwitch SunPowerSwitchShift
keycode 110 =
keycode 111 =
keycode 112 =
keycode 113 =
keycode 114 =
keycode 115 =
keycode 116 =
keycode 117 =
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 = F17 F17 SunOpen
keycode 124 = Help
keycode 125 = F13 F13 SunProps
keycode 126 = F15 F15 SunFront
keycode 127 = F11 F11 Cancel
keycode 128 = F12 F12 Redo
keycode 129 = F14 F14 Undo
keycode 130 = F20 F20 SunCut
keycode 131 = F16 F16 SunCopy
keycode 132 = F18 F18 SunPaste
keycode 133 = F19 F19 Find
keycode 134 = SunAudioMute SunVideoDegauss
keycode 135 = SunAudioRaiseVolume SunVideoRaiseBrightness
keycode 136 = SunAudioLowerVolume SunVideoLowerBrightness
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 =
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 =
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 = Control_L
keycode 232 = Shift_L
keycode 233 = Alt_L
keycode 234 = Meta_L
keycode 235 = Control_R
keycode 236 = Shift_R
keycode 237 = Mode_switch
keycode 238 = Meta_R
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
!Original
!shift Shift_L (0xe8), Shift_R (0xec)
!lock Caps_Lock (0x40)
!control Control_L (0xe7), Control_R (0xeb)
!mod1 Alt_L (0xe9)
!mod2 Mode_switch (0xed)
!mod3 Num_Lock (0x5a)
!mod4 Meta_L (0xea), Meta_R (0xee)
!mod5
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L
add mod2 = Mode_switch
add mod3 = Num_Lock
add mod4 = Meta_L Meta_R

View file

@ -1,275 +0,0 @@
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
keycode 8 =
keycode 9 =
keycode 10 =
keycode 11 = A
keycode 12 = X
keycode 13 = J
keycode 14 = e E EuroSign
keycode 15 = period greater
keycode 16 = U
keycode 17 = I
keycode 18 = D
keycode 19 = C
keycode 20 = H
keycode 21 = T
keycode 22 = N
keycode 23 = M
keycode 24 = B
keycode 25 = R
keycode 26 = L
keycode 27 = apostrophe quotedbl
keycode 28 = P
keycode 29 = O
keycode 30 = Y
keycode 31 = G
keycode 32 = K
keycode 33 = comma less
keycode 34 = Q
keycode 35 = F
keycode 36 = semicolon colon
keycode 37 = 7 ampersand
keycode 38 = 5 percent EuroSign
keycode 39 = 3 numbersign
keycode 40 = 1 exclam
keycode 41 = 9 parenleft
keycode 42 = 0 parenright
keycode 43 = 2 at
keycode 44 = 4 dollar EuroSign
keycode 45 = 6 asciicircum
keycode 46 = 8 asterisk
keycode 47 = Return
keycode 48 = grave asciitilde
keycode 49 = backslash bar brokenbar
keycode 50 = Tab
keycode 51 = space
keycode 52 = bracketleft braceleft
keycode 53 = bracketright braceright
keycode 54 = slash question
keycode 55 = equal plus
keycode 56 = BackSpace
keycode 57 = backslash bar brokenbar
keycode 58 = S
keycode 59 = minus underscore
keycode 60 = Escape
keycode 61 = W
keycode 62 = V
keycode 63 = Z
keycode 64 = Control_L
keycode 65 = F1
keycode 66 = F2
keycode 67 = F3
keycode 68 = F4
keycode 69 = F5
keycode 70 = F6
keycode 71 = F7
keycode 72 = F8
keycode 73 = F9
keycode 74 = F10
keycode 75 = SunF36
keycode 76 = SunF37
keycode 77 = F22 F22 Print SunSys_Req
keycode 78 = F23 F23 Scroll_Lock
keycode 79 = F21 F21 Pause Break
keycode 80 = Insert
keycode 81 = Home
keycode 82 = Prior
keycode 83 = Delete
keycode 84 = End
keycode 85 = Next
keycode 86 = Right
keycode 87 = Left
keycode 88 = Down
keycode 89 = Up
keycode 90 = Num_Lock
keycode 91 = F25 F25 KP_Divide
keycode 92 = F26 F26 KP_Multiply
keycode 93 = F24 F24 KP_Subtract
keycode 94 = KP_Add
keycode 95 = KP_Enter
keycode 96 = F33 F33 KP_1 End
keycode 97 = Down F34 KP_2
keycode 98 = F35 F35 KP_3 Next
keycode 99 = Left F30 KP_4
keycode 100 = F31 F31 KP_5
keycode 101 = Right F32 KP_6
keycode 102 = F27 F27 KP_7 Home
keycode 103 = Up F28 KP_8
keycode 104 = F29 F29 KP_9 Prior
keycode 105 = KP_Insert KP_Insert KP_0
keycode 106 = Delete Delete KP_Decimal
keycode 107 =
keycode 108 = Multi_key
keycode 109 = SunPowerSwitch SunPowerSwitchShift
keycode 110 =
keycode 111 =
keycode 112 =
keycode 113 =
keycode 114 =
keycode 115 =
keycode 116 =
keycode 117 =
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 = F17 F17 SunOpen
keycode 124 = Help
keycode 125 = F13 F13 SunProps
keycode 126 = F15 F15 SunFront
keycode 127 = F11 F11 Cancel
keycode 128 = F12 F12 Redo
keycode 129 = F14 F14 Undo
keycode 130 = F20 F20 SunCut
keycode 131 = F16 F16 SunCopy
keycode 132 = F18 F18 SunPaste
keycode 133 = F19 F19 Find
keycode 134 = SunAudioMute SunVideoDegauss
keycode 135 = SunAudioRaiseVolume SunVideoRaiseBrightness
keycode 136 = SunAudioLowerVolume SunVideoLowerBrightness
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 =
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 =
keycode 215 =
keycode 216 =
keycode 217 =
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 = Caps_Lock
keycode 232 = Shift_L
keycode 233 = Alt_L
keycode 234 = Meta_L
keycode 235 = Control_R
keycode 236 = Shift_R
keycode 237 = Mode_switch
keycode 238 = Meta_R
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
!Original
!shift Shift_L (0xe8), Shift_R (0xec)
!lock Caps_Lock (0x40)
!control Control_L (0xe7), Control_R (0xeb)
!mod1 Alt_L (0xe9)
!mod2 Mode_switch (0xed)
!mod3 Num_Lock (0x5a)
!mod4 Meta_L (0xea), Meta_R (0xee)
!mod5
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L
add mod2 = Mode_switch
add mod3 = Num_Lock
add mod4 = Meta_L Meta_R

View file

@ -1,248 +0,0 @@
keycode 8 =
keycode 9 = Escape NoSymbol Escape NoSymbol Escape
keycode 10 = 1 exclam 1 exclam 1 exclam
keycode 11 = 2 at 2 at 2 at
keycode 12 = 3 numbersign 3 numbersign 3 numbersign
keycode 13 = 4 dollar 4 dollar 4 dollar
keycode 14 = 5 percent 5 percent EuroSign
keycode 15 = 6 dead_circumflex 6 dead_circumflex asciicircum asciicircum
keycode 16 = 7 ampersand 7 ampersand 7 ampersand
keycode 17 = 8 asterisk 8 asterisk 8 asterisk
keycode 18 = 9 parenleft 9 parenleft leftsinglequotemark dead_breve
keycode 19 = 0 parenright 0 parenright rightsinglequotemark dead_abovering
keycode 20 = minus underscore minus underscore dead_macron dead_belowdot
keycode 21 = equal plus equal plus dead_doubleacute dead_horn
keycode 22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = q Q q Q q Q
keycode 25 = w W w W w W
keycode 26 = e E e E EuroSign cent
keycode 27 = r R r R r R
keycode 28 = t T t T t T
keycode 29 = y Y y Y y Y
keycode 30 = u U u U u U
keycode 31 = i I i I i I
keycode 32 = o O o O o O
keycode 33 = p P p P p P
keycode 34 = bracketleft braceleft bracketleft braceleft bracketleft braceleft
keycode 35 = bracketright braceright bracketright braceright bracketright braceright
keycode 36 = Return NoSymbol Return NoSymbol Return
keycode 37 = Control_L NoSymbol Control_L NoSymbol Control_L
keycode 38 = a A a A a A
keycode 39 = s S s S s S
keycode 40 = d D d D d D
keycode 41 = f F f F f F
keycode 42 = g G g G g G
keycode 43 = h H h H h H
keycode 44 = j J j J j J
keycode 45 = k K k K k K
keycode 46 = l L l L l L
keycode 47 = semicolon colon semicolon colon dead_ogonek dead_diaeresis
keycode 48 = dead_acute dead_diaeresis dead_acute dead_diaeresis apostrophe quotedbl
keycode 49 = dead_grave dead_tilde dead_grave dead_tilde grave asciitilde
keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L
keycode 51 = backslash bar backslash bar backslash bar
keycode 52 = z Z z Z z Z
keycode 53 = x X x X x X
keycode 54 = c C c C c C
keycode 55 = v V v V v V
keycode 56 = b B b B b B
keycode 57 = n N n N n N
keycode 58 = m M m M m M
keycode 59 = comma less comma less dead_cedilla dead_caron
keycode 60 = period greater period greater dead_abovedot dead_circumflex
keycode 61 = slash question slash question dead_hook dead_hook
keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space NoSymbol space
keycode 66 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 =
keycode 93 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch
keycode 94 = less greater less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12
keycode 97 = Home NoSymbol Home NoSymbol Home
keycode 98 = Up NoSymbol Up NoSymbol Up
keycode 99 = Prior NoSymbol Prior NoSymbol Prior
keycode 100 = Left NoSymbol Left NoSymbol Left
keycode 101 =
keycode 102 = Right NoSymbol Right NoSymbol Right
keycode 103 = End NoSymbol End NoSymbol End
keycode 104 = Down NoSymbol Down NoSymbol Down
keycode 105 = Next NoSymbol Next NoSymbol Next
keycode 106 = Insert NoSymbol Insert NoSymbol Insert
keycode 107 = Delete NoSymbol Delete NoSymbol Delete
keycode 108 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter
keycode 109 = Control_R NoSymbol Control_R NoSymbol Control_R
keycode 110 = Pause Break Pause Break Pause Break
keycode 111 = Print Sys_Req Print Sys_Req Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 113 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 114 =
keycode 115 = Super_L NoSymbol Super_L NoSymbol Super_L
keycode 116 = Super_R NoSymbol Super_R NoSymbol Super_R
keycode 117 = Menu NoSymbol Menu NoSymbol Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 =
keycode 124 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L
keycode 126 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal
keycode 127 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L
keycode 129 =
keycode 130 =
keycode 131 =
keycode 132 =
keycode 133 =
keycode 134 =
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 =
keycode 209 =
keycode 210 =
keycode 211 =
keycode 212 =
keycode 213 =
keycode 214 = XF86Display NoSymbol XF86Display NoSymbol XF86Display
keycode 215 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 216 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 217 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more