Jump to content




"anti" tab


  • You cannot reply to this topic
10 replies to this topic

#1 KingMachine

  • Members
  • 122 posts

Posted 09 February 2013 - 06:41 AM

In MOST text editors, specifically compilers, there is the option to use SHIFT + TAB. It UNTABS the line rather than tabbing it. It would be greatly appreciated, and simple, to add this into the edit program.

I'm not really experienced enough to do it, but it would be something like if key shift is being pressed then if tab is being pressed do oppositeOfTab().

I'll be working on it though and if I get it done I'll post the source. (by the way, thank you for entire line tabs, I hate having to hit home first)

#2 GopherAtl

  • Members
  • 888 posts

Posted 09 February 2013 - 06:46 AM

not simple actually, as thre is no way to tell if shift is held down or not when tab is recieved. You could detect shift followed by tab, but this could easily "misfire."

#3 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 09 February 2013 - 06:48 AM

Just do this:
1. 'home'
2. 'delete'
3. 'delete'

not backspace, DELETE
This will delete the default two spaces that are added. No need to get all fancy.

#4 Cruor

  • Members
  • 413 posts
  • LocationNorway

Posted 09 February 2013 - 07:27 AM

Do what cranium said, and its called decrease indent(ation), just incase you wondered :3

#5 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 09 February 2013 - 04:46 PM

View PostCranium, on 09 February 2013 - 06:48 AM, said:

Just do this:
1. 'home'
2. 'delete'
3. 'delete'

not backspace, DELETE
This will delete the default two spaces that are added. No need to get all fancy.

Or if you're on a mac, instead of pressing delete (no such thing I think, at least on a laptop there isn't) hold function while pressing backspace.

#6 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 09 February 2013 - 04:50 PM

XP mac......yeah...... ew. </personal preference>

#7 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 09 February 2013 - 06:13 PM

View PostGravityScore, on 09 February 2013 - 04:46 PM, said:

Or if you're on a mac, instead of pressing delete (no such thing I think, at least on a laptop there isn't) hold function while pressing backspace.
On Mac the 'backspace' key is called 'delete' so you press 'fn' + 'delete' to do the same as delete. OR if you have a full Apple Wired Keyboard it does have a 'delete' button in addition to the 'delete' ('backspace')

It's a bit like tab... LWJGL is programmed wrong and to do a tab in MC you need to press 'fn' + 'tab' to use tab... Damn LWJGL...

#8 KingMachine

  • Members
  • 122 posts

Posted 09 February 2013 - 07:04 PM

View PostGopherAtl, on 09 February 2013 - 06:46 AM, said:

not simple actually, as thre is no way to tell if shift is held down or not when tab is recieved. You could detect shift followed by tab, but this could easily "misfire."
I'm well aware of this actually. coroutine seems to be my only option

#9 GopherAtl

  • Members
  • 888 posts

Posted 09 February 2013 - 08:00 PM

..what?

#10 ElvishJerricco

  • Members
  • 803 posts

Posted 09 February 2013 - 08:11 PM

View PostGravityScore, on 09 February 2013 - 04:46 PM, said:

View PostCranium, on 09 February 2013 - 06:48 AM, said:

Just do this:
1. 'home'
2. 'delete'
3. 'delete'

not backspace, DELETE
This will delete the default two spaces that are added. No need to get all fancy.

Or if you're on a mac, instead of pressing delete (no such thing I think, at least on a laptop there isn't) hold function while pressing backspace.

I did not know this keyboard shortcut... Many thanks.

#11 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 10 February 2013 - 12:25 AM

Nice idea, not gonna happen until we have a reliable way to detect if a key is held down.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users