meta-] indents selected lines

This commit is contained in:
Corey Johnson
2012-04-10 09:55:13 -07:00
parent 95a2be5fa5
commit ec221bfee0
5 changed files with 41 additions and 0 deletions

View File

@@ -105,6 +105,11 @@ class Selection extends View
@autoOutdentText() if shouldOutdent
@clearSelection()
indentSelectedRows: ->
range = @getBufferRange()
for row in [range.start.row..range.end.row]
@editor.buffer.insert([row, 0], @editor.tabText) unless @editor.buffer.lineLengthForRow(row) == 0
autoIndentText: (text) ->
if @editor.autoIndent
mode = @editor.getCurrentMode()