Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » I don't want tabs when copying code to the clipboard
I don't want tabs when copying code to the clipboard [message #69316] Sat, 28 June 2003 00:10 Go to next message
Eclipse UserFriend
Originally posted by: cay_horstmann.yahoo.com

I don't want tabs when copying code to the clipboard. (When I paste into
Netscape composer, tabs are 8 spaces!)

In Preferences->Java->Appearance->Code Formatter, I un-checked "Insert
tabs for indentation, not spaces". So, why do I have tabs at all?

I sure hope I won't have to go back to Emacs just to copy and paste code
snippets into another program.

Thanks for any help!

Cay
Re: I don't want tabs when copying code to the clipboard [message #69487 is a reply to message #69316] Sat, 28 June 2003 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Cay Horstmann wrote:
> I don't want tabs when copying code to the clipboard. (When I paste into
> Netscape composer, tabs are 8 spaces!)
>
> In Preferences->Java->Appearance->Code Formatter, I un-checked "Insert
> tabs for indentation, not spaces". So, why do I have tabs at all?

This option is controlling auto-format routines. For other typing, you
need to change Preferences->Java->Editor->Typing 'Insert spaces for
tabs' - at least it is called so in 3.0M1. I also had to disable
'pasting for correct indentation' - it is messing with layout in 100% cases.

Artur
Re: I don't want tabs when copying code to the clipboard [message #69507 is a reply to message #69487] Sat, 28 June 2003 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cay_horstmann.yahoo.com

Artur Biesiadowski wrote:

> Cay Horstmann wrote:
> > I don't want tabs when copying code to the clipboard. (When I paste into
> > Netscape composer, tabs are 8 spaces!)
> >
> > In Preferences->Java->Appearance->Code Formatter, I un-checked "Insert
> > tabs for indentation, not spaces". So, why do I have tabs at all?

> This option is controlling auto-format routines. For other typing, you
> need to change Preferences->Java->Editor->Typing 'Insert spaces for
> tabs' - at least it is called so in 3.0M1. I also had to disable
> 'pasting for correct indentation' - it is messing with layout in 100% cases.

> Artur

Thank you VERY much! It works beautifully. (I had to Source->Format to get
rid of the tabs, and then copy.)

Cay
Re: I don't want tabs when copying code to the clipboard [message #73541 is a reply to message #69487] Mon, 07 July 2003 12:40 Go to previous messageGo to next message
Eclipse UserFriend
Any idea where I would look to see how "pasting for correct indentation" is
implemented? I'd like to be able to insert formatted source code into the
existing code, but I don't know how to retrieve the current indentation
level at the cursor. I found an example using ICodeFormatter that requires
this information.


"Artur Biesiadowski" <abies@pg.gda.pl> wrote in message
news:bdk9v9$gq6$1@rogue.oti.com...
> Cay Horstmann wrote:
> > I don't want tabs when copying code to the clipboard. (When I paste into
> > Netscape composer, tabs are 8 spaces!)
> >
> > In Preferences->Java->Appearance->Code Formatter, I un-checked "Insert
> > tabs for indentation, not spaces". So, why do I have tabs at all?
>
> This option is controlling auto-format routines. For other typing, you
> need to change Preferences->Java->Editor->Typing 'Insert spaces for
> tabs' - at least it is called so in 3.0M1. I also had to disable
> 'pasting for correct indentation' - it is messing with layout in 100%
cases.
>
> Artur
>
Re: I don't want tabs when copying code to the clipboard [message #73558 is a reply to message #73541] Mon, 07 July 2003 12:46 Go to previous message
Eclipse UserFriend
Originally posted by: tom.eicher.gmx.ch.nodomain

check JavaAutoIndentStrategy.smartIndentAfterNewLine()

-tom

"Ernest Pasour" <Ernest.Pasour@sas.com> wrote in message
news:bec7q5$v1l$1@eclipse.org...
> Any idea where I would look to see how "pasting for correct indentation"
is
> implemented? I'd like to be able to insert formatted source code into the
> existing code, but I don't know how to retrieve the current indentation
> level at the cursor. I found an example using ICodeFormatter that
requires
> this information.
>
>
> "Artur Biesiadowski" <abies@pg.gda.pl> wrote in message
> news:bdk9v9$gq6$1@rogue.oti.com...
> > Cay Horstmann wrote:
> > > I don't want tabs when copying code to the clipboard. (When I paste
into
> > > Netscape composer, tabs are 8 spaces!)
> > >
> > > In Preferences->Java->Appearance->Code Formatter, I un-checked "Insert
> > > tabs for indentation, not spaces". So, why do I have tabs at all?
> >
> > This option is controlling auto-format routines. For other typing, you
> > need to change Preferences->Java->Editor->Typing 'Insert spaces for
> > tabs' - at least it is called so in 3.0M1. I also had to disable
> > 'pasting for correct indentation' - it is messing with layout in 100%
> cases.
> >
> > Artur
> >
>
>
Previous Topic:how to map a Project to existing directories?
Next Topic:Use Variables when attaching javadocs to jar
Goto Forum:
  


Current Time: Tue Jun 03 05:36:53 EDT 2025

Powered by FUDForum. Page generated in 0.03239 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top