Skip to content

Instantly share code, notes, and snippets.

@rjemanuele
Created July 31, 2018 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjemanuele/f41449808738358222c2a6a7498c524f to your computer and use it in GitHub Desktop.
Save rjemanuele/f41449808738358222c2a6a7498c524f to your computer and use it in GitHub Desktop.
Emacs Config
;; default to unified diffs
(setq diff-switches "-u")
;; always end a file with a newline
;(setq require-final-newline 'query)
;;; uncomment for CJK utf-8 support for non-Asian users
;; (require 'un-define)
(setq inhibit-splash-screen t)
;; Chip says no tabs for me :(
;(setq-default indent-tabs-mode nil)
(setq-default show-trailing-whitespace t)
(defun linux-c-mode ()
"C mode with adjusted defaults for use with the Linux kernel."
(interactive)
(c-mode)
(c-set-style "K&R")
(setq indent-tabs-mode t)
(setq c-basic-offset 8))
(defun linux-c-mode-default ()
"C mode with adjusted defaults for use with the Linux kernel."
(interactive)
(c-mode)
(setq c-default-style "K&R")
(setq-default indent-tabs-mode t)
(setq-default c-basic-offset 8))
(defun toggle-fullscreen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
)
;; this works weird now (toggle-fullscreen)
(setq split-width-threshold nil)
(global-set-key [f12] 'recompile)
;; encryption
(require 'epa-file)
(epa-file-enable)
(setq epa-armor t)
;; use an indentation width of two spaces
(setq lua-indent-level 2)
;; use an indentation width of two spaces
(setq js-indent-level 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment