Whitespace, empty lines and tabs
Convert tabs to spaces, strip empty lines and trailing whitespace.
Start file
convert tabs to spaces strip all blank lines and remove any trailing spaces
End file
convert tabs to spaces strip all blank lines and remove any trailing spaces
View Diff
1,5c1,3 < convert tabs to spaces < < strip all blank lines < < and remove any trailing spaces --- > convert tabs to spaces > strip all blank lines > and remove any trailing spaces
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 662 remaining solutions by signing in and submitting your own entry
#663 Zac sliker / @Zacsliker - Score: 125 - 01/29/20 @ 16:29
<Left>d5w<Down>dwd<Left><Left><Left><Left>d5w<Down>dw<Left>d6wi<Up><Up><50-53> convert tabs to spaces<CR> strip all blank lines<CR> and remove any trailing spaces<Esc>[201~<Down><Down><BS><BS><Esc>:wq!<CR>
0 comments
Created by: @igrigorik Tweet
663 active golfers, 2979 entries
Leaderboard (lowest score wins):
#516 - Pradeep Kumar ๐ฎ๐ณ๐ฎ๐ณ๐ฎ๐ณ๐ฎ๐ฑ๐ฎ๐ฑ๐ฎ๐ฑ / @pradeep6kumar
12/12/2012 at 01:21PM