Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

replwrap

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replwrap

wrap a program to accept input from websocket

  • 1.0.0-beta
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

replwrap

with replwrap you can wrap your repl in a websocket and send input from anywhere

replwrap: send input from vim to external repl

installation

npm i -g replwrap

to send input from vim (using vim-plug) add this to your ~/.vimrc

Plug 'raoofha/replwrap'

features

  • print and evaluate input received from --host localhost --port 60999

vim plugin features

  • use space to send current line or selection to repl
  • change server port depending on file type
    • .clj,.cljc 60999
    • .py 61000
    • .js 61001
  • more stuff like sending clojure form not implemented yet

usage

replwrap program [--port 60999 --host localhost --print --raw] -- [args...]

clojure

replwrap rlwrap -- lein repl

python

replwrap python3 --port 61000 --print -- -i

node

replwrap node --port 61001 --raw -- -i

for convenience you can put these line in your ~/.zshrc or whatever

alias wclojure="replwrap rlwrap -- lein repl"
alias wpython3="replwrap python3 --port 61000 --print -- -i"
alias wnode="replwrap node --port 61001 --raw -- -i"

similar software

  • vim-slime depenend on tmux/screen/... so if you want to use tmux or screen I think it must be fine I didn't test it myself

extra

if you want vi binding in your repl put these in your ~/.inputrc

set editing-mode vi
set keymap vi-insert
# these are for vi-insert mode
Control-l: clear-screen 

Keywords

FAQs

Package last updated on 11 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc