6 Replies - 1622 Views - Last Post: 14 June 2015 - 06:09 PM

#1 techsavant  Icon User is offline

  • New D.I.C Head

Reputation: -8
  • View blog
  • Posts: 13
  • Joined: 04-June 15

Re-map tab key inside post for easier code writing

Posted 04 June 2015 - 06:59 AM

I think something that would be VERY helpful would be to re-map the [tab] key when in the text area to make writing code (specifically indenting) a lot easier. All you have to do is write some jQuery to capture the keypress event, check for tab key, if tab key insert 4 spaces at the cursor. Easy Peasy. :)

Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: Re-map tab key inside post for easier code writing

#2 andrewsw  Icon User is online

  • say what now
  • member icon

Reputation: 6409
  • View blog
  • Posts: 25,903
  • Joined: 12-December 12

Re: Re-map tab key inside post for easier code writing

Posted 04 June 2015 - 07:46 AM

I am sure that DIC wants to continue encouraging members to copy and paste their real code directly into the editor; they shouldn't be typing significant amounts of code in the editor that would warrant this tab-feature.

(The reasoning is exemplified by your recent omission of the 'click' argument in your JS code.)
Was This Post Helpful? 0
  • +
  • -

#3 techsavant  Icon User is offline

  • New D.I.C Head

Reputation: -8
  • View blog
  • Posts: 13
  • Joined: 04-June 15

Re: Re-map tab key inside post for easier code writing

Posted 04 June 2015 - 08:03 AM

View Postandrewsw, on 04 June 2015 - 07:46 AM, said:

I am sure that DIC wants to continue encouraging members to copy and paste their real code directly into the editor; they shouldn't be typing significant amounts of code in the editor that would warrant this tab-feature.

(The reasoning is exemplified by your recent omission of the 'click' argument in your JS code.)


I copy/pasted that code. Are you the only mod on this site? You argue with everything I say and constantly give me negative criticism. How about some positive re-enforcement negative nancy?

Is this how you treat all the new people. I'm going back to stack.

peace
Was This Post Helpful? -1
  • +
  • -

#4 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 7472
  • View blog
  • Posts: 12,068
  • Joined: 28-September 07

Re: Re-map tab key inside post for easier code writing

Posted 04 June 2015 - 08:10 AM

I am an actual mod on this site and I do understand your concern regarding the tabbing issue. It can be an aggravation when you have to go back through line after line of copy/pasted code and use the space bar to add formatting.

Rest assured, your suggestion has been heard. Whether or not a change will be implemented, however, is a different story. I can't say one way or another whether this is a possibility given our current system limitations, or if it might be implemented in a future version of the site. I simply do not know, but your suggestion has been noted and we thank you for your feedback.
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13562
  • View blog
  • Posts: 54,110
  • Joined: 12-June 08

Re: Re-map tab key inside post for easier code writing

Posted 04 June 2015 - 08:11 AM

Hey - let's slow that roll, buddy. You are new to the site and chock full of enthusiasm - that's awesome! Like any new group I find it best to ease into the surroundings and see how folks operate. In this case a couple of mods (and myself) have been gently urging you to tweak your posting to be in align for the general goals of DIC. Friendly hints on some of the social mores and all that jazz. There is no reason to take umbrage to the recommendations.
Was This Post Helpful? 0
  • +
  • -

#6 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Re-map tab key inside post for easier code writing

Posted 08 June 2015 - 03:06 PM

Some DIC members have worked together on a Chrome extension to make the D.I.C. Editor have better shortcuts. I don't doubt you could fork this and add [tab] as a hotkey. Tab is already a hotkey in this extension.

https://github.com/c...ditor-Shortcuts

I am not a big fan of our editor. On the other hand, I'm not a big fan of BBCode in the first place. Rather than making the editor better, I'd rather see support added for Markdown formatting.
Was This Post Helpful? 0
  • +
  • -

#7 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2343
  • View blog
  • Posts: 9,398
  • Joined: 03-December 12

Re: Re-map tab key inside post for easier code writing

Posted 14 June 2015 - 06:09 PM

It would be nice, but isn't that big of an issue; as trouble code should be copied and pasted or you could change what the original issue is. I only see it when I am posting code for an example. But, power users expect the tab key to move to the next input, not indent. Pressing the spacebar a few times won't hinder anyone and adding it could cause adverse side effects.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1