Reputation: 854
In vim script, col("$")
will return the column # of the end of the line. I want something similar to get the column # for the beginning of the line, something like col("^")
. But that doesn't work, nor can I find anything that does that.
I want this so that I know the amount of white-space at the beginning of a line.
Upvotes: 3
Views: 465
Reputation: 854
The best I can come up with right now to do this is
normal! ^
col(".")
That's not an ideal solution, though, because I'm essentially just moving the cursor where I want and then checking the column.
Upvotes: 0