Adding surrounds for LaTeX #175
Unanswered
benbrastmckie
asked this question in
Q&A
Replies: 1 comment 9 replies
-
Hi there! You can try something like this: require("nvim-surround").setup({
surrounds = {
["x"] = {
add = { "\\textit{", "}" },
find = "\\textit%b{}",
delete = "^(\\textit{)().-(})()$",
},
}
}) For an explanation on how/why this works, please see Bonus: This might be of some interest to you if you're working with LaTeX commands a bit, as a generalization of the surround you're asking for. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to be able to surround a text object
x
with\textit{ }
, and similarly for other LaTeX operations. I'm struggling to achieve this by changing the default config that is provided. Any help would be much appreciated.Beta Was this translation helpful? Give feedback.
All reactions