This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Old syntax | |
(evil-leader/set-key | |
"," 'hfj/scroll-page-down | |
"." 'hfj/scroll-page-up | |
) | |
(defun hfj/scroll-page-overlay-map () | |
"Set a temporary overlay map to easily scroll through a file." | |
(set-temporary-overlay-map |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; New syntax | |
(spacemacs|define-micro-state scroll | |
:doc "[,] page down [.] page up " | |
:bindings | |
("," evil-scroll-page-down) | |
("." evil-scroll-page-up)) | |
(evil-leader/set-key | |
"," '(lambda (x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(spacemacs|define-micro-state scroll | |
:doc "[,] page down [.] page up " | |
:bindings | |
("," evil-scroll-page-down) | |
("." evil-scroll-page-up)) | |
(evil-leader/set-key | |
"," '(lambda (x) | |
(interactive "p") | |
(evil-scroll-page-down x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(evil-leader/set-key | |
"gt" nil | |
"gt" 'spacemacs/time-machine-micro-state) | |
(spacemacs|define-micro-state time-machine | |
:doc "[q] quit [p] previous [n] next [c] current" | |
:on-enter (git-timemachine) | |
:on-exit (git-timemachine-quit) | |
:persistent t | |
:bindings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(evil-leader/set-key | |
"jn" 'spacemacs/navagation-micro-state) | |
(defun spacemacs//navagation-mode-ms-full-doc () | |
"Full documentation for helm navigation micro-state." | |
" | |
[?] display this help | |
[)] [0] forwards sentence | |
[)] [9] backwards sentence | |
[}] [{] forwards/backwards paragraph |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Stolen from http://xahlee.blogspot.com/2013/05/emacs-open-file-path-under-cursor-fast.html | |
(defun hfj/open-file-at-cursor () | |
"Open the file path under cursor. | |
If there is text selection, uses the text selection for path. | |
If the path is starts with “http://”, open the URL in browser. | |
Input path can be {relative, full path, URL}. | |
This command is similar to `find-file-at-point' but without prompting for confirmation. | |
" | |
(interactive) | |
(let ( (path (thing-at-point 'filename))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Place this in layer directory and create a "snippets" directory | |
;; in the same layer directory as this file to have a personal | |
;; layer snippets repository | |
;; My snippets directory | |
(setq hfj-snippets/snippet-dir | |
(concat (file-name-directory load-file-name) "snippets")) | |
(setq yas-snippet-dirs | |
(list hfj-snippets/snippet-dir)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading /home/herbert/.emacs.d/contrib/git/config.el (source)...done | |
Loading /home/herbert/.emacs.d/spacemacs/packages.el (source)...done | |
Loading /home/herbert/spacemacs/my-layers/hfj-c++/packages.el (source)...done | |
Loading /home/herbert/spacemacs/my-layers/hfj-pastebins/packages.el (source)...done | |
Loading /home/herbert/.emacs.d/contrib/ace-window/packages.el (source)...done | |
Loading /home/herbert/.emacs.d/contrib/git/packages.el (source)...done | |
Loading /home/herbert/.emacs.d/contrib/perspectives/packages.el (source)...done | |
Loading /home/herbert/.emacs.d/spacemacs/extensions.el (source)...done | |
Loading /home/herbert/spacemacs/my-layers/hfj-c++/extensions.el (source)...done | |
Loading /home/herbert/spacemacs/my-layers/hfj-pastebins/extensions.el (source)...done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- mode: dotspacemacs -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration." | |
(setq-default | |
;; List of additional paths where to look for configuration layers. | |
;; Paths must have a trailing slash (ie. `~/.mycontribs/') | |
dotspacemacs-configuration-layer-path '("/home/herbert/spacemacs/my-layers/") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
stderr() { cat <<< "$@" 1>&2; } | |
toggle_xinput_device() | |
{ | |
declare -r -a device_filters=("$@") | |
if [[ ${#device_filters[*]} -eq 0 ]]; then | |
stderr "No filters provided." |
OlderNewer