From a43c2ccca576ae406e68d9c2f731cd2429ffa406 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Mon, 13 Jan 2014 14:44:43 -0500 Subject: [PATCH] update things --- .emacs.d/init.el | 3 +- .vim/bundle/YouCompleteMe | 2 +- .vim/bundle/lusty | 2 +- .vim/bundle/syntastic | 2 +- .vim/bundle/tagbar | 2 +- .vim/bundle/vim-airline | 2 +- .vim/bundle/vim-fugitive | 2 +- .vim/bundle/vim-gitgutter | 2 +- .vim/bundle/vim-gocode | 2 +- .vim/bundle/vim-unimpaired | 2 +- .vimrc | 6 ++- .ycm_extra_conf.py | 120 --------------------------------------------- 12 files changed, 15 insertions(+), 132 deletions(-) delete mode 100644 .ycm_extra_conf.py diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 597c61e..8f5c1cd 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -31,10 +31,11 @@ (require 'auto-complete-config) (require 'cl) (evil-mode 1) -(eval-after-load 'flymake '(require 'flymake-cursor)) +;(eval-after-load 'flymake '(require 'flymake-cursor)) (require 'tree-mode) (require 'windata) (require 'dirtree) +(require 'flycheck) ;; Hack to get *Messages* in viper-mode. diff --git a/.vim/bundle/YouCompleteMe b/.vim/bundle/YouCompleteMe index b1d71bb..e9b3916 160000 --- a/.vim/bundle/YouCompleteMe +++ b/.vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit b1d71bbb916d591c434eb0c564fabcb6ce7348d8 +Subproject commit e9b391686286489765ebc606afb591fe14e7b7e7 diff --git a/.vim/bundle/lusty b/.vim/bundle/lusty index 131b3d6..14c1e07 160000 --- a/.vim/bundle/lusty +++ b/.vim/bundle/lusty @@ -1 +1 @@ -Subproject commit 131b3d612eca9accd624cf72bccb049a5c90d800 +Subproject commit 14c1e0762e5c19c2675163b422956594cd7eea20 diff --git a/.vim/bundle/syntastic b/.vim/bundle/syntastic index edcb2f2..f23ddae 160000 --- a/.vim/bundle/syntastic +++ b/.vim/bundle/syntastic @@ -1 +1 @@ -Subproject commit edcb2f2baf1ad677cc5b5b2c9e939b915451096d +Subproject commit f23ddae1a7982b40dbfbe55033c1817480f0a0ed diff --git a/.vim/bundle/tagbar b/.vim/bundle/tagbar index 88d7464..ace45ad 160000 --- a/.vim/bundle/tagbar +++ b/.vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit 88d74640793d58e7880feea508ccf3fd71201d65 +Subproject commit ace45adc51d0e08d45761bb515a9ff23906cba65 diff --git a/.vim/bundle/vim-airline b/.vim/bundle/vim-airline index 233e3c6..5f1c245 160000 --- a/.vim/bundle/vim-airline +++ b/.vim/bundle/vim-airline @@ -1 +1 @@ -Subproject commit 233e3c60ce3a357550f0878a91d94e79c3963728 +Subproject commit 5f1c24528c143c80e40016995fc902fb8b74eeee diff --git a/.vim/bundle/vim-fugitive b/.vim/bundle/vim-fugitive index 6b338bd..546a6bf 160000 --- a/.vim/bundle/vim-fugitive +++ b/.vim/bundle/vim-fugitive @@ -1 +1 @@ -Subproject commit 6b338bdbcfc379af06ae1be7efdf533a82600477 +Subproject commit 546a6bf2197529ed1bd402244cbf6e72ed62b2ca diff --git a/.vim/bundle/vim-gitgutter b/.vim/bundle/vim-gitgutter index 702d27a..ae81dcc 160000 --- a/.vim/bundle/vim-gitgutter +++ b/.vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit 702d27a84fb6a4e62d96b56b4141f9af9e506794 +Subproject commit ae81dccb679a423f871809d83c6829442760748a diff --git a/.vim/bundle/vim-gocode b/.vim/bundle/vim-gocode index 684bd9f..05b9cc1 160000 --- a/.vim/bundle/vim-gocode +++ b/.vim/bundle/vim-gocode @@ -1 +1 @@ -Subproject commit 684bd9f405e77dc6489a9c7f70b978a539710950 +Subproject commit 05b9cc1b9e7497eef0add18d5adb034ecfeebec8 diff --git a/.vim/bundle/vim-unimpaired b/.vim/bundle/vim-unimpaired index 3e01087..9a8be36 160000 --- a/.vim/bundle/vim-unimpaired +++ b/.vim/bundle/vim-unimpaired @@ -1 +1 @@ -Subproject commit 3e01087414a72a894e6851aa4f06473ffa4fbf83 +Subproject commit 9a8be3696bc50064b9d9d146041ec4264e36e341 diff --git a/.vimrc b/.vimrc index 4cb2f18..1f22a0f 100644 --- a/.vimrc +++ b/.vimrc @@ -174,7 +174,8 @@ 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_add_preview_to_completeopt = 1 +let g:ycm_autoclose_preview_window_after_completion = 1 " * MinBufExplorer "let g:miniBufExplMapWindowNavVim = 1 @@ -464,9 +465,10 @@ nnoremap hh :A " CommandT is useful, but if I'm juggling lots of buffers, limit it to another " one I have open (instead of standard t). nnoremap o :CtrlPBuffer -nnoremap j +"nnoremap j "nnoremap p :PTW nnoremap p :LustyJugglePrevious +nnoremap jd :YcmCompleter GoToDefinitionElseDeclaration " ** EXTRA INCLUDES ** " diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py deleted file mode 100644 index 33ac6f6..0000000 --- a/.ycm_extra_conf.py +++ /dev/null @@ -1,120 +0,0 @@ -import os -import ycm_core -from clang_helpers import PrepareClangFlags - -# These are the compilation flags that will be used in case there's no -# compilation database set (by default, one is not set). -# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. -flags = [ -'-Wall', -'-Wextra', -'-Werror', -'-Wc++98-compat', -'-Wno-long-long', -'-Wno-variadic-macros', -'-fexceptions', -'-DNDEBUG', -'-DUSE_CLANG_COMPLETER', -# THIS IS IMPORTANT! Without a "-std=" flag, clang won't know which -# language to use when compiling headers. So it will guess. Badly. So C++ -# headers will be compiled as C headers. You don't want that so ALWAYS specify -# a "-std=". -# For a C project, you would set this to something like 'c99' instead of -# 'c++11'. -'-std=c++11', -# ...and the same thing goes for the magic -x option which specifies the -# language that the files to be compiled are written in. This is mostly -# relevant for c++ headers. -# For a C project, you would set this to 'c' instead of 'c++'. -'-x', -'c++', -'-isystem', -'../BoostParts', -'-isystem', -# This path will only work on OS X, but extra paths that don't exist are not -# harmful -'/System/Library/Frameworks/Python.framework/Headers', -'-isystem', -'../llvm/include', -'-isystem', -'../llvm/tools/clang/include', -'-I', -'.', -'-I', -'./ClangCompleter', -'-isystem', -'./tests/gmock/gtest', -'-isystem', -'./tests/gmock/gtest/include', -'-isystem', -'./tests/gmock', -'-isystem', -'./tests/gmock/include' -] - -# Set this to the absolute path to the folder (NOT the file!) containing the -# compile_commands.json file to use that instead of 'flags'. See here for -# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html -# -# Most projects will NOT need to set this to anything; you can just change the -# 'flags' list of compilation flags. Notice that YCM itself uses that approach. -compilation_database_folder = '' - -if compilation_database_folder: - database = ycm_core.CompilationDatabase( compilation_database_folder ) -else: - database = None - - -def DirectoryOfThisScript(): - return os.path.dirname( os.path.abspath( __file__ ) ) - - -def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): - if not working_directory: - return flags - new_flags = [] - make_next_absolute = False - path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] - for flag in flags: - new_flag = flag - - if make_next_absolute: - make_next_absolute = False - if not flag.startswith( '/' ): - new_flag = os.path.join( working_directory, flag ) - - for path_flag in path_flags: - if flag == path_flag: - make_next_absolute = True - break - - if flag.startswith( path_flag ): - path = flag[ len( path_flag ): ] - new_flag = path_flag + os.path.join( working_directory, path ) - break - - if new_flag: - new_flags.append( new_flag ) - return new_flags - - -def FlagsForFile( filename ): - if database: - # Bear in mind that compilation_info.compiler_flags_ does NOT return a - # python list, but a "list-like" StringVec object - compilation_info = database.GetCompilationInfoForFile( filename ) - final_flags = PrepareClangFlags( - MakeRelativePathsInFlagsAbsolute( - compilation_info.compiler_flags_, - compilation_info.compiler_working_dir_ ), - filename ) - - else: - relative_to = DirectoryOfThisScript() - final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) - - return { - 'flags': final_flags, - 'do_cache': True - }