asciidoctor / atom-asciidoc-assistant

⚛ AsciiDoc Assistant package for the Atom editor.
https://atom.io/packages/asciidoc-assistant
MIT License
9 stars 2 forks source link

Extract variable #6

Open ggrossetie opened 8 years ago

ggrossetie commented 8 years ago

One of my favorite feature in Intellij IDEA is the "extract variable" quick action: https://www.jetbrains.com/help/idea/2016.1/extract-variable.html

With Ctrl+Alt+V, I can quickly extract a selection into a variable. If more than one occurrence of the selected expression is found, then Intellij can replace all occurrence with this new variable.

I think technical writers could really benefit from this feature. Example:

= Title

== Links

 * http://asciidoctor.org/docs/user-manual/[User manual]
 * http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Quick reference]
  1. Select "http://asciidoctor.org/docs"
  2. Ctrl+Alt+V
  3. Extract to uri-asciidoctor-docs
= Title
:uri-asciidoctor: http://asciidoctor.org/docs

== Links

 * {uri-asciidoctor}/user-manual/[User manual]
 * {uri-asciidoctor}/asciidoc-syntax-quick-reference/[Quick reference]

I don't know if this kind of feature should be implemented here, in the Atom preview package, in a new Atom package... ?

ldez commented 8 years ago

Good idea. For now, in a new package :wink:

ldez commented 8 years ago

You can use my new Atom package generator: https://www.npmjs.com/package/generator-atom-package-plus

ggrossetie commented 8 years ago

Ohhh nice :+1: