Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions ace_shim.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = (I, self) ->
"text"
else
extension

extension = (path) ->
if match = path.match(/\.([^\.]*)$/, '')
match[1]
Expand All @@ -26,30 +26,30 @@ module.exports = (I, self) ->
self.extend
editor: ->
aceEditor

initSession: (file) ->
session = ace.createEditSession(file.content())

session.setMode("ace/mode/#{modeFor(extension(file.path()))}")

session.setUseSoftTabs true
session.setTabSize 2

aceEditor.setOptions
highlightActiveLine: true
showPrintMargin: false

# Filetree observable binding
updating = false
file.content.observe (newContent) ->
return if updating

session.setValue newContent

# Bind session and file content
session.on "change", ->
updating = true
file.content session.getValue()
updating = false

return session
91 changes: 0 additions & 91 deletions actions.coffee

This file was deleted.

Loading