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
|
#+TITLE: yuzu-emacs
#+AUTHOR: yuzu-eva
#+STARTUP: overview
#+LANGUAGE: en
#+OPTIONS: num:nil
[[./yuzu-emacs.png]]
* Introduction
yuzu-emacs is my personal configuration for emacs.
It is a very basic configuration, which is heavily inspired by [[https://github.com/snackon/Witchmacs][Witchmacs]], the
main difference is that this configuration uses standard emacs keybindings, no
evil mode at all. Mainly used for programming in C and writing documents in
org-mode.
* Terminal
** Setting default shell to zsh
#+begin_src emacs-lisp
(defvar my-term-shell "/bin/zsh")
(defadvice ansi-term (before force-bash)
(interactive (list my-term-shell)))
(ad-activate 'ansi-term)
(global-set-key (kbd "<s-C-return>") 'ansi-term)
#+end_src
* QoL section
Some quality-of-life improvements
** Disable annoyances
*** Disable default startup screen
#+begin_src emacs-lisp
(setq inhibit-startup-message t)
#+end_src
*** Disable most GUI elements
#+begin_src emacs-lisp
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
#+end_src
*** Change directory where backups are saved
#+begin_src emacs-lisp
(setq backup-directory-alist '(("." . "~/.emacs.d/emacs_saves")))
#+end_src
*** Disable ring-bell
#+begin_src emacs-lisp
(setq ring-bell-function 'ignore)
#+end_src
*** Disable fringes
#+begin_src emacs-lisp
(set-fringe-mode 0)
#+end_src
*** Use bash for TRAMP
#+begin_src emacs-lisp
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
#+end_src
** Visual improvements
*** Enable line number
Certain modes will break with line-numbers-mode (e.g. ansi-term) so I'm only enabling it
on some major modes rather than globally
#+begin_src emacs-lisp
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'text-mode-hook 'display-line-numbers-mode)
#+end_src
*** Enable column number
#+begin_src emacs-lisp
(column-number-mode 1)
#+end_src
*** Enable prettify symbols
#+begin_src emacs-lisp
(global-prettify-symbols-mode t)
#+end_src
*** Enable rainbow-delimiters in all programming modes
#+begin_src emacs-lisp
(set-face-foreground 'rainbow-delimiters-unmatched-face "red")
(set-face-foreground 'rainbow-delimiters-depth-1-face "white")
(set-face-foreground 'rainbow-delimiters-depth-2-face "deep sky blue")
(set-face-foreground 'rainbow-delimiters-depth-3-face "magenta")
(set-face-foreground 'rainbow-delimiters-depth-4-face "spring green")
(set-face-foreground 'rainbow-delimiters-depth-5-face "chocolate")
(set-face-foreground 'rainbow-delimiters-depth-6-face "dark gray")
(set-face-foreground 'rainbow-delimiters-depth-7-face "yellow")
(set-face-foreground 'rainbow-delimiters-depth-8-face "tomato2")
(set-face-foreground 'rainbow-delimiters-depth-9-face "LightGoldenrod1")
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
#+end_src
*** Show parent parentheses
#+begin_src emacs-lisp
(show-paren-mode 1)
#+end_src
*** Highlight current line
#+begin_src emacs-lisp
(global-hl-line-mode t)
#+end_src
*** Enable conservative scrolling
#+begin_src emacs-lisp
(setq scroll-conservatively 100)
#+end_src
*** Set font
#+begin_src emacs-lisp
(set-face-attribute 'default nil :font "Hack Nerd Font" :height 110)
#+end_src
*** Set initial buffer to dashboard
#+begin_src emacs-lisp
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
#+end_src
** Ease of use
*** Set default directory
#+begin_src emacs-lisp
(setq default-directory "~/")
#+end_src
*** Enable copy-pasting outside of emacs
#+begin_src emacs-lisp
(setq x-select-enable-clipboard t)
#+end_src
*** Enable pair-matching
#+begin_src emacs-lisp
(electric-pair-mode t)
#+end_src
*** Enable subword-mode
#+begin_src emacs-lisp
(global-subword-mode 1)
#+end_src
*** Indentation
#+begin_src emacs-lisp
(setq-default tab-width 4)
(setq-default standard-indent 4)
(setq c-basic-offset tab-width)
(setq-default electric-indent-inhibit t)
(setq-default indent-tabs-mode t)
(setq backward-delete-char-untabify-method 'nil)
#+end_src
*** Change yes/no prompt to just y/n
#+begin_src emacs-lisp
(defalias 'yes-or-no-p 'y-or-n-p)
#+end_src
*** Enable ido mode
#+begin_src emacs-lisp
(setq ido-enable-flex-matching nil)
(setq ido-create-new-buffer 'always)
(setq ido-everywhere t)
(setq ido-vertical-define-keys 'C-n-and-C-p-only)
(ido-mode 1)
#+end_src
*** Change default buffer-list
I hate the default buffer list. I'm using ido-switch-buffer on "C-x C-b" and
ibuffer on "C-x b"
#+begin_src emacs-lisp
(global-set-key (kbd "C-x C-b") 'ido-switch-buffer)
(global-set-key (kbd "C-x b") 'ibuffer)
#+end_src
*** Display PDFs to the right instead of below current window
#+begin_src emacs-lisp
(add-to-list 'display-buffer-alist '("\\.pdf$" .
(display-buffer-pop-up-window-split-horizontally)))
(defun display-buffer-pop-up-window-split-horizontally (buffer alist)
"Call `display-buffer-pop-up-window', setting
`split-height-threshold' and `split-width-threshold' so that
the split is always horizontal."
(let ((split-height-threshold nil)
(split-width-threshold 0))
(display-buffer-pop-up-window buffer alist)))
#+end_src
* Org mode
My preferred org-mode defaults
#+begin_src emacs-lisp
(use-package org
:config
(add-hook 'org-mode-hook 'org-indent-mode)
(add-hook 'org-mode-hook
#'(lambda ()
(visual-line-mode 1))))
(use-package org-indent
:diminish org-indent-mode)
(use-package htmlize
:ensure t)
#+end_src
#+begin_src emacs-lisp
(setq org-latex-pdf-process
'("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))
(setq org-latex-toc-command "\\tableofcontents \\clearpage")
(setq org-latex-packages-alist '(("margin=2cm" "geometry" nil)))
(unless (boundp 'org-latex-classes)
(setq org-latex-classes nil))
(add-to-list 'org-latex-classes
'("ethz"
"\\documentclass[a4paper,11pt,titlepage]{memoir}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage{fixltx2e}
\\usepackage{graphicx}
\\usepackage{longtable}
\\usepackage{float}
\\usepackage{wrapfig}
\\usepackage{rotating}
\\usepackage[normalem]{ulem}
\\usepackage{amsmath}
\\usepackage{textcomp}
\\usepackage{marvosym}
\\usepackage{wasysym}
\\usepackage{amssymb}
\\usepackage{hyperref}
\\usepackage{mathpazo}
\\usepackage{color}
\\usepackage{enumerate}
\\definecolor{bg}{rgb}{0.95,0.95,0.95}
\\tolerance=1000
[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]
\\linespread{1.1}
\\hypersetup{pdfborder=0 0 0}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(add-to-list 'org-latex-classes
'("article"
"\\documentclass[11pt,a4paper]{article}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage{fixltx2e}
\\usepackage{graphicx}
\\usepackage{longtable}
\\usepackage{float}
\\usepackage{wrapfig}
\\usepackage{rotating}
\\usepackage[normalem]{ulem}
\\usepackage{amsmath}
\\usepackage{textcomp}
\\usepackage{marvosym}
\\usepackage{wasysym}
\\usepackage{amssymb}
\\usepackage{hyperref}
\\usepackage{mathpazo}
\\usepackage{color}
\\usepackage{enumerate}
\\definecolor{bg}{rgb}{0.95,0.95,0.95}
\\tolerance=1000
[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]
\\linespread{1.1}
\\hypersetup{pdfborder=0 0 0}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")))
(add-to-list 'org-latex-classes '("ebook"
"\\documentclass[11pt, oneside]{memoir}
\\setstocksize{9in}{6in}
\\settrimmedsize{\\stockheight}{\\stockwidth}{*}
\\setlrmarginsandblock{2cm}{2cm}{*} % Left and right margin
\\setulmarginsandblock{2cm}{2cm}{*} % Upper and lower margin
\\checkandfixthelayout
% Much more laTeX code omitted
"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")))
#+end_src
* Custom functions
** Toggle Transparency
Function to toggle transparency
#+begin_src emacs-lisp
(defconst frame-transparency 85)
(defun toggle-transparency ()
(interactive)
(let ((frame-alpha (frame-parameter nil 'alpha)))
(if (or (not frame-alpha)
(= (cadr frame-alpha) 100))
(set-frame-parameter nil 'alpha
`(,frame-transparency
,frame-transparency))
(set-frame-parameter nil 'alpha '(100 100)))))
(global-set-key (kbd "C-c t") 'toggle-transparency)
#+end_src
** Config edit/reload
*** edit
#+begin_src emacs-lisp
(defun config-visit ()
(interactive)
(find-file "~/.emacs.d/config.org"))
(global-set-key (kbd "C-c e") 'config-visit)
#+end_src
*** reload
#+begin_src emacs-lisp
(defun config-reload ()
(interactive)
(org-babel-load-file (expand-file-name "~/.emacs.d/config.org")))
(global-set-key (kbd "C-c r") 'config-reload)
#+end_src
** Kill all buffers
#+begin_src emacs-lisp
(defun kill-all-buffers ()
(interactive)
(mapc 'kill-buffer (buffer-list)))
(global-set-key (kbd "C-M-s-k") 'kill-all-buffers)
#+end_src
** Always kill current buffer
#+begin_src emacs-lisp
(defun kill-curr-buffer ()
(interactive)
(kill-buffer (current-buffer)))
(global-set-key (kbd "C-x C-k") 'kill-curr-buffer)
#+end_src
** Find-next-file
#+begin_src emacs-lisp
(defun find-next-file (&optional backward)
"Find the next file (by name) in the current directory.
With prefix arg, find the previous file."
(interactive "P")
(when buffer-file-name
(let* ((file (expand-file-name buffer-file-name))
(files (cl-remove-if (lambda (file) (cl-first (file-attributes file)))
(sort (directory-files (file-name-directory file) t nil t) 'string<)))
(pos (mod (+ (cl-position file files :test 'equal) (if backward -1 1))
(length files))))
(find-file (nth pos files)))))
(global-set-key (kbd "C-c C-n") 'find-next-file)
(global-set-key (kbd "C-c C-p") (lambda () (interactive) (find-next-file :backward)))
#+end_src
** Moving around brackets
Taken from [[http://xahlee.info][Xah Lee]].
#+begin_src emacs-lisp
(defvar xah-brackets '("“”" "()" "[]" "{}" "<>" "<>" "()" "[]" "{}"
"⦅⦆" "〚〛" "⦃⦄" "‹›" "«»" "「」" "〈〉" "《》" "【】"
"〔〕" "⦗⦘" "『』" "〖〗" "〘〙" "「」" "⟦⟧" "⟨⟩" "⟪⟫"
"⟮⟯" "⟬⟭" "⌈⌉" "⌊⌋" "⦇⦈" "⦉⦊" "❛❜" "❝❞" "❨❩" "❪❫"
"❴❵" "❬❭" "❮❯" "❰❱" "❲❳" "〈〉" "⦑⦒" "⧼⧽" "﹙﹚" "﹛﹜"
"﹝﹞" "⁽⁾" "₍₎" "⦋⦌" "⦍⦎" "⦏⦐" "⁅⁆" "⸢⸣" "⸤⸥" "⟅⟆"
"⦓⦔" "⦕⦖" "⸦⸧" "⸨⸩" "⦅⦆")
"A list of strings, each element is a string of 2 chars, the left bracket and a matching right bracket.
Used by `xah-select-text-in-quote' and others.")
(defconst xah-left-brackets
(mapcar (lambda (x) (substring x 0 1)) xah-brackets)
"List of left bracket chars. Each element is a string.")
(defconst xah-right-brackets
(mapcar (lambda (x) (substring x 1 2)) xah-brackets)
"List of right bracket chars. Each element is a string.")
(defun xah-backward-left-bracket ()
"Move cursor to the previous occurrence of left bracket.
The list of brackets to jump to is defined by `xah-left-brackets'.
URL `http://xahlee.info/emacs/emacs/emacs_navigating_keys_for_brackets.html'
Version: 2015-10-01"
(interactive)
(re-search-backward (regexp-opt xah-left-brackets) nil t))
(defun xah-forward-right-bracket ()
"Move cursor to the next occurrence of right bracket.
The list of brackets to jump to is defined by `xah-right-brackets'.
URL `http://xahlee.info/emacs/emacs/emacs_navigating_keys_for_brackets.html'
Version: 2015-10-01"
(interactive)
(re-search-forward (regexp-opt xah-right-brackets) nil t))
#+end_src
* Use-Package section
** Initialize =dashboard=
Configure a custom starting buffer
#+begin_src emacs-lisp
(use-package dashboard
:ensure t
:defer nil
:preface
(defun update-config ()
(interactive)
(let ((dir (expand-file-name user-emacs-directory)))
(if (file-exists-p dir)
(progn
(message "yuzu-emacs is updating!")
(cd dir)
(shell-command "git pull")
(message "Update finished. See changes in *Message* buffer and then restart."))
(message "\"%s\" doesn't exist"))))
(defun create-scratch-buffer ()
(interactive)
(switch-to-buffer (get-buffer-create "*scratch*"))
(lisp-interaction-mode))
:config
(dashboard-setup-startup-hook)
(setq dashboard-items '((recents . 5)))
(setq dashboard-banner-logo-title "haaaiiii :3")
(setq dashboard-startup-banner "~/.emacs.d/cirno.png")
(setq dashboard-center-content t)
(setq dashboard-show-shortcuts nil)
(setq dashboard-set-init-info t)
(setq dashboard-init-info (format "%d packages loaded in %s"
(length package-activated-list) (emacs-init-time)))
(setq dashboard-set-footer nil)
(setq dashboard-set-navigator t)
(setq dashboard-navigator-buttons
`(;; line1
((,nil
"yuzu-emacs on github"
"Open yuzu-emacs' github page on your browser"
(lambda (&rest _) (browse-url "https://github.com/yuzu-eva/yuzu-emacs")))
(nil
"Update yuzu-emacs"
"Get the latest yuzu-emacs update. See github commits for changes"
(lambda (&rest _) (update-config)))
(nil
"Open scratch buffer"
"Switch to the scratch buffer"
(lambda (&rest _) (create-scratch-buffer)))
) ;;line 2
((,nil
"Open config.org"
"Open configuration file"
(lambda (&rest _) (find-file "~/.emacs.d/config.org")))
(nil
"Open init.el"
"Open the init file"
(lambda (&rest _) (find-file "~/.emacs.d/init.el")))))))
#+End_src
** Initialize =auto-package-update=
Auto-package-update automatically updates and removes old packages
#+begin_src emacs-lisp
(use-package auto-package-update
:defer nil
:ensure t
:config
(setq auto-package-update-delete-old-versions t)
(setq auto-package-update-hide-results t)
(auto-package-update-maybe))
#+end_src
** Initialize =diminish=
Hides minor modes to prevent cluttering modeline
#+begin_src emacs-lisp
(use-package diminish
:ensure t
:init
(diminish 'subword-mode)
(diminish 'visual-line-mode)
(diminish 'abbrev-mode))
#+end_src
** Initialize =which-key=
Completion menu for keybinds
#+begin_src emacs-lisp
(use-package which-key
:ensure t
:diminish which-key-mode
:init
(which-key-mode))
#+end_src
** Initialize =ido-vertical-mode=
Uses a vertical mini-buffer for ido, instead of a horizontal one
#+begin_src emacs-lisp
(use-package ido-vertical-mode
:ensure t
:init
(ido-vertical-mode 1))
#+end_src
** Initialize =smex=
Vertical mini-buffer for interactive commands, similar to ido-vertical
#+begin_src emacs-lisp
(use-package smex
:ensure t
:init (smex-initialize)
:bind
("M-x" . smex))
#+end_src
** Initialize =avy=
Pressing "M-s" prompts for a character. Entering a character will highlight all
of them in the current visible buffer with another letter overlayed. Pressing
that letter will move the cursor to the highlighted character
#+begin_src emacs-lisp
(use-package avy
:ensure t
:bind
("M-s" . avy-goto-char))
#+end_src
** Initialize =rainbow-mode=
Displays colour of a hex code as background colour behind said hex code
#+begin_src emacs-lisp
(use-package rainbow-mode
:ensure t
:init
(add-hook 'css-mode-hook 'rainbow-mode))
#+end_src
** Initialize =switch-window=
Better way to switch windows
#+begin_src emacs-lisp
(use-package switch-window
:ensure t
:config
(setq switch-window-input-style 'minibuffer)
(setq switch-window-increase 4)
(setq switch-window-threshold 2)
(setq switch-window-shortcut-style 'qwerty)
(setq switch-window-qwerty-shortcuts
'("a" "o" "e" "u" "h" "t" "n" "s"))
:bind
([remap other-window] . switch-window))
#+end_src
** Initialize =sly=
Sly REPL
#+begin_src emacs-lisp
(use-package sly
:ensure t)
(setq inferior-lisp-program "/usr/local/bin/sbcl")
#+end_src
** Initialize =sudo-edit=
Allow for editing files as sudo
#+begin_src emacs-lisp
(use-package sudo-edit
:ensure t
:bind
("s-C-e" . sudo-edit))
#+end_src
** Initialize =page-break-lines=
Display ^L page breaks as a horizontal line
#+begin_src emacs-lisp
(use-package page-break-lines
:ensure t
:diminish page-break-lines-mode)
#+end_src
** Initialize =multiple-cursors=
Allow for editing with multiple cursors at the same time
#+begin_src emacs-lisp
(use-package multiple-cursors
:ensure t
:bind
("C-S-c C-S-c" . mc/edit-lines)
("C->" . mc/mark-next-like-this)
("C-<" . mc/mark-previous-like-this)
("C-c C-<" . mc/mark-all-like-this))
#+end_src
** Initialize =move-text=
Move line or region around using M-p M-n
#+begin_src emacs-lisp
(use-package move-text
:ensure t
:bind
("M-p" . move-text-up)
("M-n" . move-text-down))
#+end_src
** Initialize =magit=
Magical Git interface
#+begin_src emacs-lisp
(use-package magit
:ensure t)
#+end_src
* Programming section
** Initialize =company=
Company is an autocompletion frontend
#+begin_src emacs-lisp
(use-package company
:ensure t
:config
(setq company-idle-delay 0)
(setq company-minimum-prefix-length 3)
:init
(add-hook 'after-init-hook 'global-company-mode))
(with-eval-after-load 'company
(define-key company-active-map (kbd "M-n") nil)
(define-key company-active-map (kbd "M-p") nil)
(define-key company-active-map (kbd "C-n") 'company-select-next)
(define-key company-active-map (kbd "C-p") 'company-select-previous))
#+end_src
** Initialize =company-irony=
Autocompletion backend for C and C++
#+begin_src emacs-lisp
(use-package company-irony
:ensure t
:config
(require 'company)
(add-to-list 'company-backends 'company-irony))
(use-package irony
:ensure t
:config
(add-hook 'c++-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))
#+end_src
* Custom keybinds
Some keybinds to make life easier
** Make <menu> do M-x (currently set to smex)
#+begin_src emacs-lisp
(global-set-key (kbd "<menu>") 'smex)
#+end_src
** Open URL in browser
#+begin_src emacs-lisp
(global-set-key (kbd "C-c o") 'browse-url-at-point)
#+end_src
** Open recent files menu
#+begin_src emacs-lisp
(global-set-key (kbd "C-c f") 'recentf-open-files)
#+end_src
** More comfortable resize bindings
#+begin_src emacs-lisp
(global-set-key (kbd "s-C-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "s-C-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "s-C-<down>") 'shrink-window)
(global-set-key (kbd "s-C-<up>") 'enlarge-window)
#+end_src
** Xah Lee bracket movement
#+begin_src emacs-lisp
(global-set-key (kbd "C-9") 'xah-backward-left-bracket)
(global-set-key (kbd "C-0") 'xah-forward-right-bracket)
#+end_src
|