utils 0.0.57 → 0.0.58

Sign up to get free protection for your applications and to get access to all the features.
@@ -89,7 +89,7 @@ au Filetype Decho nmap <silent> <buffer> <F1> :setlocal noro ma<cr>
89
89
  " writes messages to a small window (g:decho_winheight lines)
90
90
  " on the bottom of the screen
91
91
  fun! Decho(...)
92
-
92
+
93
93
  " make sure that SaveWinPosn() and RestoreWinPosn() are available
94
94
  if !exists("g:loaded_cecutil")
95
95
  runtime plugin/cecutil.vim
@@ -111,7 +111,7 @@ fun! Decho(...)
111
111
  let eakeep= &ea
112
112
  set ei=BufEnter,WinEnter,WinLeave,ShellCmdPost,FocusGained noea
113
113
  endif
114
-
114
+
115
115
  " As needed, create/switch-to the DBG buffer
116
116
  if !bufexists(g:decho_bufname) && bufnr("*/".g:decho_bufname."$") == -1
117
117
  " if requested DBG-buffer doesn't exist, create a new one
@@ -119,13 +119,13 @@ fun! Decho(...)
119
119
  exe "keepjumps silent! bot ".g:decho_winheight."new ".fnameescape(g:decho_bufname)
120
120
  setlocal noswf
121
121
  keepjumps silent! %d
122
-
122
+
123
123
  elseif bufwinnr(g:decho_bufname) > 0
124
124
  " if requested DBG-buffer exists in a window,
125
125
  " go to that window (by window number)
126
126
  exe "keepjumps ".bufwinnr(g:decho_bufname)."wincmd W"
127
127
  exe "res ".g:decho_winheight
128
-
128
+
129
129
  else
130
130
  " user must have closed the DBG-buffer window.
131
131
  " create a new one at the bottom of the screen.
@@ -133,10 +133,10 @@ fun! Decho(...)
133
133
  setlocal noswf
134
134
  exe "keepjumps b ".bufnr(g:decho_bufname)
135
135
  endif
136
-
136
+
137
137
  set ft=Decho
138
138
  setlocal noswapfile noro nobl fo=n2croql
139
-
139
+
140
140
  " make sure DBG window is on the bottom
141
141
  wincmd J
142
142
  endif
@@ -235,7 +235,7 @@ fun! Decho(...)
235
235
  keepjumps $
236
236
  keepjumps let res= append("$",smsg)
237
237
  setlocal nomod
238
-
238
+
239
239
  " Put cursor at bottom of DBG window, then return to original window
240
240
  exe "res ".g:decho_winheight
241
241
  keepjumps norm! G
@@ -247,7 +247,7 @@ fun! Decho(...)
247
247
  if exists("swp")
248
248
  call RestoreWinPosn(swp)
249
249
  endif
250
-
250
+
251
251
  if g:decho_bufenter
252
252
  let &ei= eikeep
253
253
  let &ea= eakeep
@@ -478,7 +478,7 @@ if has("clientserver") && executable("gvim")
478
478
  if g:dechomode == s:DECHOREM
479
479
  let g:dechomode= s:DECHOWIN
480
480
  endif
481
-
481
+
482
482
  elseif a:mode == 1
483
483
  " turn remote debugging on
484
484
  if g:dechomode != s:DECHOREM
@@ -511,11 +511,11 @@ if has("clientserver") && executable("gvim")
511
511
  endtry
512
512
  endwhile
513
513
  endif
514
-
514
+
515
515
  else
516
516
  echohl Warning | echomsg "DechoRemote(".a:mode.") not supported" | echohl None
517
517
  endif
518
-
518
+
519
519
  endfun
520
520
  endif
521
521
 
@@ -524,7 +524,7 @@ endif
524
524
  " by the user; DechoVarOn [varname]
525
525
  fun! s:DechoVarOn(...)
526
526
  let g:dechomode= s:DECHOVAR
527
-
527
+
528
528
  if a:0 > 0
529
529
  let g:dechofile= a:1
530
530
  if a:2 =~ '^g:'
@@ -553,7 +553,7 @@ endfun
553
553
  if v:version >= 700
554
554
  fun! s:DechoTab(mode,...)
555
555
  " call Dfunc("DechoTab(mode=".a:mode.") a:0=".a:0)
556
-
556
+
557
557
  if a:mode
558
558
  let g:dechomode = s:DECHOTAB
559
559
  let g:dechofile = (a:0 > 0)? a:1 : ""
@@ -579,7 +579,7 @@ if v:version >= 700
579
579
  else
580
580
  let g:dechomode= s:DECHOWIN
581
581
  endif
582
-
582
+
583
583
  " call Dret("DechoTab")
584
584
  endfun
585
585
  endif
@@ -2,8 +2,8 @@
2
2
  " save/restore mark position
3
3
  " save/restore selected user maps
4
4
  " Author: Charles E. Campbell, Jr.
5
- " Version: 17
6
- " Date: Sep 04, 2007
5
+ " Version: 18b ASTRO-ONLY
6
+ " Date: Aug 27, 2008
7
7
  "
8
8
  " Saving Restoring Destroying Marks: {{{1
9
9
  " call SaveMark(markname) let savemark= SaveMark(markname)
@@ -28,19 +28,21 @@
28
28
  " believe, and shudder. But do you want to know, vain man, that
29
29
  " faith apart from works is dead? (James 2:19,20 WEB)
30
30
 
31
+ " ---------------------------------------------------------------------
31
32
  " Load Once: {{{1
32
33
  if &cp || exists("g:loaded_cecutil")
33
34
  finish
34
35
  endif
35
- let g:loaded_cecutil = "v17"
36
+ let g:loaded_cecutil = "v18b"
36
37
  let s:keepcpo = &cpo
37
38
  set cpo&vim
38
- "DechoVarOn
39
+ "DechoTabOn
39
40
 
40
- " -----------------------
41
+ " =======================
41
42
  " Public Interface: {{{1
42
- " -----------------------
43
+ " =======================
43
44
 
45
+ " ---------------------------------------------------------------------
44
46
  " Map Interface: {{{2
45
47
  if !hasmapto('<Plug>SaveWinPosn')
46
48
  map <unique> <Leader>swp <Plug>SaveWinPosn
@@ -51,6 +53,7 @@ endif
51
53
  nmap <silent> <Plug>SaveWinPosn :call SaveWinPosn()<CR>
52
54
  nmap <silent> <Plug>RestoreWinPosn :call RestoreWinPosn()<CR>
53
55
 
56
+ " ---------------------------------------------------------------------
54
57
  " Command Interface: {{{2
55
58
  com! -bar -nargs=0 SWP call SaveWinPosn()
56
59
  com! -bar -nargs=0 RWP call RestoreWinPosn()
@@ -64,8 +67,12 @@ else
64
67
  let s:modifier= "sil keepj "
65
68
  endif
66
69
 
70
+ " ===============
71
+ " Functions: {{{1
72
+ " ===============
73
+
67
74
  " ---------------------------------------------------------------------
68
- " SaveWinPosn: {{{1
75
+ " SaveWinPosn: {{{2
69
76
  " let winposn= SaveWinPosn() will save window position in winposn variable
70
77
  " call SaveWinPosn() will save window position in b:cecutil_winposn{b:cecutil_iwinposn}
71
78
  " let winposn= SaveWinPosn(0) will *only* save window position in winposn variable (no stacking done)
@@ -75,10 +82,10 @@ fun! SaveWinPosn(...)
75
82
  " call Dfunc("SaveWinPosn : empty buffer")
76
83
  return ""
77
84
  endif
78
- let so_keep = &so
79
- let siso_keep = &siso
80
- let ss_keep = &ss
81
- set so=0 siso=0 ss=0
85
+ let so_keep = &l:so
86
+ let siso_keep = &l:siso
87
+ let ss_keep = &l:ss
88
+ setlocal so=0 siso=0 ss=0
82
89
 
83
90
  let swline = line(".")
84
91
  let swcol = col(".")
@@ -107,9 +114,9 @@ fun! SaveWinPosn(...)
107
114
  let b:cecutil_winposn{b:cecutil_iwinposn}= savedposn
108
115
  endif
109
116
 
110
- let &so = so_keep
111
- let &siso = siso_keep
112
- let &ss = ss_keep
117
+ let &l:so = so_keep
118
+ let &l:siso = siso_keep
119
+ let &l:ss = ss_keep
113
120
 
114
121
  " if exists("b:cecutil_iwinposn") " Decho
115
122
  " call Decho("b:cecutil_winpos{".b:cecutil_iwinposn."}[".b:cecutil_winposn{b:cecutil_iwinposn}."]")
@@ -121,7 +128,7 @@ fun! SaveWinPosn(...)
121
128
  endfun
122
129
 
123
130
  " ---------------------------------------------------------------------
124
- " RestoreWinPosn: {{{1
131
+ " RestoreWinPosn: {{{2
125
132
  fun! RestoreWinPosn(...)
126
133
  " call Dfunc("RestoreWinPosn() a:0=".a:0)
127
134
  " call Decho("getline(1)<".getline(1).">")
@@ -130,10 +137,10 @@ fun! RestoreWinPosn(...)
130
137
  " call Dfunc("RestoreWinPosn : empty buffer")
131
138
  return ""
132
139
  endif
133
- let so_keep = &so
134
- let siso_keep = &siso
135
- let ss_keep = &ss
136
- set so=0 siso=0 ss=0
140
+ let so_keep = &l:so
141
+ let siso_keep = &l:siso
142
+ let ss_keep = &l:ss
143
+ setlocal so=0 siso=0 ss=0
137
144
 
138
145
  if a:0 == 0 || a:1 == ""
139
146
  " use saved window position in b:cecutil_winposn{b:cecutil_iwinposn} if it exists
@@ -184,23 +191,25 @@ fun! RestoreWinPosn(...)
184
191
  endif
185
192
  endif
186
193
 
187
- " seems to be something odd: vertical motions after RWP
188
- " cause jump to first column. Following fixes that
189
- if wincol() > 1
194
+ " Seems to be something odd: vertical motions after RWP
195
+ " cause jump to first column. The following fixes that.
196
+ " Note: was using wincol()>1, but with signs, a cursor
197
+ " at column 1 yields wincol()==3. Beeping ensued.
198
+ if virtcol('.') > 1
190
199
  silent norm! hl
191
200
  elseif virtcol(".") < virtcol("$")
192
201
  silent norm! lh
193
202
  endif
194
203
 
195
- let &so = so_keep
196
- let &siso = siso_keep
197
- let &ss = ss_keep
204
+ let &l:so = so_keep
205
+ let &l:siso = siso_keep
206
+ let &l:ss = ss_keep
198
207
 
199
208
  " call Dret("RestoreWinPosn")
200
209
  endfun
201
210
 
202
211
  " ---------------------------------------------------------------------
203
- " GoWinbufnr: go to window holding given buffer (by number) {{{1
212
+ " GoWinbufnr: go to window holding given buffer (by number) {{{2
204
213
  " Prefers current window; if its buffer number doesn't match,
205
214
  " then will try from topleft to bottom right
206
215
  fun! GoWinbufnr(bufnum)
@@ -219,7 +228,7 @@ fun! GoWinbufnr(bufnum)
219
228
  endfun
220
229
 
221
230
  " ---------------------------------------------------------------------
222
- " SaveMark: sets up a string saving a mark position. {{{1
231
+ " SaveMark: sets up a string saving a mark position. {{{2
223
232
  " For example, SaveMark("a")
224
233
  " Also sets up a global variable, g:savemark_{markname}
225
234
  fun! SaveMark(markname)
@@ -252,7 +261,7 @@ fun! SaveMark(markname)
252
261
  endfun
253
262
 
254
263
  " ---------------------------------------------------------------------
255
- " RestoreMark: {{{1
264
+ " RestoreMark: {{{2
256
265
  " call RestoreMark("a") -or- call RestoreMark(savemark)
257
266
  fun! RestoreMark(markname)
258
267
  " call Dfunc("RestoreMark(markname<".a:markname.">)")
@@ -294,7 +303,7 @@ fun! RestoreMark(markname)
294
303
  endfun
295
304
 
296
305
  " ---------------------------------------------------------------------
297
- " DestroyMark: {{{1
306
+ " DestroyMark: {{{2
298
307
  " call DestroyMark("a") -- destroys mark
299
308
  fun! DestroyMark(markname)
300
309
  " call Dfunc("DestroyMark(markname<".a:markname.">)")
@@ -329,7 +338,7 @@ fun! DestroyMark(markname)
329
338
  endfun
330
339
 
331
340
  " ---------------------------------------------------------------------
332
- " QArgSplitter: to avoid \ processing by <f-args>, <q-args> is needed. {{{1
341
+ " QArgSplitter: to avoid \ processing by <f-args>, <q-args> is needed. {{{2
333
342
  " However, <q-args> doesn't split at all, so this one returns a list
334
343
  " with splits at all whitespace (only!), plus a leading length-of-list.
335
344
  " The resulting list: qarglist[0] corresponds to a:0
@@ -344,33 +353,38 @@ fun! QArgSplitter(qarg)
344
353
  endfun
345
354
 
346
355
  " ---------------------------------------------------------------------
347
- " ListWinPosn:
348
- "fun! ListWinPosn() " Decho
349
- " if !exists("b:cecutil_iwinposn") || b:cecutil_iwinposn == 0 " Decho
356
+ " ListWinPosn: {{{2
357
+ "fun! ListWinPosn() " Decho
358
+ " if !exists("b:cecutil_iwinposn") || b:cecutil_iwinposn == 0 " Decho
350
359
  " call Decho("nothing on SWP stack") " Decho
351
360
  " else " Decho
352
- " let jwinposn= b:cecutil_iwinposn " Decho
353
- " while jwinposn >= 1 " Decho
354
- " if exists("b:cecutil_winposn{jwinposn}") " Decho
355
- " call Decho("winposn{".jwinposn."}<".b:cecutil_winposn{jwinposn}.">") " Decho
356
- " else " Decho
357
- " call Decho("winposn{".jwinposn."} -- doesn't exist") " Decho
358
- " endif " Decho
359
- " let jwinposn= jwinposn - 1 " Decho
360
- " endwhile " Decho
361
+ " let jwinposn= b:cecutil_iwinposn " Decho
362
+ " while jwinposn >= 1 " Decho
363
+ " if exists("b:cecutil_winposn{jwinposn}") " Decho
364
+ " call Decho("winposn{".jwinposn."}<".b:cecutil_winposn{jwinposn}.">") " Decho
365
+ " else " Decho
366
+ " call Decho("winposn{".jwinposn."} -- doesn't exist") " Decho
367
+ " endif " Decho
368
+ " let jwinposn= jwinposn - 1 " Decho
369
+ " endwhile " Decho
361
370
  " endif " Decho
362
- "endfun " Decho
363
- "com! -nargs=0 LWP call ListWinPosn() " Decho
371
+ "endfun " Decho
372
+ "com! -nargs=0 LWP call ListWinPosn() " Decho
364
373
 
365
374
  " ---------------------------------------------------------------------
366
- " SaveUserMaps: this function sets up a script-variable (s:restoremap) {{{1
375
+ " SaveUserMaps: this function sets up a script-variable (s:restoremap) {{{2
367
376
  " which can be used to restore user maps later with
368
377
  " call RestoreUserMaps()
369
378
  "
370
- " mapmode - see :help maparg for its list
379
+ " mapmode - see :help maparg for details (n v o i c l "")
371
380
  " ex. "n" = Normal
372
- " If the first letter is u, then unmapping will be done
373
- " ex. "un" = Normal + unmapping
381
+ " The letters "b" and "u" are optional prefixes;
382
+ " The "u" means that the map will also be unmapped
383
+ " The "b" means that the map has a <buffer> qualifier
384
+ " ex. "un" = Normal + unmapping
385
+ " ex. "bn" = Normal + <buffer>
386
+ " ex. "bun" = Normal + <buffer> + unmapping
387
+ " ex. "ubn" = Normal + <buffer> + unmapping
374
388
  " maplead - see mapchx
375
389
  " mapchx - "<something>" handled as a single map item.
376
390
  " ex. "<left>"
@@ -395,60 +409,70 @@ fun! SaveUserMaps(mapmode,maplead,mapchx,suffix)
395
409
 
396
410
  " set up dounmap: if 1, then save and unmap (a:mapmode leads with a "u")
397
411
  " if 0, save only
398
- if a:mapmode =~ '^u'
399
- let dounmap= 1
400
- let mapmode= strpart(a:mapmode,1)
401
- else
402
- let dounmap= 0
403
- let mapmode= a:mapmode
404
- endif
405
-
412
+ let mapmode = a:mapmode
413
+ let dounmap = 0
414
+ let dobuffer = ""
415
+ while mapmode =~ '^[bu]'
416
+ if mapmode =~ '^u'
417
+ let dounmap= 1
418
+ let mapmode= strpart(a:mapmode,1)
419
+ elseif mapmode =~ '^b'
420
+ let dobuffer= "<buffer> "
421
+ let mapmode= strpart(a:mapmode,1)
422
+ endif
423
+ endwhile
424
+ " call Decho("dounmap=".dounmap." dobuffer<".dobuffer.">")
425
+
406
426
  " save single map :...something...
407
427
  if strpart(a:mapchx,0,1) == ':'
428
+ " call Decho("save single map :...something...")
408
429
  let amap= strpart(a:mapchx,1)
409
430
  if amap == "|" || amap == "\<c-v>"
410
431
  let amap= "\<c-v>".amap
411
432
  endif
412
433
  let amap = a:maplead.amap
413
- let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:silent! ".mapmode."unmap ".amap
434
+ let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:silent! ".mapmode."unmap ".dobuffer.amap
414
435
  if maparg(amap,mapmode) != ""
415
436
  let maprhs = substitute(maparg(amap,mapmode),'|','<bar>','ge')
416
- let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:".mapmode."map ".amap." ".maprhs
437
+ let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:".mapmode."map ".dobuffer.amap." ".maprhs
417
438
  endif
418
439
  if dounmap
419
- exe "silent! ".mapmode."unmap ".amap
440
+ exe "silent! ".mapmode."unmap ".dobuffer.amap
420
441
  endif
421
-
442
+
422
443
  " save single map <something>
423
444
  elseif strpart(a:mapchx,0,1) == '<'
445
+ " call Decho("save single map <something>")
424
446
  let amap = a:mapchx
425
447
  if amap == "|" || amap == "\<c-v>"
426
448
  let amap= "\<c-v>".amap
449
+ " call Decho("amap[[".amap."]]")
427
450
  endif
428
- let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|silent! ".mapmode."unmap ".amap
451
+ let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|silent! ".mapmode."unmap ".dobuffer.amap
429
452
  if maparg(a:mapchx,mapmode) != ""
430
453
  let maprhs = substitute(maparg(amap,mapmode),'|','<bar>','ge')
431
- let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".amap." ".maprhs
454
+ let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".amap." ".dobuffer.maprhs
432
455
  endif
433
456
  if dounmap
434
- exe "silent! ".mapmode."unmap ".amap
457
+ exe "silent! ".mapmode."unmap ".dobuffer.amap
435
458
  endif
436
-
459
+
437
460
  " save multiple maps
438
461
  else
462
+ " call Decho("save multiple maps")
439
463
  let i= 1
440
464
  while i <= strlen(a:mapchx)
441
465
  let amap= a:maplead.strpart(a:mapchx,i-1,1)
442
466
  if amap == "|" || amap == "\<c-v>"
443
467
  let amap= "\<c-v>".amap
444
468
  endif
445
- let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|silent! ".mapmode."unmap ".amap
469
+ let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|silent! ".mapmode."unmap ".dobuffer.amap
446
470
  if maparg(amap,mapmode) != ""
447
471
  let maprhs = substitute(maparg(amap,mapmode),'|','<bar>','ge')
448
- let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".amap." ".maprhs
472
+ let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".amap." ".dobuffer.maprhs
449
473
  endif
450
474
  if dounmap
451
- exe "silent! ".mapmode."unmap ".amap
475
+ exe "silent! ".mapmode."unmap ".dobuffer.amap
452
476
  endif
453
477
  let i= i + 1
454
478
  endwhile
@@ -457,7 +481,7 @@ fun! SaveUserMaps(mapmode,maplead,mapchx,suffix)
457
481
  endfun
458
482
 
459
483
  " ---------------------------------------------------------------------
460
- " RestoreUserMaps: {{{1
484
+ " RestoreUserMaps: {{{2
461
485
  " Used to restore user maps saved by SaveUserMaps()
462
486
  fun! RestoreUserMaps(suffix)
463
487
  " call Dfunc("RestoreUserMaps(suffix<".a:suffix.">)")
@@ -472,11 +496,13 @@ fun! RestoreUserMaps(suffix)
472
496
  " call Dret("RestoreUserMaps")
473
497
  endfun
474
498
 
475
- " ---------------------------------------------------------------------
499
+ " ==============
476
500
  " Restore: {{{1
501
+ " ==============
477
502
  let &cpo= s:keepcpo
478
503
  unlet s:keepcpo
479
504
 
480
- " ---------------------------------------------------------------------
505
+ " ================
481
506
  " Modelines: {{{1
507
+ " ================
482
508
  " vim: ts=4 fdm=marker
@@ -0,0 +1,61 @@
1
+ " =============================================================================
2
+ " File: plugin/ctrlp.vim
3
+ " Description: Fuzzy file, buffer, mru and tag finder.
4
+ " Author: Kien Nguyen <github.com/kien>
5
+ " =============================================================================
6
+ " GetLatestVimScripts: 3736 1 :AutoInstall: ctrlp.zip
7
+
8
+ if ( exists('g:loaded_ctrlp') && g:loaded_ctrlp ) || v:version < 700 || &cp
9
+ fini
10
+ en
11
+ let g:loaded_ctrlp = 1
12
+
13
+ let [g:ctrlp_lines, g:ctrlp_allfiles, g:ctrlp_alltags, g:ctrlp_alldirs,
14
+ \ g:ctrlp_allmixes, g:ctrlp_buftags, g:ctrlp_ext_vars, g:ctrlp_builtins]
15
+ \ = [[], [], [], [], {}, {}, [], 2]
16
+
17
+ if !exists('g:ctrlp_map') | let g:ctrlp_map = '<c-p>' | en
18
+ if !exists('g:ctrlp_cmd') | let g:ctrlp_cmd = 'CtrlP' | en
19
+
20
+ com! -n=? -com=dir CtrlP cal ctrlp#init(0, <q-args>)
21
+
22
+ com! CtrlPBuffer cal ctrlp#init(1)
23
+ com! CtrlPMRUFiles cal ctrlp#init(2)
24
+
25
+ com! CtrlPLastMode cal ctrlp#init(-1)
26
+
27
+ com! CtrlPClearCache cal ctrlp#clr()
28
+ com! CtrlPClearAllCaches cal ctrlp#clra()
29
+ com! CtrlPReload cal ctrlp#reset()
30
+
31
+ com! ClearCtrlPCache cal ctrlp#clr()
32
+ com! ClearAllCtrlPCaches cal ctrlp#clra()
33
+ com! ResetCtrlP cal ctrlp#reset()
34
+
35
+ com! CtrlPCurWD cal ctrlp#init(0, 0)
36
+ com! CtrlPCurFile cal ctrlp#init(0, 1)
37
+ com! CtrlPRoot cal ctrlp#init(0, 2)
38
+
39
+ if g:ctrlp_map != '' && !hasmapto(':<c-u>'.g:ctrlp_cmd.'<cr>', 'n')
40
+ exe 'nn <silent>' g:ctrlp_map ':<c-u>'.g:ctrlp_cmd.'<cr>'
41
+ en
42
+
43
+ cal ctrlp#mrufiles#init()
44
+
45
+ com! CtrlPTag cal ctrlp#init(ctrlp#tag#id())
46
+ com! CtrlPQuickfix cal ctrlp#init(ctrlp#quickfix#id())
47
+ com! -n=? -com=dir CtrlPDir
48
+ \ cal ctrlp#init(ctrlp#dir#id(), <q-args>)
49
+ com! -n=? -com=buffer CtrlPBufTag
50
+ \ cal ctrlp#init(ctrlp#buffertag#cmd(0, <q-args>))
51
+ com! CtrlPBufTagAll cal ctrlp#init(ctrlp#buffertag#cmd(1))
52
+ com! CtrlPRTS cal ctrlp#init(ctrlp#rtscript#id())
53
+ com! CtrlPUndo cal ctrlp#init(ctrlp#undo#id())
54
+ com! CtrlPLine cal ctrlp#init(ctrlp#line#id())
55
+ com! -n=? -com=buffer CtrlPChange
56
+ \ cal ctrlp#init(ctrlp#changes#cmd(0, <q-args>))
57
+ com! CtrlPChangeAll cal ctrlp#init(ctrlp#changes#cmd(1))
58
+ com! CtrlPMixed cal ctrlp#init(ctrlp#mixed#id())
59
+ com! CtrlPBookmarkDir cal ctrlp#init(ctrlp#bookmarkdir#id())
60
+ com! -n=? -com=dir CtrlPBookmarkDirAdd
61
+ \ cal ctrlp#call('ctrlp#bookmarkdir#add', <q-args>)
@@ -59,7 +59,7 @@ call s:SetOptDefault("rails_ctags_arguments","--languages=-javascript")
59
59
  call s:SetOptDefault("rails_default_file","README")
60
60
  call s:SetOptDefault("rails_root_url",'http://localhost:3000/')
61
61
  call s:SetOptDefault("rails_modelines",0)
62
- call s:SetOptDefault("rails_menu",0)
62
+ call s:SetOptDefault("rails_menu",!has('mac'))
63
63
  call s:SetOptDefault("rails_gnu_screen",1)
64
64
  call s:SetOptDefault("rails_history_size",5)
65
65
  call s:SetOptDefault("rails_generators","controller\ngenerator\nhelper\nintegration_test\nmailer\nmetal\nmigration\nmodel\nobserver\nperformance_test\nplugin\nresource\nscaffold\nscaffold_controller\nsession_migration\nstylesheets")
@@ -79,9 +79,6 @@ function! s:escvar(r)
79
79
  endfunction
80
80
 
81
81
  function! s:Detect(filename)
82
- if exists('b:rails_root')
83
- return s:BufInit(b:rails_root)
84
- endif
85
82
  let fn = substitute(fnamemodify(a:filename,":p"),'\c^file://','','')
86
83
  let sep = matchstr(fn,'^[^\\/]\{3,\}\zs[\\/]')
87
84
  if sep != ""
@@ -110,7 +107,7 @@ function! s:Detect(filename)
110
107
  return s:BufInit(fn)
111
108
  endif
112
109
  let ofn = fn
113
- let fn = fnamemodify(ofn,':s?\(.*\)[\/]\(app\|config\|db\|doc\|extras\|features\|lib\|log\|public\|script\|spec\|stories\|test\|tmp\|vendor\)\($\|[\/].*$\)?\1?')
110
+ let fn = fnamemodify(ofn,':s?\(.*\)[\/]\(app\|config\|db\|doc\|features\|lib\|log\|public\|script\|spec\|stories\|test\|tmp\|vendor\)\($\|[\/].*$\)?\1?')
114
111
  endwhile
115
112
  return 0
116
113
  endfunction
@@ -101,7 +101,7 @@ syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|==\|=\~\|
101
101
  syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
102
102
  syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\h\w*"
103
103
  syn match rubySymbol "[]})\"':]\@<!:\h\w*\%([?!=]>\@!\)\="
104
- syn match rubySymbol "[]})\"':]\@<!\h\w*\%([?!=]>\@!\)\=:"
104
+ syn match rubySymbol "[]})\"':]\@<!\h\w*\%([?!=]>\@!\)\=:[^:]\@="
105
105
  syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
106
106
  syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
107
107
 
@@ -32,7 +32,7 @@ set nocursorcolumn
32
32
  set nocursorline
33
33
  set nofoldenable
34
34
  set noignorecase
35
- set noincsearch
35
+ set incsearch
36
36
  set nojoinspaces
37
37
  set nopaste
38
38
  set nosmartcase
@@ -116,8 +116,8 @@ if has("gui_running")
116
116
  set antialias
117
117
  set guiheadroom=0
118
118
  "set macatsui
119
- set columns=80
120
- set lines=71
119
+ set columns=160
120
+ set lines=86
121
121
  elseif has("x11")
122
122
  set guifont=-b&h-lucidatypewriter-*-*-normal-*-17-*-*-*-*-*-iso10646-*
123
123
  if exists("+guioptions")
@@ -493,7 +493,7 @@ function! Ccamelunderscore(...)
493
493
  endfunction
494
494
 
495
495
  function! Csymbolhash() range
496
- execute join([ 'silent ', a:firstline, ',', a:lastline, 's/\([^:]\):\([^:', "'", '" ]\{1,\}\) *=>/\1\2:/g' ])
496
+ execute join([ 'silent ', a:firstline, ',', a:lastline, 's/\([^:]\):\([^:=!', "'", '" ]\{1,\}\) *=>/\1\2:/g' ])
497
497
  endfunction
498
498
 
499
499
  function! Ccreatetags()
@@ -505,17 +505,16 @@ function! PrintGivenRange() range
505
505
  " Do some more things
506
506
  endfunction
507
507
 
508
- comclear
509
- command -bar -nargs=1 OpenURL :!open <args>
510
- command -bar -nargs=* -complete=file Find call Cfind(<f-args>)
511
- command -bar -nargs=* -complete=file Grep call Cgrep(<f-args>)
512
- command -bar -nargs=* -complete=file Test call Ctest(<f-args>)
513
- command -bar -nargs=* -complete=file Classify call Cclassify(<f-args>)
514
- command -bar -nargs=* -complete=file PathClassify call CpathClassify(<f-args>)
515
- command -bar -nargs=* -complete=file Declassify call Cdeclassify(<f-args>)
516
- command Createtags call Ccreatetags()
517
- command -range Symbolhash <line1>,<line2>call Csymbolhash()
518
- command -range PrintGivenRange <line1>,<line2>call PrintGivenRange()
508
+ command! -bar -nargs=1 OpenURL :!open <args>
509
+ command! -bar -nargs=* -complete=file Find call Cfind(<f-args>)
510
+ command! -bar -nargs=* -complete=file Grep call Cgrep(<f-args>)
511
+ command! -bar -nargs=* -complete=file Test call Ctest(<f-args>)
512
+ command! -bar -nargs=* -complete=file Classify call Cclassify(<f-args>)
513
+ command! -bar -nargs=* -complete=file PathClassify call CpathClassify(<f-args>)
514
+ command! -bar -nargs=* -complete=file Declassify call Cdeclassify(<f-args>)
515
+ command! Createtags call Ccreatetags()
516
+ command! -range Symbolhash <line1>,<line2>call Csymbolhash()
517
+ command! -range PrintGivenRange <line1>,<line2>call PrintGivenRange()
519
518
 
520
519
  function! Iexec(cmd)
521
520
  let output = system(a:cmd)
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.0.57'
3
+ VERSION = '0.0.58'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: