1 let g:fuzzy_roots = ['~/src/digsby/src']
3 function! SetFuzzyOptions()
4 if exists("g:FuzzyFinderOptions") && exists("g:FuzzyFinderOptions.TextMate")
5 let g:FuzzyFinderOptions.TextMate.matching_limit = 50
9 au VimEnter * call SetFuzzyOptions()
11 command CdFile :cd %:h " change directories to the current file's directory
13 " hides file types in directory listings
14 let g:netrw_list_hide='^\.svn/$,^\.settings/$,.*\.pyo$,.*\.pyc,.*\.obj'
16 " Launches web browser with the given URL.
17 function! LaunchBrowser(url)
18 let startcmd = has("win32") || has("win64") ? "! start " : "! "
19 let endcmd = has("unix") ? "&" : ""
21 " Escape characters that have special meaning in the :! command.
22 " let url = substitute(a:url, '!\|#\|%', '\\&', 'g')
24 silent! execute startcmd url endcmd
29 command! CdSrc :cd c:\dev\digsby\src
30 command! CdExt :cd c:\dev\digsby\ext
31 command! CdWxpy :cd c:\dev\digsby\build\msw\wxpy
32 command! CdWebKit :cd c:\dev\digsby\build\msw\webkit
33 command! CdWx :cd c:\dev\digsby\build\msw\wxWidgets
34 command! CdSip :cd c:\dev\digsby\build\msw\sip
35 command! CdPython :cd c:\dev\digsby\build\msw\python
37 " digsby website shortcuts
38 command! -nargs=1 Bug :call LaunchBrowser("http://mini/bugs/?act=view&id=<args>")
39 command! -nargs=1 Ticket :call LaunchBrowser("http://mini/cgi-bin/ticket/<args>")
40 command! -nargs=1 Revision :call LaunchBrowser("http://mini/cgi-bin/changeset/<args>")
44 map \t :FuzzyFinderTextMate<CR>
46 command! Todo :sp ~/Desktop/TODO.txt
48 command! Pyflakes :call Pyflakes()
50 let tmpfile = tempname()
51 execute "set makeprg=(pyflakes\\ " . % . ")"
56 " highlight SIP files like C++
57 au BufNewFile,BufRead *.sip set filetype=cpp
59 " automatically jump to the last position in a file
60 " au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
62 " let VCSCommandGitExec = "c:\\program files\\git\\bin\\git.exe"
64 set nowrap " no wordwrap
66 " don't write any temporary files
75 map ,v :sp ~/vimfiles/.vimrc<CR><C-W>_
76 map <silent> ,V :source ~/vimfiles/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
78 " ,d deletes a line but leaves a blank
81 " ,b goes back to previous file
85 autocmd BufEnter * :syntax sync fromstart
87 " don't bother with vi compatibility
91 " make the default window size a bit bigger
95 " set gfn=Consolas:h10:cANSI
98 set guioptions-=m "remove the menu bar
99 set guioptions-=T "remove the tool bar
102 set showmatch "show matching brackets
103 set ignorecase "case insensitive matching
104 set textwidth=0 "don't wrap text
105 set scrolloff=5 "keep context while scrolling
107 let python_highlight_all = 1
109 set autowrite " automatically save files when changing buffers
111 " tab and shift-tab flip between buffers
115 set wildignore+=*.o,*.obj,*.pyc,*.pyo " ignore filetypes for auto complete
120 set nohls " turn off search highlighting (set hls will bring it back)
124 " enter spaces when tab is pressed:
127 " do not break lines when line length increases
130 " use 4 spaces to represent a tab
134 " Copy indent from current line when starting a new line.
139 " number of space to use for auto indent
140 " you can use >> or << keys to indent current line or selection
144 " automatically strip trailing whitespace from Python files
145 autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
147 " auto indent after "def foo():<CR>"
148 autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,with
150 " makes backspace key more powerful.
151 set backspace=indent,eol,start
153 " shows the match while typing
156 " show line and column number
159 " show some autocomplete options in status bar
162 " share clipboard with windows clipboard
163 set clipboard+=unnamed
165 set showmatch " highlight matching parens
168 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
170 iab pymain if __name__ == '__main__':<CR>main()<ESC>