cst<NavLink> in a macro works just fine in Vim with vim-surround.
Note that the "surround" you get in IdeaVim is not the real vim-surround, as the vim plug-ins available in IdeaVim are actually emulated and not running the same Vimscript code as the actual Vim plug-ins do (AFAICT).
I imagine the issue with this particular usage is that the
cst command will use something akin to an
input() to prompt for the new tab name and I can see how this could confuse the macro recording/replaying system and how keys are fed to Vim. (To be frank, when I first saw your question, I found it quite plausible that this would not work in Vim itself, but testing it showed that it actually does.)
So, is it a bug? Possibly. I guess it depends on how much the IdeaVim authors (who presumably also own the emulated plug-ins) care about close compatibility with Vim. In any case, I'd suggest raising this problem in the issue tracker of IdeaVim, since the authors are probably the ones who can make the call of whether that should (or even can) be fixed in IdeaVim's emulation of vim-surround.
As for a replacement, I'd suggest going with a
:s for replacing the
NavLinks. Depending on whether
li> is unique enough to not match anything other than the
</li>s, you could use something like:
I'm using a Visual selection as the range (the
'<,'> part), assuming you don't want this replacement in the whole buffer... So use a Visual first to delimit the region where you want this executed. Vim automatically adds the
'<,'> when you press
: from a Visual selection, so you typically don't have to type it. Not sure if IdeaVim does the same, I'd expect it will.