Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

457
Vistas
Automatically generated Kotlin code (from Java code) loses all blank lines, making the code uglier

When using IntelliJ IDEA's automatic Java -> Kotlin converter, the blank lines are lost, making the code not that readable. Is there an approach to avoid this or recover the blank lines?

For example,

line1;
line2;

line3;
line4;

may be converted to something without the blank line at the middle.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

As a workaround you may do the following:

  1. Replace all blank lines with some comment. You may do this by replacing
<Ctrl+Shift+Enter>
\s*
<Ctrl+Shift+Enter>

with

<Ctrl+Shift+Enter>
//newLine
<Ctrl+Shift+Enter>

(don't forget to turn on usage of regex):

enter image description here

  1. Convert file from Java->Kotlin
  2. Delete comment (replace it with empty string)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda