Compare commits
6
Commits
91da886a69
...
1c277c96da
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c277c96da | ||
|
|
6e4565cd90 | ||
|
|
6bc67c0c82 | ||
|
|
a1fea5bc99 | ||
|
|
a9265c931d | ||
|
|
d54d16f98f |
+53
-6
@@ -251,16 +251,26 @@
|
||||
#+end_src
|
||||
|
||||
* Org
|
||||
I use a couple non-standard bits and pieces, but not a whole
|
||||
bunch. I really like the =<s= to insert a source block thing (which
|
||||
was deprecated); =org-tempo= brings that back.
|
||||
** Code and Quote block shortcuts
|
||||
I am a big fan of using =<s= for source blocks and =<q= for quotes;
|
||||
these are enabled by the =org-tempo= module, which is included in
|
||||
=org= but not loaded by default.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org
|
||||
:config
|
||||
(require 'org-tempo))
|
||||
(use-package org :config (require 'org-tempo))
|
||||
#+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
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
@@ -1243,6 +1253,32 @@
|
||||
(use-package nix-update)
|
||||
#+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
|
||||
** Git
|
||||
=magit= is truly a wonderful creation! Add keybinding for
|
||||
@@ -1380,6 +1416,17 @@
|
||||
(use-package graphviz-dot-mode)
|
||||
#+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
|
||||
** Keep $PWD Tidy
|
||||
Emacs' default behaviour of dumping temporary files in the current
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: header-guard
|
||||
# binding: C-c C-k C-l
|
||||
# binding: C-c C-k C-h
|
||||
# key: hdr
|
||||
# --
|
||||
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
# key: spdx
|
||||
# --
|
||||
/*
|
||||
* SPDX-License-Identifier: $1
|
||||
* Copyright (c) Camden Dixie O'Brien
|
||||
* SPDX-License-Identifier: $1
|
||||
*/
|
||||
|
||||
$0
|
||||
|
||||
Reference in New Issue
Block a user