I want to be able to wrap a line conditionally.
if it matches a regex pattern then it doesn't wrap.
What is the best way to implement this?
I want to be able to wrap a line conditionally.
if it matches a regex pattern then it doesn't wrap.
What is the best way to implement this?
I believe you can call
editor.updateOptions({ wordWrap: "off" })
to switch between the states after the editor has been created. Depending on your code you could call this function when your condition is true or false