Skip to content

Windows Operating With Emacs Enhancements, Allows Emacs-like commands and keybinds in Windows and is based on EWOW -- Emacs Way of Operating Windows

License

Notifications You must be signed in to change notification settings

captainflasmr/wowee

Repository files navigation

README of wowee

img/WOWEE---Windows-Operating-With-Emacs-Enhancements_banner.jpg

Summary

WOWEE is a set of AutoHotKey scripts designed to bring Emacs-like commands and keybindings to the Windows operating system. Based on the concept of EWOW (Emacs Way of Operating Windows), WOWEE allows you to use Emacs-style navigation and commands throughout your Windows environment.

Whats New

v0.3.5 <2024-08-03>

feat: Add global keybinds and minor refactor

  • Added a new file `keybinds-global.ahk` which includes essential keybindings for workspace switching, quitting windows, and starting applications like Emacs and Firefox.
  • Updated `wowee.ahk` to include `keybinds-global.ahk` for enhanced functionality with global keybindings.

Details:

  • `keybinds-global.ahk`:
    • Introduced local utility functions for workspace navigation and window management.
    • Added workspace switching keybindings (`#i`, `#u`).
    • Added window quitting keybinding (`#q`).
    • Added startup applications keybindings (`#m` for Emacs, `#n` for Firefox).
  • `wowee.ahk`:
    • Included `keybinds-global.ahk` to make use of the new global keybindings.

v0.3.4 <2024-07-19>

feat: Add xref navigation functions and keybindings

  • Introduced xref_find_references(), xref_go_back(), and xref_find_definitions() functions in commands.ahk for navigation.
  • Assigned new keybindings in keybinds-core.ahk:
    • Alt+. for xref_find_definitions()
    • Alt+, for xref_go_back()
    • Alt+? for xref_find_references()

v0.3.3 <2024-07-01>

A little support for Notepad++:

  • isearch
  • comment line

v0.3.2 <2024-07-01>

Separated individual ergonomic key-mappings as thus:

  • wowee–caps_to_ctrl.ahk
  • wowee–ralt_to_ctrl.ahk

These are extra files that can be run in addition to the main wowee.ahk for some common ergonomic keyboard Emacs mappings.

v0.3.1 <2024-06-30>

This commit has added windows, frames support

  • kill frame (C-x c)
  • split window vertically (C-x 3)
  • maximize window (C-x 1)
  • next window (C-x o)
  • suspend frame (C-z)
  • reorganisation of kanban
  • reorganisation of commands.ahk to better group

v0.3.0 <2024-06-28>

This commit has split out ahk files into apps, core and init:

  • Added comment-line
  • Added mark-whole-buffer
  • Refined isearch
  • Added application specific bindings in keybinds-apps.ahk for Visual Studio and VSCode
  • Update README to reflect design changes
  • Added beginning_of_buffer and end_of_buffer core mappings
  • Added mark_whole_buffer core mapping

v0.2.0 <2024-06-26>

This commit introduces several new functions to enhance the usability and functionality of the `commands.ahk` script. Notable additions include:

  • Implementation of `isearch_backward` and `isearch_forward` functions for improved search capabilities, allowing for backwards and forwards in-document searches with initialization and continuation logic.
  • Addition of `recenter_line`, `indent_line`, and `backward_kill_word` functions to enrich text editing commands.
  • Enhancement of `select_line` and `goto_line` functions for better line selection and navigation.
  • The `quit_g` function extends quitting capabilities to also reset the `selecting` and `searching` states.
  • Modifications to `next_lines` and `previous_lines` to increase the number of lines navigated with each command from 3 to 6, improving scroll efficiency.
  • Update to `kill_ring_save` to include an escape key press, ensuring a more comprehensive cleanup post-operation.
  • Improved the README.org kanban to more easily differentiate between command sections and to define those commands I am not implementing (IGNORE) and those additional commands (EXTRA)

v0.1.0 <2024-06-19>

Initial version

Quick Start / Installation / Usage

  1. **Install AutoHotKey**: Download and install AutoHotKey from [AutoHotKey’s official website](https://www.autohotkey.com/).
  2. **Run WOWEE**: Double-click on the `wowee.ahk` script to start WOWEE. Once running, Emacs commands will be available in your Windows environment.
  3. **Quit WOWEE**: To quit WOWEE, right-click the AutoHotKey icon in the task tray and select “Exit.”

Features

  • Emacs-like commands and keybindings in Windows
  • Based on EWOW – Emacs Way of Operating Windows
  • Written in AutoHotKey v2
  • Includes various Emacs style navigation commands
  • (a) Ergonomic keyboard layout options
    • map caps lock key to control
    • map right alt key to control
  • Easily add your own keybindings by modifying AHK source files
  • (b) Bindings bespoke to individual applications

Development

(a) Ergonomic keyboard layout options

Additional AHK files that can be run in parallel with the main wowee.ahk file if you would prefer some extra ergonomic mappings.

For example it is common to map the Caps Lock key to the Control key to avoid the dreaded Emacs pinky, which can be performed by running up :

wowee--caps_to_ctrl.ahk

I prefer to map the right hand Alt key to the Control key by running:

wowee--ralt_to_ctrl.ahk

Both can also be run if desired!

(a) Bindings bespoke to individual applications

  • I am playing around with the idea of application specific bindings within the keybinds.ahk file, for example something like :
    ;; -------------
    ;; Visual Studio
    ;; -------------
    ;; Shortcut rebindings:
    ;;
    ;; Control+p Control+s : Text Editor : Incremental Search
    ;; Control+p Control+r : Text Editor : Incremental Search Reverse
    ;; Control+p Control+l : Text Editor : Scroll Recenter
    ;; Control+p Control+f : Text Editor : Format selection
    
    #HotIf WinActive("ahk_class VisualStudio")
    ^r::isearch_backward("{Shift down}{F3}{Shift up}" "^p^r")
    ^s::isearch_forward("{F3}" "^p^s")
    ^l::recenter_line()
    ^i::indent_line()
    ^+i::indent_line()
        

    These will be placed in a separate ahk file called keybinds-apps.ahk.

    The comments would indicate which commands require re-bindings, or redefining the shortcuts. For example, in Visual Studio, Control+I is an incremental search which in emacs is used for multiple actions including indentation, cycling, e.t.c, so at times rather than relying on either default application keybindings or the general windows keybindings an explicit mapping may be required for full functionality.

    So as part of the application definition, why not add in the re-mappings in a comment!

    Also I might have to create some more generic functions to accept arguments defining application specific commands, as demonstrated above with isearch_forward and isearch_backward.

    As part of this I might have to expand the kanban per application, or maybe separate kanbans on which functions have been implemented.

Foibles

  1. I have yet to implement C-x C-<key> but these functions, for example like save-buffer (C-x C-s) and save-buffers-kill-terminal (C-x C-z) are still accessible, but without the second Control, for example C-x s and C-x z
  2. Any application shortcut re-mappings are using the convention C-p C-<key>, this is temporary as I never use C-p (print) and thought this would be a good unique leader key combination.

Applications

The applications I am currently looking to support are the following:

  • Visual Studio
  • VSCode
  • NotePad++

kanban

This kanban board is keeping track of those original EWOW functions.

The IGNORE column includes functions that I am definitely not going to implement.

The EXTRA section are additional commands that I am adding.

There is a prefix type indicator for each command referring to the specific type:

(C) - Core Emacs commands (VS) - Visual Studio specific (VC) - VSCode specific (N++) - NotePad++ specific (E) - Extra

and any command with an asterisk is an unconventional Emacs keybinding which will probably get fixed sometime in the future!

TODODOINGDONEIGNORE
(C) REGION COMMANDS(E) global windows navigation keybindings(C) MOTION COMMANDS(C) JUMPING AROUND COMMANDS
- (C) mark_word(VS) VISUAL STUDIO- (C) forward_char (C-f)- (C) scroll_left
- (C) yank_pop- (VS) recenter_line (C-l)- (C) backward_char (C-b)- (C) scroll_right
- (C) kill_region- (VS) indent_line (C-i)- (C) forward_word (M-f)(C) NEWLINE AND INDENT COMMANDS
- (C) delete_backward_char(VC) VSCODE- (C) backward_word (M-b)- (C) open_line
- (C) kill_word- (VC) isearch_backwards (C-r)- (C) next_line (C-n)(C) EDIT COMMANDS
- (C) kill_whole_line- (VC) isearch_forwards (C-s)- (C) previous_line (C-p)- (C) transpose_chars
(C) NEWLINE AND INDENT COMMANDS- (VC) comment_line (C-;)(C) JUMPING AROUND COMMANDS- (C) transpose_words
- (C) newline- (VC) recenter_line (C-l)- (C) scroll_down (C-v)- (C) transpose_lines
- (C) delete_indentation(N++) NOTEPAD++- (C) scroll_up (M-v)(C) CASE CONVERSION COMMANDS
(C) EDIT COMMANDS(E) PROGRAM SPECIFIC PRESETS- (C) move_beginning_of_line (C-a)- (C) upcase_region
- (C) redo(E) ERGO PRESET SELECTION- (C) move_end_of_line (C-e)- (C) downcase_region
- (C) query_replace(E) xref_go_back<a href=”file:README.org::*- (C) beginning_of_buffer (M-<)">- (C) beginning_of_buffer (M-<)- (C) upcase_word
- (C) overwrite_mode- (C) downcase_word
(C) INSERT PAIRS COMMANDS- (C) goto_line (M-g g)- (C) capitalize_word
- (C) insert_parentheses(C) REGION COMMANDS(C) MACRO RECORDING COMMANDS
- (C) insert_comment- (E) mark_whole_line (M-s ,)(C) ADD IGNORE FRAMES
- (C) indent_new_comment_line- (C) mark_whole_buffer (C-x h)(C) ADD MOUSE EVENTS
(C) OTHER COMMANDS- (C) kill_ring_save (M-w)
- (C) shell- (C) yank (C-y)
- (C) shell_command- (C) delete_char (C-d)
- (C) facemenu- (C) backward_kill_word (M-BKSP)
- (C) help- (C) kill_line (C-k)
(C) SYSTEM COMMANDS(C) NEWLINE AND INDENT COMMANDS
- (C) ignore- (C) indent_for_tab_command (C-i)
- (C) repeat(C) EDIT COMMANDS
(C) UNIVERSAL ARGUMENT COMMANDS- (C) undo_only (C-/)
(C) FILES COMMANDS- (C) search_forward (C-s)
- (C) write_file- (C) search_backward (C-r)
- (C) find_file(C) SYSTEM COMMANDS
- (C) dired- (C) set_mark_command (C-SPC)
(C) WINDOWS FRAMES COMMANDS- (C) set_c-x_command (C-x)
- (C) delete_window- (C) keyboard_quit (C-g)
- (C) split_window(C) FILES COMMANDS
(C) ADD HOOKS- (*C) save_buffer (C-x s)
(C) ADD GENERIC GOTO LINE(C) WINDOWS FRAMES COMMANDS
(C) ADD KILL RING- (*C) kill_frame (C-x c)
(VC) VSCODE- (C) next_window (C-x o)
- (VC) indent_line (C-i)- (C) suspend_frame (C-z)
- (E) isearch-yank-word-or-char(C) ADD C-X (C-x)
- (C) previous_window(VS) VISUAL STUDIO
- (VS) isearch_backwards (C-r)
- (VS) isearch_forwards (C-s)
- (VS) comment_line (C-;)
- (VS) split window vert (C-x 3)
(N++) NOTEPAD++
- (N++) isearch_backwards (C-r)
- (N++) isearch_forwards (C-s)
- (N++) comment_line (C-;)
(E) xref_find_definitions
(E) xref_find_references

Configuration

WOWEE is composed of several AutoHotKey scripts, each serving a specific purpose to replicate Emacs functionalities:

wowee.ahk

The top level script to be run, contains the following scripts along with some potential ergonomic key-mappings which if not desired can be commented out:

RAlt::Control
CapsLock::Control
#Include fundamental.ahk
#Include commands.ahk
#Include keybinds-apps.ahk
#HotIf !WinActive("ahk_class Emacs")
#Include keybinds-core.ahk
#Include keybinds-init.ahk
#HotIf

fundamental.ahk

This script provides a set of fundamental functions and variables that are used to implement Emacs-like commands and keybindings.

commands.ahk

This script includes the basic implementation of Emacs commands.

commands_util.ahk

This script contains simple utility functions used by the command scripts.

keybinds-core.ahk

This script defines the default core keybindings for Emacs-like commands, which will be a fallback for any windows application.

keybinds-apps.ahk

This script defines the application specific commands, typically commands that have been remapped to accommodate the chosen commands.

Comments within the ahk file indicate the potential re-mappings.

keybinds-init.ahk

Analogous to the init.el file or Emacs init file in which all the users bespoke keybindings will exist. An example of my preferred keybindings has been supplied.

keybinds-global.ahk

Essential keybindings for workspace switching, quitting windows, and starting applications like Emacs and Firefox.

Installation and Setup

  1. **Download WOWEE**: Download the WOWEE scripts from the repository.
  2. **Extract Files**: Extract the files to a directory of your choice.
  3. **Run the Script**: Double-click `wowee.ahk` to start using WOWEE.

Customization

Editing Keybindings

You can customize the keybindings by editing the `keybinds.ahk` file. Open the file in any text editor and modify the keybindings according to your preferences. Refer to the AutoHotKey documentation for the syntax and available key options.

Adding New Commands

To add new commands, you can edit the `commands.ahk` and `commands_util.ahk` files. Define your new commands and utility functions, and then bind them to keys in `keybinds.ahk`.

Troubleshooting

If you encounter any issues while using WOWEE, try the following steps:

  1. **Check AutoHotKey Version**: Ensure you have the latest version of AutoHotKey installed.
  2. **Script Errors**: If there are errors in the script, AutoHotKey will usually display a message with details. Use this information to debug and fix the issue.
  3. **Conflicting Programs**: Some programs might have conflicting keybindings. Try closing other programs to see if the issue is resolved.

Contributing

Contributions to WOWEE are welcome! If you have suggestions for improvements or want to add new features, feel free to submit a pull request.

  1. Fork the repository
  2. Create your feature branch (`git checkout -b feature/YourFeature`)
  3. Commit your changes (`git commit -am ‘Add your feature’`)
  4. Push to the branch (`git push origin feature/YourFeature`)
  5. Create a new pull request

License

WOWEE is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgements

Special thanks to the creators of AutoHotKey and the Emacs community for their inspiration and contributions to keyboard efficiency.

Contact

For any questions or issues, please open an issue on the GitHub repository or contact the maintainer at [email@example.com].

Enjoy using WOWEE and bring the power of Emacs navigation to your Windows experience!

ROADMAP

(C) REGION COMMANDS

- (C) mark_word

- (C) yank_pop

- (C) kill_region

- (C) delete_backward_char

- (C) kill_word

- (C) kill_whole_line

(C) NEWLINE AND INDENT COMMANDS

- (C) newline

- (C) delete_indentation

(C) EDIT COMMANDS

- (C) redo

- (C) query_replace

- (C) overwrite_mode

(C) INSERT PAIRS COMMANDS

- (C) insert_parentheses

- (C) insert_comment

- (C) indent_new_comment_line

(C) OTHER COMMANDS

- (C) shell

- (C) shell_command

- (C) facemenu

- (C) help

(C) SYSTEM COMMANDS

- (C) ignore

- (C) repeat

(C) UNIVERSAL ARGUMENT COMMANDS

(C) FILES COMMANDS

- (C) write_file

- (C) find_file

- (C) dired

(C) WINDOWS FRAMES COMMANDS

- (C) delete_window

- (C) split_window

(C) ADD HOOKS

(C) ADD GENERIC GOTO LINE

(C) ADD KILL RING

(VC) VSCODE

- (VC) indent_line (C-i)

(E) global windows navigation keybindings

(VS) VISUAL STUDIO

- (VS) recenter_line (C-l)

- (VS) indent_line (C-i)

(VC) VSCODE

- (VC) isearch_backwards (C-r)

- (VC) isearch_forwards (C-s)

- (VC) comment_line (C-;)

- (VC) recenter_line (C-l)

(N++) NOTEPAD++

(E) PROGRAM SPECIFIC PRESETS

(E) ERGO PRESET SELECTION

(E) xref_go_back

(C) JUMPING AROUND COMMANDS

- (C) scroll_left

- (C) scroll_right

(C) NEWLINE AND INDENT COMMANDS

- (C) open_line

(C) EDIT COMMANDS

- (C) transpose_chars

- (C) transpose_words

- (C) transpose_lines

(C) CASE CONVERSION COMMANDS

- (C) upcase_region

- (C) downcase_region

- (C) upcase_word

- (C) downcase_word

- (C) capitalize_word

(C) MACRO RECORDING COMMANDS

(C) ADD IGNORE FRAMES

(C) ADD MOUSE EVENTS

(C) MOTION COMMANDS

- (C) forward_char (C-f)

- (C) backward_char (C-b)

- (C) forward_word (M-f)

- (C) backward_word (M-b)

- (C) next_line (C-n)

- (C) previous_line (C-p)

(C) JUMPING AROUND COMMANDS

- (C) scroll_down (C-v)

- (C) scroll_up (M-v)

- (C) move_beginning_of_line (C-a)

- (C) move_end_of_line (C-e)

- (C) beginning_of_buffer (M-<)

- (C) end_of_buffer (M->)

- (C) goto_line (M-g g)

(C) REGION COMMANDS

- (E) mark_whole_line (M-s ,)

- (C) mark_whole_buffer (C-x h)

- (C) kill_ring_save (M-w)

- (C) yank (C-y)

- (C) delete_char (C-d)

- (C) backward_kill_word (M-BKSP)

- (C) kill_line (C-k)

(C) NEWLINE AND INDENT COMMANDS

- (C) indent_for_tab_command (C-i)

(C) EDIT COMMANDS

- (C) undo_only (C-/)

- (C) search_forward (C-s)

- (C) search_backward (C-r)

- (E) isearch-yank-word-or-char

(C) SYSTEM COMMANDS

- (C) set_mark_command (C-SPC)

- (C) set_c-x_command (C-x)

- (C) keyboard_quit (C-g)

(C) FILES COMMANDS

- (*C) save_buffer (C-x s)

(C) WINDOWS FRAMES COMMANDS

- (*C) kill_frame (C-x c)

- (C) next_window (C-x o)

- (C) previous_window

- (C) suspend_frame (C-z)

(C) ADD C-X (C-x)

(VS) VISUAL STUDIO

- (VS) isearch_backwards (C-r)

- (VS) isearch_forwards (C-s)

- (VS) comment_line (C-;)

- (VS) split window vert (C-x 3)

(N++) NOTEPAD++

- (N++) isearch_backwards (C-r)

- (N++) isearch_forwards (C-s)

- (N++) comment_line (C-;)

(E) xref_find_definitions

(E) xref_find_references

About

Windows Operating With Emacs Enhancements, Allows Emacs-like commands and keybinds in Windows and is based on EWOW -- Emacs Way of Operating Windows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published