Menu

#4 Maintain existing indentation after pasting a multiline snip

open
nobody
None
5
2011-01-27
2011-01-27
Ken
No

Maintain existing indentation after pasting a multiline snippet or surround with.
I re-put it here coz the previous one cannot show the indentation

For example: if the original code is
public class Foo
public int foo () {
System.out.println("nothing");
System.out.println("nothing");
<----- I want to insert a multiline snippet here
System.out.println("nothing");
return 123;
}
}

and the snippet is
--------------------
System.out.println("snippet");
System.out.println("snippet");
System.out.println("snippet");
--------------------

I want the result to be

public class Foo
public int foo () {
System.out.println("nothing");
System.out.println("nothing");
System.out.println("snippet");
System.out.println("snippet");
System.out.println("snippet");
System.out.println("nothing");
return 123;
}
}

instead of:

public class Foo
public int foo () {
System.out.println("nothing");
System.out.println("nothing");
System.out.println("snippet");
System.out.println("snippet");
System.out.println("snippet");
System.out.println("nothing");
return 123;
}
}

Discussion

  • Ken

    Ken - 2011-01-27

    Example without display problem

     
  • Ken

    Ken - 2011-01-27

    Please look at the attached file instead......the details here cannot show the whitespace i have entered

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.