Customize colors and other stuff;

master
Jacopo De Simoi 12 years ago
parent c24f3d6c25
commit f5336944e6
  1. 1
      emacsclient-activities
  2. 113
      init.el

@ -7,6 +7,7 @@ kde-current-activity () {
}
emacsclient -n -s "$(kde-current-activity)" -a '/usr/bin/emacs' $@
emacsclient -n -s "$(kde-current-activity)" -e '(recenter)'
# emacsclient -s "$(kde-current-activity)" -a false -e 'server-name' >/dev/null

@ -30,6 +30,8 @@
'(cursor ((t (:background "orchid"))))
'(fixed-pitch ((t (:family "Bitstream Vera Sans Mono"))))
'(font-latex-italic-face ((t (:inherit italic :foreground "SpringGreen"))))
'(font-lock-comment-delimiter-face ((t (:foreground "lightslategray"))))
'(font-lock-comment-face ((t (:foreground "SlateGray"))))
'(highlight ((t (:background "DarkSlateGray"))))
'(italic ((((supports :underline t)) nil)))
'(menu ((t (:inverse-video t))))
@ -113,14 +115,18 @@
(add-hook 'LaTeX-mode-hook (lambda () (modify-syntax-entry ?\\ "w" LaTeX-mode-syntax-table)))
(require 'sourcepair)
(add-hook 'LaTeX-mode-hook (lambda () (setq sourcepair-source-extensions '(".tex"))))
(add-hook 'LaTeX-mode-hook (lambda () (setq sourcepair-header-extensions '(".p.tex"))))
(global-set-key (kbd "<f6>") 'sourcepair-load)
;; this should really be called in the hook
(add-hook 'LaTeX-mode-hook (lambda ()
(setq sourcepair-source-extensions '(".tex"))
(setq sourcepair-header-extensions '(".p.tex"))
;; (define-key LaTeX-mode-map (kbd "\\") (lambda () (interactive) (insert ";")))
;; (define-key LaTeX-mode-map (kbd ";") (lambda () (interactive) (insert "\\")))
(define-key LaTeX-mode-map (kbd "C-c }") 'TeX-back-insert-braces)
))
(setq subword-forward-regexp "\\W*\\(\\([\\\\[:upper:]]*\\W?\\)[[:lower:][:digit:]]*\\)")
(setq subword-backward-regexp "\\(\\(\\W\\|[[:lower:][:digit:]]\\)\\([\\\\[:upper:]]+\\W*\\)\\|\\W\\w+\\)")
(global-set-key (kbd "<f6>") 'sourcepair-load)
;; this should really be called in the hook
(setq default-fill-column 120)
(add-to-list 'load-path "~/tmp")
@ -159,10 +165,10 @@
(key-chord-define-global "4r" "$")
(key-chord-define-global "$%" 'add-dollar-delimiter)
(global-set-key (kbd "M-[") 'previous-buffer)
(global-set-key (kbd "M-]") 'next-buffer)
(global-set-key (kbd "M-p") 'backward-paragraph)
(global-set-key (kbd "M-n") 'forward-paragraph)
;; kde activity stuff -- move to other file when stabilized
@ -204,15 +210,12 @@
)
;; Rehab ↓
;; stop using the arrow keys
;; mark the date 30/1/2014
(global-unset-key [left])
(global-unset-key [up])
(global-unset-key [right])
(global-unset-key [down])
(add-to-list 'load-path "~/.emacs.d/emacs-no-easy-keys")
(require 'no-easy-keys)
(no-easy-keys 1)
;; remove mouse-binding. Keyboard is faster
;;Keyboard is faster than mouse
(global-unset-key (kbd "<mouse-1>"))
(global-unset-key (kbd "<down-mouse-1>"))
(global-unset-key (kbd "<drag-mouse-1>"))
@ -232,8 +235,32 @@
(require 'magit)
(require 'iy-go-to-char)
(global-set-key (kbd "M-m") 'iy-go-to-char)
(global-set-key (kbd "M-M") 'iy-go-to-char-backward)
(global-set-key (kbd "M-m") 'iy-go-up-to-char)
(global-set-key (kbd "M-M") 'iy-go-up-to-char-backward)
;;
;; ace jump mode major function
;;
(add-to-list 'load-path "~/.emacs.d/ace-jump-mode/")
(autoload
'ace-jump-mode
"ace-jump-mode"
"Emacs quick move minor mode"
t)
;; you can select the key you prefer to
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
;;
;; enable a more powerful jump back function from ace jump mode
;;
(autoload
'ace-jump-mode-pop-mark
"ace-jump-mode"
"Ace jump back:-)"
t)
(eval-after-load "ace-jump-mode"
'(ace-jump-mode-enable-mark-sync))
(define-key global-map (kbd "C-x SPC") 'ace-jump-mode-pop-mark)
(defun smart-line-beginning ()
"Move point to the beginning of text on the current line; if that is already
@ -287,12 +314,54 @@ This is the same as using \\[set-mark-command] with the prefix argument."
(set-mark-command 1))
(global-set-key (kbd "M-`") 'jump-to-mark)
(defun exchange-point-and-mark-no-activate ()
"Identical to \\[exchange-point-and-mark] but will not activate the region."
(interactive)
(exchange-point-and-mark)
(deactivate-mark nil))
(define-key global-map [remap exchange-point-and-mark] 'exchange-point-and-mark-no-activate)
;; (defun exchange-point-and-mark-no-activate ()
;; "Identical to \\[exchange-point-and-mark] but will not activate the region."
;; (interactive)
;; (exchange-point-and-mark)
;; (deactivate-mark nil))
;; (define-key global-map [remap exchange-point-and-mark] 'exchange-point-and-mark-no-activate)
(add-to-list 'load-path "~/.emacs.d")
;; (require 'wordnik)
;; (setq wordnik-api-key "fa815fa92045b7fa23699014d0a01c081b3d9c3c761292bf3")(kbd "H-=") synonym-at-point)
(require 'wordnik-synonym)
(global-set-key (kbd "H-=") 'wn/synonym-at-point)
;; this reimplements TeX-insert-braces to work with negative argument
(defun TeX-insert-braces (arg)
"Make a pair of braces around next ARG sexps and leave point inside.
No argument is equivalent to zero: just insert braces and leave point
between.
If there is an active region, ARG will be ignored, braces will be
inserted around the region, and point will be left after the
closing brace."
(interactive "P")
(if (TeX-active-mark)
(progn
(if (< (point) (mark))
(exchange-point-and-mark))
(insert TeX-grcl)
(save-excursion
(goto-char (mark))
(insert TeX-grop)))
(if (and arg (< arg 0))
(progn
(save-excursion
(backward-sexp (prefix-numeric-value (- 0 arg)))
(insert TeX-grop))
(insert TeX-grcl))
(insert TeX-grop)
(save-excursion
(if arg (forward-sexp (prefix-numeric-value arg)))
(insert TeX-grcl)))))
(defun TeX-back-insert-braces (arg)
(interactive "P")
(if arg (TeX-insert-braces (- 0 arg))
(insert TeX-grcl)))
(setq server-name (kde-current-activity))

Loading…
Cancel
Save