Bubble up avy

master
Jacopo De Simoi 9 years ago
parent c82ab38b1e
commit f6276e37fd
  1. 232
      global.org

@ -349,6 +349,13 @@
(global-set-key (kbd "<H-f14>") 'mc/mark-pop)
(global-set-key (kbd "H-#") 'mc/insert-numbers)
#+END_SRC
** avy
#+BEGIN_SRC emacs-lisp
(global-set-key (kbd "C-c SPC") 'avy-goto-word-or-subword-1)
(global-set-key (kbd "M-s") 'avy-goto-word-or-subword-1)
(global-set-key (kbd "M-g M-g") 'avy-goto-line)
(global-set-key (kbd "M-g g") 'avy-goto-line)
#+END_SRC
** Atomic chrome
#+BEGIN_SRC emacs-lisp
;;(require 'atomic-chrome)
@ -379,120 +386,115 @@
#+END_SRC
** Leftovers
#+BEGIN_SRC emacs-lisp
;;(setq kde-full-name "Jacopo De Simoi")
;;(setq kde-email "wilderkde@gmail.com")
;; (require 'sourcepair)
;; (global-set-key (kbd "<f6>") 'sourcepair-load)
(setq default-fill-column 110)
;; (require 'pomodoro)
;; * smart-tab-mode
(require 'smart-tab)
(global-smart-tab-mode 1)
(global-set-key (kbd "C-j") 'smart-tab) ;; try this; I never use C-j for goto-line
(global-set-key (kbd "C-c SPC") 'avy-goto-word-or-subword-1)
(global-set-key (kbd "M-s") 'avy-goto-word-or-subword-1)
(global-set-key (kbd "M-g M-g") 'avy-goto-line)
(global-set-key (kbd "M-g g") 'avy-goto-line)
;; * redefine line-beginning to handle indentation properly
(defun smart-line-beginning ()
"Move point to the beginning of text on the current line; if that is already
the current position of point, then move it to the beginning of the line."
(interactive)
(let ((pt (point)))
(beginning-of-line-text)
(when (eq pt (point))
(beginning-of-line))))
(global-set-key (kbd "C-a") 'smart-line-beginning)
;; * load expand-region
(require 'expand-region)
(global-set-key (kbd "C-=") 'er/expand-region)
;; * construct emacs-session so with session-id
(defun emacs-session-filename (session-id)
"Construct a filename to save the session in based on SESSION-ID.
If the directory ~/.emacs.d exists, we make a filename in there, otherwise
a file in the home directory."
(let ((basename (concat "sessions/session." session-id))
(emacs-dir user-emacs-directory))
(expand-file-name (if (file-directory-p emacs-dir)
(concat emacs-dir basename)
(concat "~/.emacs-" basename)))))
;; * Wordnik - this has bitrotten :fixme:
;(require 'wordnik-synonym)
;(global-set-key (kbd "H-=") 'wn/synonym-at-point)
;; * Time stamps
;; write
;; Time-stamp: <>
;; in your file and save it to see time stamps at work.
;; Other time stamp format: "%a %b %e, %Y %l:%M %p"
(add-hook 'write-file-hooks 'time-stamp)
(setq time-stamp-active t)
(setq time-stamp-format "%:a %02d %:b %:y, %02H:%02M:%02S, %u")
(setq european-calendar-style 't)
;; first day of the week is monday instead of sunday:
(setq calendar--week--start--day 1)
;; * toorg
(require 'highlight-sexps)
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
;; (eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
;; Use system proxy
(setq url-proxy-services '(("http" . "127.0.0.1:8118")))
(defun flash-hline ()
(let ((fg (face-foreground 'default))
(bg (face-background 'hl-line)))
(set-face-background 'hl-line fg)
(run-with-timer
0.1 nil (lambda ()
(set-face-background 'hl-line "#303030") ))))
(global-set-key (kbd "<f15>") 'flash-hline)
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph
(defun unfill-paragraph (&optional region)
"Takes a multi-line paragraph and makes it into a single line of text."
(interactive (progn (barf-if-buffer-read-only) '(t)))
(let ((fill-column (point-max))
;; This would override `fill-column' if it's an integer.
(emacs-lisp-docstring-fill-column t))
(fill-paragraph nil region)))
(defun select-frame-on-current-activity ()
(select-frame-on-activity (kde-current-activity))
)
;; * start server named after kde activity name
(setq server-name (kde-current-activity-name))
;; mmh
;; (set-face-font 'default "-xos4-hackminus-medium-r-normal--20-200-72-72-c-100-ISO10646-1") ;
;; Why is the above needed down here?
;;
;; Because it sets the face for packages that have loaded in the meantime;
;; it does not wark perfectly as some packages are still to be loaded
;; (most notably magit)
(mapc
(lambda (face)
(set-face-attribute face nil :weight 'normal)
(set-face-attribute face nil :slant 'normal))
(face-list))
(server-start)
;;(setq kde-full-name "Jacopo De Simoi")
;;(setq kde-email "wilderkde@gmail.com")
;; (require 'sourcepair)
;; (global-set-key (kbd "<f6>") 'sourcepair-load)
(setq default-fill-column 110)
;; (require 'pomodoro)
;; * smart-tab-mode
(require 'smart-tab)
(global-smart-tab-mode 1)
(global-set-key (kbd "C-j") 'smart-tab) ;; try this; I never use C-j for goto-line
;; * redefine line-beginning to handle indentation properly
(defun smart-line-beginning ()
"Move point to the beginning of text on the current line; if that is already
the current position of point, then move it to the beginning of the line."
(interactive)
(let ((pt (point)))
(beginning-of-line-text)
(when (eq pt (point))
(beginning-of-line))))
(global-set-key (kbd "C-a") 'smart-line-beginning)
;; * load expand-region
(require 'expand-region)
(global-set-key (kbd "C-=") 'er/expand-region)
;; * construct emacs-session so with session-id
(defun emacs-session-filename (session-id)
"Construct a filename to save the session in based on SESSION-ID.
If the directory ~/.emacs.d exists, we make a filename in there, otherwise
a file in the home directory."
(let ((basename (concat "sessions/session." session-id))
(emacs-dir user-emacs-directory))
(expand-file-name (if (file-directory-p emacs-dir)
(concat emacs-dir basename)
(concat "~/.emacs-" basename)))))
;; * Wordnik - this has bitrotten :fixme:
;(require 'wordnik-synonym)
;(global-set-key (kbd "H-=") 'wn/synonym-at-point)
;; * Time stamps
;; write
;; Time-stamp: <>
;; in your file and save it to see time stamps at work.
;; Other time stamp format: "%a %b %e, %Y %l:%M %p"
(add-hook 'write-file-hooks 'time-stamp)
(setq time-stamp-active t)
(setq time-stamp-format "%:a %02d %:b %:y, %02H:%02M:%02S, %u")
(setq european-calendar-style 't)
;; first day of the week is monday instead of sunday:
(setq calendar--week--start--day 1)
;; * toorg
(require 'highlight-sexps)
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
;; (eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
;; Use system proxy
(setq url-proxy-services '(("http" . "127.0.0.1:8118")))
(defun flash-hline ()
(let ((fg (face-foreground 'default))
(bg (face-background 'hl-line)))
(set-face-background 'hl-line fg)
(run-with-timer
0.1 nil (lambda ()
(set-face-background 'hl-line "#303030") ))))
(global-set-key (kbd "<f15>") 'flash-hline)
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph
(defun unfill-paragraph (&optional region)
"Takes a multi-line paragraph and makes it into a single line of text."
(interactive (progn (barf-if-buffer-read-only) '(t)))
(let ((fill-column (point-max))
;; This would override `fill-column' if it's an integer.
(emacs-lisp-docstring-fill-column t))
(fill-paragraph nil region)))
(defun select-frame-on-current-activity ()
(select-frame-on-activity (kde-current-activity))
)
;; * start server named after kde activity name
(setq server-name (kde-current-activity-name))
;; mmh
;; (set-face-font 'default "-xos4-hackminus-medium-r-normal--20-200-72-72-c-100-ISO10646-1") ;
;; Why is the above needed down here?
;;
;; Because it sets the face for packages that have loaded in the meantime;
;; it does not wark perfectly as some packages are still to be loaded
;; (most notably magit)
(mapc
(lambda (face)
(set-face-attribute face nil :weight 'normal)
(set-face-attribute face nil :slant 'normal))
(face-list))
(server-start)
#+END_SRC

Loading…
Cancel
Save