https://github.com/holgerbrandl/send2terminal
Intellij plugin to send line or selection to terminal
https://github.com/holgerbrandl/send2terminal
intellij
Last synced: 3 months ago
JSON representation
Intellij plugin to send line or selection to terminal
- Host: GitHub
- URL: https://github.com/holgerbrandl/send2terminal
- Owner: holgerbrandl
- License: bsd-2-clause
- Created: 2017-01-16T07:55:29.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-31T20:01:08.000Z (about 2 years ago)
- Last Synced: 2025-04-05T09:41:50.841Z (6 months ago)
- Topics: intellij
- Language: Java
- Size: 199 KB
- Stars: 17
- Watchers: 1
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Send To Terminal
================Intellij plugin to send line or selection to a terminal
The following modes are supported
* Send current line or selection (default shortcut `meta alt ENTER`)
* Send current and move focus to next line with expression (default shortcut `meta alt shift ENTER`)Supported evaluation targets are
* [Cmdr](http://cmder.net/) via [conemu](https://conemu.github.io/) (Windows)
* [R GUI](https://www.r-project.org/) (Windows)
* Terminal (MacOS)
* [iTerm2](https://www.iterm2.com/) (MacOS)## Kotlin Support
The plugin comes with special support for Kotlin, namely
1. Paste Mode Support:
With the stock Kotlin-REPL, one can not evaluate certain multi-line expressions such as
```kotlin
listOf("foo", "bar")
.map{it+"2"}
```Please vote for [KT-13319](https://youtrack.jetbrains.net/issue/KT-13319) to push for a REPL paste-mode. Alternatively you could use `kshell` from https://github.com/khud/sparklin and enable the paste mode support in the preferences of this plugin.
2. Automatic Import Detection
The plugin will detect imports in a kotlin document and will evaluate imports in the target terminal prior to the user selection/expression.
3. Expression Guessing
The plugin will guess the scope of the expression under the cursor when using the shortcut `ctr+alt+shift+enter`. The scope barriers are named fuctions or the file itself.
## Custom shortcut actions
Up to 4 custom actions can be defined to send the current selection/line to the evaluation target. Below some examples are shown for `R`
Those shortcut actions are exposed via the context menu and can be assigned to custom keyboard bindings:
## How to build?
Clone from `https://github.com/holgerbrandl/send2terminal`, open project in Intellij, Import from Gradle, and click "Run".
## Support & Development
Feel welcome to suggest features or improvments by submitting an [issue](https://github.com/holgerbrandl/send2terminal/issues)
## References
* [Official Plugin Page ](https://plugins.jetbrains.com/idea/plugin/9409-send-to-terminal) in Jetbrains` Plugin Repository