Last active
March 4, 2020 10:55
-
-
Save KevinLiebergen/30df96bf24581586e50a829d6c1b76b5 to your computer and use it in GitHub Desktop.
Sustituir desde vim varias lineas en blanco por una sola
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 modos diferentes: | |
Sustituye en todo el fichero (:%s`) 3 o más saltos de línea (`\n\n\n\+`) por 2 (`\r\r`) y en la línea actual (`/g`), separado por `/`. | |
:%s/\n\n\n\+/\r\r/g | |
Ejecutando el comando cat al propio fichero con el parámetro -s (Suppress repeared empty output lines) | |
:%!cat -s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment