Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-youtube-lyte domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wordpress/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wordpress/wp-includes/functions.php on line 6114
vim - delete all blank lines - The Grok Shop

vim – delete all blank lines

To delete all blank lines in vim:

:g/^$/d
  •  “:” -> enter command-line mode
  • “g” -> do the action globally (apply it to all lines to which the subsequent match applies)
  • “/^$/” -> regex to mean “a line is a match if it contains nothing from start to finish”
  • “d” -> the action to do for matches is “delete”

Note: to see the lines which would be deleted without actually deleting them, just remove the action (“d”):

:g/^$/

Of course, you can undo any mistakes with: ESC then u

Sharing is caring!

Leave a Comment

Your email address will not be published. Required fields are marked *