From 36be36db446b480a1e1edfc4aea2f2e6972b490f Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 30 Dec 2024 19:23:14 +0100 Subject: minor oversight --- nvim/ftplugin/php.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nvim/ftplugin/php.lua') diff --git a/nvim/ftplugin/php.lua b/nvim/ftplugin/php.lua index a34bb10..8d7c165 100644 --- a/nvim/ftplugin/php.lua +++ b/nvim/ftplugin/php.lua @@ -1,10 +1,10 @@ -local copy_indent_macro = "0\"_D" -- clear current line +local copy_indent_macro = "^\"_d0" -- clear current indentation .. "?." -- find first non-empty line above .. "noh" -- clear highlight .. "^\"yy0" -- copy indentation to y register - .. "" -- return to original line - .. "\"yp" -- paste y register - .. "A" -- enter insert mode + .. "0" -- return to original line + .. "\"yP" -- paste y register + .. "a" -- enter insert mode vim.keymap.set({ "n" }, "o", "o" .. copy_indent_macro, { buffer = 0 }) vim.keymap.set({ "n" }, "O", "O" .. copy_indent_macro, { buffer = 0 }) -- cgit v1.3.1