Coldfusion 如何选择变量名并使用Atom将其包围

Coldfusion 如何选择变量名并使用Atom将其包围,coldfusion,atom-editor,Coldfusion,Atom Editor,我决定从崇高的文本3跳到原子。我处理HTML、CSS、JS和大部分ColdFusion。我似乎无法理解Atom如何选择变量,比如: <cfoutput>testVariable</cfoutput> 我知道这很古老,但为了以防万一有人在看,这对我很有用: 在init.coffee中: wrapSelection = (selection, before, after) -> after ?= before selectedText = selection.

我决定从崇高的文本3跳到原子。我处理HTML、CSS、JS和大部分ColdFusion。我似乎无法理解Atom如何选择变量,比如:

<cfoutput>testVariable</cfoutput>

我知道这很古老,但为了以防万一有人在看,这对我很有用:

在init.coffee中:

wrapSelection = (selection, before, after) ->
  after ?= before
  selectedText = selection.getText()
  selection.insertText("#{before}#{selectedText}#{after}")

atom.commands.add 'atom-text-editor',
  'custom:wrap-with-pound', ->
     editor = @getModel()
     editor.transact ->
       wrapSelection(selection, "#", "#") for selection in editor.getSelections()
在keymap.cson中:

'atom-text-editor':
  'ctrl-#': 'custom:wrap-with-pound'

我知道这很古老,但为了以防万一有人在看,这对我很有用:

在init.coffee中:

wrapSelection = (selection, before, after) ->
  after ?= before
  selectedText = selection.getText()
  selection.insertText("#{before}#{selectedText}#{after}")

atom.commands.add 'atom-text-editor',
  'custom:wrap-with-pound', ->
     editor = @getModel()
     editor.transact ->
       wrapSelection(selection, "#", "#") for selection in editor.getSelections()
在keymap.cson中:

'atom-text-editor':
  'ctrl-#': 'custom:wrap-with-pound'

对于Dreamweaver,它是ctrl-shift-3或ctrl-。值得一试,使用Dreamweaver,它是ctrl-shift-3或ctrl-。值得一试,