Vim – delete last character of line

How to delete the last character of a line with vim:

:%s/.\{1}$//

If anybody knows why this works, please write it in the comments. I don’t really understand the syntax sometimes…. but it works….

0 0 vote
Article Rating
Abonnieren
Benachrichtige mich bei
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Scroll to Top