From 35c75c52ccf7cb17f44f948238f7f1037fead645 Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Thu, 3 Aug 2017 15:12:26 -0700 Subject: [PATCH] Add ctags support --- home/.ctags | 6 ++++++ home/.vimrc | 26 ++++++++++++++++---------- install.sh | 1 + 3 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 home/.ctags diff --git a/home/.ctags b/home/.ctags new file mode 100644 index 0000000..682d78a --- /dev/null +++ b/home/.ctags @@ -0,0 +1,6 @@ +--langdef=CoffeeScript +--langmap=CoffeeScript:.coffee +--regex-CoffeeScript=/(^|=[ \t])*class ([A-Za-z.]+)( extends [A-Za-z.]+)?$/\2/c,class/ +--regex-CoffeeScript=/^[ \t]*@?([A-Za-z.]+):.*[-=]>.*$/\1/f,function/ +--regex-CoffeeScript=/^[ \t]*([A-Za-z.]+)[ \t]+=.*[-=]>.*$/\1/f,function/ +--regex-CoffeeScript=/^[ \t]*([A-Za-z.]+)[ \t]+=[^-=>\n]*$/\1/v,variable/ diff --git a/home/.vimrc b/home/.vimrc index 5b7eadf..40515a9 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -73,7 +73,7 @@ autocmd BufWritePre * %s/\s\+$//e " ctrlpvim/ctrlp.vim let g:ctrlp_working_path_mode = 0 -let g:ctrlp_regexp = 1 +let g:ctrlp_regexp = 0 if executable('ag') let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' let g:ctrlp_use_caching = 0 @@ -93,18 +93,24 @@ let g:indent_guides_enable_on_vim_startup = 0 " :IndentGuidesToggle " Key Mappings ######################################################################################################### -map :NERDTreeToggle -map :NERDTreeFind -map :'a,.!sort -map :IndentGuidesToggle -map :e -map :set hlsearch! -map :cp -map :copen -map :cn +map :NERDTreeToggle +map :NERDTreeFind +map :'a,.!sort +map :IndentGuidesToggle +map :e +map :set hlsearch! +map :cp +map :copen +map :cn +map :tselect +map :!ctags -R src test " Local Overrides ###################################################################################################### if !empty(glob("$HOME/.vimrc.local")) source $HOME/.vimrc.local endif + +" File-Type Specific Settings ########################################################################################## + +autocmd BufRead COMMIT_EDITMSG set textwidth=70 colorcolumn=70 diff --git a/install.sh b/install.sh index 00cedae..fce12ed 100755 --- a/install.sh +++ b/install.sh @@ -26,6 +26,7 @@ brew update echo; echo; echo "Installing standard brew packages..." brew install ag +brew install ctags brew install fswatch brew install macvim brew install node