🪴 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

keybinds: update insertsection keymap

robin c07649a6 99730478

+6 -2
+6 -2
config/plugin/keymap.insertsection.lua
··· 6 6 7 7 -- Insert template: 'commentstring' but with '%s' replaced by section symbols 8 8 local comment_string = vim.bo.commentstring 9 - local content = string.rep(symbol, total_width - (comment_string:len() - 2)) 9 + local comment_str_len = #comment_string:format("") 10 + local content = string.rep(symbol, total_width - comment_str_len) 10 11 local section_template = comment_string:format(content) 11 - vim.fn.append(vim.fn.line("."), section_template) 12 + local okn = vim.fn.append(vim.fn.line("."), { section_template }) 13 + if okn == 1 then 14 + return 15 + end 12 16 13 17 -- Enable Replace mode in appropriate place 14 18 local inner_start = comment_string:find("%%s")