Skip to content

Instantly share code, notes, and snippets.

View ubaldot's full-sized avatar

ubaldot ubaldot

View GitHub Profile
@ubaldot
ubaldot / visual_surround.vim
Last active August 18, 2024 22:03
Markdown and Vim: quick Bold, italic and strikethough toggle.
def Surround(pre: string, post: string)
var pre_len = strlen(pre)
var post_len = strlen(post)
var [line_start, column_start] = getpos("'<")[1 : 2]
var [line_end, column_end] = getpos("'>")[1 : 2]
if line_start > line_end
var tmp = line_start
line_start = line_end
line_end = tmp