Commit a9fffdbe by Hermann Mayer

VimRC: Added advanced PHP CTags support.

parent 94f29132
......@@ -86,6 +86,9 @@ shopt -s histappend
shopt -s extglob
# Auto "cd" when entering just a path
shopt -s autocd
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix)
......
......@@ -72,7 +72,6 @@ hi DiffChange ctermbg=237 guibg=#382a37
"hi User9
"hi WildMenu
" Syntax highlighting
hi Keyword ctermfg=111 cterm=none guifg=#88b8f6 gui=none
hi Statement ctermfg=111 cterm=none guifg=#88b8f6 gui=none
......@@ -87,6 +86,8 @@ hi String ctermfg=113 cterm=none guifg=#95e454 gui=italic
hi Comment ctermfg=246 cterm=none guifg=#9c998e gui=italic
hi Todo ctermfg=101 cterm=none guifg=#857b6f gui=italic
" Tagbar Plugin Coloring
hi! TagbarVisibilityProtected ctermfg=111 cterm=none guifg=#46B7B7 gui=none
" Links
hi! link FoldColumn Folded
......
......@@ -90,6 +90,8 @@ Bundle "garbas/vim-snipmate"
Bundle "tpope/vim-markdown"
" NERDTree with tabs
Bundle 'jistr/vim-nerdtree-tabs'
" Advanced PHP CTags Generator
Bundle 'techlivezheng/tagbar-phpctags'
" Bundles from vim-scripts repos
......@@ -222,26 +224,38 @@ imap <M-Left> <ESC><c-w>h
imap <M-Up> <ESC><c-w>k
imap <M-Down> <ESC><c-w>j
" Alt+arrow Navigation
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
" ReFormat the Document
vmap <Tab> >
vmap <S-Tab> <
" Indent Out
map <F6> >i}<CR>
imap <F6> <ESC>>i}<CR>i
" Indent In
map <F5> <i}<CR>
imap <F5> <ESC><i}<CR>i
" Reformat the buffer
map <F7> mzgg=G`z<CR>
" Align = or => Statements
map <F8> <ESC>:Align =<CR>
imap <F8> <ESC>:Align =<CR>i
map <F9> <ESC>:Align =><CR>
imap <F9> <ESC>:Align =><CR>i
" Check the syntax of the buffer
map <F11> <ESC>:SyntasticCheck<CR>
imap <F11> <ESC>:SyntasticCheck<CR>i
" Move Lines / Selections
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
......@@ -447,7 +461,7 @@ endif
" +-----------------------------------------------
" | PHP Doc
" | PHP - Doc and common Settings
" +-----------------------------------------------
source ~/.vim/php-doc.vim
......@@ -459,6 +473,9 @@ let g:pdv_cfg_Author = "Hermann Mayer <hermann.mayer92@gmail.com>"
let g:pdv_cfg_Copyright = ""
let g:pdv_cfg_License = ""
" Advanced PHP CTag generator binary path
let g:tagbar_phpctags_bin='~/.vim/tools/phpctags/phpctags'
" +-----------------------------------------------
" | Coding References
......@@ -603,10 +620,14 @@ map <C-T> :tabnew<CR>
map <C-N> :!gvim &<CR><CR>
map <C-W> :confirm bdelete<CR>
" Start Tagbar on known filetype and new buffers automatically
autocmd BufEnter * nested if (!&readonly && &buftype != 'nofile' && &buftype != 'help') | :call tagbar#autoopen(0) | endif
" +-----------------------------------------------
" | Startups
" +-----------------------------------------------
let g:nerdtree_tabs_open_on_gui_startup = 1
let g:tagbar_foldlevel = 1
......@@ -19,6 +19,18 @@ Finally you just need to fetch all Vim bundles by opening vim and type the follo
Nice! You made it. Now everything should work!
PHP TagBar
==========
The TagBar for PHP code is quite useless with the common
CTags binary. A alternative is integrated into the VimRC
and here are the steps to install the addon:
cd ~/projects/vim-config/.vim/tools
git clone https://github.com/techlivezheng/phpctags.git && cd phpctags
curl -s http://getcomposer.org/installer | php
php composer.phar install
Fonts
=====
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment