1
1
==============================================================================
2
2
------------------------------------------------------------------------------
3
- *commands .init_commands()*
4
- `commands .init_commands` ()
3
+ *TextTransform .init_commands()*
4
+ `TextTransform .init_commands` ()
5
5
Initializes user commands
6
6
@private
7
7
8
8
------------------------------------------------------------------------------
9
- *commands .init_keymaps()*
10
- `commands .init_keymaps` ()
9
+ *TextTransform .init_keymaps()*
10
+ `TextTransform .init_keymaps` ()
11
11
Initializes user keymaps
12
12
@private
13
13
14
14
15
15
==============================================================================
16
16
------------------------------------------------------------------------------
17
- *config .config*
18
- `config .config`
17
+ *TextTransform .config*
18
+ `TextTransform .config`
19
19
Your plugin configuration with its default values.
20
20
21
21
Default values:
22
22
>
23
- config .config = {
23
+ TextTransform .config = {
24
24
--- Prints information about internals of the plugin. Very verbose, only useful for debugging.
25
25
debug = false,
26
26
--- Keymap configurations
@@ -61,8 +61,8 @@ Default values:
61
61
<
62
62
63
63
------------------------------------------------------------------------------
64
- *config .setup()*
65
- `config .setup` ({options} )
64
+ *TextTransform .setup()*
65
+ `TextTransform .setup` ({options} )
66
66
Define your text-transform setup.
67
67
68
68
Parameters ~
@@ -82,8 +82,8 @@ Finds the boundaries of the surrounding word around `start_col` within `line`.
82
82
@return number start_col, number end_col
83
83
84
84
------------------------------------------------------------------------------
85
- *replacers .replace_range()*
86
- `replacers .replace_range` ({start_line}, {start_col}, {end_line}, {end_col}, {transform_name})
85
+ *TextTransform .replace_range()*
86
+ `TextTransform .replace_range` ({start_line}, {start_col}, {end_line}, {end_col}, {transform_name})
87
87
Replace the range between the given positions with the given transform.
88
88
Acts on the lines between the given positions, replacing the text between the given columns.
89
89
@@ -94,8 +94,8 @@ Acts on the lines between the given positions, replacing the text between the gi
94
94
@param transform_name string The transformer name
95
95
96
96
------------------------------------------------------------------------------
97
- *replacers .replace_word()*
98
- `replacers .replace_word` ({transform_name}, {position} )
97
+ *TextTransform .replace_word()*
98
+ `TextTransform .replace_word` ({transform_name}, {position} )
99
99
Replace the word under the cursor with the given transform.
100
100
If `position` is provided, replace the word under the given position.
101
101
Otherwise, attempts to find the word under the cursor.
@@ -104,25 +104,25 @@ Otherwise, attempts to find the word under the cursor.
104
104
@param position table|nil A table containing the position of the word to replace
105
105
106
106
------------------------------------------------------------------------------
107
- *replacers .replace_columns()*
108
- `replacers .replace_columns` ({transform_name})
107
+ *TextTransform .replace_columns()*
108
+ `TextTransform .replace_columns` ({transform_name})
109
109
Replaces each column in visual block mode selection with the given transform.
110
110
Assumes that the each selection is 1 character and operates on the whole word under each cursor.
111
111
112
112
@param transform_name string The transformer name
113
113
114
114
------------------------------------------------------------------------------
115
- *replacers .replace_selection()*
116
- `replacers .replace_selection` ({transform_name})
115
+ *TextTransform .replace_selection()*
116
+ `TextTransform .replace_selection` ({transform_name})
117
117
Replaces a selection with the given transform. This function attempts to infer the replacement
118
118
type based on the cursor positiono and visual selections, and passes information to relevant
119
119
range replacement functions.
120
120
121
121
@param transform_name string The transformer name
122
122
123
123
------------------------------------------------------------------------------
124
- *replacers .get_visual_selection_details()*
125
- `replacers .get_visual_selection_details` ()
124
+ *TextTransform .get_visual_selection_details()*
125
+ `TextTransform .get_visual_selection_details` ()
126
126
Takes the saved positions and translates them into individual visual ranges, regardless of how
127
127
the original selection was performed.
128
128
@@ -132,28 +132,28 @@ the full information around the selection logic.
132
132
133
133
==============================================================================
134
134
------------------------------------------------------------------------------
135
- *state .save_positions()*
136
- ` state .save_positions` ()
135
+ *TextTransform .save_positions()*
136
+ `TextTransform .save_positions` ()
137
137
Save the current cursor position, mode, and visual selection ranges
138
138
139
139
------------------------------------------------------------------------------
140
- *state .restore_positions()*
141
- ` state .restore_positions` ({new_state })
140
+ *TextTransform .restore_positions()*
141
+ `TextTransform .restore_positions` ({positions } )
142
142
Restore the cursor position, mode, and visual selection ranges saved using `save_position ()` ,
143
143
or a given modified state, if passed as the first argument
144
144
145
145
146
146
==============================================================================
147
147
------------------------------------------------------------------------------
148
- *transformers .to_words()*
149
- `transformers .to_words` ({string} )
148
+ *TextTransform .to_words()*
149
+ `TextTransform .to_words` ({string} )
150
150
Splits a string into words.
151
151
@param string string
152
152
@return table
153
153
154
154
------------------------------------------------------------------------------
155
- *transformers .transform_words()*
156
- `transformers .transform_words` ({words} , {with_word_cb}, {separator} )
155
+ *TextTransform .transform_words()*
156
+ `TextTransform .transform_words` ({words} , {with_word_cb}, {separator} )
157
157
Transforms a table of strings into a string using a callback and separator.
158
158
The callback is called with the word, the index, and the table of words.
159
159
The separator is added between each word.
@@ -164,59 +164,59 @@ The separator is added between each word.
164
164
@return string
165
165
166
166
------------------------------------------------------------------------------
167
- *transformers .to_camel_case()*
168
- `transformers .to_camel_case` ({string} )
167
+ *TextTransform .to_camel_case()*
168
+ `TextTransform .to_camel_case` ({string} )
169
169
Transforms a string into camelCase.
170
170
@param string string
171
171
@return string
172
172
173
173
------------------------------------------------------------------------------
174
- *transformers .to_snake_case()*
175
- `transformers .to_snake_case` ({string} )
174
+ *TextTransform .to_snake_case()*
175
+ `TextTransform .to_snake_case` ({string} )
176
176
Transfroms a string into snake_case.
177
177
@param string any
178
178
@return string
179
179
180
180
------------------------------------------------------------------------------
181
- *transformers .to_pascal_case()*
182
- `transformers .to_pascal_case` ({string} )
181
+ *TextTransform .to_pascal_case()*
182
+ `TextTransform .to_pascal_case` ({string} )
183
183
Transforms a string into PascalCase.
184
184
@param string string
185
185
@return string
186
186
187
187
------------------------------------------------------------------------------
188
- *transformers .to_title_case()*
189
- `transformers .to_title_case` ({string} )
188
+ *TextTransform .to_title_case()*
189
+ `TextTransform .to_title_case` ({string} )
190
190
Transforms a string into Title Case.
191
191
@param string string
192
192
@return string
193
193
194
194
------------------------------------------------------------------------------
195
- *transformers .to_kebab_case()*
196
- `transformers .to_kebab_case` ({string} )
195
+ *TextTransform .to_kebab_case()*
196
+ `TextTransform .to_kebab_case` ({string} )
197
197
Transforms a string into kebab-case.
198
198
@param string string
199
199
@return string
200
200
201
201
------------------------------------------------------------------------------
202
- *transformers .to_dot_case()*
203
- `transformers .to_dot_case` ({string} )
202
+ *TextTransform .to_dot_case()*
203
+ `TextTransform .to_dot_case` ({string} )
204
204
Transforms a string into dot.case.
205
205
@param string string
206
206
@return string
207
207
208
208
------------------------------------------------------------------------------
209
- *transformers .to_const_case()*
210
- `transformers .to_const_case` ({string} )
209
+ *TextTransform .to_const_case()*
210
+ `TextTransform .to_const_case` ({string} )
211
211
Transforms a string into CONSTANT_CASE.
212
212
@param string string
213
213
@return string
214
214
215
215
216
216
==============================================================================
217
217
------------------------------------------------------------------------------
218
- *popup .show_popup()*
219
- ` popup .show_popup` ()
218
+ *TextTransform .show_popup()*
219
+ `TextTransform .show_popup` ()
220
220
Pops up a selection menu, containing the available case transformers.
221
221
When a transformer is selected, the cursor position/range/columns will be used to replace the
222
222
words around the cursor or inside the selection.
@@ -227,8 +227,8 @@ made.
227
227
228
228
==============================================================================
229
229
------------------------------------------------------------------------------
230
- *select .select_popup()*
231
- `select .select_popup` ()
230
+ *TextTransform .select_popup()*
231
+ `TextTransform .select_popup` ()
232
232
Pops up a selection menu, containing the available case transformers.
233
233
When a transformer is selected, the cursor position/range/columns will be used to replace the
234
234
words around the cursor or inside the selection.
@@ -239,8 +239,8 @@ made.
239
239
240
240
==============================================================================
241
241
------------------------------------------------------------------------------
242
- *telescope .telescope_popup()*
243
- `telescope .telescope_popup` ()
242
+ *TextTransform .telescope_popup()*
243
+ `TextTransform .telescope_popup` ()
244
244
Pops up a telescope menu, containing the available case transformers.
245
245
When a transformer is selected, the cursor position/range/columns will be used to replace the
246
246
words around the cursor or inside the selection.
@@ -251,8 +251,8 @@ made.
251
251
252
252
==============================================================================
253
253
------------------------------------------------------------------------------
254
- *utils .merge()*
255
- `utils .merge` ({t1} , {t2} )
254
+ *TextTransform .merge()*
255
+ `TextTransform .merge` ({t1} , {t2} )
256
256
Merges two tables into one. Same as `vim.tbl_extend("keep", t1, t2)`.
257
257
Mutates the first table.
258
258
0 commit comments