Git Product home page Git Product logo

control-mode's People

Contributors

mattiasb avatar mrkkrp avatar purcell avatar stephendavidmarsh 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

Watchers

 avatar  avatar  avatar  avatar  avatar

control-mode's Issues

C-m doesn't work

When the mode is enabled C-m doesn't work (it should insert new lines or do whatever RET is bound to).

Add visual feedback other than "Control" lighter in mode line

The package would benefit from good visual feedback similar to that used in Evil mode. That is, when we're in “normal” mode let cursor be in form of box (by default, it will be configurable), while in “insert” mode let it be in form of thin bar.

I made heavy use of this package in short time and it would be absolutely impossible to use without this visual feedback. If you agree that this will be an improvement, I will include necessary changes into pull request I'm working on.

Make it respect key translations

When defining key binding translations with key-translation-map, they are currently not respected in control-mode. For example, if I have:

(define-key key-translation-map (kbd "C-x ;") (kbd "C-x C-;"))

Then in control-mode the translation won't happen and x ; will be equal to C-x ;, not C-x C-;. Is it possible to somehow support translations of key bindings in control-mode?

By the way, great package. I'm planning to open a PR with cosmetic improvements, also consider tagging the package, so it will be available in MELPA stable for example.

Improve control-mode to handle multiple control

I really like control-mode. I think it would be more useful if it has the following feature: Using number argument as a place holder for the number of controls the next command is going to use:

My idea basically is, if you are in control mode, pressing a number (i.e. 2,3 or 10 - a random number) will count the amount of controls "pressed" in the future. By default, if the control mode is on, pressing normal characters keys (any character but modifiers and number key) consumes a "control token" and control count is decreased. If a character key is pressed along with other modifier key such as Meta or Super, a "control token" is not decreased and the character key is combined with the other modifier keys.

For example, suppose we have 2 "control tokens". We press x first, which will consume a token and the key sequence is considered C-x. However, for the next character key such as f, we press Meta as a prefix, a token will not be consumed and the key sequence is M-f.

In the mode line, along with letter C to indicate control mode is on, there should be another variable which displays the token count. For example. [C 2] indicates that control mode is on, and the tokens remaining in used is 2. Default is [C 1], which means if a key is pressed, it will decreased to 0, and further key strokes are counted as part of key sequence without control prefix (except other modifier keys if pressed).

Doing it this way, we won't have to add any Elisp code to avoid collisions between key sequences for different commands i.e. as you provided in your description. Also, instead of pressing C-z to get into this mode, we can actually bind directly to Control key to switch between control/edit mode (kinda like vi, but for Emacs users). This way, Emacs users won't have to use Evil mode to get something like Vi and still can use their original key bindings.

I am looking forward to it! I hope you can implement it. I am willing to learn Elisp to help it out.

Support org-mode

Most 'unbound' keys in org-mode are bound to 'org-self-insert-command, rather than 'self-insert-command.

Supporting org-mode out of the box appears to be just a matter of adding 'org-self-insert-command to 'control-mode-overrideable-bindings.

`isearch-forward is not working in control-mode

Normally, isearch-forward is bound to C-s, according to the documentation, it should be available in control mode as s, but when I hit s in control mode, s- is displayed in the echo area, and seemed to wait for input to complete.

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.