Re:Regex character "$" doesn't mean "end-of-string"
by Izkata on Wednesday March 20, 2024 @10:09AM
(#39766787)
^ actually takes you to the first non-whitespace character in the line in vim. For start of line you want 0
Re:Regex character "$" doesn't mean "end-of-string"
by kataklasm on Wednesday March 20, 2024 @02:02PM
(#39770032)
I don't have (n)vi(m) open right now but I think this only applies to prepending spaces. For prepending tabs, 0 will take you to the first non-tab character as well.
Re:Regex character "$" doesn't mean "end-of-string"
by qu4z-2 on Wednesday March 20, 2024 @06:15PM
(#39772650)
Vim takes me to the first character in the line (the first tab), but displays the cursor on the last gridsquare the tab's width covers.
Re:Regex character "$" doesn't mean "end-of-string"
by Izkata on Wednesday March 20, 2024 @08:46PM
(#39773784)
If you have "set list" to make non-space whitespace visible, it'll go to the leftmost position. I did it long ago along with "set listchars=trail:.,tab:>-" so I can see not only where tabs are, but also their size/alignment without causing the text to shift.
^ - takes you to start of line $ - takes you to end of line