   initialize: ->
     super
 
-    @vimState.onDidConfirmSelectList (transformer) =>
+    @vimState.onDidConfirmSelectList (item) =>
+      transformer = item.name
+      @target = transformer::target if transformer::target?
       @vimState.reset()
-      target = @target?.constructor.name
-      @vimState.operationStack.run(transformer.name, {target})
-    @focusSelectList({items: @getItems()})
+      if @target?
+        @vimState.operationStack.run(transformer, {@target})
+      else
+        @vimState.operationStack.run(transformer)
+
+    @focusSelectList(items: @getItems())
 
   execute: ->
     # NEVER be executed since operationStack is replaced with selected transformer


# TransformString
# ================================
transformerRegistry = []
class TransformString extends Operator
  @extend(false)
  trackChange: true
  stayOptionName: 'stayOnTransformString'
  autoIndent: false
  autoIndentNewline: false

  @registerToSelectList: ->
    transformerRegistry.push(this)

  mutateSelection: (selection, stopMutation) ->
    if text = @getNewText(selection.getText(), selection, stopMutation)

  hover: icon: ':split-string:', emoji: ':hocho:'
  requireInput: true
  input: null
  target: "MoveToRelativeLine"

  initialize: ->
    @onDidSetTarget =>
      @focusInput(charsMax = 10)
    super

  getNewText: (text) ->
    @input = "\\n" if @input is ''
