Compare commits
6 Commits
91da886a69
...
1c277c96da
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c277c96da | |||
| 6e4565cd90 | |||
| 6bc67c0c82 | |||
| a1fea5bc99 | |||
| a9265c931d | |||
| d54d16f98f |
59
config.org
59
config.org
@@ -251,16 +251,26 @@
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Org
|
* Org
|
||||||
I use a couple non-standard bits and pieces, but not a whole
|
** Code and Quote block shortcuts
|
||||||
bunch. I really like the =<s= to insert a source block thing (which
|
I am a big fan of using =<s= for source blocks and =<q= for quotes;
|
||||||
was deprecated); =org-tempo= brings that back.
|
these are enabled by the =org-tempo= module, which is included in
|
||||||
|
=org= but not loaded by default.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org
|
(use-package org :config (require 'org-tempo))
|
||||||
:config
|
|
||||||
(require 'org-tempo))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
However, I have recently discovered, much to my despair, that these
|
||||||
|
shortcuts do not work if there are tabs in the line ahead of them!
|
||||||
|
Quite ridiculous. Easily worked around, however; I am going to
|
||||||
|
ensure that spaces are used for indentation when in org mode by
|
||||||
|
setting [[help:indent-tabs-mode][indent-tabs-mode]] to nil in a hook:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-hook 'org-mode-hook (lambda () (setq indent-tabs-mode nil)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Keybindings
|
||||||
A keybinding to add a new heading is super useful
|
A keybinding to add a new heading is super useful
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -1243,6 +1253,32 @@
|
|||||||
(use-package nix-update)
|
(use-package nix-update)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** SCAD
|
||||||
|
There is a language server for OpenSCAD, but I think I'll just
|
||||||
|
stick to the basic mode:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package scad-mode)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Go
|
||||||
|
First of all, of course, install =go-mode=:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package go-mode)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
This package provides a convenient lil function to use gofmt to
|
||||||
|
format a buffer; I want to run this whenever I save a go source
|
||||||
|
file. This is pretty easily done by adding a =before-save-hook= in
|
||||||
|
a =go-mode-hook= (hey, I heard you like hooks...)
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-hook 'go-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(add-hook 'before-save-hook 'gofmt-before-save)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Tool Integrations
|
* Tool Integrations
|
||||||
** Git
|
** Git
|
||||||
=magit= is truly a wonderful creation! Add keybinding for
|
=magit= is truly a wonderful creation! Add keybinding for
|
||||||
@@ -1380,6 +1416,17 @@
|
|||||||
(use-package graphviz-dot-mode)
|
(use-package graphviz-dot-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Man pages
|
||||||
|
Man page support is built in to Emacs but it's one of those
|
||||||
|
annoying things where it will open in the "other" window instead of
|
||||||
|
where you ran =M-x man= from. Thankfully, this behaviour can be
|
||||||
|
changed by setting [[help:Man-notify-method][Man-notify-method]]. The value ~'pushy~ makes the
|
||||||
|
man page open in the current window.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq Man-notify-method 'pushy)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Backup and Autosave
|
* Backup and Autosave
|
||||||
** Keep $PWD Tidy
|
** Keep $PWD Tidy
|
||||||
Emacs' default behaviour of dumping temporary files in the current
|
Emacs' default behaviour of dumping temporary files in the current
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: header-guard
|
# name: header-guard
|
||||||
# binding: C-c C-k C-l
|
# binding: C-c C-k C-h
|
||||||
# key: hdr
|
# key: hdr
|
||||||
# --
|
# --
|
||||||
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H}
|
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
# key: spdx
|
# key: spdx
|
||||||
# --
|
# --
|
||||||
/*
|
/*
|
||||||
* SPDX-License-Identifier: $1
|
|
||||||
* Copyright (c) Camden Dixie O'Brien
|
* Copyright (c) Camden Dixie O'Brien
|
||||||
|
* SPDX-License-Identifier: $1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$0
|
$0
|
||||||
|
|||||||
Reference in New Issue
Block a user