Code Monkey home page Code Monkey logo

nmux's Introduction

nmux

nmux is a multiplexer for Neovim processes. It is very much a work in progress at the moment.

It currently has a built-in HTTP server that renders a single nvim process in your browser using websockets as a proof-of-concept. Short video of nvim rendered in a browser: https://youtu.be/mzfHBPHkT-E

The browser client was made mainly for prototyping. Native GUI clients for Linux, macOS, and Windows are being worked on.

Requirements

Neovim must be installed and nvim available in $PATH.

Install

There is an unstable Darwin (macOS) binary available. Windows and Linux builds will be available in the future.

You can also install it with Go:

$ go get -u github.com/tweekmonster/nmux/cmd/nmux

Usage

To run the server:

$ nmux --server --addr localhost:9999

To use Neovim in a browser, go to http://localhost:9999/

Note: The browser client has been tested and works in Google Chrome. The keyboard currently doesn't work in Firefox or Safari. If you're using an extension that gives you vi functionality, it will need to be disabled.

If you're using the Darwin release:

$ nmux.app/Contents/MacOS/nmux --server --addr localhost:9999

Then run nmux.app to connect to the server. If you're using a port other than 9999, you will need to run the client the same way, but without the --server flag. A future release will allow you to configure a remote server and optionally spawn a local server.

Goals

  • A server that manages multiple nvim processes.
    • Allow clients to connect over TCP.
    • Shared unnamed register between all nvim processes.
  • Native cross-platform client programs.
    • Each nvim instance can be a tab or a split view.
    • UI is always consistent. No platform-specific GUI elements, except for the title bar.
    • Image replacements for glyphs (in-editor icons).
    • Basic OS integration (clipboard, notifications, open URLs, etc.)
  • "Simplified" configuration.
    • Only basics need to be configured for client programs.
      • Client programs can be scripted and configured via vimscript.
    • No need to configure a terminal emulator or tmux. nvim can already be configured and scripted to no end.

The ultimate goal is to create native client apps that connect to the nmux server, making the terminal emulator an obsolete program in my daily work. This is not an attempt to create a new terminal emulatorβ€”nvim already has reliable terminal emulator built-in through libvterm.

This will make it possible to turn a Docker container or Virtual Machine (possibly even WSL) into your "IDE". You could take a snapshot of your workspaces and resume where you left off after a reboot.

nmux's People

Contributors

tweekmonster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nmux's Issues

Black screen

Environment:

  • Chrome 54.0.2840.98
  • macOS 10.12.1
  • NVIM v0.2.0-11-gf2c6cc2 Build type: Dev
  • go version go1.7.3 darwin/amd64

Repro:

  1. $ nmux --addr localhost:8080
  2. Go to http://localhost:8080/ in Chrome
  3. Type ixxx

Result:

untitled

Expect:

First line has characters "xxx".

Stdout from lo nmux:

$ nmux  --addr localhost:8080
2016/11/30 13:08:04 GET - /
2016/11/30 13:08:04 GET - /const.js
2016/11/30 13:08:04 GET - /string.js
2016/11/30 13:08:04 GET - /bytes.js
2016/11/30 13:08:04 GET - /animate.js
2016/11/30 13:08:04 GET - /keyboard.js
2016/11/30 13:08:04 GET - /screen.js
2016/11/30 13:08:04 GET - /socket.js
2016/11/30 13:08:04 GET - /nmux.js
2016/11/30 13:08:04 Connection from: http://localhost:8080
2016/11/30 13:08:07 Mouse Enabled
2016/11/30 13:08:07 Mode change: insert

In case my init.vim is a fault, I also ran an edited version of numx with nvim command line flags -u NORC. This does not fix the issue.

Feature request

Thanks for this tool, a lot of interesting cases to use. πŸ‘

Please add:

β€” font setup (it is difficult to read);
β€” support keys (I have some not working, like "<");
β€” multi connect/edit (I guess it's hard);
β€” view only (by address).

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.