From 50f7ff268b6f9dc3e3f6fdfb8666c90acb1c81d5 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Thu, 25 May 2017 00:24:08 -0400 Subject: [PATCH] ctags and emacs stuff --- bash_aliases | 1 + emacs | 63 ++++++++++++++++++++++++++++++++++++++-------------- vimrc | 8 +++++++ zpreztorc | 1 - 4 files changed, 55 insertions(+), 18 deletions(-) diff --git a/bash_aliases b/bash_aliases index 3e15273..55a1dcf 100644 --- a/bash_aliases +++ b/bash_aliases @@ -6,6 +6,7 @@ alias adocs='cd $ADDGENE_CORE_REPO_DIR/docs && make html && open $ADDGENE_CORE_R alias aenv='env | sort | grep ADDGENE' alias ag='\ag --pager="less"' alias cg='cd "$(git rev-parse --show-toplevel)"' +alias ctags="`brew --prefix`/bin/ctags" alias dots="cd $(dirname `readlink ~/.vim`)" alias g='git' alias gp='git push' diff --git a/emacs b/emacs index 6a19bb8..166ec86 100644 --- a/emacs +++ b/emacs @@ -5,44 +5,65 @@ (add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) (setq package-enable-at-startup nil) -(setq sml/theme 'dark) +(setq sml/theme 'light) (package-initialize) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. + '(custom-enabled-themes (quote (smart-mode-line-dark))) '(custom-safe-themes (quote - ("3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" default))) + ("4aee8551b53a43a883cb0b7f3255d6859d766b6c5e14bcb01bed572fcbef4328" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" default))) '(package-selected-packages (quote - (color-theme-solarized neotree smart-mode-line powerline magit use-package helm evil-visual-mark-mode)))) + (color-theme-sanityinc-solarized projectile virtualenvwrapper jedi color-theme-solarized neotree smart-mode-line powerline magit use-package helm evil-visual-mark-mode)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) + +;; Git interface +(use-package magit) + +;; VIM IN EMACS (use-package evil :ensure t :config (evil-mode 1) ;; More configuration goes here ) -(use-package magit) +; Solariazed Configurations (load-theme 'solarized t) +(set-terminal-parameter nil 'background-mode 'dark) +(add-hook 'after-make-frame-functions + (lambda (frame) + (let ((mode (if (display-graphic-p frame) 'light 'dark))) + (set-frame-parameter frame 'background-mode mode) + (set-terminal-parameter frame 'background-mode mode)) + (enable-theme 'solarized))) + +; Mode Line configurations to make powerliner better (use-package smart-mode-line :ensure t :config (sml/setup) -) + +;; Powerline (use-package powerline :ensure t :config (powerline-center-evil-theme) ) +;; Set Powerline Configuration +(setq powerline-arrow-shape 'curve) +(setq powerline-default-separator-dir '(right . left)) +) + ; https://www.emacswiki.org/emacs/NeoTree (use-package neotree :ensure t @@ -50,20 +71,28 @@ (global-set-key [f8] 'neotree-toggle) (setq neo-smart-open t) ) -;; Set Powerline Configuration -(setq powerline-arrow-shape 'curve) -(setq powerline-default-separator-dir '(right . left)) - -;; rebind neotree in evil-mode (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-enter) (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) -(set-terminal-parameter nil 'background-mode 'dark) -(add-hook 'after-make-frame-functions - (lambda (frame) - (let ((mode (if (display-graphic-p frame) 'light 'dark))) - (set-frame-parameter frame 'background-mode mode) - (set-terminal-parameter frame 'background-mode mode)) - (enable-theme 'solarized))) \ No newline at end of file +;; Jedi - Python autocomplete +(add-hook 'python-mode-hook 'jedi:setup) +(setq jedi:complete-on-dot t) +(add-hook 'python-mode-hook 'jedi:setup) + +;; Virtualenv stuff +;; https://github.com/porterjamesj/virtualenvwrapper.el +(require 'virtualenvwrapper) +(venv-initialize-interactive-shells) ;; if you want interactive shell support +(venv-initialize-eshell) ;; if you want eshell support + +;; Projectile and Virtualenv +(setq projectile-switch-project-action 'venv-projectile-auto-workon) +(setq venv-dirlookup-names '(".venv" "pyenv" ".virtual")) + +;; keybindings +;; Magit! +(global-set-key (kbd "C-x g") 'magit-status) +;; buffer list +(global-set-key (kbd "C-x C-l") 'list-buffers) diff --git a/vimrc b/vimrc index 615c9f5..727027e 100644 --- a/vimrc +++ b/vimrc @@ -114,6 +114,10 @@ nmap bb :CtrlPBuffer nmap bm :CtrlPMixed nmap bs :CtrlPMRU +" Tagbar +nmap :TagbarToggle +nmap :CtrlPTag + " To open a new empty buffer " This replaces :tabnew which I used to bind to this mapping @@ -143,3 +147,7 @@ let vim_markdown_preview_browser='Google Chrome' if filereadable($HOME . "/.vimrc.local") source ~/.vimrc.local endif + +" Set the ctags file name +set tags=./tags; +let g:tagbar_ctags_bin='/usr/local/bin/ctags' diff --git a/zpreztorc b/zpreztorc index 3d29533..58686ff 100644 --- a/zpreztorc +++ b/zpreztorc @@ -9,7 +9,6 @@ zstyle ':prezto:load' pmodule \ 'completion' \ 'tmux' \ 'git' \ - 'python' \ 'prompt' zstyle ':prezto:module:autosuggestions:color' found ''