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….

Hinterlasse einen Kommentar

  Abonnieren  
Benachrichtige mich bei
Scroll to Top