Last active
August 29, 2015 13:57
-
-
Save joaotavora/9371411 to your computer and use it in GitHub Desktop.
My simple .emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(server-start) | |
(show-paren-mode 1) | |
(global-auto-revert-mode 1) | |
(delete-selection-mode 1) | |
(menu-bar-mode -1) | |
(tooltip-mode -1) | |
(ido-mode 1) | |
(ido-everywhere 1) | |
(setq ido-enable-flex-matching t) | |
(setq ido-auto-merge-work-directories-length -1) | |
(and (require 'elec-pair nil t) (electric-pair-mode 1)) | |
(and (featurep 'tool-bar) (tool-bar-mode -1)) | |
(and (featurep 'scroll-bar) (scroll-bar-mode -1)) | |
(setq visible-bell t) | |
(setq ediff-window-setup-function 'ediff-setup-windows-plain) | |
(set-default 'indent-tabs-mode nil) | |
(set-default 'truncate-lines t) | |
(windmove-default-keybindings) | |
(defalias 'yes-or-no-p 'y-or-n-p) | |
(setq backup-directory-alist `(("." . ,(getenv "TEMP")))) | |
(setq default-input-method "portuguese-prefix") | |
;; Get this find.exe from http://gnuwin32.sourceforge.net/packages/findutils.htm | |
(setq find-program "z:/Vendor/findutils/find.exe") | |
(global-set-key [remap dabbrev-expand] 'hippie-expand) | |
(global-set-key [remap exchange-point-and-mark] 'pop-to-mark-command) | |
(global-set-key (kbd "C-<return>") 'cua-rectangle-mark-mode) | |
(global-set-key (kbd "C-x C-k") 'joaot/kill-this-buffer) | |
(global-set-key [remap just-one-space] 'joaot/no-spaces-at-all) | |
(global-set-key [remap move-beginning-of-line] 'joaot/move-beginning-of-line) | |
(eval-after-load 'hippie-exp | |
`(progn | |
(delete 'try-expand-line hippie-expand-try-functions-list) | |
(delete 'try-expand-list hippie-expand-try-functions-list))) | |
(defun joaot/kill-this-buffer () | |
(interactive) (kill-buffer (current-buffer))) | |
(defun joaot/no-spaces-at-all () | |
(interactive) | |
(delete-region (point) (+ (point) (skip-chars-forward "\s\t\n")))) | |
(defun joaot/move-beginning-of-line () | |
(interactive) | |
(let ((pos (point))) | |
(back-to-indentation) | |
(when (= pos (point)) (move-beginning-of-line nil)))) | |
(eval-after-load 'slime | |
`(progn | |
(setq slime-complete-symbol-function | |
'slime-fuzzy-complete-symbol) | |
(define-key slime-mode-map (kbd "C-c M-k") | |
'slime-compile-and-load-file) | |
(define-key sldb-mode-map (kbd "q") 'sldb-abort))) | |
(defadvice slime-sync-package-and-default-directory | |
(after also-switch-to-repl-buffer activate) | |
"After synching packge and dir, also switch to the relevant REPL." | |
(slime-repl)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment