jluebbert (owner)

Revisions

gist: 225554 Download_button fork
public
Public Clone URL: git://gist.github.com/225554.git
Embed All Files: show embed
vimrc #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
set nocompatible
 
" have command-line completion <Tab> (for filenames, help topics, option names)
" first list the available options and complete the longest common part, then
" have further <Tab>s cycle through the possibilities:
set wildmode=list:longest,full
 
" display the current mode and partially-typed commands in the status line:
set showmode
set showcmd
 
" when using list, keep tabs at their full width and display `arrows':
execute 'set listchars+=tab:' . nr2char(187) . nr2char(183)
" (Character 187 is a right double-chevron, and 183 a mid-dot.)
 
" have the mouse enabled all the time:
set mouse=a
 
" don't have files trying to override this .vimrc:
set nomodeline
 
" * Text Formatting -- General
 
" don't make it look like there are line breaks where there aren't:
set nowrap
 
" use indents of 2 spaces, and have them copied down lines:
set shiftwidth=2
set expandtab
" set shiftround
set autoindent
 
" normally don't automatically format `text' as it is typed, IE only do this
" with comments, at 79 characters:
set formatoptions-=t
set textwidth=79
 
" get rid of the default style of C comments, and define a style with two stars
" at the start of `middle' rows which (looks nicer and) avoids asterisks used
" for bullet lists being treated like C comments; then define a bullet list
" style for single stars (like already is for hyphens):
set comments-=s1:/*,mb:*,ex:*/
set comments+=s:/*,mb:**,ex:*/
set comments+=fb:*
 
" treat lines starting with a quote mark as comments (for `Vim' files, such as
" this very one!), and colons as well so that reformatting usenet messages from
" `Tin' users works OK:
set comments+=b:\"
set comments+=n::
 
" * Text Formatting -- Specific File Formats
 
" enable filetype detection:
filetype on
filetype indent on
filetype plugin on
 
" for C-like programming, have automatic indentation:
autocmd FileType c,cpp,slang set cindent
 
" for actual C (not C++) programming where comments have explicit end
" characters, if starting a new line in the middle of a comment automatically
" insert the comment leader characters:
autocmd FileType c set formatoptions+=ro
 
" for Perl programming, have things in braces indenting themselves:
autocmd FileType perl set smartindent
 
" for CSS, also have things in braces indented:
autocmd FileType css set smartindent
 
" for HTML, generally format text, but if a long line has been created leave it
" alone when editing:
autocmd FileType html set formatoptions+=tl
 
" in makefiles, don't expand tabs to spaces, since actual tab characters are
" needed, and have indentation at 8 chars to be sure that all indents are tabs
" (despite the mappings later):
autocmd FileType make set noexpandtab shiftwidth=8
 
" * Search & Replace
 
" make searches case-insensitive, unless they contain upper-case letters:
set ignorecase
set smartcase
 
" show the `best match so far' as search strings are typed:
set incsearch
 
" assume the /g flag on :s substitutions to replace all matches in a line:
set gdefault
 
 
" * Spelling
 
" have % bounce between angled brackets, as well as t'other kinds:
set matchpairs+=<:>
 
" * Keystrokes -- Formatting
" have Q reformat the current paragraph (or selected text if there is any):
nnoremap Q gqap
vnoremap Q gq
 
" have Y behave analogously to D and C rather than to dd and cc (which is
" already done by yy):
noremap Y y$
 
 
set laststatus=2
 
augroup filetype
  autocmd BufNewFile,BufRead *.rhtml set filetype=eruby
  autocmd BufNewFile,BufRead *.erb* set filetype=eruby
  autocmd BufNewFile,BufRead *.rake set filetype=ruby
augroup END
 
syntax on
 
" auto indent
set ai
 
" show line numbers
set nu
 
set ts=2
set tabstop=2
set shiftwidth=2
set binary noeol
set backspace=indent,eol,start
set showmatch
 
 
win 90 60
 
colorscheme molokai
 
set wildmenu
 
filetype plugin on
 
"Remove the toolbar
set guioptions-=T
"better status line
set statusline=%<%f%h%m%r%=%{strftime(\"%I:%M:%S\ \%p,\ %a\ %b\ %d,\ %Y\")}\ \ \|\ \ %{&ff}\ %l,%c%V\ %P\ \
"bigger font so i don't go blind
set guifont=Monaco:h14
"Sets the location of the ctags command for the TagList plugin
let Tlist_Ctags_Cmd = "/usr/local/bin/ctags"
 
"Taglist
map \a :TlistToggle<CR>
"autogenerate tags
let generate_tags=1
" Jump to taglist window on open.
let Tlist_GainFocus_On_ToggleOpen = 1
let Tlist_Close_OnSelect=1
" if you are the last window, kill yourself
let Tlist_Exist_OnlyWindow = 1
" sort by order or name
let Tlist_Sort_Type = "order"
" do not show prototypes and not tags in the taglist window.
let Tlist_Display_Prototype = 0
" Remove extra information and blank lines from the taglist window.
let Tlist_Compart_Format = 1
" Show tag scope next to the tag name.
let Tlist_Display_Tag_Scope = 1
let Tlist_WinWidth = 25
" Show only current file
let Tlist_Show_One_File = 1
" function names in status line
let g:ctags_statusline=1
 
"replace all tabs with 4 spaces
map \ft :%s/ / /g<CR>
 
"FuzzyFinder
"Seriously FF, setting up your options sucks
if !exists('g:FuzzyFinderOptions')
    let g:FuzzyFinderOptions = { 'Base':{}, 'Buffer':{}, 'File':{}, 'Dir':{}, 'MruFile':{}, 'MruCmd':{}, 'Bookmark':{}, 'Tag':{}, 'TaggedFile':{}}
    let g:FuzzyFinderOptions.File.excluded_path = '\v\~$|\.o$|\.exe$|\.bak$|\.swp$|((^|[/\\])\.{1,2}[/\\]$)|\.pyo$|\.pyc$|\.svn[/\\]$'
    let g:FuzzyFinderOptions.Base.key_open_vsplit = '<Space>'
endif
let g:fuzzy_matching_limit = 60
let g:fuzzy_ceiling = 50000
let g:fuzzy_ignore = "*.log;*.git;*.pyc;*.svn;"
 
map <silent> \f :FuzzyFinderTextMate<CR>
map <silent> \F :FuzzyFinderTextMateRefreshFiles<CR>:FuzzyFinderTextMate<CR>
map <silent> \b :FuzzyFinderBuffer!<CR>
 
"NERDTree
map <silent> \e :NERDTreeToggle<CR>
let NERDTreeWinPos='right'
let NERDTreeChDirMode='2'
let NERDTreeIgnore=['\.vim$', '\~$', '\.pyo$', '\.pyc$', '\.svn[\//]$', '\.swp$', '\.git[\//]$']
 
 
set et
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
 
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete