File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,10 @@ div.code {
304304 outline : none;
305305 margin : 5px 0 20px ;
306306 color : # def ;
307+ -webkit-tab-size : 2 ;
308+ -moz-tab-size : 2 ;
309+ -o-tab-size : 2 ;
310+ tab-size : 2 ;
307311}
308312 # repl_results , # repl_source_wrap {
309313 width : auto; height : auto;
Original file line number Diff line number Diff line change @@ -3892,6 +3892,16 @@ <h2>
38923892 # Listen for keypresses and recompile .
38933893 $ ( '#repl_source' ) . keyup - > compileSource ( )
38943894
3895+ # Use tab key to insert tabs
3896+ $ ( '#repl_source' ) . keydown ( e ) - >
3897+ if e . keyCode is 9
3898+ e . preventDefault ( )
3899+ textbox = e . target
3900+ # Insert tab character at caret or in selection
3901+ textbox . value = textbox . value [ 0. . . textbox . selectionStart ] + "\t" + textbox . value [ textbox . selectionEnd . . . ]
3902+ # Put caret in correct position
3903+ textbox . selectionEnd = ++ textbox . selectionStart
3904+
38953905 # Eval the compiled js .
38963906 evalJS = - >
38973907 try
Original file line number Diff line number Diff line change @@ -2317,6 +2317,16 @@ six = ->
23172317 # Listen for keypresses and recompile.
23182318 $('#repl_source').keyup -> compileSource ( )
23192319
2320+ # Use tab key to insert tabs
2321+ $ ( '#repl_source') . keydown ( e ) - >
2322+ if e . keyCode is 9
2323+ e . preventDefault ( )
2324+ textbox = e . target
2325+ # Insert tab character at caret or in selection
2326+ textbox . value = textbox . value [ 0. . . textbox . selectionStart ] + "\t" + textbox . value [ textbox . selectionEnd ...]
2327+ # Put caret in correct position
2328+ textbox . selectionEnd = ++ textbox . selectionStart
2329+
23202330 # Eval the compiled js .
23212331 evalJS = - >
23222332 try
You can’t perform that action at this time.
0 commit comments