forked from colonelpanic/dotfiles
random tweaks
This commit is contained in:
parent
d9155dc397
commit
f0067856bf
37
.mc-lists.el
37
.mc-lists.el
@ -3,24 +3,25 @@
|
|||||||
|
|
||||||
(setq mc/cmds-to-run-for-all
|
(setq mc/cmds-to-run-for-all
|
||||||
'(
|
'(
|
||||||
dired-do-rename
|
dired-do-rename
|
||||||
forward-sexp
|
forward-sexp
|
||||||
git-rebase-squash
|
git-rebase-squash
|
||||||
git-rebase-undo
|
git-rebase-undo
|
||||||
isearch-forward-regexp
|
isearch-forward-regexp
|
||||||
isearch-other-control-char
|
isearch-other-control-char
|
||||||
isearch-printing-char
|
isearch-printing-char
|
||||||
keyboard-quit
|
keyboard-quit
|
||||||
kill-region
|
kill-region
|
||||||
python-indent-electric-colon
|
python-indent-electric-colon
|
||||||
sgml-slash
|
sgml-slash
|
||||||
skeleton-pair-insert-maybe
|
skeleton-pair-insert-maybe
|
||||||
universal-argument-minus
|
tern-ac-dot-complete
|
||||||
))
|
universal-argument-minus
|
||||||
|
))
|
||||||
|
|
||||||
(setq mc/cmds-to-run-once
|
(setq mc/cmds-to-run-once
|
||||||
'(
|
'(
|
||||||
delete-horizontal-space
|
delete-horizontal-space
|
||||||
isearch-delete-char
|
isearch-delete-char
|
||||||
smex
|
smex
|
||||||
))
|
))
|
||||||
|
24
init.el
24
init.el
@ -42,9 +42,6 @@
|
|||||||
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
|
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
|
||||||
|
|
||||||
(defun ensure-packages-installed (packages)
|
(defun ensure-packages-installed (packages)
|
||||||
"Assure every package is installed, ask for installation if it’s not.
|
|
||||||
Return a list of installed packages or nil for every package not installed."
|
|
||||||
;; fetch the list of packages available
|
|
||||||
(unless package-archive-contents
|
(unless package-archive-contents
|
||||||
(package-refresh-contents))
|
(package-refresh-contents))
|
||||||
(mapcar
|
(mapcar
|
||||||
@ -280,13 +277,10 @@ Return a list of installed packages or nil for every package not installed."
|
|||||||
;; Python
|
;; Python
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defvar use-python-tabs nil)
|
(defvar use-python-tabs nil)
|
||||||
|
|
||||||
(defun python-tabs () (setq tab-width 4
|
(defun python-tabs ()
|
||||||
indent-tabs-mode t
|
(setq tab-width 4 indent-tabs-mode t python-indent-offset 4))
|
||||||
python-indent-offset 4))
|
|
||||||
|
|
||||||
(defun add-virtual-envs-to-jedi-server ()
|
(defun add-virtual-envs-to-jedi-server ()
|
||||||
(let ((virtual-envs (get-virtual-envs)))
|
(let ((virtual-envs (get-virtual-envs)))
|
||||||
@ -350,14 +344,8 @@ Return a list of installed packages or nil for every package not installed."
|
|||||||
(progn (add-hook 'scala-mode-hook
|
(progn (add-hook 'scala-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(require 'whitespace)
|
(require 'whitespace)
|
||||||
|
|
||||||
;; clean-up whitespace at save
|
|
||||||
(make-local-variable 'before-save-hook)
|
(make-local-variable 'before-save-hook)
|
||||||
(add-hook 'before-save-hook 'whitespace-cleanup)
|
(add-hook 'before-save-hook 'whitespace-cleanup)
|
||||||
|
|
||||||
;; turn on highlight. To configure what is highlighted, customize
|
|
||||||
;; the *whitespace-style* variable. A sane set of things to
|
|
||||||
;; highlight is: face, tabs, trailing
|
|
||||||
(whitespace-mode))))
|
(whitespace-mode))))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
@ -540,7 +528,8 @@ buffer is not visiting a file."
|
|||||||
|
|
||||||
(global-set-key (kbd "C-c C-s") 'sudo-edit)
|
(global-set-key (kbd "C-c C-s") 'sudo-edit)
|
||||||
(global-set-key (kbd "C-c SPC") (lambda () (interactive)
|
(global-set-key (kbd "C-c SPC") (lambda () (interactive)
|
||||||
(if current-prefix-arg (helm-global-mark-ring) (helm-mark-ring))))
|
(if current-prefix-arg (helm-global-mark-ring)
|
||||||
|
(helm-mark-ring))))
|
||||||
(global-set-key (kbd "C-c e") 'os-copy)
|
(global-set-key (kbd "C-c e") 'os-copy)
|
||||||
(global-set-key (kbd "C-x C-b") 'buffer-menu)
|
(global-set-key (kbd "C-x C-b") 'buffer-menu)
|
||||||
(global-set-key (kbd "C-x C-c") 'kill-emacs)
|
(global-set-key (kbd "C-x C-c") 'kill-emacs)
|
||||||
@ -548,7 +537,6 @@ buffer is not visiting a file."
|
|||||||
(global-set-key (kbd "C-x C-r") (lambda () (interactive) (revert-buffer t t)))
|
(global-set-key (kbd "C-x C-r") (lambda () (interactive) (revert-buffer t t)))
|
||||||
(global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1)))
|
(global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1)))
|
||||||
(global-set-key (kbd "C-x w") 'whitespace-mode)
|
(global-set-key (kbd "C-x w") 'whitespace-mode)
|
||||||
(global-set-key (kbd "M-Z") 'zap-to-char)
|
|
||||||
(global-set-key (kbd "M-g") 'goto-line)
|
(global-set-key (kbd "M-g") 'goto-line)
|
||||||
(global-set-key (kbd "M-n") 'forward-paragraph)
|
(global-set-key (kbd "M-n") 'forward-paragraph)
|
||||||
(global-set-key (kbd "M-p") 'backward-paragraph)
|
(global-set-key (kbd "M-p") 'backward-paragraph)
|
||||||
@ -620,9 +608,9 @@ buffer is not visiting a file."
|
|||||||
|
|
||||||
(defun set-my-font-for-frame (frame)
|
(defun set-my-font-for-frame (frame)
|
||||||
(condition-case exp
|
(condition-case exp
|
||||||
(set-default-font (random-choice fonts) nil t)
|
(set-frame-font (random-choice fonts) nil t)
|
||||||
('error (package-refresh-contents)
|
('error (package-refresh-contents)
|
||||||
(set-default-font "monaco-10" nil t) nil)))
|
(set-frame-font "monaco-11" nil t) nil)))
|
||||||
|
|
||||||
(defun remove-fringe-and-hl-line-mode (&rest stuff)
|
(defun remove-fringe-and-hl-line-mode (&rest stuff)
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user