duncan
7
An earlier thread on the same topic might also help you out.
Also you can do this from kak command line by just selecting some desired text to test.
Preserves NL character:
:echo %sh{echo "${kak_selection}" | sed 's/^[ \t]*//g'}
Removes NL character:
:echo %sh{echo ${kak_selection} | sed 's/^[ \t]*//g'}
Lets us know if you get it going. Bye.