aboutsummaryrefslogtreecommitdiffstats
path: root/.spacemacs
diff options
context:
space:
mode:
authorjason2015-11-07 14:27:50 -0700
committerjason2015-11-07 14:27:50 -0700
commit010ae230fdffaf7c67e4336918fe8055059f2a0d (patch)
tree17a37e03334fd679bd029382721bd2497e4613e5 /.spacemacs
parent29787dfa04985d1014a61eaff8400cf9864aaa4d (diff)
downloaddotfiles-010ae230fdffaf7c67e4336918fe8055059f2a0d.tar.gz
dotfiles-010ae230fdffaf7c67e4336918fe8055059f2a0d.zip
unscroll func and other updates
Diffstat (limited to '.spacemacs')
-rw-r--r--.spacemacs59
1 files changed, 50 insertions, 9 deletions
diff --git a/.spacemacs b/.spacemacs
index ca0fea4..48f8f43 100644
--- a/.spacemacs
+++ b/.spacemacs
@@ -34,8 +34,6 @@ values."
34 deft 34 deft
35 django 35 django
36 emacs-lisp 36 emacs-lisp
37 eyebrowse
38 erc
39 git 37 git
40 gnus 38 gnus
41 ;; github 39 ;; github
@@ -45,6 +43,7 @@ values."
45 markdown 43 markdown
46 org 44 org
47 osx 45 osx
46 perspectives
48 (python :variables 47 (python :variables
49 ;;python-enable-yapf-format-on-save t 48 ;;python-enable-yapf-format-on-save t
50 ) 49 )
@@ -69,6 +68,7 @@ values."
69 hackernews 68 hackernews
70 ;; helm-dash ;; osx is broken 69 ;; helm-dash ;; osx is broken
71 ;; itail 70 ;; itail
71 jbeans-theme
72 magit-gitflow 72 magit-gitflow
73 ;; mentor ;; rTorrent client 73 ;; mentor ;; rTorrent client
74 org-journal 74 org-journal
@@ -121,7 +121,7 @@ values."
121 ;; Default font. `powerline-scale' allows to quickly tweak the mode-line 121 ;; Default font. `powerline-scale' allows to quickly tweak the mode-line
122 ;; size to make separators look not too crappy. 122 ;; size to make separators look not too crappy.
123 dotspacemacs-default-font '("Inconsolata for Powerline" 123 dotspacemacs-default-font '("Inconsolata for Powerline"
124 :size 11 124 :size 12
125 :weight normal 125 :weight normal
126 :width normal 126 :width normal
127 :powerline-scale 1.0) 127 :powerline-scale 1.0)
@@ -269,19 +269,57 @@ M-x ao/what-face."
269 (let ((vc-follow-symlinks t)) 269 (let ((vc-follow-symlinks t))
270 (apply orig-fun args))) 270 (apply orig-fun args)))
271 271
272(defun other-window-previous (&optional n)
273 "Move to the previous window"
274 (interactive "p")
275 (other-window (- n))
276 )
277;; Undo accidental scrolling
278(defvar unscroll-point nil
279 "Text position for next call to 'unscroll'.")
280(defvar unscroll-window-start nil
281 "Window start for next call to 'unscroll'.")
282(defvar unscroll-window-hscroll nil
283 "Hscroll for next call to 'unscroll'.")
284(defun unscroll-maybe-remember ()
285 (if (not (or (eq last-command 'scroll-up-command)
286 (eq last-command 'scroll-down-command)))
287 (setq unscroll-point (point)
288 unscroll-window-start (window-start)
289 unscroll-window-hscroll (window-hscroll))))
290(defun unscroll ()
291 "Jump to location specified by 'unscroll-point'."
292 (interactive)
293 (if (not unscroll-point)
294 (error "Cannot unscroll yet"))
295
296 (goto-char unscroll-point)
297 (set-window-start nil unscroll-window-start)
298 (set-window-hscroll nil unscroll-window-hscroll))
299(defadvice scroll-down (before remember-for-unscroll
300 activate compile)
301 "Remember where we started from, for 'unscroll'."
302 (unscroll-maybe-remember))
303(defadvice scroll-up (before remember-for-unscroll
304 activate compile)
305 "Remember where we started from, for 'unscroll'."
306 (unscroll-maybe-remember))
307;; End accidental scrolling
308
272(defun load-ropemacs () 309(defun load-ropemacs ()
273 "Load pymacs and ropemacs" 310 "Load pymacs and ropemacs"
274 (interactive) 311 (interactive)
275 (require 'pymacs) 312 (require 'pymacs)
276 (pymacs-load "ropemacs" "rope-") 313 (pymacs-load "ropemacs" "rope-")
277 ;; Automatically save project python buffers before refactorings 314 ;; Automatically save project python buffers before refactorings
278 (setq ropemacs-confirm-saving 'nil) 315 (setq ropemacs-confirm-saving nil)
279 ) 316 )
280 317
281(defun dotspacemacs/user-init () 318(defun dotspacemacs/user-init ()
282 "Initialization function for user code. 319 "Initialization function for user code.
283It is called immediately after `dotspacemacs/init'. You are free to put any 320It is called immediately after `dotspacemacs/init'. You are free to put any
284user code." 321user code."
322 (require 'tls)
285 (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") 323 (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
286 (add-to-list 'load-path "~/.emacs.d/private/local/") 324 (add-to-list 'load-path "~/.emacs.d/private/local/")
287 ) 325 )
@@ -292,12 +330,15 @@ user code."
292layers configuration." 330layers configuration."
293 331
294 (setq org-agenda-files '("~/Code/org")) 332 (setq org-agenda-files '("~/Code/org"))
295 (global-set-key (kbd "C-c C-g") 'evil-escape) 333 ;(global-set-key (kbd "C-c C-g") 'evil-escape)
296 (global-vi-tilde-fringe-mode -1) 334 (global-vi-tilde-fringe-mode -1)
297 335
336 (global-set-key (kbd "C-<") 'other-window-previous)
337 (global-set-key (kbd "C->") 'other-window)
338
298 (setq 339 (setq
299 mac-command-modifier 'meta 340 mac-command-modifier 'meta
300 341 diredp-hide-details-initially-flag nil
301 org-agenda-include-diary t 342 org-agenda-include-diary t
302 343
303 web-mode-enable-engine-detection t 344 web-mode-enable-engine-detection t
@@ -327,7 +368,8 @@ layers configuration."
327 (defun ao/find-dotfile (orig-fun &rest args) 368 (defun ao/find-dotfile (orig-fun &rest args)
328 "Always follow symlink when using `SPC f e d'." 369 "Always follow symlink when using `SPC f e d'."
329 (let ((vc-follow-symlinks t)) ; Set `vc-follow-symlinks` to t just for this 370 (let ((vc-follow-symlinks t)) ; Set `vc-follow-symlinks` to t just for this
330 (apply orig-fun args))) 371 (apply orig-fun args))r)
372
331 373
332 374
333 ;; then, in `user-config` in `~/.spacemacs`: 375 ;; then, in `user-config` in `~/.spacemacs`:
@@ -343,7 +385,6 @@ layers configuration."
343 ;; or searches 385 ;; or searches
344 (global-evil-search-highlight-persist nil) 386 (global-evil-search-highlight-persist nil)
345 387
346
347 ;; Dired 388 ;; Dired
348 (require 'dired-x) ; Enable dired-x 389 (require 'dired-x) ; Enable dired-x
349 (require 'dired+) ; Enable dired+ 390 (require 'dired+) ; Enable dired+
@@ -389,7 +430,7 @@ layers configuration."
389 '(ahs-inhibit-face-list nil) 430 '(ahs-inhibit-face-list nil)
390 '(custom-safe-themes 431 '(custom-safe-themes
391 (quote 432 (quote
392 ("040d5032864c4b6ca2d7ebc89689cd3617edf585ff4db4244baa170f6d18c899" default))) 433 ("369c5ccf7acf67abbc1f4f46e8267044972cd9647b15f42214cb470e3b74d5cf" "4f131ca455f9de016ceecb37f821a9392948a65fc9c0ceb6222435f43ca6f16c" "040d5032864c4b6ca2d7ebc89689cd3617edf585ff4db4244baa170f6d18c899" default)))
393 '(org-agenda-files 434 '(org-agenda-files
394 (quote 435 (quote
395 ("~/Code/enderlabs/eventboard.io/agenda.org" "/Users/jason/Code/org/aws.org"))) 436 ("~/Code/enderlabs/eventboard.io/agenda.org" "/Users/jason/Code/org/aws.org")))