Coder Social home page Coder Social logo

emacs-everywhere's Introduction

emacs-everywhere

AutoHotkey script to provide basic Emacs key bindings for various Windows apps

To use:

  1. Clone/download all the files to a folder.
  2. Download and install AutoHotkey
  3. Double-click EmacsEverywhere.ahk to launch.
  4. Ctrl+Alt+Enter toggles whether Emacs mode is active.
C-p	Previous line (move up)
C-n	Next line (move down)
C-f	Forward one character (move right) Note: conflicts with normal "find" shortcut
C-b	Back one character (move left) Note: conflicts with normal "bold" shortcut
M-f	Forward one word
M-b	Back one word
C-a	Start of line Note: conflicts with normal "Select all" shortcut
C-e	End of line
C-<	Start of page
C->	End of page
C-_	Undo
C-/ Undo
C-d	Delete character after cursor
M-d	Delete word after cursor
C-Backspace	Delete word before cursor
C-k	Kill line
C-w	Cut region
M-w	Copy region
C-y	Paste (no kill ring, so don’t get full Emacs yank ability)
C-Space Set mark
C-g Clear mark
M-< Goto home
M-> Goto end
C-o Open line above cursor
C-w Delete selection
C-S-f Send Ctrl-f (e.g., to trigger a 'Find' dialog)
C-u Universal arg - increase numeric prefix by multiples of 4 (for repeating movement/deletion commands)
C-M-F12 Reloads the script after making edits

Basic Emacs key bindings are supported for the following programs:

  • Notepad
  • FreeCommander XE
  • Cmd and PowerShell
  • P4V
  • Firefox address bar
  • Office Communicator / Skype
  • MusicBee
  • Visual Studio and R#
  • PyCharm
  • Outlook email editor
  • Word dialogs (Emacs key bindings for Word are available through VBacs

It should be fairly straightforward to add support to other programs. Feel free to contribute.

emacs-everywhere's People

Contributors

catweazle9 avatar tboevil 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

Watchers

 avatar  avatar  avatar

emacs-everywhere's Issues

swap caps lock and ctrl

It's pretty common to use caps lock as a control. However, simply swapping them makes the entire invalid since ^ is now caps lock. Do you have any ideas on how to tell autohotkeys to use caps lock as ^ in the script?

Disable it for specific apps

This is not an issue, I just don't know how to disable it for a specific application, I'm trying to disable it for VSCode.

Contributions

Are you guys interested in contributions to this? I've added a bunch new features that come from standard emacs:

  • Browser hot keys: switch tabs like emacs, C-x Left, C-x Right. New tab, C-x C-f, new window, C-x 5 2, refresh C-L and more.

  • Reverse undo/redo direction after C-g

  • C-u input to specify repeat #

  • Transpose functions, C-t, M-t, C-x C-t

  • select all C-x h

  • Replace M-%

  • Grow window taller, C-x ^

  • Kill window C-c C-c

  • Forward and back paragraph M-} and M-{

.. and others

How do I add programs that I want the keybindings to work with?

Do you have to find the right name of the program in order for it to work? For example I would like to use the keybindings within the Windows Start Menu search bar. I tried by adding programs to the list like below, which works for some programs, but not for others:

; GroupAdd, EmacsApps, - RStudio; don't work
; GroupAdd, EmacsApps, - rstudio; don't work
; GroupAdd, EmacsApps, - File Manager ; don't work
; GroupAdd, EmacsApps, - File Explorer ; don't work
; GroupAdd, EmacsApps, - Windows File Manager ; don't work
; GroupAdd, EmacsApps, - Zoom ; don't work
; GroupAdd, EmacsApps, - SpotifyMainWindow ; don't work or Spotify etc
; GroupAdd, Explorer, ahk_class CabinetWClass ;doesn't work
; GroupAdd, Explorer, ahk_class CabinetWClass ;doesn't work
; GroupAdd, EmacsApps, ahk_class ExploreWClass ;doesn't work
; GroupAdd, EmacsApps, ahk_class ExploreWClass ;doesn't work
; GroupAdd, EmacsApps, - PyCharm_2020.3.5 ; doesn't work
; GroupAdd, EmacsApps, - pythonw ; doesn't work
GroupAdd, EmacsApps, - PowerPoint
GroupAdd, EmacsApps, - Maple_2020
GroupAdd, EmacsApps, - Maple
GroupAdd, EmacsApps, - Adobe_Acrobat_Reader_DC_-_Nederlands
GroupAdd, EmacsApps, - Adobe
GroupAdd, EmacsApps, - Adobe_Acrobat_Reader_DC
GroupAdd, EmacsApps, - MozillaWindowClass
GroupAdd, EmacsApps, - Word
GroupAdd, EmacsApps, - OneNote
GroupAdd, EmacsApps, - Microsoft Office
GroupAdd, EmacsApps, - LibreOffice Writer
GroupAdd, EmacsApps, - VLC media player
GroupAdd, EmacsApps, - Excel
GroupAdd, EmacsApps, - Discord

Thank you for your script, don't want to use my computer without it!

Backspace/Del bug in normal mode

This script is great!
But I found when I switch to normal mode from emacs mode, in VS2017 or notepad, the Backspace and Delete keys went crazy!
They don't back/forward delete any characters, instead, when you press backspace or delete key, there will be really a string "Backspace" or "Delete"(without quotation marks) on your text filed or input method.
This bug doesn't happen in any other applications outside the default app list.

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.