 
     # Register package commands
     @subscriptions.add atom.commands.add 'atom-text-editor',
-      'list-edit:select': => @select()
-      'list-edit:cut':    => @cut()
-      'list-edit:copy':   => @copy()
-      'list-edit:paste':  => @paste()
-      'list-edit:delete': => @delete()
+      'list-edit:select': => @selectCmd()
+      'list-edit:cut':    => @cutCmd()
+      'list-edit:copy':   => @copyCmd()
+      'list-edit:paste':  => @pasteCmd()
+      'list-edit:delete': => @deleteCmd()
 
   deactivate: ->
     @subscriptions.dispose()


    # [bracket-space-1ELTbracket-space2]
    # [bracket-space-1ELTsep-space-1,sep-space-2ELTbracketspace2]
  delete: ->
    console.log 'Executing command list-edit-delete'

# for testing in console:
# > atom.packages.activatePackage('list-edit')
# > atom.packages.activePackages['list-edit'].mainModule.<function>

# Some test lists:
# [1,[1,2,[ ,, ]]]


    # Not cut, but some test code to easily visualize ranges
    editor = atom.workspace.getActiveTextEditor()
    if editor?
      cursorPos = editor.getCursorBufferPosition()
      console.log 'cursor row ' + cursorPos.row + ' col ' + cursorPos.column
      textBuffer = editor.getBuffer()
      bufferText = textBuffer.getText()

      listElements = TextManipulation.getListElements bufferText, textBuffer.characterIndexForPosition cursorPos

      bufferRanges = _.map listElements, (elt) ->
        TextManipulation.getRangeForIxRange textBuffer, [elt.eltStart, elt.eltEnd]

      console.log 'bufferRanges:'
      console.log bufferRanges

      if bufferRanges? && bufferRanges.length > 0
        editor.setSelectedBufferRanges(bufferRanges)

  copyCmd: ->
    console.log 'Executing command list-edit-copy'
    # select
    # copy

    # Select, strip whitespace and copy to clipboard

  pasteCmd: ->
    console.log 'Executing command list-edit-paste'

    # On element, replace element with stripped clipboard, while preserving whitespace
