Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t9md/atom-try
Paste fragment of code into try buffer then try it!
https://github.com/t9md/atom-try
atom
Last synced: 8 days ago
JSON representation
Paste fragment of code into try buffer then try it!
- Host: GitHub
- URL: https://github.com/t9md/atom-try
- Owner: t9md
- License: mit
- Created: 2015-05-05T03:21:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-11T12:50:55.000Z (about 8 years ago)
- Last Synced: 2024-10-29T18:24:54.001Z (about 2 months ago)
- Topics: atom
- Language: CoffeeScript
- Homepage: https://atom.io/packages/try
- Size: 28.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Try
Paste texts to predetermined place.![gif](https://raw.githubusercontent.com/t9md/t9md/12fba4ff60861ae1acd973407c93a62edf61c956/img/atom-try.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](https://atom.io/packages/script).# Features
- Paste selected text to bottom of `try` buffer by default.
- Without selection, simply open `try` buffer.
- `try` buffer is merely simple file, not special scratch buffer.# Commands
- `try:paste`: paste to try file.
- `try:open-file`: open try file by reading extension from user interactively.# How to use
Select text in editor then
- Invoke `try:paste` via command palette or keymap.# Keymap
No keymap by default.e.g.
* With `F10`
```coffeescript
'atom-text-editor:not([mini])':
'f10': 'try:paste'
```* if you are using [vim-mode-plus](https://atom.io/packages/vim-mode-plus), following are suggestion which I use.
```coffeescript
'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'
```