From 9674c8cca9a61685f3d0dfb4b65a81e7b291522c Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Mon, 20 Jan 2014 19:55:23 -0500 Subject: [PATCH] update all the things --- .emacs.d/Cask | 9 +++++++++ .emacs.d/init.el | 38 ++++++++++++++++++++++++++++++++++++-- .gitmodules | 18 +++++++++++++++--- .vim/after/ftplugin/haskell.vim | 2 ++ .vim/bundle/delimitMate | 1 + .vim/bundle/ghcmod-vim | 1 + .vim/bundle/neco-ghc | 1 + .vim/bundle/snipmate | 1 - .vim/bundle/ultisnips | 1 + .vim/bundle/vim-gocode | 2 +- .vim/bundle/vimproc | 1 + .vim/snippets/cpp.snippets | 39 +++++++++++++++++++++++++++++++++++++++ .vimrc | 11 +++++++++-- 13 files changed, 116 insertions(+), 9 deletions(-) create mode 100644 .vim/after/ftplugin/haskell.vim create mode 160000 .vim/bundle/delimitMate create mode 160000 .vim/bundle/ghcmod-vim create mode 160000 .vim/bundle/neco-ghc delete mode 160000 .vim/bundle/snipmate create mode 160000 .vim/bundle/ultisnips create mode 160000 .vim/bundle/vimproc create mode 100644 .vim/snippets/cpp.snippets diff --git a/.emacs.d/Cask b/.emacs.d/Cask index 793b7cd..f734d1d 100644 --- a/.emacs.d/Cask +++ b/.emacs.d/Cask @@ -4,12 +4,21 @@ (source org) (depends-on "ack-and-a-half") +(depends-on "auto-complete") +(depends-on "auto-complete-clang") +(depends-on "auto-complete-clang-async") (depends-on "cask") +(depends-on "cedit") +(depends-on "company-go") (depends-on "elpy") +(depends-on "epc") (depends-on "evil") (depends-on "exec-path-from-shell") (depends-on "flx-ido") (depends-on "flycheck") +(depends-on "go-autocomplete") +(depends-on "go-mode") +(depends-on "jedi") (depends-on "magit") (depends-on "pallet") (depends-on "projectile") diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 050a91d..b910f6a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -22,9 +22,9 @@ ;; Root directory (setq root-dir (file-name-directory (or (buffer-file-name) load-file-name))) +(setq make-backup-files nil) (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") - ;; Don't show startup screen (let ((background-color "#2F2F2F") (foreground-color "LightGrey") @@ -56,6 +56,11 @@ (evil-mode 1) (setq evil-default-cursor t) +;; Jedi.el +(add-hook 'python-mode-hook 'jedi:setup) +(setq jedi:setup-keys t) ; optional +(setq jedi:complete-on-dot t) ; optional + ;; Git (require 'magit) (eval-after-load 'magit @@ -72,6 +77,24 @@ (require 'projectile) (projectile-global-mode) +; Autocomplete +(require 'auto-complete-config) +(ac-config-default) +(setq ac-dwim t) +(setq ac-expand-on-auto-complete nil) +(setq ac-use-fuzzy t) +(setq ac-auto-start t) +(define-key ac-completing-map (kbd "") 'ac-stop) + +Company-mode autocomplete +(require 'company) ; load company mode +(require 'company-go) ; load company mode go backend +(setq company-tooltip-limit 20) ; bigger popup window +(setq company-minimum-prefix-length 0) ; autocomplete right after '.' +(setq company-idle-delay .3) ; shorter delay before autocompletion popup +(setq company-echo-delay 0) ; removes annoying blinking +(setq company-begin-commands '(self-insert-command)) ; start autocompletion only after typing + ;; Snippets ;; https://github.com/capitaomorte/yasnippet (require 'yasnippet) @@ -81,8 +104,19 @@ ;; Evil Key Defines (define-key evil-normal-state-map "gc" 'kill-buffer-and-window) -(load-theme 'barak) +(load-theme 'barak t) + + + +;; _ +;; | |__ _ _ _ __ _ _ _ __ _ __ _ ___ ___ +;; | / _` | ' \/ _` | || / _` / _` / -_|_-< +;; |_\__,_|_||_\__, |\_,_\__,_\__, \___/__/ +;; |___/ |___/ +(add-hook 'go-mode-hook (lambda () + (set (make-local-variable 'company-backends) '(company-go)) + (company-mode))) diff --git a/.gitmodules b/.gitmodules index ee3d4dd..8f640f9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,9 +31,6 @@ [submodule ".vim/bundle/EasyGrep"] path = .vim/bundle/EasyGrep url = https://github.com/vim-scripts/EasyGrep.git -[submodule ".vim/bundle/snipmate"] - path = .vim/bundle/snipmate - url = git://github.com/msanders/snipmate.vim.git [submodule ".vim/bundle/syntastic"] path = .vim/bundle/syntastic url = https://github.com/scrooloose/syntastic.git @@ -79,3 +76,18 @@ [submodule ".vim/bundle/tagbar"] path = .vim/bundle/tagbar url = git://github.com/majutsushi/tagbar +[submodule ".vim/bundle/delimitMate"] + path = .vim/bundle/delimitMate + url = https://github.com/Raimondi/delimitMate/ +[submodule ".vim/bundle/neco-ghc"] + path = .vim/bundle/neco-ghc + url = http://github.com/eagletmt/neco-ghc +[submodule ".vim/bundle/ghcmod-vim"] + path = .vim/bundle/ghcmod-vim + url = https://github.com/eagletmt/ghcmod-vim +[submodule ".vim/bundle/vimproc"] + path = .vim/bundle/vimproc + url = https://github.com/Shougo/vimproc.vim.git +[submodule ".vim/bundle/ultisnips"] + path = .vim/bundle/ultisnips + url = https://github.com/SirVer/ultisnips diff --git a/.vim/after/ftplugin/haskell.vim b/.vim/after/ftplugin/haskell.vim new file mode 100644 index 0000000..bcf2803 --- /dev/null +++ b/.vim/after/ftplugin/haskell.vim @@ -0,0 +1,2 @@ +setlocal omnifunc=necoghc#omnifunc +let g:ycm_key_invoke_completion = '' diff --git a/.vim/bundle/delimitMate b/.vim/bundle/delimitMate new file mode 160000 index 0000000..35280c1 --- /dev/null +++ b/.vim/bundle/delimitMate @@ -0,0 +1 @@ +Subproject commit 35280c1444bf62d651f56ccaf03ad8db29c02383 diff --git a/.vim/bundle/ghcmod-vim b/.vim/bundle/ghcmod-vim new file mode 160000 index 0000000..788b193 --- /dev/null +++ b/.vim/bundle/ghcmod-vim @@ -0,0 +1 @@ +Subproject commit 788b193dbeb1bebe303b0d0c6b17c09fdd1ebabb diff --git a/.vim/bundle/neco-ghc b/.vim/bundle/neco-ghc new file mode 160000 index 0000000..41c7160 --- /dev/null +++ b/.vim/bundle/neco-ghc @@ -0,0 +1 @@ +Subproject commit 41c7160ee129209b758c5a9f0fc196ffeeb866f9 diff --git a/.vim/bundle/snipmate b/.vim/bundle/snipmate deleted file mode 160000 index f5a75d0..0000000 --- a/.vim/bundle/snipmate +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f5a75d075d3c005ebe69e3f5e56cf99516e8aa3b diff --git a/.vim/bundle/ultisnips b/.vim/bundle/ultisnips new file mode 160000 index 0000000..ae611cc --- /dev/null +++ b/.vim/bundle/ultisnips @@ -0,0 +1 @@ +Subproject commit ae611ccf950a93f93cab64542cbe48029f1e9c02 diff --git a/.vim/bundle/vim-gocode b/.vim/bundle/vim-gocode index c1bab3c..05b9cc1 160000 --- a/.vim/bundle/vim-gocode +++ b/.vim/bundle/vim-gocode @@ -1 +1 @@ -Subproject commit c1bab3c1c12854eee1e8e3d47e0636909364bd59 +Subproject commit 05b9cc1b9e7497eef0add18d5adb034ecfeebec8 diff --git a/.vim/bundle/vimproc b/.vim/bundle/vimproc new file mode 160000 index 0000000..11bd685 --- /dev/null +++ b/.vim/bundle/vimproc @@ -0,0 +1 @@ +Subproject commit 11bd6853b25f73f3729cccbb9282fecade2bf50a diff --git a/.vim/snippets/cpp.snippets b/.vim/snippets/cpp.snippets new file mode 100644 index 0000000..9967b87 --- /dev/null +++ b/.vim/snippets/cpp.snippets @@ -0,0 +1,39 @@ +extends c + +########################################################################### +# TextMate Snippets # +########################################################################### +snippet beginend "$1.begin(), $1.end() (beginend)" +${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}begin(), $1${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}end() +endsnippet + +snippet cl "class .. (class)" ! +class ${1:`!p snip.rv = snip.basename or "name"`} { + public: + ${1/(\w+).*/$1/}(${2:arguments}); + virtual ~${1/(\w+).*/$1/}(); + + private: + ${0:/* data */} +}; +endsnippet + +snippet ns "namespace .. (namespace)" ! +namespace${1/.+/ /m}${1:`!p snip.rv = snip.basename or "name"`} { + ${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}} +} // namespace $1 +endsnippet + +snippet map "std::map (map)" +std::map<${1:key}, ${2:value}> map$0; +endsnippet + +snippet vector "std::vector (v)" +std::vector<${1:char}> v$0; +endsnippet + +snippet tp "template (template)" +template +endsnippet + +# vim:ft=snippets: diff --git a/.vimrc b/.vimrc index 1f22a0f..512b07e 100644 --- a/.vimrc +++ b/.vimrc @@ -174,8 +174,14 @@ let g:ConqueTerm_SendVisKey = 'ss' " * YouCompleteMe let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py' let g:ycm_confirm_extra_conf = 0 -let g:ycm_add_preview_to_completeopt = 1 -let g:ycm_autoclose_preview_window_after_completion = 1 +"let g:ycm_add_preview_to_completeopt = 1 +"let g:ycm_autoclose_preview_window_after_completion = 1 + +" * UltiSnips +let g:UltiSnipsSnippetDirectories=["UltiSnips", "snippets"] +let g:UltiSnipsExpandTrigger="," +let g:UltiSnipsJumpForwardTrigger="," +let g:UltiSnipsJumpBackwardTrigger="" " * MinBufExplorer "let g:miniBufExplMapWindowNavVim = 1 @@ -469,6 +475,7 @@ nnoremap o :CtrlPBuffer "nnoremap p :PTW nnoremap p :LustyJugglePrevious nnoremap jd :YcmCompleter GoToDefinitionElseDeclaration +nnoremap ii :GhcModInfo! " ** EXTRA INCLUDES ** "