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

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Scroll to Top