summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbluezery <ohpowel@gmail.com>2015-01-12 17:22:33 +0900
committerbluezery <ohpowel@gmail.com>2015-01-12 17:22:33 +0900
commit8bb4c8e43c34c2e38072f359cfdd860c476fff56 (patch)
treef7216560132039c9b1ab7c45370cde695e122223
parent855538e2e5d4d67355c791ee0a365676528b823f (diff)
-rw-r--r--.vimrc13
-rwxr-xr-xctags.sh48
2 files changed, 26 insertions, 35 deletions
diff --git a/.vimrc b/.vimrc
index 5229612..ebe65fc 100644
--- a/.vimrc
+++ b/.vimrc
@@ -17,7 +17,7 @@ set nocompatible " not compatible with original vi
17set incsearch 17set incsearch
18set hlsearch 18set hlsearch
19set number 19set number
20set noexpandtab 20set expandtab
21set title 21set title
22set showmatch 22set showmatch
23set showmode 23set showmode
@@ -58,7 +58,7 @@ aug developer
58 au BufRead *.c,*.cpp,*.h match ExtraOver /\s\+\%#\@<!$\|\%81v.*/ 58 au BufRead *.c,*.cpp,*.h match ExtraOver /\s\+\%#\@<!$\|\%81v.*/
59 59
60 " Remove extra white space before save 60 " Remove extra white space before save
61 "au bufwritepre *.c,*.cpp,*.h,*.edc :%s/\s\+$\| \+\ze\t//e 61 au bufwritepre *.c,*.cpp,*.h,*.edc :%s/\s\+$\| \+\ze\t//e
62 map <S-F9> :%s/\s\+$\| \+\ze\t//e 62 map <S-F9> :%s/\s\+$\| \+\ze\t//e
63 63
64 "indent for e17 ref: http://trac.enlightenment.org/e/wiki/ecoding 64 "indent for e17 ref: http://trac.enlightenment.org/e/wiki/ecoding
@@ -107,10 +107,13 @@ aug developer
107 au filetype c,cpp,h,edc set csto=0 107 au filetype c,cpp,h,edc set csto=0
108 au filetype c,cpp,h,edc set cst 108 au filetype c,cpp,h,edc set cst
109 au filetype c,cpp,h,edc set csverb 109 au filetype c,cpp,h,edc set csverb
110 if filereadable("/home/bluezery/.vim/tags/cscope.out") 110
111 au filetype c,cpp,h,edc cs kill -1 111 " Disable cscope temporarily )conflict with ctags
112 "if filereadable("/home/bluezery/.vim/tags/cscope.out")
113 "au filetype c,cpp,h,edc cs kill -1
112 "au filetype c,cpp,h,edc cs add /home/bluezery/.vim/tags/cscope.out 114 "au filetype c,cpp,h,edc cs add /home/bluezery/.vim/tags/cscope.out
113 endif 115 "endif
116 "
114 au filetype c,cpp,h,edc map <F6> :!cscope<CR> 117 au filetype c,cpp,h,edc map <F6> :!cscope<CR>
115 au filetype c,cpp,h,edc map <C-F6> :exec("cs find g ".expand("<cword>")) <CR> 118 au filetype c,cpp,h,edc map <C-F6> :exec("cs find g ".expand("<cword>")) <CR>
116 au filetype c,cpp,h,edc map <C-\> :exec("cs find c ".expand("<cword>"))<CR> 119 au filetype c,cpp,h,edc map <C-\> :exec("cs find c ".expand("<cword>"))<CR>
diff --git a/ctags.sh b/ctags.sh
index ebe2a5a..b4a1cea 100755
--- a/ctags.sh
+++ b/ctags.sh
@@ -1,4 +1,10 @@
1#/bin/bash 1#/bin/bash
2
3PREFIX=$HOME/work
4DIR="$PREFIX/EFL/efl $PREFIX/EFL/elementary $PREFIX/cairo $PREFIX/pixman $PREFIX/harfbuzz $PREFIX/wayland $PREFIX/freetype2"
5TAGDIR=$HOME/.vim/tags
6
7
2if [[ ! -d $HOME/.vim ]]; then 8if [[ ! -d $HOME/.vim ]]; then
3 echo "vim is not installed yet" 9 echo "vim is not installed yet"
4 exit 10 exit
@@ -17,46 +23,28 @@ if [[ -z "$TEST" ]]; then
17fi 23fi
18 24
19############ Create ctags & cscope 25############ Create ctags & cscope
20DIR="$HOME/work/opensrc/efl $HOME/work/opensrc/elementary" 26### Remove old tags
21TAGDIR=$HOME/.vim/tags
22
23if [[ ! -d $TAGDIR ]]; then 27if [[ ! -d $TAGDIR ]]; then
24 mkdir -p $TAGDIR 28 mkdir -p $TAGDIR
25fi 29fi
26 30
27pushd $TAGDIR 31pushd $TAGDIR
28#### Upstream 32#### Upstream
29IGNORE="EINA_ARG_NONNULL" 33IGNORE="-I EINA_ARG_NONNULL -I FT_EXPORT_DEF"
30echo "Creating ctags for upstream EFL... $DIR"
31rm -rf $TAGDIR/tags && ctags --c-kinds=+p --sort=foldcase --langmap=c:.c.x.s.S.edc -I $IGNORE $TAGDIR -R $DIR
32
33echo "Creating cscope for upstream EFL... $DIR"
34rm -rf cscope.files && \
35 find $DIR -name '*.c' -o -name '*.cpp' -o -name '*.h' -o -name '*.h.in' -o -name '*.s' -o -name '*.x' -o -name '*.edc' > $TAGDIR/cscope.files && \
36 cscope -b -q -k$HOME/work/tizen/MOBILE/EFL
37cd -
38popd
39 34
40#### Downstream 35echo "Creating ctags for... $DIR"
41TAGDIR="$HOME/work/tizen/MOBILE/EFL" 36ctags --c-kinds=+p --sort=foldcase --langmap=c:.c.x.s.S.edc $IGNORE $TAGDIR -R $DIR
42DIR="$TAGDIR/eina $TAGDIR/eet $TAGDIR/embryo $TAGDIR/ecore $TAGDIR/evas $TAGDIR/edje $TAGDIR/elementary"
43if [[ ! -d $TAGDIR ]]; then
44 echo "$TAGDIR does not exist"
45 exit
46fi
47 37
48pushd $TAGDIR 38for i in $DIR
49IGNORE="EINA_ARG_NONNULL" 39do
50echo "Creating ctags for downstream... $DIR" 40 echo "Creating cscope for... $i"
51rm -rf $TAGDIR/tags && ctags --c-kinds=+p --sort=foldcase --langmap=c:.c.x.s.S.edc -I $IGNORE $PREF -R $DIR 41 find $i -name '*.c' -o -name '*.cpp' -o -name '*.h' -o -name '*.h.in' -o -name '*.s' -o -name '*.x' -o -name '*.edc' > $TAGDIR/cscope.files && \
52
53echo "Creating cscope for mobile... $DIR"
54rm -rf cscope.files && \
55 find $DIR -name '*.c' -o -name '*.cpp' -o -name '*.h' -o -name '*.h.in' -o -name '*.s' -o -name '*.x' -o -name '*.edc' > $TAGDIR/cscope.files && \
56 cscope -b -q -k 42 cscope -b -q -k
43done
57popd 44popd
58 45
59# Create gtags 46
47# Create gtags, disabled temporarily
60#echo "Creating gtags... $PREF" 48#echo "Creating gtags... $PREF"
61#pushd $PREF && gtags 49#pushd $PREF && gtags
62#popd \ No newline at end of file 50#popd