4 ms·
True int main() { if (a < b) if (c > d) ; } You can switch between the less-than and greater-than sign using '%' key in vim. I bet no
by fctorial 7y ago
True
int main() {
if (a < b)
if (c > d)
;
}
You can switch between the less-than and greater-than sign using '%' key in vim. I bet no other ide can do that.
Vim is the javascript of text editors.
- guitarbill 7y agoi was initially confused, why would you want to jump or even convert between the '<' and '>' signs? but from trying it out on that snippet, '%' actually jumps to the nearest bracket and selects(?) the matching one [0]. now, i'm not 100% sure on the exact behaviour, but e.g. even a cursory test in sublime shows it will highlight the start and end brackets if i'm inside the if-expression and you can "expand selection to brackets". [0] https://hea-www.harvard.edu/~fine/Tech/vi.html https://hea-www.harvard.edu/~fine/Tech/vi.html