@@ -3,7 +3,7 @@ call pathogen#helptags()
3
3
call pathogen#runtime_append_all_bundles ()
4
4
5
5
set nocompatible " use Vim settings; must be first!
6
- let mapleader = " ," " set mapleader to comma instead of backslash
6
+ let mapleader= " ," " set mapleader to comma instead of backslash
7
7
set backspace = indent ,eol ,start
8
8
set hidden " set dirty buffer as hidden by default
9
9
set history = 10000 " number of lines of history to remember
93
93
" For when you forget to sudo.. Really Write the file.
94
94
cmap w!! w !sudo tee % >/dev/null
95
95
96
- " don't need to use a : for commands, just hit ;
97
- " breaks ability to use ; when searching with f/F :(
98
- " nnoremap ; :
99
-
100
96
" to quickly get the path of current file command mode
101
97
cabbr <expr> %% expand (' %:p:h' )
102
98
@@ -144,12 +140,6 @@ map <leader>yr :YRShow<CR>
144
140
" snipMate setup
145
141
let g: snips_author = ' Matt McKeon'
146
142
147
- " setup Gist.vim
148
- let g: gist_detect_filetype = 1
149
- let g: gist_open_browser_after_post = 1
150
- map <leader> gi :Gist<CR>
151
- map <leader> gip :Gist-p<CR>
152
-
153
143
" lets make quicker
154
144
map <leader> m :make<CR>
155
145
@@ -236,13 +226,6 @@ map <A-7> 7gt
236
226
map <A-8> 8gt
237
227
map <A-9> 9gt
238
228
239
-
240
- " setup php-doc
241
- " source ~/.vim/plugin/php-doc.vim
242
- " inoremap <C-P> <ESC>:call PhpDocSingle()<CR>i
243
- " nnoremap <C-P> :call PhpDocSingle()<CR>
244
- " vnoremap <C-P> :call PhpDocRange()<CR>
245
-
246
229
" blowout trailing whitespaces,
247
230
" they make baby jesus cry
248
231
nnoremap <silent> <F5> :let _s=@/<Bar> :%s/\s\+$//e<Bar> :let @/=_s<Bar> :nohl<CR>
@@ -254,6 +237,12 @@ map <F7> :set spell!<Bar>set spell?<CR>
254
237
if ! exists (" mm_filetype_config" )
255
238
let mm_filetype_config = 1
256
239
240
+ " Jump to last cursor position unless it's invalid or in an event handler
241
+ autocmd BufReadPost *
242
+ \ if line (" '\" " ) > 0 && line (" '\" " ) <= line (" $" ) |
243
+ \ exe " normal g`\" " |
244
+ \ endif
245
+
257
246
" Turn on spelling in subversion/git commits
258
247
autocmd BufNewFile ,BufRead svn-commit.* set spell
259
248
autocmd BufNewFile ,BufRead COMMIT_EDITMSG set spell
@@ -269,32 +258,6 @@ if !exists("mm_filetype_config")
269
258
autocmd FileType javascript,php,html,python,actionscript set autoindent
270
259
endif
271
260
272
- " http://www.jukie.net/~bart/conf/vimrc
273
- function ! OnlineDoc ()
274
- let s: browser = " chromium-browser"
275
- let s: wordUnderCursor = expand (" <cword>" )
276
-
277
- if &ft == " cpp" || &ft == " c" || &ft == " ruby" || &ft == " python"
278
- let s: url = " http://www.google.com/codesearch?q=" .s: wordUnderCursor ." +lang:" .&ft
279
- elseif &ft == " php"
280
- let s: url = " http://php.net/manual-lookup.php?pattern=" .s: wordUnderCursor
281
- elseif &ft == " vim"
282
- let s: url = " http://www.google.com/codesearch?q=" .s: wordUnderCursor
283
- elseif &ft == " actionscript"
284
- let s: url = " http://community.adobe.com/help/search.html?q=" .s: wordUnderCursor ." &l=flash_product_adobelr"
285
- else
286
- return
287
- endif
288
-
289
- let s: cmd = " silent !" .s: browser . " \" " .s: url ." \" "
290
- " echo s:cmd
291
- execute s: cmd
292
- redraw !
293
- endfunction
294
-
295
- " online doc search
296
- map <leader> k :call OnlineDoc()<CR>
297
-
298
261
" setup PHP Code Sniffer
299
262
function ! RunPhpcs ()
300
263
let l: filename= @%
0 commit comments