Coder Social home page Coder Social logo

iron.nvim's Introduction

iron.nvim

Interactive Repls Over Neovim

What is it for?

Iron is a simple utility that helps you bringing repls for the current ft, together with some mappings that allow you to quickly interact with it.

It provides commands below:

  • IronRepl to start a repl based on current buffer;
  • IronPromptRepl to prompt you for which repl type it should open;
  • IronPromptCommand to prompt for which command to run for current ft (if no definition for current ft, prompts for ft);
  • IronDumpReplDefinition to dump on the logfile the current definition for repls. Useful for debugging.
  • IronClearReplDefinition resets data to original state. If something gets messy, this should restore the behavior.

It also provides the following functions:

  • IronSendSpecial allows calling python functions for the current ft. See more below.
  • IronSendMotion gets a chunk of text from current buffer based on the motion sent. Used by ctr.
  • IronSend is a general function for sending text to the repl.

Language special mappings

Iron allows that you add some commonly used tasks as special mappings for each language. Currently, only clojure has several of those implemented. Those mappings allow you the get chunks of text from the current buffer and issue commands specifically for the current ft, such as calling a test for that file/namespace, importing a dependency, toggling debugging state or whatever makes sense for the language/repl.

If you think you are repeating yourself too much, feel free to open a PR implementing one of those.

Installing

As iron.nvim is a remote plugin, it requires you to :UpdateRemotePlugins after installing or upgrading it.

To install, simply do as follows:

  Plug 'hkupty/iron.nvim'

  "remember to update
  UpdateRemotePlugins

Using

After opening a repl for current buffer, iron has defined a general mapping to send text to it: ctr.

ctr operates on text objects, so you can ctr3j, ctrap, 0ctr$, and any other combination of commands/mappings you may need to send text to the repl.

Iron has also set conveniently a mapping for calling back the previous command: cp (remember as call previous).

Iron also can have special, language/repl based mappings as defined per-repl. Refer to Language Special Mappings above for more information.

Status

Although iron is currently experimental/beta and may have bugs and/or missing functionality, it has already a nice range of languages implemented and quite a nice support for clojure already. Other languages may be lacking support, but reportedly work ok.

Feel free to fork and extend iron. It is completely open source and community driven.

Please report any bugs by opening issues and/or PRs.

iron.nvim's People

Contributors

alok avatar bpetri avatar calopter avatar hkupty avatar jduc avatar jrolfs avatar laserswald avatar lugoues avatar spencerwi avatar tsfoster avatar zegervdv avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.