diff --git a/.gvimrc b/.gvimrc index c4cc2db..e96839a 100644 --- a/.gvimrc +++ b/.gvimrc @@ -1,5 +1,5 @@ winsize 115 45 -set expandtab +"set expandtab set guifont=DejaVu\ Sans\ Mono:h14.00 "call AppleTSetPath("~/work/client") diff --git a/.vim/plugin/cscopemenu.vim b/.vim/plugin/cscopemenu.vim new file mode 100644 index 0000000..ebb3e26 --- /dev/null +++ b/.vim/plugin/cscopemenu.vim @@ -0,0 +1,24 @@ +" Add_Cscope_Menu +" Adds a cscope menu +" All the commands work on the word that is under the cursor +function! s:Add_CScope_Menu(menu_clear) + if has("gui_running") + if (a:menu_clear) + + silent! unmenu &Cscope + silent! unmenu! &Cscope + amenu &Cscope.Find\ functions\ calling\ this\ function :cs find c =expand("") + amenu &Cscope.Find\ functions\ called\ by\ this\ function :cs find d =expand("") + amenu &Cscope.Find\ this\ egrep\ pattern :cs find e =expand("") + amenu &Cscope.Find\ this\ file :cs find f =expand("") + amenu &Cscope.Find\ this\ definition :cs find g =expand("") + amenu &Cscope.Find\ files\ #including\ this\ file :cs find i =expand("") + amenu &Cscope.Find\ this\ Symbol :cs find s =expand("") + amenu &Cscope.Find\ assignments\ to :cs find t =expand("") + endif + endif + +endfunction + + +autocmd BufEnter * call s:Add_CScope_Menu(1) diff --git a/.vim/plugin/vim-scmdiff/NEWS b/.vim/plugin/vim-scmdiff/NEWS new file mode 100644 index 0000000..c8b2899 --- /dev/null +++ b/.vim/plugin/vim-scmdiff/NEWS @@ -0,0 +1,24 @@ +2008-09-20 +* Changed the default diff key from C-d to d (default would be \d) + +2008-09-03 +* Add Enabled/Disabled messages when scmdiff is toggled +* Fix highlighting on error messages so subsequent messages aren't highlighted + +2008-08-25 +* Move Highlight colors out of code so they can be customized by user in .vimrc + +2008-08-18 +* Initial support for mercurial auto-detection + +2008-08-17 +* fix bug: Look for SCM directories based on path of file in current buffer, not on getcwd() + +2008-08-15 +* Add auto-detection of svn, git, and cvs SCMs + +2008-08-10 + +* Make C-d a toggle to turn the diff on/off +* Avoid deleting unrelated buffers when turning diff off +* Autorefresh now works properly diff --git a/.vim/plugin/vim-scmdiff/README b/.vim/plugin/vim-scmdiff/README new file mode 100644 index 0000000..fa757e3 --- /dev/null +++ b/.vim/plugin/vim-scmdiff/README @@ -0,0 +1,22 @@ + +vim-scmdiff: A Vim script to show the differences from a base version in SCM. + +Supported SCMs: + * CVS + * SVN + * GIT + * Mercurial + * Bitkeeper + +Installation: + copy the scmdiff.vim script to your vim plugin path ie: "~/.vim/plugins". (system paths may vary) + +Default commands: + \d Toggle diff view on/off + :D rev Difference between current and rev + +This script is an evolution from the scripts posted at the following places: + http://tekrat.com/2008/02/21/vim-diff/ + http://www.vim.org/scripts/script.php?script_id=2201 + http://playground.audioscrobbler.com/jonty/scmdiff.vim + diff --git a/.vim/plugin/vim-scmdiff/TODO b/.vim/plugin/vim-scmdiff/TODO new file mode 100644 index 0000000..e0c4fb5 --- /dev/null +++ b/.vim/plugin/vim-scmdiff/TODO @@ -0,0 +1,11 @@ +Bugs + +* After exiting (:q) a buffer that has diff enabled, subsequent diffs appear to fail. +* Should restore options like 'wrap' to their original state when turning diff off +* winsaveview() and winrestview() require Vim 7.x. Autodetect and degrade gracefully. + +Features + +* Option to show side-by-side diff (ie. don't hide original buffer) +* Make it easier to customize colors and commands +* Add a refresh or enable an auto-update feature so diff highlighting changes as changes are made. diff --git a/.vim/plugin/vim-scmdiff/scmdiff.vim b/.vim/plugin/vim-scmdiff/scmdiff.vim new file mode 100644 index 0000000..ade4388 --- /dev/null +++ b/.vim/plugin/vim-scmdiff/scmdiff.vim @@ -0,0 +1,160 @@ +" Vim script to show file differences from a base version in SCM. +" Home: http://github.com/ghewgill/vim-scmdiff + +" Default commands: +" \d Toggle diff view on/off +" :D rev Difference between current and rev +" +" You can change the highlighting by adding the following to your +" .vimrc file and customizing as necessary. (or just uncomment them here): +" highlight DiffAdd ctermbg=DarkBlue ctermfg=white cterm=NONE +" highlight DiffChange ctermbg=DarkBlue ctermfg=white cterm=NONE +" highlight DiffText ctermbg=DarkBlue ctermfg=white cterm=underline +" highlight DiffDelete ctermbg=red ctermfg=white + +if exists("loadedScmDiff") || &cp + finish +endif + +let loadedScmDiff = 1 + +map d :call scmToggle() +noremap