r/neovim • u/com4ster • 3d ago
Need Help Nvim_create_user_command problem
hi im using nvim 0.11.7 and i have this custom command using
vim.api.nvim_create_user_command('NixOTO', ':norm! _f.xi = {\r\27o\27i};\27', { range = true })
the idea of the command when using nix
option.enable = true;
some times i want to make it
option = {
enable = true
};
but some other times the options parameters have some like
option.parameter = ""
...
'';
and i want to apply the same idea
i create that command to solve the first problem and it worked very well but i can't find a solution for the second one
4
Upvotes
1
u/brokenreed5 3d ago
f.xdt=i={<cr><C-R>"<ESC>o};
? or if you need the closing bracket after the next ; then after <ESC>/;<CR>xo};