try

Paste fragment of code into try buffer then try it!

t9md

348

7

0.5.0

MIT

GitHub

Try

Paste texts to predetermined place.

gif

Why?

While I'm reading code and encounter the code which I can not understand how it works.
What I should do in such situation is try that code and see how it works.
This package improve your repetitive copy and paste workflow into one step.

  1. Select buffer
  2. Invoke try:paste command.
  3. Your selected code is pasted at bottom of try buffer.
  4. Start try&see by running script runner package like script.

Features

Commands

How to use

Select text in editor then

Keymap

No keymap by default.

e.g.

'atom-text-editor:not([mini])':
  'f10': 'try:paste'
'atom-text-editor.vim-mode-plus.normal-mode':
  'space T': 'try:open-file'
  'T': 'try:paste'
'atom-text-editor.vim-mode.visual-mode':
  'T': 'try:paste'