Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite339887

Browse files
authored
Merge pull request#25 from harmonwood/master
Fixed a bug 21: remappings in normal mode
2 parents84b5388 +da19c48 commite339887

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

‎plugin/php-refactoring-toolbox.vim‎

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,27 @@ function! PhpDocAll() " {{{
108108
calls:PhpEchoError(g:vim_php_refactoring_phpdoc .'() vim function doesn''t exists.')
109109
return
110110
endif
111-
normal magg
111+
normal! magg
112112
whilesearch(s:php_regex_class_line,'eW') >0
113113
calls:PhpDocument()
114114
endwhile
115-
normal gg
115+
normal! gg
116116
whilesearch(s:php_regex_member_line,'eW') >0
117117
calls:PhpDocument()
118118
endwhile
119-
normal gg
119+
normal! gg
120120
whilesearch(s:php_regex_func_line,'eW') >0
121121
calls:PhpDocument()
122122
endwhile
123-
normal `a
123+
normal! `a
124124
endfunction
125125
" }}}
126126

127127
function!PhpCreateGetters()" {{{
128-
normal gg
128+
normal! gg
129129
letl:properties= []
130130
whilesearch(s:php_regex_member_line,'eW') >0
131-
normalw"xye
131+
normal!w"xye
132132
calladd(l:properties,@x)
133133
endwhile
134134
forl:propertyinl:properties
@@ -147,10 +147,10 @@ endfunction
147147
" }}}
148148

149149
function!PhpCreateSettersAndGetters()" {{{
150-
normal gg
150+
normal! gg
151151
letl:properties= []
152152
whilesearch(s:php_regex_member_line,'eW') >0
153-
normalw"xye
153+
normal!w"xye
154154
calladd(l:properties,@x)
155155
endwhile
156156
forl:propertyinl:properties
@@ -220,7 +220,7 @@ endfunction
220220
" }}}
221221

222222
function!PhpExtractUse()" {{{
223-
normal mr
223+
normal! mr
224224
letl:fqcn=s:PhpGetFQCNUnderCursor()
225225
letl:use=s:PhpGetDefaultUse(l:fqcn)
226226
letl:defaultUse=l:use
@@ -235,7 +235,7 @@ function! PhpExtractUse() " {{{
235235
else
236236
calls:PhpInsertUseStatement(l:fqcn)
237237
endif
238-
normal `r
238+
normal! `r
239239
endfunction
240240
" }}}
241241

@@ -245,15 +245,15 @@ function! PhpExtractConst() " {{{
245245
return
246246
endif
247247
letl:name=toupper(inputdialog("Name of new const:"))
248-
normal mrgv"xy
248+
normal! mrgv"xy
249249
calls:PhpReplaceInCurrentClass(@x,'self::' .l:name)
250250
calls:PhpInsertConst(l:name,@x)
251-
normal `r
251+
normal! `r
252252
endfunction
253253
" }}}
254254

255255
function!PhpExtractClassProperty()" {{{
256-
normal mr
256+
normal! mr
257257
letl:name=substitute(expand('<cword>'),'^\$*','','')
258258
calls:PhpReplaceInCurrentFunction('$' .l:name .'\>','$this->' .l:name)
259259
ifg:vim_php_refactoring_auto_validate_visibility==0
@@ -265,7 +265,7 @@ function! PhpExtractClassProperty() " {{{
265265
letl:visibility=g:vim_php_refactoring_default_property_visibility
266266
endif
267267
calls:PhpInsertProperty(l:name,l:visibility)
268-
normal `r
268+
normal! `r
269269
endfunction
270270
" }}}
271271

@@ -283,12 +283,12 @@ function! PhpExtractMethod() range " {{{
283283
else
284284
letl:visibility=g:vim_php_refactoring_default_method_visibility
285285
endif
286-
normal gv"xdmr
286+
normal! gv"xdmr
287287
letl:middleLine=line('.')
288288
callsearch(s:php_regex_func_line,'bW')
289289
letl:startLine=line('.')
290290
callsearch('(','W')
291-
normal"pyi(
291+
normal!"pyi(
292292
callsearch('{','W')
293293
exec"normal! %"
294294
letl:stopLine=line('.')
@@ -310,7 +310,7 @@ function! PhpExtractMethod() range " {{{
310310
calladd(l:output,l:var)
311311
endif
312312
endfor
313-
normal `r
313+
normal! `r
314314
iflen(l:output)==0
315315
exec"normal! O$this->" .l:name ."(" .join(l:parameters,",") .");\<ESC>k=3="
316316
letl:return=''
@@ -322,7 +322,7 @@ function! PhpExtractMethod() range " {{{
322322
letl:return="return array(" .join(l:output,",") .");\<CR>"
323323
endif
324324
calls:PhpInsertMethod(l:visibility,l:name,l:parametersSignature,@x .l:return)
325-
normal `r
325+
normal! `r
326326
endfunction
327327
" }}}
328328

@@ -341,7 +341,7 @@ endfunction
341341
" }}}
342342

343343
function!PhpDetectUnusedUseStatements()" {{{
344-
normal mrgg
344+
normal! mrgg
345345
whilesearch('^use','W')
346346
letl:startLine=line('.')
347347
callsearch(';\_s*','eW')
@@ -355,7 +355,7 @@ function! PhpDetectUnusedUseStatements() " {{{
355355
endif
356356
endfor
357357
endwhile
358-
normal `r
358+
normal! `r
359359
endfunction
360360
" }}}
361361

@@ -390,34 +390,34 @@ endfunction
390390

391391
function!s:PhpDocument()" {{{
392392
ifmatch(getline(line('.')-1),"*/")==-1
393-
normal mr
393+
normal! mr
394394
exec"call" .g:vim_php_refactoring_phpdoc .'()'
395-
normal `r
395+
normal! `r
396396
endif
397397
endfunction
398398
" }}}
399399

400400
function!s:PhpReplaceInCurrentFunction(search, replace)" {{{
401-
normal mr
401+
normal! mr
402402
callsearch(s:php_regex_func_line,'bW')
403403
letl:startLine=line('.')
404404
callsearch('{','W')
405405
exec"normal! %"
406406
letl:stopLine=line('.')
407407
execl:startLine .',' .l:stopLine .':s/' .a:search .'/'.a:replace .'/ge'
408-
normal `r
408+
normal! `r
409409
endfunction
410410
" }}}
411411

412412
function!s:PhpReplaceInCurrentClass(search, replace)" {{{
413-
normal mr
413+
normal! mr
414414
callsearch(s:php_regex_class_line,'beW')
415415
callsearch('{','W')
416416
letl:startLine=line('.')
417417
exec"normal! %"
418418
letl:stopLine=line('.')
419419
execl:startLine .',' .l:stopLine .':s/' .a:search .'/'.a:replace .'/ge'
420-
normal `r
420+
normal! `r
421421
endfunction
422422
" }}}
423423

@@ -447,7 +447,7 @@ function! s:PhpInsertConst(name, value) " {{{
447447
else
448448
callappend(line('.'),'const' .a:name .' =' .a:value .';')
449449
endif
450-
normalj=1=
450+
normal!j=1=
451451
endfunction
452452
" }}}
453453

@@ -475,7 +475,7 @@ function! s:PhpInsertPropertyExtended(name, visibility, insertLine, emptyLineBef
475475
callappend(a:insertLine+a:emptyLineBefore+1,'* @var mixed')
476476
callappend(a:insertLine+a:emptyLineBefore+2,'*/')
477477
callappend(a:insertLine+a:emptyLineBefore+3,a:visibility ." $" .a:name .';')
478-
normalj=5=
478+
normal!j=5=
479479
endfunction
480480
" }}}
481481

@@ -515,25 +515,25 @@ endfunction
515515
" }}}
516516

517517
function!s:PhpSearchInCurrentFunction(pattern, flags)" {{{
518-
normal mr
518+
normal! mr
519519
callsearch(s:php_regex_func_line,'bW')
520520
letl:startLine=line('.')
521521
callsearch('{','W')
522522
exec"normal! %"
523523
letl:stopLine=line('.')
524-
normal `r
524+
normal! `r
525525
returns:PhpSearchInRange(a:pattern,a:flags,l:startLine,l:stopLine)
526526
endfunction
527527
" }}}
528528

529529
function!s:PhpSearchInCurrentClass(pattern, flags)" {{{
530-
normal mr
530+
normal! mr
531531
callsearch(s:php_regex_class_line,'beW')
532532
callsearch('{','W')
533533
letl:startLine=line('.')
534534
exec"normal! %"
535535
letl:stopLine=line('.')
536-
normal `r
536+
normal! `r
537537
returns:PhpSearchInRange(a:pattern,a:flags,l:startLine,l:stopLine)
538538
endfunction
539539
" }}}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp