Removing unicode combine character - vim -


i have found great tip how implement strikethrough unicode characters in gvim - http://vim.wikia.com/wiki/create_underlines,_overlines,_and_strikethroughs_using_combining_characters

it working great me, stuck in creating "reverse function" final result achive in pressing e.g. t striketrough characters , repeating remove striketrough characters. think able create such function missing core thing , how remove combine character. in mentioned article there mentioned can

:set delcombine 

which enables deleting 'x' combine character. not :)

so able change following script stated in article add there fucntion remove strikethrough selection?

" modify selected text using combining diacritics command! -range -nargs=0 overline        call s:combineselection(<line1>, <line2>, '0305') command! -range -nargs=0 underline       call s:combineselection(<line1>, <line2>, '0332') command! -range -nargs=0 doubleunderline call s:combineselection(<line1>, <line2>, '0333') command! -range -nargs=0 strikethrough   call s:combineselection(<line1>, <line2>, '0336')  function! s:combineselection(line1, line2, cp)   execute 'let char = "\u'.a:cp.'"'   execute a:line1.','.a:line2.'s/\%v[^[:cntrl:]]/&'.char.'/ge' endfunction 

i appreciate :)


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -