2 let digsby='c:\dev\digsby\'
3 let pydir=digsby.'build\msw\python\'
4 let g:fuzzy_roots=[digsby.'src', digsby.'ext\src', digsby.'build\msw\wxWidgets\src', digsby.'build\msw\wxWidgets\include', pydir.'include', pydir.'Modules', pydir.'Objects', pydir.'Lib', digsby.'build\msw\sip', digsby.'build\msw\wxpy\src']
5 let g:fuzzy_ignore='*.pyc;*.pyo;.svn;*.suo;*.vcproj;*.o;*.obj;.git'
6 let g:fuzzy_match_limit=75 " default 200
7 let g:fuzzy_roots = ['~/src/digsby/src']
9 function! SetFuzzyOptions()
10 if exists("g:FuzzyFinderOptions") && exists("g:FuzzyFinderOptions.TextMate")
11 let g:FuzzyFinderOptions.TextMate.matching_limit = 50
15 au VimEnter * call SetFuzzyOptions()
17 command CdFile :cd %:h " change directories to the current file's directory
19 " hides file types in directory listings
20 let g:netrw_list_hide='^\.svn/$,^\.settings/$,.*\.pyo$,.*\.pyc,.*\.obj'
22 " Launches web browser with the given URL.
23 function! LaunchBrowser(url)
24 let startcmd = has("win32") || has("win64") ? "! start " : "! "
25 let endcmd = has("unix") ? "&" : ""
27 " Escape characters that have special meaning in the :! command.
28 " let url = substitute(a:url, '!\|#\|%', '\\&', 'g')
30 silent! execute startcmd url endcmd
35 command! CdSrc :cd c:\dev\digsby\src
36 command! CdExt :cd c:\dev\digsby\ext
37 command! CdWxpy :cd c:\dev\digsby\build\msw\wxpy
38 command! CdWebKit :cd c:\dev\digsby\build\msw\webkit
39 command! CdWx :cd c:\dev\digsby\build\msw\wxWidgets
40 command! CdSip :cd c:\dev\digsby\build\msw\sip
41 command! CdPython :cd c:\dev\digsby\build\msw\python
43 " digsby website shortcuts
44 command! -nargs=1 Bug :call LaunchBrowser("http://mini/bugs/?act=view&id=<args>")
45 command! -nargs=1 Ticket :call LaunchBrowser("http://mini/cgi-bin/ticket/<args>")
46 command! -nargs=1 Revision :call LaunchBrowser("http://mini/cgi-bin/changeset/<args>")
50 map \t :FuzzyFinderTextMate<CR>
52 command! Todo :sp ~/Desktop/TODO.txt
54 " highlight SIP files like C++
55 au BufNewFile,BufRead *.sip set filetype=cpp
57 " automatically jump to the last position in a file
58 " au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
60 " let VCSCommandGitExec = "c:\\program files\\git\\bin\\git.exe"
62 set nowrap " no wordwrap
64 " don't write any temporary files
73 map ,v :sp ~/vimfiles/.vimrc<CR><C-W>_
74 map <silent> ,V :source ~/vimfiles/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
76 " ,d deletes a line but leaves a blank
79 " ,b goes back to previous file
83 autocmd BufEnter * :syntax sync fromstart
85 " don't bother with vi compatibility
89 " make the default window size a bit bigger
93 set gfn=Monaco:h15:a,Consolas:h10:cANSI
95 set guioptions-=m "remove the menu bar
96 set guioptions-=T "remove the tool bar
99 set showmatch "show matching brackets
100 set ignorecase "case insensitive matching
101 set textwidth=0 "don't wrap text
102 set scrolloff=5 "keep context while scrolling
104 let python_highlight_all = 1
106 set autowrite " automatically save files when changing buffers
108 set wildignore+=*.o,*.obj,*.pyc,*.pyo " ignore filetypes for auto complete
113 set nohls " turn off search highlighting (set hls will bring it back)
117 " enter spaces when tab is pressed:
120 " do not break lines when line length increases
123 " use 4 spaces to represent a tab
127 " Copy indent from current line when starting a new line.
132 " number of space to use for auto indent
133 " you can use >> or << keys to indent current line or selection
137 " automatically strip trailing whitespace from Python files
138 autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
140 " auto indent after "def foo():<CR>"
141 autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,with
145 " makes backspace key more powerful.
146 set backspace=indent,eol,start
148 " shows the match while typing
151 " show line and column number
154 " show some autocomplete options in status bar
157 " share clipboard with windows clipboard
158 set clipboard+=unnamed
160 set showmatch " highlight matching parens
163 iab wxmain import wx<CR><CR>def main():<CR>a = wx.PySimpleApp()<CR>f = wx.Frame(None, -1, 'Test')<CR><CR>f.Show()<CR>a.MainLoop()<CR><CR>
\bif __name__ == '__main__':<CR>main()<ESC>6ko
165 iab pymain if __name__ == '__main__':<CR>main()<ESC>