Reputation:
I should follow python style guide. And i want to delete all blank lines in the end of file but one.
Upvotes: 0
Views: 115
Reputation: 196566
Move the cursor to last line:
G
Vim considers a series of blank lines as a "paragraph", which may seem odd but works in our favour, here, because we can change the current paragraph:
cip
and immediately go back to normal mode:
<Esc>
Demo:
But, as far as I can tell, PEP8, doesn't mandate that and I suspect that the last blank line you want to keep may be a misunderstanding.
Upvotes: 2