projects > change_case.lua
1
change_case.nvim[github]
1
2
A small Neovim plugin that converts the word under the cursor
3
between cases: camel, upper camel, snake, kebab, screaming snake,
4
train, dot, lowercase and uppercase.
5
6
Pure Lua, no dependencies, with a test suite.
7
8
[Lua][Neovim]
9
11
12
return {
13
camel_case = {
14
separator = "",
15
word_transformer = function(word, index)
16
if index ~= 1 then
17
return capitalize(word:lower())
18
end
19
return word:lower()
20
end,
21
},
22
upper_camel_case = {
23
separator = "",
24
word_transformer = function(word)
25
return capitalize(word)
26
end,
27
},
28
snake_case = {
29
separator = "_",
30
word_transformer = function(word)
31
return word:lower()
32
end,
33
},
34
35
36
NORMAL~/oleksandr/projects/change_case.lua.../projects/change_case.luamainutf-8
Enter to open · :q to quit
keys
j / kmove the cursor line, or the tree cursor
hfocus the tree; in the tree, fold or go to the parent
l / Enterin the tree, unfold or open the file
gg / Gfirst / last line
clickput the cursor on a line; on README.sh, run the session again
:qquit to the shell
:help ?this table
q / Escclose this