I'm an emacs newbie and am using evil mode for text formatting. I have some text in the following format:
word1 = meaning with elaboration; word2 = simpler meaning; word3; word4 = much long explanation needed;
and want to wrap each of word1, word2, word3 etc.. into \textif\textbf{word1}}
, \textif\textbf{word2}}
etc. and transform the original text as
\textif{\textbf{word1}} = meaning with elaboration;
\textif{\textbf{word2}} = simpler meaning;
\textif{\textbf{word3}};
\textif{\textbf{word4}} = much long explanation needed;
In VIM, I verified separately that the following search+replace pattern applies the changes for word2
, word3
and word4
(I know this pattern won't change word1
)
:%s,;\s*\(\w*\),; \r\\textit\{\\textbf\{\1\}\},g
However, this doesn't work in emacs. All I see is Ex: Syntax error
Does vim-style search+replace work in emacs? Is there a way to apply the same search+replace in emacs?
make emacs
inside a Git checkout of Evil, decline running tests,C-x b foo.tex
,M-x tex-mode
, insert the text above, execute the ex command above). In both cases I see "[No match]" and upon executing the commands, I get no replacements. Ensure you're using the latest version and provide a minimal set of reproduction instructions.