random tweaks

This commit is contained in:
Ivan Malison 2014-11-18 03:09:17 -08:00
parent d9155dc397
commit f0067856bf
2 changed files with 25 additions and 36 deletions

View File

@ -3,24 +3,25 @@
(setq mc/cmds-to-run-for-all
'(
dired-do-rename
forward-sexp
git-rebase-squash
git-rebase-undo
isearch-forward-regexp
isearch-other-control-char
isearch-printing-char
keyboard-quit
kill-region
python-indent-electric-colon
sgml-slash
skeleton-pair-insert-maybe
universal-argument-minus
))
dired-do-rename
forward-sexp
git-rebase-squash
git-rebase-undo
isearch-forward-regexp
isearch-other-control-char
isearch-printing-char
keyboard-quit
kill-region
python-indent-electric-colon
sgml-slash
skeleton-pair-insert-maybe
tern-ac-dot-complete
universal-argument-minus
))
(setq mc/cmds-to-run-once
'(
delete-horizontal-space
isearch-delete-char
smex
))
delete-horizontal-space
isearch-delete-char
smex
))

24
init.el
View File

@ -42,9 +42,6 @@
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(defun ensure-packages-installed (packages)
"Assure every package is installed, ask for installation if its not.
Return a list of installed packages or nil for every package not installed."
;; fetch the list of packages available
(unless package-archive-contents
(package-refresh-contents))
(mapcar
@ -280,13 +277,10 @@ Return a list of installed packages or nil for every package not installed."
;; Python
;; =============================================================================
(defvar use-python-tabs nil)
(defun python-tabs () (setq tab-width 4
indent-tabs-mode t
python-indent-offset 4))
(defun python-tabs ()
(setq tab-width 4 indent-tabs-mode t python-indent-offset 4))
(defun add-virtual-envs-to-jedi-server ()
(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
(lambda ()
(require 'whitespace)
;; clean-up whitespace at save
(make-local-variable 'before-save-hook)
(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))))
:config
(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 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-x C-b") 'buffer-menu)
(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 O") (lambda () (interactive) (other-window -1)))
(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-n") 'forward-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)
(condition-case exp
(set-default-font (random-choice fonts) nil t)
(set-frame-font (random-choice fonts) nil t)
('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)
(scroll-bar-mode -1)