From 03c63bf3bb3d2c93dac0bb481a7be6b4251c3e6e Mon Sep 17 00:00:00 2001
From: talha <->
Date: Sat, 6 Dec 2025 15:09:52 +0500
Subject: Added snippet, minor updates to config
---
after/ftplugin/html.lua | 19 ++++++++++++++++---
init.lua | 4 ++--
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/after/ftplugin/html.lua b/after/ftplugin/html.lua
index 3a318c8..fc89319 100644
--- a/after/ftplugin/html.lua
+++ b/after/ftplugin/html.lua
@@ -6,15 +6,15 @@ function Snippets(snipType, value)
elseif snipType == "tag" then
snippet = string.format("<%s>%s>", value, value)
elseif snipType == "linebreak" then
- snippet = [[]]
+ snippet = [[
]]
elseif snipType == "hrline" then
- snippet = [[
]]
+ snippet = [[
]]
elseif snipType == "link" then
snippet = string.format([[%s]],
value["url"], value["label"]
)
elseif snipType == "pieces" then
- if value == "document" then
+ if value == "init" then
snippet = [[
@@ -34,6 +34,18 @@ html {
}
]]
+ elseif value == "cjHeader" then
+ snippet = string.format([[
+
+ ]], os.date("%Y/%m/%d"))
end
end
return snippet
@@ -84,6 +96,7 @@ vim.keymap.set('i', "", function()
JumpInTag()
end, {remap=true})
+
vim.keymap.set('i', "", function()
dt = os.date("%Y/%m/%d")
WriteText(dt)
diff --git a/init.lua b/init.lua
index e061d87..4b67e5b 100644
--- a/init.lua
+++ b/init.lua
@@ -22,7 +22,7 @@ vim.opt.cursorline = true
vim.opt.scrolloff = 8
vim.opt.updatetime = 50
vim.opt.linebreak = false
-vim.cmd[[let &showbreak = "> "]]
+vim.cmd[[let &showbreak = "←"]]
if vim.fn.executable('rg') > 0 then
vim.opt.grepprg = 'rg --vimgrep'
@@ -103,7 +103,7 @@ function WriteLines(toWrite)
end
local posYX = vim.api.nvim_win_get_cursor(0)
print(posYX[0], posYX[1], posYX[2])
- vim.api.nvim_buf_set_lines(0, posYX[1]-1, posYX[2], true, toWrite)
+ vim.api.nvim_buf_set_lines(0, posYX[1]-1, posYX[1]-1, true, toWrite)
end
function StrSplit(inpstr, sep)
--
cgit v1.2.3