FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vim-ruby/doc/ft-ruby-plugin.txt at master · vim-ruby/vim-ruby · GitHub
vim-ruby
/
vim-ruby
Public
Notifications
You must be signed in to change notification settings
Fork
285
Star
2k
Code
Issues
57
Pull requests
6
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
vim-ruby
/
doc
/
ft-ruby-plugin.txt
Copy path
More file actions
More file actions
Latest commit
History
History
History
81 lines (58 loc) · 2.3 KB
Breadcrumbs
vim-ruby
/
doc
/
ft-ruby-plugin.txt
Copy path
File metadata and controls
81 lines (58 loc) · 2.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
RUBY
*ft-ruby-plugin*
*vim-ruby-plugin*
Ruby: Recommended settings
|
ruby-recommended
|
Ruby: Motion commands
|
ruby-motion
|
Ruby: Text objects
|
ruby-text-objects
|
*ruby-recommended*
*g:ruby_recommended_style*
Ruby: Recommended settings
~
The
`
g:
ruby_recommended_style
`
variable activates indentation settings
according to the most common ruby convention: two spaces for indentation. It's
turned on by default to ensure an unsurprising default experience for most
ruby developers.
If you'd like to enforce your own style, it's possible to apply your own
preferences in your own configuration in
`after
/ftplugin/
ruby
.
vim
`
. You can
also disable the setting by setting the variable to 0:
>
let g:ruby_recommended_style = 0
<
*ruby-motion*
Ruby: Motion commands
~
Vim provides motions such as
|
[m
|
and
|
]m
|
for jumping to the start or end of
a method definition. Out of the box, these work for curly-bracket languages,
but not for Ruby. The vim-ruby plugin enhances these motions, by making them
also work on Ruby files.
*ruby-]m*
]m Go to start of next method definition.
*ruby-]M*
]M Go to end of next method definition.
*ruby-[m*
[m Go to start of previous method definition.
*ruby-[M*
[M Go to end of previous method definition.
*ruby-]]*
]] Go to start of next module or class definition.
*ruby-][*
][ Go to end of next module or class definition.
*ruby-[[*
[[ Go to start of previous module or class definition.
*ruby-[]*
[] Go to end of previous module or class definition.
*ruby-text-objects*
Ruby: Text objects
~
Vim's
|
text-objects
|
can be used to select or operate upon regions of text
that are defined by structure. The vim-ruby plugin adds text objects for
operating on methods and classes.
*ruby-v_am*
*ruby-am*
am "a method", select from "def" until matching "end"
keyword.
*ruby-v_im*
*ruby-im*
im "inner method", select contents of "def"/"end" block,
excluding the "def" and "end" themselves.
*ruby-v_aM*
*ruby-aM*
aM "a class", select from "class" until matching "end"
keyword.
*ruby-v_iM*
*ruby-iM*
iM "inner class", select contents of "class"/"end"
block, excluding the "class" and "end" themselves.
vim:tw=78:sw=4:ts=8:ft=help:norl:
Back
|
FazBrowse Home
|
New Git URL