forked from colonelpanic/dotfiles
Changed submodules updating init.el.
This commit is contained in:
parent
d14b633d9e
commit
efea58982b
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ac-comphist.dat
|
||||||
|
auto-save-list
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -7,3 +7,9 @@
|
|||||||
[submodule "lisp/yasnippet"]
|
[submodule "lisp/yasnippet"]
|
||||||
path = lisp/yasnippet
|
path = lisp/yasnippet
|
||||||
url = git@github.com:capitaomorte/yasnippet.git
|
url = git@github.com:capitaomorte/yasnippet.git
|
||||||
|
[submodule "emacs-for-python"]
|
||||||
|
path = emacs-for-python
|
||||||
|
url = git@github.com:gabrielelanaro/emacs-for-python.git
|
||||||
|
[submodule "lisp/rainbow-delimiters"]
|
||||||
|
path = lisp/rainbow-delimiters
|
||||||
|
url = git@github.com:jlr/rainbow-delimiters.git
|
||||||
|
1
emacs-for-python
Submodule
1
emacs-for-python
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 67bffc200b4d183bd1882a42cdeb95e7e73af3f1
|
78
init.el
78
init.el
@ -1,10 +1,10 @@
|
|||||||
;; -----------------------------------------------------------------------------
|
;; =============================================================================
|
||||||
;; Ivan Malison
|
;; Ivan Malison
|
||||||
;; ___ _ __ ___ __ _ ___ ___
|
;; ___ _ __ ___ __ _ ___ ___
|
||||||
;; / _ \ '_ ` _ \ / _` |/ __/ __|
|
;; / _ \ '_ ` _ \ / _` |/ __/ __|
|
||||||
;; | __/ | | | | | (_| | (__\__ \
|
;; | __/ | | | | | (_| | (__\__ \
|
||||||
;; (_)___|_| |_| |_|\__,_|\___|___/
|
;; (_)___|_| |_| |_|\__,_|\___|___/
|
||||||
;; -----------------------------------------------------------------------------
|
;; =============================================================================
|
||||||
|
|
||||||
(setq user-full-name "Ivan Malison")
|
(setq user-full-name "Ivan Malison")
|
||||||
(setq user-mail-address "<IvanMalison@gmail.com>")
|
(setq user-mail-address "<IvanMalison@gmail.com>")
|
||||||
@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
(let ((default-directory "~/.emacs.d/lisp/"))
|
(let ((default-directory "~/.emacs.d/lisp/"))
|
||||||
(normal-top-level-add-subdirs-to-load-path))
|
(normal-top-level-add-subdirs-to-load-path))
|
||||||
(setq load-path (cons "~/.emacs.d/elpa" load-path))
|
(add-to-list 'load-path "~/.emacs.d/elpa")
|
||||||
|
(add-to-list 'load-path "~/.emacs.d/lisp/multi-line-it")
|
||||||
|
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; General Emacs Options
|
;; General Emacs Options
|
||||||
@ -31,20 +33,42 @@
|
|||||||
(ido-mode t)
|
(ido-mode t)
|
||||||
(setq ido-enable-flex-matching t)
|
(setq ido-enable-flex-matching t)
|
||||||
|
|
||||||
;; Unique buffer names dependent on file name
|
;; Give duplicate open buffers better titles.
|
||||||
(require 'uniquify)
|
(require 'uniquify)
|
||||||
(setq uniquify-buffer-name-style 'forward)
|
(setq uniquify-buffer-name-style 'forward)
|
||||||
|
|
||||||
(add-hook 'python-mode-hook (lambda () (setq show-trailing-whitespace t)))
|
(add-hook 'python-mode-hook (lambda () (setq show-trailing-whitespace t)))
|
||||||
(setq visible-bell t)
|
(setq visible-bell t)
|
||||||
|
|
||||||
;; Multi-lining for python.
|
|
||||||
(require 'multi-line-it)
|
|
||||||
|
|
||||||
;; Display line and column numbers in mode line.
|
;; Display line and column numbers in mode line.
|
||||||
(line-number-mode t)
|
(line-number-mode t)
|
||||||
(column-number-mode t)
|
(column-number-mode t)
|
||||||
|
|
||||||
|
;; Don't disable downcase and upcase region.
|
||||||
|
(put 'upcase-region 'disabled nil)
|
||||||
|
(put 'downcase-region 'disabled nil)
|
||||||
|
|
||||||
|
;; Change the behavior of M-<arrow> so that it stops on underscores.
|
||||||
|
(defun change-major-mode-hook () (modify-syntax-entry ?_ "_"))
|
||||||
|
(setq c-subword-mode t)
|
||||||
|
|
||||||
|
;; =============================================================================
|
||||||
|
;; Python
|
||||||
|
;; =============================================================================
|
||||||
|
|
||||||
|
;; Emacs for python.
|
||||||
|
(load-file "~/.emacs.d/emacs-for-python/epy-init.el")
|
||||||
|
|
||||||
|
;; Multi-lining for python.
|
||||||
|
(require 'multi-line-it)
|
||||||
|
|
||||||
|
;; Set tabs to be four spaces wide in python mode.
|
||||||
|
(add-hook 'python-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(setq indent-tabs-mode t)
|
||||||
|
(setq tab-width 4)
|
||||||
|
(setq python-indent 4)))))))))
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; Custom Key Bindings
|
;; Custom Key Bindings
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
@ -64,6 +88,7 @@
|
|||||||
(global-set-key "\C-x\C-r" (lambda () (interactive) (revert-buffer t t)))
|
(global-set-key "\C-x\C-r" (lambda () (interactive) (revert-buffer t t)))
|
||||||
(global-set-key "\C-x\C-i" 'increase-left-margin)
|
(global-set-key "\C-x\C-i" 'increase-left-margin)
|
||||||
(global-set-key "\C-x\C-d" 'decrease-left-margin)
|
(global-set-key "\C-x\C-d" 'decrease-left-margin)
|
||||||
|
(global-set-key "\C-c\C-c" 'comment-region)
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; ELPA
|
;; ELPA
|
||||||
@ -100,43 +125,6 @@
|
|||||||
(add-hook 'python-mode-hook
|
(add-hook 'python-mode-hook
|
||||||
(lambda () (unless (eq buffer-file-name nil) (flymake-mode 1))))
|
(lambda () (unless (eq buffer-file-name nil) (flymake-mode 1))))
|
||||||
|
|
||||||
|
|
||||||
(require 'yasnippet)
|
(require 'yasnippet)
|
||||||
(require 'whitespace)
|
(require 'whitespace)
|
||||||
|
(require 'rainbow-delimiters)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; pymacs
|
|
||||||
(require 'pymacs)
|
|
||||||
(autoload 'pymacs-apply "pymacs")
|
|
||||||
(autoload 'pymacs-call "pymacs")
|
|
||||||
(autoload 'pymacs-eval "pymacs" nil t)
|
|
||||||
(autoload 'pymacs-exec "pymacs" nil t)
|
|
||||||
(autoload 'pymacs-load "pymacs" nil t)
|
|
||||||
|
|
||||||
(pymacs-load "ropemacs" "rope-")
|
|
||||||
(whitespace-mode t)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; tab display width of 4 columns by default
|
|
||||||
; (throw everything at the wall, and eventually something will stick...)
|
|
||||||
(setq-default tab-width 4) ; Normal emacs tab-width
|
|
||||||
; (setq-default c-basic-offset 2) ; python-mode.el setting
|
|
||||||
(setq-default py-indent-offset 4) ; Use Tabs, not spaces
|
|
||||||
(setq-default py-indent-offset 4) ; emacs-for-python setting
|
|
||||||
(setq-default py-smart-indentation nil) ; Don't try to guess tab width
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(setq c-subword-mode t)
|
|
||||||
(put 'upcase-region 'disabled nil)
|
|
||||||
(defun change-major-mode-hook () (modify-syntax-entry ?_ "_"))
|
|
||||||
|
|
||||||
(put 'downcase-region 'disabled nil)
|
|
||||||
|
|
||||||
|
72
lisp/init_elpa.el
Normal file
72
lisp/init_elpa.el
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
;; -------------------------------------------------------------------------
|
||||||
|
;; File: init-elpa.el - initialize the Emacs Lisp Package Archive (ELPA)
|
||||||
|
;; see http://tromey.com/elpa/
|
||||||
|
;; Install a base set of packages automatically.
|
||||||
|
;;
|
||||||
|
;; Copyright (c) 2010 Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
||||||
|
;; http://varrette.gforge.uni.lu
|
||||||
|
;;
|
||||||
|
;; _ _ _ _ _
|
||||||
|
;; (_)_ __ (_) |_ ___| |_ __ __ _ ___| |
|
||||||
|
;; | | '_ \| | __|____ / _ \ | '_ \ / _` | / _ \ |
|
||||||
|
;; | | | | | | ||_____| __/ | |_) | (_| | _ | __/ |
|
||||||
|
;; |_|_| |_|_|\__| \___|_| .__/ \__,_| (_) \___|_|
|
||||||
|
;; |_|
|
||||||
|
;;
|
||||||
|
;; More information about Emacs Lisp:
|
||||||
|
;; http://www.emacswiki.org/emacs/EmacsLisp
|
||||||
|
;; -------------------------------------------------------------------------
|
||||||
|
;; This file is NOT part of GNU Emacs.
|
||||||
|
;;
|
||||||
|
;; This program is free software: you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
;;
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
;; -------------------------------------------------------------------------
|
||||||
|
;; Directly Inspired by Emacs Starter Kit
|
||||||
|
;; see http://github.com/technomancy/emacs-starter-kit/blob/master/
|
||||||
|
|
||||||
|
|
||||||
|
;; Adapt to suit you needs
|
||||||
|
(defvar starter-kit-packages (list 'magit 'mo-git-blame 'python-mode)
|
||||||
|
"Libraries that should be installed by default.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defun starter-kit-elpa-install ()
|
||||||
|
"Install all starter-kit packages that aren't installed."
|
||||||
|
(interactive)
|
||||||
|
(dolist (package starter-kit-packages)
|
||||||
|
(unless (or (member package package-activated-list)
|
||||||
|
(functionp package))
|
||||||
|
(message "Installing %s" (symbol-name package))
|
||||||
|
(package-install package))))
|
||||||
|
|
||||||
|
(defun esk-online? ()
|
||||||
|
(if (and (functionp 'network-interface-list)
|
||||||
|
(network-interface-list))
|
||||||
|
(some (lambda (iface) (unless (equal "lo" (car iface))
|
||||||
|
(member 'up (first (last (network-interface-info
|
||||||
|
(car iface)))))))
|
||||||
|
(network-interface-list))
|
||||||
|
t))
|
||||||
|
|
||||||
|
;; On your first run, this should pull in all the base packages.
|
||||||
|
(when (esk-online?)
|
||||||
|
(unless package-archive-contents (package-refresh-contents))
|
||||||
|
(starter-kit-elpa-install))
|
||||||
|
|
||||||
|
;; Workaround for an ELPA bug that people are reporting but I've been
|
||||||
|
;; unable to reproduce:
|
||||||
|
(autoload 'paredit-mode "paredit")
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'init-elpa)
|
@ -1 +0,0 @@
|
|||||||
Subproject commit da2e474ec816c0f22037becc355d339899ddc1dd
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit da2e474ec816c0f22037becc355d339899ddc1dd
|
|
1
lisp/rainbow-delimiters
Submodule
1
lisp/rainbow-delimiters
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d38744e9453cbe33ae2d28d76fa847d0611eb4c6
|
Loading…
Reference in New Issue
Block a user