From 8c1b5ffa418bc07a6bb1e310fcbf785e01deadd1 Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Tue, 25 Aug 2015 23:16:01 +0200 Subject: [PATCH] Setup ctags global config --- ctags | 11 +++++++++++ install.sh | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 ctags diff --git a/ctags b/ctags new file mode 100644 index 0000000..8e23ce2 --- /dev/null +++ b/ctags @@ -0,0 +1,11 @@ +# Basic options +--recurse=yes +--tag-relative=yes +--exclude=.git + +# Go +--langdef=Go +--langmap=Go:.go +--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/f,func/ +--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/v,var/ +--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/t,type/ diff --git a/install.sh b/install.sh index 106352d..d1d45c7 100755 --- a/install.sh +++ b/install.sh @@ -8,6 +8,7 @@ vimfiles=$dotfiles/vimfiles tmux_conf=$dotfiles/tmux.conf gitignore=$dotfiles/gitignore bin=$dotfiles/bin +ctags=$dotfiles/ctags [[ ! -e $HOME/.bash_profile ]] && ln -s $bash_profile $HOME/.bash_profile \ || echo ".bash_profile already exists..." @@ -33,4 +34,7 @@ bin=$dotfiles/bin [[ ! -e $HOME/.gitconfig ]] && ruby -rerb -e "File.open('../.gitconfig', 'w') { |file| file.write(ERB.new(File.read('gitconfig.erb')).result) }" \ || echo "gitconfig already exists..." +[[ ! -e $HOME/ctags ]] && ln -s $ctags $HOME/.ctags \ + || echo "ctags already exists..." + echo "Done"