Code Monkey home page Code Monkey logo

nvim-editcommand's Issues

prompt may change if user enters an interpreter

If a user enters a interpreter from within the terminal. e.g. python, then the prompt may change, $ -> >>>. We should provide a mechanism to automatically update the prompt, and reset the prompt, when the user leaves the interpreter.

To do this we could remap <cr> to run some commands if the current command is python/lua/ruby/etc.. and the same for whatever command is used to exit the interpreter. We will also need to handle the case where the user uses control characters, e.g. ^C, to leave the interpreter.

Method of clearing commandline is rather hacky

Because terminal buffers are 'nomodifiable' clearing the commandline after we have extracted the command is a bit of a hack.

The only way I've found that works is to have the keypresses required directly inside of the mapping (or having them inside a macro which is called directly from the mapping).

Extracting them into their own function does not work.
execute 'normal!...' does not work.
'feedkeys()' cannot be used because it does not run till the script has completed.

If we had the job id of the terminal then we could do call jobsend(id, "^C") but I'm unsure if terminals started using :terminal even get a job id.

call termopen('/usr/local/bin/fish') does return a job id so it could be used but then users would need to start their terminals via my plugin somehow, currently the plugin works regardless of how the terminal was started.

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.