From f6c9f8c638683b0c8dc4effe4c72a03508a3cc63 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 8 Oct 2014 04:02:27 -0700 Subject: [PATCH] add autocomplete, enable server-use-tcp --- .gitignore | 3 ++- init.el | 29 ++++++++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 6755dea7..31dea022 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ elpa/* .dir-locals.el .mc-lists.el .python-environments/ -tramp \ No newline at end of file +tramp +server \ No newline at end of file diff --git a/init.el b/init.el index 3aace533..fda65903 100644 --- a/init.el +++ b/init.el @@ -43,7 +43,8 @@ paredit inf-ruby undo-tree rainbow-delimiters smex solarized-theme zenburn-theme scala-mode2 ensime monokai-theme - gitconfig-mode jedi flymake-cursor pytest) + gitconfig-mode jedi flymake-cursor pytest + auto-complete) "Packages that must be installed at launch.") (defun ensure-package-installed (packages) @@ -74,6 +75,9 @@ Return a list of installed packages or nil for every package not installed." ;; Fuck auto fill mode (auto-fill-mode -1) +;; This makes it so that emacs --daemon creates server files in ~/.emacs.d/server +(setq server-use-tcp t) + ;; Enable ido mode. (require 'ido) (ido-mode t) @@ -191,7 +195,6 @@ Return a list of installed packages or nil for every package not installed." ;; Multi-lining for python. (require 'multi-line-it) -(require 'emacs-testify) (require 'pytest) (add-hook 'python-mode-hook (lambda () (setq show-trailing-whitespace t))) @@ -211,6 +214,11 @@ Return a list of installed packages or nil for every package not installed." (fset 'ipdb "import ipdb; ipdb.set_trace()") (fset 'main "if __name__ == '__main__':") +(global-auto-complete-mode) + +;; Macros +(fset 'ipdb "import ipdb; ipdb.set_trace()") + ;; ============================================================================= ;; JavaScript ;; ============================================================================= @@ -224,12 +232,6 @@ Return a list of installed packages or nil for every package not installed." (add-hook 'scala-mode-hook (lambda () (subword-mode 1))) -;; ============================================================================= -;; Starter Kits -;; ============================================================================= - -;;(load-file "~/.emacs.d/emacs-for-python/epy-init.el") - ;; ============================================================================= ;; Custom Key Bindings ;; ============================================================================= @@ -242,7 +244,8 @@ Return a list of installed packages or nil for every package not installed." ;; Miscellaneous (global-set-key (kbd "C-x C-b") 'buffer-menu) -(global-set-key (kbd "C-c w") 'whitespace-mode) +(global-unset-key (kbd "C-o")) +(global-set-key (kbd "C-x w") 'whitespace-mode) (global-set-key (kbd "C-x C-r") (lambda () (interactive) (revert-buffer t t))) (global-set-key (kbd "M-g") 'goto-line) (global-set-key (kbd "C-c C-c") 'comment-dwim) @@ -250,8 +253,6 @@ Return a list of installed packages or nil for every package not installed." (global-set-key (kbd "C-c C-o") 'testify-run-case) (global-set-key (kbd "C-c e") 'os-copy) (global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1))) -(global-set-key (kbd "C-c t") 'testify-run-test) -(global-set-key (kbd "C-c C-t") 'testify-run-case) (global-set-key (kbd "C-x C-c") 'kill-emacs) (global-set-key (kbd "C-c +") 'message-buffer-name) @@ -259,9 +260,6 @@ Return a list of installed packages or nil for every package not installed." (global-unset-key (kbd "C-o")) -;; Macros -(fset 'ipdb "import ipdb; ipdb.set_trace()") - ;; Multiple Cursors (global-set-key (kbd "C-x r t") 'mc/edit-lines) @@ -335,6 +333,3 @@ Return a list of installed packages or nil for every package not installed." ;; If there is more than one, they won't work right. '(reb-re-syntax (quote string)) '(safe-local-variable-values (quote ((use-python-tabs . t) (python-indent . 4) (whitespace-line-column . 80) (lexical-binding . t))))) - -(load-file "~/.emacs.d/emacs-for-python/epy-init.el") -