Skip to content

Commit

Permalink
Merging Mac Modifications into Master
Browse files Browse the repository at this point in the history
  • Loading branch information
MacGyverQue committed Feb 6, 2012
2 parents 0e892e3 + a04fb7c commit da4c184
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -58,3 +58,6 @@
[submodule "_vim/bundle/doxygen"]
path = _vim/bundle/doxygen
url = https://github.com/vim-scripts/DoxygenToolkit.vim.git
[submodule "_vim/bundle/taglist"]
path = _vim/bundle/taglist
url = https://github.com/vim-scripts/taglist.vim.git
2 changes: 2 additions & 0 deletions _gitconfig
Expand Up @@ -29,3 +29,5 @@
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = ls-files

[merge]
tool = vimdiff
5 changes: 5 additions & 0 deletions _gitignore_global
Expand Up @@ -9,6 +9,9 @@
*.pyc
*.swp

# Tags
tags

# Packages #
############
# it's better to unpack these files and commit the raw source
Expand All @@ -34,3 +37,5 @@
ehthumbs.db
Icon?
Thumbs.db
*.files
*.out
14 changes: 14 additions & 0 deletions _scripts/cscope_gen.sh
@@ -0,0 +1,14 @@
#!/bin/sh
find . -name '*.py' \
-o -name '*.java' \
-o -iname '*.[CH]' \
-o -name '*.cpp' \
-o -name '*.cc' \
-o -name '*.hpp' \
-o -name '*.c' \
-o -name '*.h' \
> cscope.files

# -b: just build
# -q: create inverted index
cscope -b -q
1 change: 1 addition & 0 deletions _vim/bundle/taglist
Submodule taglist added at 53041f
57 changes: 33 additions & 24 deletions _vimrc
Expand Up @@ -111,7 +111,7 @@ map <c-h> <c-w>h
imap <C-W> <C-O><C-W>
" Open NerdTree
map <leader>n :NERDTree<CR>
map <leader>n :NERDTreeToggle<CR>
" Run command-t file search
map <leader>f :CommandT<CR>
Expand All @@ -126,6 +126,11 @@ map <leader>j :RopeGotoDefinition<CR>
" Rename whatever the cursor is on (including references to it)
map <leader>r :RopeRename<CR>
" Toggle TaskList
map <leader>t :TlistToggle<CR>

" ==========================================================
" Pathogen - Allows us to organize our vim plugins
" ==========================================================
Expand Down Expand Up @@ -193,6 +198,8 @@ set shiftround " rounds indent to a multiple of shiftwidth
set matchpairs+=<:> " show matching <> (html mainly) as well
set foldmethod=indent " allow us to fold on indents
set foldlevel=99 " don't fold by default
set foldnestmax=10 "deepest fold is 10 levels
set nofoldenable "dont fold by default

" don't outdent hashes
inoremap # #
Expand Down Expand Up @@ -261,10 +268,14 @@ inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" Allow sudo writing of files
cmap w!! w !sudo tee >/dev/null %
nmap <F11> :!find . -iname '*.c' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.hpp' > cscope.files<CR>
\:!cscope -b -i cscope.files -f cscope.out<CR>
\:cs reset<CR>
" ==========================================================
" Doxygen
" ==========================================================
let g:DoxygenToolkit_briefTag_pre="@Synopsis "
let g:DoxygenToolkit_briefTag_pre="@Brief"
let g:DoxygenToolkit_paramTag_pre="@Param "
let g:DoxygenToolkit_returnTag="@Returns "
let g:DoxygenToolkit_blockHeader="--------------------------------------------------------------------------"
Expand Down Expand Up @@ -299,25 +310,23 @@ au BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\
" Don't let pyflakes use the quickfix window
let g:pyflakes_use_quickfix = 0


if has("unix")
let s:uname = system("uname")
if s:uname != "Darwin\n"
" Add the virtualenv's site-packages to vim path
" py << EOF
import os.path
import sys
import vim
if 'VIRTUALENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV']
sys.path.insert(0, project_base_dir)
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
endif
endif
" Load up virtualenv's vimrc if it exists
if filereadable($VIRTUAL_ENV . '/.vimrc')
source $VIRTUAL_ENV/.vimrc
endif

endif
" TODO Add c specific changes including:
" Automatic ctags regeneration on file open or save
" Automatic cscope regeneration on file open or save
" Automatic cscope connections
if has("cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif

"set colorcolumn=79

0 comments on commit da4c184

Please sign in to comment.