1
- ==============================================================================
2
- ------------------------------------------------------------------------------
3
- *TextTransform.init_commands()*
4
- `TextTransform.init_commands` ()
5
- Initializes user commands
6
- @private
7
-
8
- ------------------------------------------------------------------------------
9
- *TextTransform.init_keymaps()*
10
- `TextTransform.init_keymaps` ()
11
- Initializes user keymaps
12
- @private
13
-
14
-
15
1
==============================================================================
16
2
------------------------------------------------------------------------------
17
3
*TextTransform.config*
@@ -77,21 +63,24 @@ Usage ~
77
63
*find_word_boundaries()*
78
64
`find_word_boundaries` ({line} , {start_col})
79
65
Finds the boundaries of the surrounding word around `start_col` within `line ` .
80
- @param line number
81
- @param start_col number
82
- @return number start_col, number end_col
66
+ Parameters ~
67
+ {line} `(number )`
68
+ {start_col} `(number )`
69
+ Return ~
70
+ `(number )` start_col, number end_col
83
71
84
72
------------------------------------------------------------------------------
85
73
*TextTransform.replace_range()*
86
74
`TextTransform.replace_range` ({start_line}, {start_col}, {end_line}, {end_col}, {transform_name})
87
75
Replace the range between the given positions with the given transform.
88
76
Acts on the lines between the given positions, replacing the text between the given columns.
89
77
90
- @param start_line number The starting line
91
- @param start_col number The starting column
92
- @param end_line number The ending line
93
- @param end_col number The ending column
94
- @param transform_name string The transformer name
78
+ Parameters ~
79
+ {start_line} `(number )` The starting line
80
+ {start_col} `(number )` The starting column
81
+ {end_line} `(number )` The ending line
82
+ {end_col} `(number )` The ending column
83
+ {transform_name} `(string )` The transformer name
95
84
96
85
------------------------------------------------------------------------------
97
86
*TextTransform.replace_word()*
@@ -100,16 +89,18 @@ Replace the word under the cursor with the given transform.
100
89
If `position` is provided, replace the word under the given position.
101
90
Otherwise, attempts to find the word under the cursor.
102
91
103
- @param transform_name string The transformer name
104
- @param position table|nil A table containing the position of the word to replace
92
+ Parameters ~
93
+ {transform_name} `(string )` The transformer name
94
+ {position} `(table|nil)` A table containing the position of the word to replace
105
95
106
96
------------------------------------------------------------------------------
107
97
*TextTransform.replace_columns()*
108
98
`TextTransform.replace_columns` ({transform_name})
109
99
Replaces each column in visual block mode selection with the given transform.
110
100
Assumes that the each selection is 1 character and operates on the whole word under each cursor.
111
101
112
- @param transform_name string The transformer name
102
+ Parameters ~
103
+ {transform_name} `(string )` The transformer name
113
104
114
105
------------------------------------------------------------------------------
115
106
*TextTransform.replace_selection()*
@@ -118,7 +109,8 @@ Replaces a selection with the given transform. This function attempts to infer t
118
109
type based on the cursor positiono and visual selections, and passes information to relevant
119
110
range replacement functions.
120
111
121
- @param transform_name string The transformer name
112
+ Parameters ~
113
+ {transform_name} `(string )` The transformer name
122
114
123
115
------------------------------------------------------------------------------
124
116
*TextTransform.get_visual_selection_details()*
@@ -148,8 +140,10 @@ or a given modified state, if passed as the first argument
148
140
*TextTransform.to_words()*
149
141
`TextTransform.to_words` ({string} )
150
142
Splits a string into words.
151
- @param string string
152
- @return table
143
+ Parameters ~
144
+ {string} `(string )`
145
+ Return ~
146
+ `(table)`
153
147
154
148
------------------------------------------------------------------------------
155
149
*TextTransform.transform_words()*
@@ -158,59 +152,75 @@ Transforms a table of strings into a string using a callback and separator.
158
152
The callback is called with the word, the index, and the table of words.
159
153
The separator is added between each word.
160
154
161
- @param words string|table string or table of strings
162
- @param with_word_cb function (word: string, index: number, words: table) -> string
163
- @param separator string|nil (optional)
164
- @return string
155
+ Parameters ~
156
+ {words} `(string |table)` string or table of strings
157
+ {with_word_cb} `(function )` (word: string, index: number, words: table) -> string
158
+ {separator} `(string |nil)` (optional)
159
+ Return ~
160
+ `(string )`
165
161
166
162
------------------------------------------------------------------------------
167
163
*TextTransform.to_camel_case()*
168
164
`TextTransform.to_camel_case` ({string} )
169
165
Transforms a string into camelCase.
170
- @param string string
171
- @return string
166
+ Parameters ~
167
+ {string} `(string )`
168
+ Return ~
169
+ `(string )`
172
170
173
171
------------------------------------------------------------------------------
174
172
*TextTransform.to_snake_case()*
175
173
`TextTransform.to_snake_case` ({string} )
176
174
Transfroms a string into snake_case.
177
- @param string any
178
- @return string
175
+ Parameters ~
176
+ {string} `(any)`
177
+ Return ~
178
+ `(string )`
179
179
180
180
------------------------------------------------------------------------------
181
181
*TextTransform.to_pascal_case()*
182
182
`TextTransform.to_pascal_case` ({string} )
183
183
Transforms a string into PascalCase.
184
- @param string string
185
- @return string
184
+ Parameters ~
185
+ {string} `(string )`
186
+ Return ~
187
+ `(string )`
186
188
187
189
------------------------------------------------------------------------------
188
190
*TextTransform.to_title_case()*
189
191
`TextTransform.to_title_case` ({string} )
190
192
Transforms a string into Title Case.
191
- @param string string
192
- @return string
193
+ Parameters ~
194
+ {string} `(string )`
195
+ Return ~
196
+ `(string )`
193
197
194
198
------------------------------------------------------------------------------
195
199
*TextTransform.to_kebab_case()*
196
200
`TextTransform.to_kebab_case` ({string} )
197
201
Transforms a string into kebab-case.
198
- @param string string
199
- @return string
202
+ Parameters ~
203
+ {string} `(string )`
204
+ Return ~
205
+ `(string )`
200
206
201
207
------------------------------------------------------------------------------
202
208
*TextTransform.to_dot_case()*
203
209
`TextTransform.to_dot_case` ({string} )
204
210
Transforms a string into dot.case.
205
- @param string string
206
- @return string
211
+ Parameters ~
212
+ {string} `(string )`
213
+ Return ~
214
+ `(string )`
207
215
208
216
------------------------------------------------------------------------------
209
217
*TextTransform.to_const_case()*
210
218
`TextTransform.to_const_case` ({string} )
211
219
Transforms a string into CONSTANT_CASE.
212
- @param string string
213
- @return string
220
+ Parameters ~
221
+ {string} `(string )`
222
+ Return ~
223
+ `(string )`
214
224
215
225
216
226
==============================================================================
@@ -258,9 +268,11 @@ Mutates the first table.
258
268
259
269
TODO accept multiple tables to merge
260
270
261
- @param t1 table
262
- @param t2 table
263
- @return table
271
+ Parameters ~
272
+ {t1} `(table)`
273
+ {t2} `(table)`
274
+ Return ~
275
+ `(table)`
264
276
265
277
266
278
vim:tw=78:ts=8:noet:ft=help:norl:
0 commit comments