-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs
2005 lines (1778 loc) · 83.2 KB
/
.emacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; package: --- summary
;;; Commentary:
;;; Blablub
;;; Code:
;; -*- lexical-binding: t -*-
;; muss aufgerufen werden, sonst funktioniert load-theme nicht?!
(package-initialize)
;; (byte-recompile-directory (expand-file-name "~/.emacs.d") 0)
(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.
'(ansi-color-faces-vector
[default bold shadow italic underline bold bold-italic bold])
'(ansi-color-names-vector
["#073642" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#657b83"])
'(ansi-term-color-vector
[unspecified "#1F1611" "#660000" "#144212" "#EFC232" "#5798AE" "#BE73FD" "#93C1BC" "#E6E1DC"] t)
'(auto-hscroll-mode t)
'(blink-cursor-interval 2)
'(blink-cursor-mode nil)
'(bmkp-last-as-first-bookmark-file "~/.emacs.d/bookmarks")
'(centered-window-mode nil)
'(column-number-mode t)
'(compilation-message-face (quote default))
'(cua-global-mark-cursor-color "#2aa198")
'(cua-normal-cursor-color "#839496")
'(cua-overwrite-cursor-color "#b58900")
'(cua-read-only-cursor-color "#859900")
'(custom-enabled-themes (quote (deep-thought)))
'(custom-safe-themes
(quote
("3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "96998f6f11ef9f551b427b8853d947a7857ea5a578c75aa9c4e7c73fe04d10b4" "987b709680284a5858d5fe7e4e428463a20dfabe0a6f2a6146b3b8c7c529f08b" "3020dc2250c069e54f2b511a8ebd1f7cb32bcfc656052d338e5edaafe15b63ce" "94c5bc8fc704ae14be32ae431b0ea69401b86cced60bfc2dd61b59b5752aa548" "762052e64a1afe2858cbdb74e235923b1325dae3fb6d1863eaebfffa4e6d01b6" "5a121632ba70f6ad6579d56046fd4d1a7d636183dcccfab60f3d9f19a1590bf1" "3189a4f0f158218f036f31974f70209d7aca4ef0657b59c8f9af588c25fb9157" "2dfc88456d75733816c47d9cbc76577b1834a2edfeeb26ba5c971a83a70698fa" "abac85c5290c454e2aee3e7dec431c9320bc2009345fa5f6b80ca290180c39c1" "0024424ff9d06038246914144e7eee9812ee4597ddde76f53564fabcb39e3feb" "ad97202c92f426a867e83060801938acf035921d5d7e78da3041a999082fb565" "47e37fa090129214330d13a68549d5c86ccc2c41f4979cb4be130ff945a9859a" "3cc2385c39257fed66238921602d8104d8fd6266ad88a006d0a4325336f5ee02" "e9776d12e4ccb722a2a732c6e80423331bcb93f02e089ba2a4b02e85de1cf00e" "1a85b8ade3d7cf76897b338ff3b20409cb5a5fbed4e45c6f38c98eee7b025ad4" "3d5ef3d7ed58c9ad321f05360ad8a6b24585b9c49abcee67bdcbb0fe583a6950" "7bde52fdac7ac54d00f3d4c559f2f7aa899311655e7eb20ec5491f3b5c533fe8" "46fd293ff6e2f6b74a5edf1063c32f2a758ec24a5f63d13b07a20255c074d399" "3cd28471e80be3bd2657ca3f03fbb2884ab669662271794360866ab60b6cb6e6" "0c29db826418061b40564e3351194a3d4a125d182c6ee5178c237a7364f0ff12" "4f2ede02b3324c2f788f4e0bad77f7ebc1874eff7971d2a2c9b9724a50fb3f65" "e008d9149dd39b249d4f8a9b5c1362d8f85bd11e9c08454e5728fbf0fcc11690" "c537bf460334a1eca099e05a662699415f3971b438972bed499c5efeb821086b" "7b7ef508f9241c01edaaff3e0d6f03588a6f4fddb1407a995a7a333b29e327b5" "f15a7ce08b9e13553c1f230678e9ceb5b372f8da26c9fb815eb20df3492253b7" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" "a0fdc9976885513b03b000b57ddde04621d94c3a08f3042d1f6e2dbc336d25c7" "e3c90203acbde2cf8016c6ba3f9c5300c97ddc63fcb78d84ca0a144d402eedc6" "8022cea21aa4daca569aee5c1b875fbb3f3248a5debc6fc8cf5833f2936fbb22" "cab317d0125d7aab145bc7ee03a1e16804d5abdfa2aa8738198ac30dc5f7b569" "b3775ba758e7d31f3bb849e7c9e48ff60929a792961a2d536edec8f68c671ca5" "58c6711a3b568437bab07a30385d34aacf64156cc5137ea20e799984f4227265" "2e1f802a1a0e64be3e8340e1ddf6b1ac92d5cae69d5d01bff01f6520fa0509ec" "6d906da85461c423a797b082dac60289c5ecb6020e36cb7c2f4e889b112ba418" "4cfad7896ff2993dafce390a729a573d794568af181100fe789f0314684347df" "c56d90af9285708041991bbc780a073182cbe91721de17c6e7a8aac1380336b3" "b9183de9666c3a16a7ffa7faaa8e9941b8d0ab50f9aaba1ca49f2f3aec7e3be9" "0ed983facae99849805b2f7be926561cb58474eb18e5296d9bb3ad7f9b088a5b" "e80932ca56b0f109f8545576531d3fc79487ca35a9a9693b62bf30d6d08c9aaf" "f66d14168cbbc5bb16f44b95e181c8e66ecd92dd11c42837edb49a94bea96f51" "ce965ad1ab1febba3a3b813376bb3bc197aa8138da2d157d118966e60ad7672f" "5523e2938d77a075377c748cf5255ddf3ad9bf336cf5b0d313ce42f0cf9e3da9" "0dfa1e8661e71b0ea99d72657ed2f8091733f260eebfb3df36fb6f04aaf91faa" "aaabb08b44f70837bb81e5f8765fbc7320aa9f194e191f7cf6991c05ab6e0bdd" "4d69ca4daa84a4fe422fc9fcdf371ea68ac78160ed8b114ee83980c26c192571" "056cc49d7892609356495b9d84cda7a3a4c4907a24fe1005be0286315e5e743a" "a5b08a032ccc87e2dcee0c6593ec7ddfb1e404484c0b31913272465411ed985f" "8a0d67242cfe61abd626f852820daf01a6c43a9a60ae1d089acd93a5d66c0aae" "cb7a467df3ac296e83871a441d397ff58dbc58cb421af058c90d36ca89a6fa60" "94a9bdbc38f38c479dd49f12576160a1f5354144b88ef92f5d5f88aa196b89ea" "8917968eb3da797036c303eb03102248447953d479e33ef91aea1eabf33f5741" "dce1c195114880942abf49757ccbcffcf28a11c64e89e7065dbcbf0d6de84926" "299164bc6ba7b154403cf90a305b38a0c5cf6d6fd8c2074bb6163ae213773484" "c96831947ff9377cec694b3510c2fa3eec9cdf58ac1c58a711450d38284a51a3" "08269693f826b4dac039e70700a469c204ad54ac98b06ea3a512b2ce239852c9" "6915f9b0d1aed1121e9f47725cae7f2f7e7128716afad8ec511d8519693e0df0" "3ec7e0747a871644d2a5ae7af865d9fbb9ca38245af35aad43b6b75490b7ce3f" "cc0dbb53a10215b696d391a90de635ba1699072745bf653b53774706999208e3" "08851585c86abcf44bb1232bced2ae13bc9f6323aeda71adfa3791d6e7fea2b6" "39dd7106e6387e0c45dfce8ed44351078f6acd29a345d8b22e7b8e54ac25bac4" "868f73b5cf78e72ca2402e1d48675e49cc9a9619c5544af7bf216515d22b58e7" "8f1cedf54f137f71382e3367e1843d10e173add99abe3a5f7d3285f5cc18f1a9" "2a86b339554590eb681ecf866b64ce4814d58e6d093966b1bf5a184acf78874d" "4e262566c3d57706c70e403d440146a5440de056dfaeb3062f004da1711d83fc" "c5a044ba03d43a725bd79700087dea813abcb6beb6be08c7eb3303ed90782482" "ef08e77c67344f23154fd8cb9f3b8b1b4bb1799c0bf9d05dfd4b792557e0e401" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "4c41d3e6fb19438b23899ffcb64cec224f995866911974f274b9c3771630ae96" "c14901c2292ec32e2718ec0324bf238dc2fe72466de3800977ad46a4cf32034a" "130dde3591d54f11db5f5c78185556b5b122b18d4e1dbaf9251666587e440b57" "5beea8d4fc82da6bc88094f2faa22750096c90674e4156d7a9ead6b9c0392b26" "aba5c6a53bd439fd531d9c91a7a50228c90ce40926225047f81b03f11ad05c51" "6d637708c89f256c7de050148ad75acb8b1cd653ae23e175542e27cdccb99d43" "3b0ac518cb44e09dbde90f828ae3ec97d69a164b825bc31b8eeb43c4ceb87656" "456ac8176c7c01680384356cbdc568a7683d1bada9c83ae3d7294809ddda4014" "c87cc60d01cf755375759d165c1d60d9586c6a31f0b5437a0378c2a93cfc8407" "ed5af4af1d148dc4e0e79e4215c85e7ed21488d63303ddde27880ea91112b07e" "1177fe4645eb8db34ee151ce45518e47cc4595c3e72c55dc07df03ab353ad132" "7bf64a1839bf4dbc61395bd034c21204f652185d17084761a648251041b70233" "62c9339d5cac3a49688abb34e98f87a6ee82003a11251f12e0ada1788090c40f" "cbef37d6304f12fb789f5d80c2b75ea01465e41073c30341dc84c6c0d1eb611d" "8cf56691a70156f611ac86d0bbcbc7dee7673df195de5918f34bfdc6814ffd39" "4aee8551b53a43a883cb0b7f3255d6859d766b6c5e14bcb01bed572fcbef4328" "a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0" "756597b162f1be60a12dbd52bab71d40d6a2845a3e3c2584c6573ee9c332a66e" "6a37be365d1d95fad2f4d185e51928c789ef7a4ccf17e7ca13ad63a8bf5b922f" "e26780280b5248eb9b2d02a237d9941956fc94972443b0f7aeec12b5c15db9f3" "c7359bd375132044fe993562dfa736ae79efc620f68bab36bd686430c980df1c" "c4e6fe8f5728a5d5fd0e92538f68c3b4e8b218bcfb5e07d8afff8731cc5f3df0" "e16a771a13a202ee6e276d06098bc77f008b73bbac4d526f160faa2d76c1dd0e" "53c542b560d232436e14619d058f81434d6bbcdc42e00a4db53d2667d841702e" "1989847d22966b1403bab8c674354b4a2adf6e03e0ffebe097a6bd8a32be1e19" "bf648fd77561aae6722f3d53965a9eb29b08658ed045207fe32ffed90433eb52" "ce79400f46bd76bebeba655465f9eadf60c477bd671cbcd091fe871d58002a88" "0ebe0307942b6e159ab794f90a074935a18c3c688b526a2035d14db1214cf69c" "33c5a452a4095f7e4f6746b66f322ef6da0e770b76c0ed98a438e76c497040bb" "9bcb8ee9ea34ec21272bb6a2044016902ad18646bd09fdd65abae1264d258d89" "90b5269aefee2c5f4029a6a039fb53803725af6f5c96036dee5dc029ff4dff60" "7d4d00a2c2a4bba551fcab9bfd9186abe5bfa986080947c2b99ef0b4081cb2a6" "a774c5551bc56d7a9c362dca4d73a374582caedb110c201a09b410c0ebbb5e70" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
'(debug-on-error t)
'(default-input-method "chinese-py")
'(electric-indent-mode nil)
'(electric-pair-mode t)
'(fci-rule-character-color "#452E2E")
'(fci-rule-color "#073642" t)
'(fringe-mode 0 nil (fringe))
'(global-auto-highlight-symbol-mode nil)
'(global-hl-line-mode nil)
'(help-window-select t)
'(highlight-changes-colors (quote ("#d33682" "#6c71c4")))
'(highlight-symbol-colors
(--map
(solarized-color-blend it "#002b36" 0.25)
(quote
("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2"))))
'(highlight-symbol-foreground-color "#93a1a1")
'(highlight-tail-colors
(quote
(("#073642" . 0)
("#546E00" . 20)
("#00736F" . 30)
("#00629D" . 50)
("#7B6000" . 60)
("#8B2C02" . 70)
("#93115C" . 85)
("#073642" . 100))))
'(hl-bg-colors
(quote
("#7B6000" "#8B2C02" "#990A1B" "#93115C" "#3F4D91" "#00629D" "#00736F" "#546E00")))
'(hl-fg-colors
(quote
("#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36")))
'(ibus-python-shell-command-name "python2")
'(ido-mode (quote both) nil (ido))
'(inhibit-startup-screen t)
'(lazy-highlight-cleanup nil)
'(linum-format " %5i ")
'(linum-relative-current-symbol ">>")
'(magit-diff-use-overlays nil)
'(main-line-color1 "#191919")
'(main-line-color2 "#111111")
'(menu-bar-mode nil)
'(nyan-mode nil)
'(org-agenda-files
(quote
("~/doks/new_mag/rt-gramm_frwk_chi.org" "~/doks/new_mag/mag.org" "~/Dokumente/mag/mag.org")))
'(org-latex-table-caption-above nil)
'(package-archives
(quote
(("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/"))))
'(package-selected-packages
(quote
(evil-magit magit nodejs-repl flymake-json js2-mode json-mode merlin tuareg nim-mode evil rust-mode loop poker parsec zotelo zenburn-theme zen-and-art-theme yaxception yasnippet xquery-mode warm-night-theme typescript-mode tern tabbar sublime-themes sr-speedbar solarized-theme smooth-scrolling sml-mode smartparens smart-mode-line slime shm scss-mode sass-mode rainbow-mode rainbow-delimiters projectile-speedbar project-explorer powerline-evil pos-tip popwin php-mode perspective ox-reveal ox-pandoc ox-html5slide org-plus-contrib org-pandoc org-gcal nyan-prompt nyan-mode noflet neotree multiple-cursors multi-term monokai-theme monochrome-theme molokai-theme mkdown minimap minimal-theme linum-relative levenshtein less-css-mode key-chord js3-mode jazz-theme hl-anything hipster-theme hide-comnt heroku-theme helm-idris helm-hoogle helm-ghc gotham-theme ghci-completion geben flymake-jshint flycheck fcitx evil-visualstar evil-search-highlight-persist evil-org esxml esqlite epresent emmet-mode elm-mode edbi e2wm dtrt-indent debbugs dark-souls csv-mode company-ghci company-ghc company-cabal color-theme-sanityinc-solarized color-theme cider centered-window-mode boron-theme bookmark+ birds-of-paradise-plus-theme beacon base16-theme auto-virtualenv auto-highlight-symbol auto-complete apache-mode ample-zen-theme)))
'(pos-tip-background-color "#073642")
'(pos-tip-foreground-color "#93a1a1")
'(powerline-color1 "#191919")
'(powerline-color2 "#111111")
'(powerline-default-separator (quote arrow))
'(rainbow-html-colors t)
'(safe-local-variable-values
(quote
((haskell-process-use-ghci . t)
(haskell-indent-spaces . 4)
(eval when
(fboundp
(quote rainbow-mode))
(rainbow-mode 1))
(zotero-collection .
#("4" 0 1
(name "ChinGrammar")))
(org-export-allow-bind-keywords . t)
(export-with-reveal . t)
(zotero-collection .
#("5" 0 1
(name "Magister")))
(reftex-default-bibliography "/home/rtb/Dokumente/mag/mag.bib")
(TeX-master . "mag")
(zotero-collection .
#("1" 0 1
(name "Magister"))))))
'(save-place t nil (saveplace))
'(scroll-bar-mode nil)
'(scss-compile-at-save nil)
'(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#073642" 0.2))
'(syslog-debug-face
(quote
((t :background unspecified :foreground "#2aa198" :weight bold))))
'(syslog-error-face
(quote
((t :background unspecified :foreground "#dc322f" :weight bold))))
'(syslog-hour-face (quote ((t :background unspecified :foreground "#859900"))))
'(syslog-info-face
(quote
((t :background unspecified :foreground "#268bd2" :weight bold))))
'(syslog-ip-face (quote ((t :background unspecified :foreground "#b58900"))))
'(syslog-su-face (quote ((t :background unspecified :foreground "#d33682"))))
'(syslog-warn-face
(quote
((t :background unspecified :foreground "#cb4b16" :weight bold))))
'(term-default-bg-color "#002b36")
'(term-default-fg-color "#839496")
'(tool-bar-mode nil)
'(uniquify-buffer-name-style (quote post-forward) nil (uniquify))
'(vc-annotate-background nil)
'(vc-annotate-color-map
(quote
((20 . "#dc322f")
(40 . "#CF4F1F")
(60 . "#C26C0F")
(80 . "#b58900")
(100 . "#AB8C00")
(120 . "#A18F00")
(140 . "#989200")
(160 . "#8E9500")
(180 . "#859900")
(200 . "#729A1E")
(220 . "#609C3C")
(240 . "#4E9D5B")
(260 . "#3C9F79")
(280 . "#2aa198")
(300 . "#299BA6")
(320 . "#2896B5")
(340 . "#2790C3")
(360 . "#268bd2"))))
'(vc-annotate-very-old-color nil)
'(weechat-color-list
(quote
(unspecified "#002b36" "#073642" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#839496" "#657b83")))
'(when (not (facep (aref ansi-term-color-vector 0))))
'(zotelo-default-translator (quote BibLaTeX)))
(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.
'(default ((t (:inherit nil :stipple nil :background nil :foreground nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 140 :width normal :foundry "unknown" :family "Droid Sans Mono"))))
'(ahs-definition-face ((t (:foreground "moccasin" :underline t))))
'(ahs-face ((t (:foreground "dark orange"))))
'(ahs-plugin-defalt-face ((t (:foreground "magenta"))))
'(custom-variable-tag ((t (:foreground "#1057f0" :weight bold))))
'(evil-search-highlight-persist-highlight-face ((t (:background "indian red"))))
'(fringe ((t (:background "#002b36"))))
'(google-translate-translation-face ((t nil)))
'(helm-candidate-number ((t (:background "#b58900" :foreground "black"))))
'(helm-selection ((t (:background "#206080" :foreground "black"))))
'(helm-source-header ((t (:background "#22083397778B" :foreground "#93a1a1" :weight bold :height 1.3 :family "Sans Serif"))))
'(linum-relative-current-face ((t (:inherit linum :background "chocolate" :foreground "firebrick" :weight bold))))
'(mode-line ((t (:height 0.8))))
'(popup-tip-face ((t (:background "chocolate4" :foreground "dark gray"))))
'(whitespace-indentation ((t (:background "dark magenta" :foreground "deep sky blue"))))
'(whitespace-space-after-tab ((t (:background "dark magenta" :foreground "cyan")))))
(add-to-list 'default-frame-alist '(font . "Droid Sans Mono 10"))
;; (add-to-list 'default-frame-alist '(font . "Monoid 10"))
;;(load "/home/rtb/git/dotfiles/cjk-font.el")
;;(set-face-attribute 'default t :font "Droid Sans Mono 14" )
;;(set-default-font "Droid Sans Mono 10")
(setq undo-tree-auto-save-history t)
;; für Terminal?!
(setq-default cursor-type 'hbar)
;;(setq evil-default-cursor t)
(setq evil-move-cursor-back nil)
(show-paren-mode t)
(let ((default-directory "~/.emacs.d/elpa/"))
(normal-top-level-add-subdirs-to-load-path))
(let ((default-directory "~/.emacs.d/plugins/"))
(normal-top-level-add-subdirs-to-load-path))
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
;; sollte in custom stehen:
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
;; does not work: (comint input ring is not saved)
;; (savehist-mode t)
;; instead see here: https://oleksandrmanzyuk.wordpress.com/2011/10/23/a-persistent-command-history-in-emacs/
;; there also is an article for ghci completion!! (refound)
(require 'savehist)
(savehist-mode t)
(eval-after-load 'company
'(progn
(define-key company-active-map (kbd "RET") nil)
(define-key company-active-map (kbd "ESC") 'company-abort)
(setq company-idle-delay 0.125
company-minimum-prefix-length 1
company-require-match nil
company-transformers '(company-sort-by-occurrence)
company-dabbrev-ignore-case nil
company-dabbrev-downcase nil
company-frontends '(company-pseudo-tooltip-unless-just-one-frontend
company-preview-frontend
company-echo-metadata-frontend))))
;; (add-hook 'after-init-hook 'global-company-mode)
(eval-after-load 'org-mode
'(progn
(auto-complete-mode -1)
(require 'company)))
(defun xah-new-empty-buffer ()
"Open 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)))
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)
(require 'multiple-cursors)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
;; When you want to add multiple cursors not based on continuous lines, but based on
;; keywords in the buffer, use:
(global-set-key (kbd "M-3") 'mc/mark-next-like-this)
(global-set-key (kbd "M-4") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
;; First mark the word, then add more cursors.
;; To get out of multiple-cursors-mode, press `<return>` or `C-g`. The latter will
;; first disable multiple regions before disabling multiple cursors. If you want to
;; insert a newline in multiple-cursors-mode, use `C-j`.
;; (load-theme 'sanityinc-solarized-dark)
;; (load-theme 'zenburn)
;; (load-theme 'base16-tomorrow)
(load-theme 'ample-zen)
;; (load-theme 'minimal)
;; Die Unterstreichung von modeline und tabbar war direkt unter der Grundlinie
;; der Buchstaben; hiermit werden sie besser positioniert!
(setq x-underline-at-descent-line t)
; show recent files
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 1000)
(scroll-bar-mode -1)
(electric-pair-mode)
(global-set-key (kbd "C-ö") 'other-window)
(require 'evil-leader)
(global-evil-leader-mode)
;; german mötäl köyböärd
(evil-leader/set-leader "ö")
;; does compute!!! :-))))
(evil-leader/set-key
"x" 'org-latex-export-to-pdf
"c" 'mark-sexp
"e" 'evil-end-of-visual-line
"a" 'evil-beginning-of-visual-line
"f" 'ido-find-file
;;"f" 'helm-find-files
"<SPC>" 'ido-switch-buffer
"d" 'helm-mini
"ö" 'other-window
"l" 'evil-search-forward
"m" 'evil-search-backward
"v" 'eval-last-sexp
"9" 'insert-char
"j" 'outline-next-visible-heading
"k" 'outline-previous-visible-heading
"i" 'my-save-word
"g" 'my-surround-german-guillemets
"r" 'describe-char
"q" 'evil-jump-to-tag
;; "t" 'toggle-input-method
"s" 'evil-search-highlight-persist-remove-all
"<" 'tabbar-switch-grouping-method
)
;; (require 'evil)
(load "~/elisp/evil/evil")
(setq evil-jumps-cross-buffers nil)
(evil-mode 1)
(setq evil-want-Y-yank-to-eol t)
(require 'evil-visualstar)
(global-evil-visualstar-mode)
(require 'helm-config)
(require 'helm-swoop)
(global-set-key (kbd "M-i") 'helm-swoop)
(global-set-key (kbd "M-I") 'helm-swoop-back-to-last-point)
(global-set-key (kbd "C-c M-i") 'helm-multi-swoop)
(global-set-key (kbd "C-x M-i") 'helm-multi-swoop-all)
;; (define-key isearch-mode-map (kbd "M-i") 'helm-swoop-from-isearch)
;; TODO: ob evil-motion-state-map oder diese andere map, die ich in evil-search.el
;; gefunden habe: funktioniert alles nicht ("attempt minibuffer while in mb" nun)
(define-key evil-ex-search-keymap (kbd "M-i") 'helm-swoop-from-evil-search)
;;(setq evil-search-module 'evil-search)
;; modes without evil
(add-to-list 'evil-emacs-state-modes 'interactive-haskell-mode)
(add-to-list 'evil-emacs-state-modes 'artist-mode)
(add-to-list 'evil-emacs-state-modes 'haskell-error-mode)
;; Emacs modes to Motion modes
(setq evil-motion-state-modes (append evil-emacs-state-modes evil-motion-state-modes))
(setq evil-motion-state-modes (delete 'debugger-mode evil-motion-state-modes))
;; (setq evil-emacs-state-modes (list 'desktop-menu-mode))
;; (setq evil-motion-state-modes (delete 'desktop-menu-mode evil-motion-state-modes))
(add-to-list 'evil-intercept-maps '(desktop-menu-mode-map . motion))
(add-hook 'desktop-menu-mode-hook
(lambda ()
(evil-define-key 'motion desktop-menu-mode-map (kbd "RET") 'desktop-menu-load)
)
)
(evil-add-hjkl-bindings desktop-menu-mode-map)
;;
;;(define-key evil-normal-state-map (kbd "C-v") 'evil-visual-block)
(define-key evil-normal-state-map (kbd "<f3>") 'helm-do-ag)
(define-key evil-normal-state-map (kbd "C-SPC") 'helm-mini)
(define-key evil-normal-state-map (kbd "C-u") 'evil-scroll-up)
(define-key evil-normal-state-map (kbd "SPC") 'evil-scroll-down)
(define-key evil-normal-state-map (kbd "S-SPC") 'evil-scroll-up)
(define-key evil-motion-state-map (kbd "C-u") 'evil-scroll-up)
(define-key evil-motion-state-map (kbd "SPC") 'evil-scroll-down)
(define-key evil-motion-state-map (kbd "S-SPC") 'evil-scroll-up)
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
(define-key evil-visual-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-visual-state-map (kbd "k") 'evil-previous-visual-line)
(define-key evil-normal-state-map (kbd "C-0") 'evil-switch-to-windows-last-buffer)
(define-key evil-normal-state-map (kbd "<f2>") 'evil-switch-to-windows-last-buffer)
(define-key evil-motion-state-map (kbd "C-0") 'evil-switch-to-windows-last-buffer)
;; (define-key evil-motion-state-map (kbd "<f2>") 'evil-switch-to-windows-last-buffer)
(global-set-key (kbd "<f2>") 'evil-switch-to-windows-last-buffer)
;; 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-normal-state-map "\C-c" '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-normal-state-map [escape] 'keyboard-quit)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
(define-key minibuffer-local-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-ns-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-completion-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-must-match-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-isearch-map [escape] 'abort-recursive-edit)
(define-key evil-normal-state-map "-" 'evil-search-forward)
(define-key evil-insert-state-map "\C-l" 'forward-char)
(global-set-key (kbd "C-0") 'evil-switch-to-windows-last-buffer)
;;(add-hook 'dired-mode-hoo
(defun my-dired-up-directory ()
"Take dired up one directory, but behave like dired-find-alternate-file"
(interactive)
(let ((old (current-buffer)))
(dired-up-directory)
(kill-buffer old)))
(eval-after-load 'dired
'(progn
(evil-define-key 'normal dired-mode-map "h" 'my-dired-up-directory)
(evil-define-key 'normal dired-mode-map "l" 'dired-find-alternate-file)
(evil-define-key 'normal dired-mode-map "o" 'dired-find-file-other-window)
(evil-define-key 'normal dired-mode-map "s" 'dired-sort-toggle-or-edit)
(evil-define-key 'normal dired-mode-map "t" 'dired-toggle-marks)
(evil-define-key 'normal dired-mode-map "m" 'dired-mark)
(evil-define-key 'normal dired-mode-map "u" 'dired-unmark)
(evil-define-key 'normal dired-mode-map "U" 'dired-unmark-all-marks)
(evil-define-key 'normal dired-mode-map "c" 'dired-create-directory)
(evil-define-key 'normal dired-mode-map "n" 'evil-search-next)
(evil-define-key 'normal dired-mode-map "N" 'evil-search-previous)
(evil-define-key 'normal dired-mode-map "-" 'evil-search-forward)
(evil-define-key 'normal dired-mode-map "q" 'kill-this-buffer)))
;;(require 'dired-sort-map)
(setq dired-listing-switches "-ABhl --group-directories-first")
(setenv "LC_COLLATE" "C")
(add-hook 'comint-mode-hook
(lambda ()
(define-key evil-normal-state-local-map (kbd "<up>") 'comint-previous-input)
(define-key evil-insert-state-local-map (kbd "<up>") 'comint-previous-input)
(define-key evil-normal-state-local-map (kbd "<down>") 'comint-next-input)
(define-key evil-insert-state-local-map (kbd "<down>") 'comint-next-input)
(define-key comint-mode-map (kbd "C-c C-l") 'helm-comint-input-ring)
(define-key comint-mode-map (kbd "<f12>") 'comint-send-eof)
(evil-define-key 'normal comint-mode-map (kbd "C-d") 'evil-scroll-down)
)
)
(defun comint-write-history-on-exit (process event)
"Write comint history of PROCESS when EVENT happened to a file specified in buffer local var 'comint-input-ring-file-name' (defined in turn-on-comint-history)."
(comint-write-input-ring)
(let ((buf (process-buffer process)))
(when (buffer-live-p buf)
(with-current-buffer buf
(insert (format "\nProcess %s %s !!!" process event))))))
(defun turn-on-comint-history ()
"Setup comint history.
When comint process started set buffer local var
'comint-input-ring-file-name', so that a file name is specified to write
and read from comint history.
That 'comint-input-ring-file-name' is buffer local is determined by the
4th argument to 'add-hook' below. And localness is important, because
otherwise 'comint-write-input-ring' will find mentioned var nil.
As of 29th July 2015 the localness does not seem to be important anymore.
Should investigate further (TODO)."
(let ((process (get-buffer-process (current-buffer))))
(when process
(setq comint-input-ring-file-name
(format "~/.emacs.d/inferior-%s-history"
(process-name process)))
(comint-read-input-ring)
(set-process-sentinel process
#'comint-write-history-on-exit))))
(add-hook 'inf-gf-mode-hook 'turn-on-comint-history)
;; see comint-mode-hook above; this defun here atm not needed
;; but customs in comint-mode-hook should have an own function like this here
(defun rtb/scroll-down-ctrl-d ()
"Evil scroll down in Comint."
(evil-define-key 'normal comint-mode-map (kbd "C-d") 'evil-scroll-down))
;; (require 'neotree)
;; (global-set-key [f8] 'neotree-toggle)
(global-set-key [f8] 'eval-buffer)
;; when opening neotree switch to dir of current buffer
;; (setq neo-smart-open t)
;; (add-hook 'neotree-mode-hook
;; (lambda ()
;; ;; DONE: truncate does work now with visual-line disabled
;; (visual-line-mode -1)
;; (setq truncate-lines t)
;; (define-key evil-normal-state-local-map (kbd "TAB") 'neotree-enter)
;; (define-key evil-normal-state-local-map (kbd "SPC") 'neotree-enter)
;; (define-key evil-normal-state-local-map (kbd "l") 'neotree-enter)
;; (define-key evil-normal-state-local-map (kbd "h") 'neotree-enter)
;; (define-key evil-normal-state-local-map (kbd "q") 'neotree-hide)
;; (define-key evil-normal-state-local-map (kbd "RET") 'neotree-enter)
;; (define-key evil-normal-state-local-map (kbd "g") 'neotree-refresh)
;; (define-key evil-normal-state-local-map (kbd "A") 'neotree-stretch-toggle)
;; (define-key evil-normal-state-local-map (kbd "u") 'neotree-select-up-node)
;; (define-key evil-normal-state-local-map (kbd "D") 'neotree-select-down-node)
;; (define-key evil-normal-state-local-map (kbd "H") 'neotree-hidden-file-toggle)
;; (define-key evil-normal-state-local-map (kbd "S") 'neotree-select-previous-sibling-node)
;; (define-key evil-normal-state-local-map (kbd "s") 'neotree-select-next-sibling-node)
;; (define-key evil-normal-state-local-map (kbd "C") 'neotree-change-root)
;; (define-key evil-normal-state-local-map (kbd "c") 'neotree-create-node)
;; (define-key evil-normal-state-local-map (kbd "+") 'neotree-create-node)
;; (define-key evil-normal-state-local-map (kbd "d") 'neotree-delete-node)
;; (define-key evil-normal-state-local-map (kbd "r") 'neotree-rename-node)
;; ))
;; (setq neo-dont-be-alone nil)
;; (setq neo-theme 'arrow)
;; Chinese-Input
;; (define-key evil-insert-state-map (kbd "M-SPC") 'toggle-input-method)
;; (define-key evil-insert-state-map "j" #'cofi/maybe-exit)
;; (evil-define-command cofi/maybe-exit ()
;; :repeat change
;; (interactive)
;; (let ((modified (buffer-modified-p)))
;; (insert "j")
;; (let ((evt (read-event (format "Insert %c to exit insert state" ?k)
;; nil 0.5)))
;; (cond
;; ((null evt) (message ""))
;; ((and (integerp evt) (char-equal evt ?k))
;; (delete-char -1)
;; (set-buffer-modified-p modified)
;; (push 'escape unread-command-events))
;; (t (setq unread-command-events (append unread-command-events
;; (list evt))))))))
;; esc quits
;; http://juanjoalvarez.net/es/detail/2014/sep/19/vim-emacsevil-chaotic-migration-guide/
(defun minibuffer-keyboard-quit ()
"Abort recursive edit.
In Delete Selection mode, if the mark is active, just deactivate it;
then it takes a second \\[keyboard-quit] to abort the minibuffer."
(interactive)
(if (and delete-selection-mode transient-mark-mode mark-active)
(setq deactivate-mark t)
(when (get-buffer "*Completions*") (delete-windows-on "*Completions*"))
(abort-recursive-edit)))
(define-key evil-normal-state-map [escape] 'keyboard-quit)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
(define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)
(global-set-key [escape] 'evil-exit-emacs-state)
;; (setq tabbar-use-images nil)
;; (load "~/.emacs.d/plugins/tabbar/tabbar-tweak.el")
(global-set-key (kbd "C-,") 'tabbar-backward)
(global-set-key (kbd "<M-dead-circumflex>") 'other-window)
(global-set-key (kbd "C-.") 'tabbar-forward)
(define-key evil-normal-state-map (kbd "C-.") 'tabbar-forward)
(define-key evil-motion-state-map (kbd "C-.") 'tabbar-forward)
(define-key evil-motion-state-map (kbd "C-,") 'tabbar-backward)
(define-key evil-normal-state-map (kbd "C-p") 'tabbar-backward-group)
(define-key evil-motion-state-map (kbd "C-p") 'tabbar-backward-group)
(define-key evil-normal-state-map (kbd "C-n") 'tabbar-forward-group)
(define-key evil-motion-state-map (kbd "C-n") 'tabbar-forward-group)
(defun rtb/tabbar-buffer-groups-by-dir ()
"Put all files in the same directory into the same tab bar"
(with-current-buffer (current-buffer)
(let ((dir (expand-file-name default-directory)))
(cond ;; assign group name until one clause succeeds, so the order is important
((eq major-mode 'dired-mode)
(list "Dired"))
((memq major-mode
'(help-mode apropos-mode Info-mode Man-mode))
(list "Help"))
((string-match-p "\*edbi.*\*" (buffer-name))
(list "edbi"))
((string-match-p "\*.*\*" (buffer-name))
(list "Misc"))
(t (list dir))))))
;; (defun rtb/tabbar-buffer-groups-working-dirs ()
;; "List only real directories by dir -- no internal buffers"
;; (with-current-buffer (current-buffer)
;; (let ((dir (expand-file-name default-directory)))
;; (list dir))))
;; (setq tabbar-buffer-groups-function 'rtb/tabbar-buffer-groups-working-dirs)
(setq tabbar-buffer-groups-function 'rtb/tabbar-buffer-groups-by-dir)
(defun tabbar-switch-grouping-method (&optional arg)
"Changes grouping method of tabbar to grouping by dir.
With a prefix arg, changes to grouping by major mode."
(interactive "P")
(ignore-errors
(if arg
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups) ;; the default setting
(setq tabbar-buffer-groups-function 'rtb/tabbar-buffer-groups-by-dir))))
(setq ido-enable-flex-matching t)
;; bound in evil-leader
(defun ido-jump-to-tab-group ()
"Jump to a tabbar group."
(interactive)
(if (< emacs-major-version 24)
(ido-common-initialization))
(unless (and (featurep 'tabbar)
tabbar-mode)
(error "Error: tabbar-mode not turned on."))
(set tabbar-tabsets-tabset (tabbar-map-tabsets 'tabbar-selected-tab)) ;; refresh groups
(let* ( (groups (mapcar #'(lambda (group)
(format "%s" (cdr group)))
(tabbar-tabs tabbar-tabsets-tabset)))
(group-name (ido-completing-read "Groups: " groups)))
(mapc #'(lambda (group)
(when (string= group-name (format "%s" (cdr group)))
(message "Switch to group '%s', current buffer: %s" (cdr group) (car group))
(switch-to-buffer (car group))))
(tabbar-tabs tabbar-tabsets-tabset))))
;; for use in different frames
(defun ido-switch-tab-group ()
"Switch tab groups using ido."
(interactive)
(let* (
(tab-buffer-list (mapcar
#'(lambda (b)
(with-current-buffer b
(list (current-buffer)
(buffer-name)
(funcall tabbar-buffer-groups-function) )))
(funcall tabbar-buffer-list-function)))
(groups (delete-dups
(mapcar #'(lambda (group)
(car (car (cdr (cdr group))))) tab-buffer-list)))
(group-name (ido-completing-read "Groups: " groups)) )
(catch 'done
(mapc
#'(lambda (group)
(when (equal group-name (car (car (cdr (cdr group)))))
(throw 'done (switch-to-buffer (car (cdr group))))))
tab-buffer-list) )))
(defun switch-tab-group (group-name)
"Switch to a specific tab group."
(let ((tab-buffer-list (mapcar
#'(lambda (b)
(with-current-buffer b
(list (current-buffer)
(buffer-name)
(funcall tabbar-buffer-groups-function) )))
(funcall tabbar-buffer-list-function))))
(catch 'done
(mapc
#'(lambda (group)
(when (equal group-name (format "%s" (car (car (cdr (cdr group))))))
(throw 'done (switch-to-buffer (car (cdr group))))))
tab-buffer-list) )))
;; thanks to: http://stackoverflow.com/questions/17914945/tabbar-2-0-custom-function-switching-to-a-specific-tab-group
;;
(defun switch-to-tab-group-dired ()
"Switch to a predefined existing tab group named `N`."
(interactive)
(switch-tab-group "Dired"))
(global-set-key (kbd "C-9") 'switch-to-tab-group-dired)
(defun switch-to-tab-group-a ()
"Switch to a predefined existing tab group named `A`."
(interactive)
(switch-tab-group "A"))
;;Exit insert mode by pressing j and then j quickly
;;(setq key-chord-two-keys-delay 0.5)
;;(key-chord-define evil-insert-state-map "饥渴" 'evil-normal-state)
;; (key-chord-mode -1)
;; hallo was gibt es hier denn zu schreiben??
;; Ich glaube ohne keychord, schreibt es ich um einges besser!
(require 'evil-org)
(require 'surround)
(global-surround-mode 1)
;; normal state: ys<textobject>?key
;; s + ?key
(setq-default surround-pairs-alist (cons '(?m "»" . "«")
surround-pairs-alist))
(setq-default surround-pairs-alist (cons '(?M "\\mq{" . "}")
surround-pairs-alist))
(setq-default surround-pairs-alist (cons '(?n "›" . "‹")
surround-pairs-alist))
(setq-default surround-pairs-alist (cons '(?i "\\inlst$" . "$")
surround-pairs-alist))
(setq-default surround-pairs-alist (cons '(?z "\\hspace{0.2em}「" . "」\\hspace{0.2em}")
surround-pairs-alist))
(setq-default surround-pairs-alist (cons '(?t "「" . "」")
surround-pairs-alist))
(setq-default surround-pairs-alist (cons '(?p "\\xp{" . "}")
surround-pairs-alist))
(setq-default surround-pairs-alist (cons '(?e "`" . "'")
surround-pairs-alist))
; http://ergoemacs.org/emacs/elisp_editing_basics.html
(defun my-surround-german-guillemets ()
"Surround word with german guillemets (chevrons = Möwchen)"
(interactive)
(search-backward " ")
(forward-char 1)
(insert "»")
(search-forward " ")
(backward-char 1)
(insert "«"))
;; working in terminal
(setq x-select-enable-clipboard t)
(setq x-select-enable-primary t)
(setq interprogram-paste-function 'x-selection-value)
(defun copy-to-clipboard ()
(interactive)
(if (display-graphic-p)
(progn
(message "Yanked region to x-clipboard!")
(call-interactively 'clipboard-kill-ring-save)
)
(if (region-active-p)
(progn
(shell-command-on-region (region-beginning) (region-end) "xsel -i -b")
(message "Yanked region to clipboard!")
(deactivate-mark))
(message "No region active; can't yank to clipboard!"))))
(defun paste-from-clipboard ()
(interactive)
(if (display-graphic-p)
(progn
(clipboard-yank)
(message "graphics active"))
(insert (shell-command-to-string "xsel -o -b"))))
;; needed only in shell -- never using shell with emacs...
;; (global-set-key [f7] 'copy-to-clipboard)
;; (global-set-key [f6] 'paste-from-clipboard)
(global-set-key [f6] 'revert-buffer)
;;no confirm:
;; (global-set-key [f5] (lambda () (interactive) (revert-buffer nil t)))
;; bringt das hier was?
;;(define-key global-map (kbd "RET") 'newline-and-indent)
;; occur-mode-goto-occurrence fehlt
;; http://ergoemacs.org/emacs/emacs_avoid_lambda_in_hook.html
;; -- stellt sich heraus, dass doch schon Bindings für Evil da sind
;; -- aber dies erstmal behalten, als HOOK-Beispiel
;; (defun rtb/occur-with-evil ()
;; "necessary functions when entering Occur from Evil"
;; (interactive)
;; (define-key evil-motion-state-map (kbd "RET") 'occur-mode-goto-occurence)
;; )
;; (add-hook 'ido-setup-hook
;; (define-key ido-completion-map "SPC" 'ido-exit-minibuffer))
;; (add-hook 'occur-mode-hook 'rtb/occur-with-evil)
;; (define-key evil-motion-state-map "RET" 'occur-mode-goto-occurence)
;; (add-hook 'occur-mode-hook
;; (lambda ()
;; ;;(interactive)
;; (define-key evil-motion-state-map (kbd "RET") 'occur-mode-goto-occurrence)
;; (define-key evil-motion-state-map (kbd "C-o") 'occur-mode-goto-occurence-other-window)))
(setq xterm-mouse-mode t)
;; haskell!
;; (load "haskell-mode-autoloads")
(require 'haskell-mode)
(require 'haskell-debug)
;;(autoload 'ghc-init "ghc" nil t)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
(add-hook 'haskell-mode-hook
(function
(lambda ()
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(setq haskell-program-name "ghci")
(setq haskell-ghci-program-name "ghci")
(electric-indent-local-mode -1))))
;;electric-indent-mode war im Haskell mode dafür verantwortlich
;;dass jedesmal bei RET eingerückt wurde
(eval-after-load 'haskell-interactive-mode '(progn
(evil-define-key 'normal haskell-interactive-mode-map (kbd "RET") 'haskell-interactive-mode-return)
))
(eval-after-load 'haskell-mode '(progn
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
(define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
(define-key haskell-mode-map (kbd "C-c C-n C-t") 'haskell-process-do-type)
(define-key haskell-mode-map (kbd "C-c C-n C-i") 'haskell-process-do-info)
(define-key haskell-mode-map (kbd "C-c C-n C-c") 'haskell-process-cabal-build)
(define-key haskell-mode-map (kbd "C-c C-n c") 'haskell-process-cabal)
(define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space)))
(eval-after-load 'haskell-cabal '(progn
(define-key haskell-cabal-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
(define-key haskell-cabal-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
(define-key haskell-cabal-mode-map (kbd "C-c c") 'haskell-process-cabal)))
;; (require 'inf-haskell)
;; (require 'company-mode)
;; (add-hook 'interactive-haskell-mode-hook 'ac-haskell-process-setup)
;; (add-hook 'haskell-interactive-mode-hook 'ac-haskell-process-setup)
;; (eval-after-load "auto-complete"
;; '(add-to-list 'ac-modes 'haskell-interactive-mode))
;; Reftex aktivieren für das Magister-Projekt zumindest!
(setq-default TeX-master t)
(setq reftex-default-bibliography
(quote
("./mag.bib")))
(setq reftex-bibpath-environment-variables
'("/home/rtb/doks/new_mag/"))
;; Set the default zotero export method to BibLatex instead of defaulting to BibTeX
;; Done by custom-stuff at beginning!
(defun na-org-mode-reftex-setup ()
(interactive)
(load-library "reftex")
(and (buffer-file-name)
(file-exists-p (buffer-file-name))
(reftex-parse-all)))
(add-hook 'org-mode-hook 'na-org-mode-reftex-setup)
;; (evil-define-key 'normal dired-mode-map "h" 'my-dired-up-directory)
;; (add-hook 'org-mode-hook (lambda ()
;; (evil-define-key 'normal org-mode-map "J" 'evil-join)))
;; (setq org-latex-pdf-process
;; '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
;; "biber %b"
;; "xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
;; "xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(setq org-latex-pdf-process
'(
;; "/home/rtb/datatooltk/bin/datatooltk --map-tex-specials --sep ';' --nocsvheader --csv tests/eng_chi3.csv --output tests/eng_chi3.dbtex"
"xelatex -shell-escape -no-pdf -interaction nonstopmode -output-directory %o %f"
;; "biber %b"
"xelatex -shell-escape -no-pdf -interaction nonstopmode -output-directory %o %f"
"xdvipdfmx %b"
))
(unless (boundp 'org-latex-classes)
(setq org-latex-classes nil))
;; '(org-latex-classes
;; (quote
;; (("koma-article" "\\documentclass{scrartcl} [NO-DEFAULT-PACKAGES]"
;; ("\\section{%s}" . "\\section*{%s}")
;; ("\\subsection{%s}" . "\\subsection*{%s}")
;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
;; ("\\paragraph{%s}" . "\\paragraph*{%s}")
;; ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
;; ("article" "\\documentclass[11pt]{article}"
;; ("\\section{%s}" . "\\section*{%s}")
;; ("\\subsection{%s}" . "\\subsection*{%s}")
;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
;; ("\\paragraph{%s}" . "\\paragraph*{%s}")
;; ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
;; ("report" "\\documentclass[11pt]{report}"
;; ("\\part{%s}" . "\\part*{%s}")
;; ("\\chapter{%s}" . "\\chapter*{%s}")
;; ("\\section{%s}" . "\\section*{%s}")
;; ("\\subsection{%s}" . "\\subsection*{%s}")
;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
;; ("book" "\\documentclass[11pt]{book}"
;; ("\\part{%s}" . "\\part*{%s}")
;; ("\\chapter{%s}" . "\\chapter*{%s}")
;; ("\\section{%s}" . "\\section*{%s}")
;; ("\\subsection{%s}" . "\\subsection*{%s}")
;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
;; ("beamer" "\\documentclass{beamer}" org-beamer-sectioning))) t)
(add-to-list 'org-latex-classes
;; beamer class, for presentations
'("beamer"
"\\documentclass[11pt]{beamer}\n
\\usepackage{fontspec}\n
\\usepackage{xeCJK}\n
\\setCJKmainfont[Mapping=tex-text]{WenQuanYi Micro Hei}\n
\\setCJKmonofont[Mapping=tex-text]{SimSun}\n
\\setmainfont[Mapping=tex-text]{TeXGyrePagella}\n
\\setmonofont[Mapping=tex-text]{Courier 10 Pitch}\n
\\setsansfont[Mapping=tex-text]{SimSun}\n
\\usetheme[pageofpages=of,% String used between the current page and the
% total page count.
alternativetitlepage=true,% Use the fancy title page.
titlepagelogo=logo-telekinesis,% Logo for the first page.
]{PaloAlto} \n
\\usecolortheme{wolverine}\n
\\beamertemplateballitem\n
\\setbeameroption{show notes}
\\usepackage[utf8]{inputenc}\n
\\usepackage[T1]{fontenc}\n
\\usepackage{hyperref}\n
\\usepackage{color}
\\usepackage{listings}
\\lstset{numbers=none,tabsize=4,
frame=single,
basicstyle=\\small,
showspaces=false,showstringspaces=false,
showtabs=false,
keywordstyle=\\color{blue}\\bfseries,
commentstyle=\\color{red},
}\n
\\usepackage{verbatim}\n
\\institute{institute}\n
\\subject{{{{beamersubject}}}}\n"
("\\section{%s}" . "\\section*{%s}")
("\\begin{frame}[fragile]\\frametitle{%s}"
"\\end{frame}"
"\\begin{frame}[fragile]\\frametitle{%s}"
"\\end{frame}")))
(add-to-list 'org-latex-classes
'("cn-mag"
"\\documentclass[12pt,twopage, a4paper]{report}
\\usepackage[babel,german=guillemets]{csquotes}
\\usepackage[xetex,colorlinks=false,CJKbookmarks=true,linkcolor=blue,urlcolor=blue,menucolor=blue]{hyperref}
\\usepackage[xindy={language=german-duden, codepage=utf8}, style=altlist, section, numberedsection=false, toc, nopostdot]{glossaries}
\\usepackage[xindy, splitindex]{imakeidx}
\\usepackage{graphicx}
\\usepackage{setspace}
\\onehalfspacing
\\usepackage{parskip}
\\usepackage{enumitem}
\\usepackage{xcolor}
\\usepackage{appendix}
\\usepackage{xunicode}
\\usepackage[indentfirst=false]{xeCJK}
\\xeCJKsetup{PunctStyle=quanjiao}
\\usepackage{lmodern}
\\usepackage{verbatim}
\\usepackage{fixltx2e}
\\usepackage{longtable}
\\usepackage{tabularx}
\\usepackage{float}
\\usepackage{tikz}
\\usetikzlibrary{positioning, matrix,fit, arrows.meta}
\\usepackage{framed}
\\usepackage{wrapfig}
\\usepackage{array}
\\usepackage{booktabs}
\\usepackage{soul}
\\usepackage{textcomp}
\\usepackage{listings}
\\usepackage[margin=1.5in]{geometry}
\\usepackage{algorithm}
\\usepackage{algorithmic}
\\usepackage{marvosym}
\\usepackage{datatool}
\\usepackage{wasysym}
\\usepackage{latexsym}
\\usepackage[citestyle=authoryear-ibid, bibstyle=authortitle, natbib=true, isbn=false, backend=biber]{biblatex}
\\usepackage{fancyhdr}
\\usepackage{xspace}
\\usepackage{metalogo}
\\usepackage{etoolbox}
\\BeforeBeginEnvironment{Verbatim}{\\def\\baselinestretch{0.7}}
%\\defaultfontfeatures{Mapping=tex-text}
\\usepackage{fontspec}
\\usepackage[flushmargin]{footmisc}
\\usepackage{chngcntr}
\\counterwithout{footnote}{chapter}
\\usepackage{emptypage}
\\usepackage{fancyvrb}
\\usepackage{xpinyin}
\\xpinyinsetup{ratio={.5}}
\\setCJKmainfont[Scale=1]{Adobe Song Std} % 设置缺省中文字体
%\\setCJKmainfont[Scale=1]{SimHei} % 设置缺省中文字体
\\setCJKmonofont[Scale=0.8]{AR PL New Sung Mono} %xelatex 細明體
\\setmainfont[Numbers={Proportional, OldStyle}]{Linux Libertine}
\\setsansfont[BoldFont=WenQuanYi Zen Hei Sharp]{AR PL UKai CN}
\\setmonofont[Scale=0.8]{DejaVu Sans Mono}