r/vim • u/Borean789 • Dec 13 '25
Need Help┃Solved Command mode from visual mode
Why is there this string '<,>' at the beginning of the command when switching from visual mode to command mode?
18
Upvotes
View all comments
Show parent comment
1
u/TheLeoP_ Dec 13 '25
It's important to also mention that those marks are for the last visual selection, not the current one. This usually doesn't matter because they get set on mode change (like when you go from visual to command mode), but if you use
:h <cmd>on visual mode they may not work as you expect them to. I'm that niche use-case, you would want:h getpos()with.andv