Skip to content

Instantly share code, notes, and snippets.

View Palanikannan1437's full-sized avatar
😄

M. Palanikannan Palanikannan1437

😄
View GitHub Profile
@Palanikannan1437
Palanikannan1437 / surround-visual-selection-with-backticks.lua
Last active May 31, 2024 16:09
A simple lazy snippet to quickly surround selected code with triple backticks in neovim to paste in ChatGPT ;)
local function surround_selection_with_backticks()
-- Get the visual selection
local lines = get_visual_selection()
-- Ensure lines are not nil
if not lines or #lines == 0 then
print("No lines selected")
return
end