Reputation: 5462
I'm new to vim and I saw the following response in a vimgolf challenge:
:%s/\d\d/\=line('.')*10/<CR>ZZ
Where does the "=line('.')" come from? I've never seen it on any of the vim cheat sheets I've looked at.
Upvotes: 0
Views: 38
Reputation: 23809
Try :help line
.
line
is a VIM function. line('.')
returns the cursor position (line number).
Try this in VIM:
:echo line('.')
Upvotes: 2