Coder Social home page Coder Social logo

okkemacs's Introduction

Okkemacs

okkemacs is a collection of setting for Emacs to ease the transition to Emacs from “Mundane Editors”.

Sadly after some years of use of “Mundane Editors” and other software CTRL-X,* *CTRL-C,* *CTRL-V,* *CTRL-Z,* *CTRL-F, *CTRL-Y are cast in muscular memory that it is very difficult to change your behaviour.

“Mundane Editors” use some keybindings that “One True Editor” dislike notably CTRL-X and CTRL-C, *CTRL-Y and CTRL-F has a specific means in Emacs.

There are some solutions, but nothing is a perfect one, and neither this is a perfect one.

So I’ve found a way to move the behaviour of CTRL-X and CTRL-C to a different keybindings with a package, but as many other packages it is quite invasive, modifying eve other things, like the usual Emacs command for movements and similar things.

So probably best approach is to restrict the “common key press” to those strictly necessary avoid conflicts and to satisfy muscular memory.

So I’ve solved to achieve a mixed approach:

  • CTRL-C is translated to CTRL-D
  • CTRL-X is translated to CTRL-W

This is sufficient to have the usual keys to make cut copy and paste, plus undo and redo, so you have these shortcuts:

  • CTRL-X to cut
  • CTRL-C to copy
  • CTRL-V to paste
  • CTRL-Z to undo using undo-fu-only-undo
  • CTRL-Y to redo using undo-fu-only-redo
  • CTRL-SHIFT-Z to invoke the standard Emacs function undo-redo that some find broken

Note the absence of the dedicated shortcuts:

  • CTRL-O to open a file
  • CTRL-S to save a file
  • CTRL-F to start the search

With these choices you have the standard Emacs behavior to start search:

  • CTRL-S to start a search forward
  • CTRL-R to start a search backward

And the usual movement commands:

  • CTRL-F to move a character forward
  • CTRL-B to move a character backward

This will ease the mnemonics for other movement relate to word that are bound to Meta-B and Meta-F.

Some may think that is a mess, but it is a precise design choice, as there are many documentation around that use the standard Emacs shortcuts, so changing them will means that you are left in a “undefined state” as soon you exit the standard text editing, having the doubt that the solution is worse than the problem.

Side effects is that you have to remeber only two things:

  • the minimal substitution map cited above
  • the new special prefix keys :
    • CTRL-D instead of CTRL-C
    • CTRL-W instead of CTRL-X

I have ignored every other considerations about ergonomics, as probably the best solution is to take some pauses from the work, and use a decent keyboard, plus make some exercises.

To ease the use of the new buttons, there are many extensions, I have decided to use which-keys that will open a window on the bottom of the screen (it is configurable, if you know what you are doing) and will tell you what key combination after the prefix key is available.

This will greatly ease the use of the new keybindings, as you have a reminder on the lower part of the screen.

This work is my first big Emacs project, so feel free to make comments and questions and even proposal on how to improve it.

Notes:

  • CheatSheet is not updated yet.
  • keymap.org is updated but not verified yet. It should be almost correct.

Donations

You could help the development, making a little donation at:

PayPalMe

Blog

English language Blog

Regards

Carlo D.

okkemacs's People

Contributors

onekk avatar

Watchers

 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.