Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t9md/atom-vim-mode-plus-replace-with-execution
TransformString with result of execution
https://github.com/t9md/atom-vim-mode-plus-replace-with-execution
atom vim-mode-plus
Last synced: 25 days ago
JSON representation
TransformString with result of execution
- Host: GitHub
- URL: https://github.com/t9md/atom-vim-mode-plus-replace-with-execution
- Owner: t9md
- License: mit
- Created: 2016-01-22T18:50:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-09T04:30:57.000Z (about 7 years ago)
- Last Synced: 2024-10-29T18:24:53.257Z (2 months ago)
- Topics: atom, vim-mode-plus
- Language: JavaScript
- Homepage: https://atom.io/packages/vim-mode-plus-replace-with-execution
- Size: 17.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/t9md/atom-vim-mode-plus-replace-with-execution.svg?branch=master)](https://travis-ci.org/t9md/atom-vim-mode-plus-replace-with-execution)
# vim-mode-plus-replace-with-execution
This is operator plugin for [vim-mode-plus](https://atom.io/packages/vim-mode-plus).
Replace selected text with the result of stdout of execution.
So, **you have to be very careful every time you use this command**.
Don't set keymap if you are working in critical environment to avoid unwanted invocation.Pipe(`|`) is not supported.
![](https://raw.githubusercontent.com/t9md/t9md/eabb959026d79c19956a6d5d3569a47e8849989c/img/replace-with-execution.gif)
## Configuration
### registerToSelectList: (default false)
Register as member of transformers for `TransformStringBySelectList`.
You have to restart Atom to make change take effect.### Invocation
Three kinds of invocation.
- Keymap
- Command palette
- From select-list prompted by `vim-mode-plus:transform-string-by-select-list` command## Keymap example
No keymap by default. Set following keymap to in your `keymap.cson`.
```coffeescipt
'atom-text-editor.vim-mode-plus.normal-mode, atom-text-editor.vim-mode-plus.visual-mode':
'f5': 'vim-mode-plus-user:replace-with-execution'
'shift-f5': 'vim-mode-plus-user:replace-with-execution-keep-original-text
```or For specific grammar
- Github markdown
```coffeescipt
'atom-text-editor.vim-mode-plus.normal-mode[data-grammar="source gfm"],
atom-text-editor.vim-mode-plus.visual-mode[data-grammar="source gfm"]':
'f5': 'vim-mode-plus-user:replace-with-execution'
'shift-f5': 'vim-mode-plus-user:replace-with-execution-keep-original-text'
```