v1
This commit is contained in:
parent
88969e03a2
commit
1cd9fc15e8
1 changed files with 11 additions and 0 deletions
11
init.lua
11
init.lua
|
|
@ -0,0 +1,11 @@
|
|||
local function split_sentences()
|
||||
local view = vim.fn.winsaveview() -- keep cursor & view stable
|
||||
vim.cmd([[%s/\([.?!]\)\s\+/\1\r/ge]])
|
||||
vim.fn.winrestview(view)
|
||||
end
|
||||
|
||||
-- run after leaving insert mode
|
||||
vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, {
|
||||
pattern = { "*.md", "*.txt" },
|
||||
callback = split_sentences
|
||||
})
|
||||
Loading…
Reference in a new issue