Skip to content

Commit 4d6e3c8

Browse files
committed
Improve message in window
1 parent bc75e53 commit 4d6e3c8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plugin/vim-kaizen.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
function VimKaizen(pat, alt)
2-
local txt = string.format('You entered "%s", which is an anti-pattern. Consider using "%s" from now on.', pat, alt)
2+
local txt1 = string.format('You entered "%s", which is an anti-pattern.', pat)
3+
local txt2 = string.format('Consider using "%s" from now on.', alt)
4+
local txt3 = 'Press "q" or ESC to close window.'
35
local buf = vim.api.nvim_create_buf(false, true)
4-
vim.api.nvim_buf_set_lines(buf, 0, -1, false, {txt})
6+
vim.api.nvim_buf_set_lines(buf, 0, -1, false, {txt1, txt2, '', txt3})
57
local ui = vim.api.nvim_list_uis()[1] or vim.api.nvim_list_uis()[0]
68

79
local width = 50
@@ -29,7 +31,7 @@ local vimKaizenPatterns = {
2931
{'n', 'd$', 'D'},
3032
{'n', 'y$', 'Y'},
3133
{'n', 'ggVG', 'yG'},
32-
{'n', 'cc', 'S'}
34+
{'n', 'cc', 'S'},
3335
}
3436

3537
for _, tuple in ipairs(vimKaizenPatterns) do

0 commit comments

Comments
 (0)