How do you record a macro to toggle boolean values (true/false)?
Answer
qa/true\|false\ncgn<C-r>=@"=='true'?'false':'true'\n<Esc>q
Explanation
Record a macro using cgn with an expression register to toggle between true and false. Advanced use of expression evaluation.