1

I am not sure why, but when I tried to create a new java file and paste some java code into it, vim turned them into comments and added additional indentation to the code.

 16 // import com.myproject.queue.BatchQueueDriver;
 17 //
 18 // import com.codahale.metrics.health.HealthCheckRegistry;
 19 // import org.apache.curator.framework.CuratorFramework;
 20 // import org.springframework.context.ConfigurableApplicationContext;
 21 //
 22 // import java.util.concurrent.TimeUnit;
 23 // import java.util.function.BooleanSupplier;
 24 //
 25 // public class WorkerLauncher extends AbstractLauncher {
 26 //
 27 //   private final ConfigurableApplicationContext ctx;
 28 //     private final CuratorFramework curator;
 29 //       private final BatchQueueDriver<?> jobQueue1Driver;
 30 //         private final BatchQueueDriver<?> jobQueue2Driver;
 31 //           private final BatchQueueDriver<?> jobQueue3Driver;

How can I disable this behaviour?

Version 8.0.1365 on OSX mojave

  • 3
    :set paste might be useful. Is the text you're pasting include a comment line or start with one? – muru Jan 14 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.