-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples
44 lines (26 loc) · 1.17 KB
/
examples
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
# Rename function inside namespace (explicit)
:RefactorvimRename refactorvim#renaming#rename_function() new_function()
# Rename function with namespace (explicit)
:RefactorvimRename refactorvim#renaming#rename_function() refactorvim#autoload#new_function()
# Rename namespace (explicit)
:RefactorvimRename refactorvim#renaming# refactorvim#autoload#
# Rename function inside namespace (guess)
:RefactorvimRename refactorvim#renaming#rename_function new_function
# Rename function with namespace (guess)
:RefactorvimRename refactorvim#renaming#rename_function refactorvim#autoload#new_function
Guessing strategy
-----------------
- if ends in () it is a function
- if ends in # it is a namespace
- if _not_ contains # it is a function name
- if exists as namespace it is a namespace
- otherwise it is a function name
Namespace renaming
------------------
my#namespace# → some#other#foo
./my/namespace.vim → ./some/other/foo.vim
./my/namespace/ → ./some/other/foo
./my/namespace/one/lvl2.vim → /some/other/foo/one/lvl2.vim
my#namespace# → my#namespace#sub1#sub2
./my/namespace.vim → ./my/namespace/sub1/sub2.vim
./my/namespace/ → ./my/namespace/sub1/sub2