{"id":13436316,"url":"https://github.com/zk-phi/ewow","last_synced_at":"2025-04-14T13:03:01.481Z","repository":{"id":9755197,"uuid":"11720870","full_name":"zk-phi/ewow","owner":"zk-phi","description":"Use Emacs command (almost) everywhere","archived":false,"fork":false,"pushed_at":"2021-10-16T23:31:37.000Z","size":629,"stargazers_count":66,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-27T20:19:03.648Z","etag":null,"topics":["ahk","emacs"],"latest_commit_sha":null,"homepage":"","language":"AutoHotkey","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zk-phi.png","metadata":{"files":{"readme":"Readme.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-28T14:41:54.000Z","updated_at":"2024-10-13T09:51:28.000Z","dependencies_parsed_at":"2022-07-28T19:29:59.660Z","dependency_job_id":null,"html_url":"https://github.com/zk-phi/ewow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fewow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fewow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fewow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fewow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zk-phi","download_url":"https://codeload.github.com/zk-phi/ewow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223633990,"owners_count":17176871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ahk","emacs"],"created_at":"2024-07-31T03:00:46.617Z","updated_at":"2024-11-08T04:35:01.463Z","avatar_url":"https://github.com/zk-phi.png","language":"AutoHotkey","readme":"* EWOW -- Emacs Way of Operating Windows\n** Features\n\n+ allows Emacs-like commands and keybinds (almost) everywhere in\n  Windows\n\n  - keyboard macros\n\n  - prefix digit-argument\n    - ex. C-3 C-n -\u003e go 3 lines down\n\n  - Emacs-style region selection (i.e. set-mark-command)\n\n  - ... etc\n\n** Usage\n\nInstall AutoHotKey_L, and run \"ewow.ahk\" then emacs commands are\navailable. You can quit EWOW from tasktray icon.\n\n** Configuration\n*** Abstract\n\nEWOW is a set of AutoHotKey scripts :\n\n- fundamental.ahk :: provides a bunch of functions and variables, that\n     are used to implement emacs-like commands and keybinds\n\n- commands.ahk :: provides basic emacs commands implementation\n\n- init.ahk :: *PUT YOUR SETTINGS HERE*.\n\n- keybinds.ahk :: provides the default keybinds\n\n\"ewow.ahk\" just loads them in sequence. You can configure EWOW by\nwriting AHK script in \"init.ahk\", so that \"ewow.ahk\" will load it.\nSome recomended configurations are provided and commented-out in\n\"init.ahk\", and you can uncomment to try them.\n\n*** How To Write AHK Script ?\n\nAn AHK script basically consists of two parts :\n\n- auto-exec section\n- hotkey definitions\n\nthey must be in the order. That is, you CANNOT write auto-exec section\nafter hotkey definitions.\n\n**** auto-exec section\n\nIn auto-exec section, you can define define/call functions and set\nvariables, like usual programming languages. Calling functions and\nsetting variables are as easy as :\n\n: foo()      ; function call\n: bar = baz  ; set variable value\n\nIf you need to define functions to configure EWOW, please read AHK\nmanuals.\n\nYou may also import other EWOW packages in auto-execution section :\n\n: #Include evil.ahk\n\n**** hotkey definitions\n\nHotkey definitions are similar to keybinds in emacs. To rebind =C-f=\nkey to =forward_char= command, you just need to add following to your\n\"init.ahk\".\n\n: ^f:: forward_char()\n\nThe letter =^= here indicates that =f= is modified by =Ctrl=\nkey. Respectively =+= indicates =Shift= and =!= indicates\n=Alt=. Default Keybinds are defined in \"keybinds.ahk\".\n\nYou may also define conditional keybinds with =#If= directive :\n\n: #If !ignored_frame() \u0026\u0026 !cx\n: ^f:: forward_char()\n: #If !ignored_frame() \u0026\u0026 cx\n: ^f:: find_file()\n\nThe example above binds =C-f= to =forward_char= command, when =C-x= is\nnot prefixed and the cursor is not in =ignored_frames= which is\ndescribed later. If we are not in =ignored_frames= but =C-x= is\nprefixed, then =C-f= is bind to =find_file= command instead. Otherwise\n(when we are in \"ignored_frames\"), =C-f= is not bound. That is,\n=Ctrl-f= is sent to Windows normally.\n\n*** Functions and Variables provided in fundamental.ahk\n\nFollowing functions and variables are provided in\n\"fundamental.ahk\". You may call or set them in \"init.ahk\" to do some\nconfigurations.\n\n- configurable variables\n\n  + ignored_frames :: a list of window-classes in which EWOW should be\n                      disabled. for example, we usually do not want\n                      get EWOW enabled in Emacs window.\n\n- read-only variables\n\n  + cx :: true when =C-x= is prefixed.\n  + mark :: true when the mark is active.\n\n- functions\n\n  + ignored_frame() :: return if we are in =ignored_frames=\n\n** Writing Extensions\n\nIf you are familiar with AHK, it is easy to write your own commands or\npackages. Because commands are just AHK functions, and a package is\nbasically a set of commands and variables.\n\nThough, there are some differences to be cared. PLEASE READ\ndescription below, before start writing your own extensions.\n\n*** Functions and Variables Provided for Developers\n\n- functions\n\n  + send(str) :: a wrapper function of =Send= operation. PLEASE DO USE\n                 THIS instead of normal =Send= operation, so that sent\n                 keys are recorded in keyboard macros.\n\n  + add_hook(var, func) :: like =add-hook= in Emacs. available hooks\n       are described later. =var= must be a name of hook variable, and\n       =func= must be a name of a 0-ary function.\n\n  + remove_hook(var, func) :: inverse of =add_hook=.\n\n  + run_hooks(var) :: run hooks added to the hook variable =var=.\n\n  + alloc_tt() :: allocate an UID for =tooltip= and return it. when\n                  you use =tooltip= operation, PLEASE DO USE the ID\n                  provided by this function as =WhichToolTip=\n                  argument. there is no =free_tt()= function, so\n                  PLEASE DO REUSE the provided ID.\n\n  + read_char() :: steal a key event from keyboard and return it,\n                   without sending it to Windows nor invoking\n                   commands.\n\n  + set_mark() :: activate mark.\n\n  + reset_mark() :: deactivate mark.\n\n- read-only variables\n\n  + last_command :: the last key sequence sent to Windows.\n\n  + arg :: prefixed digit argument is stored as an integer.\n\n- hooks\n\n  + pre_command_hook :: hook which MUST BE CALLED manually at the\n       beginning of command.\n\n  + post_command_hook :: hook which MUST BE CALLED manually at the end\n       of command.\n\n  + after_change_hook :: hook which MUST BE CALLED manually just after\n       changes.\n\n  + before_send_hook :: hook which automatically runs before sending\n       keys to Windows. you may assume that the variable\n       =last_command= is set to the key sequence being sent, in the\n       hook.\n\n  + after_send_hook :: hook which automatically runs after sending\n       keys to Windows.\n\n  + after_display_transition_hook :: hook which automatically runs\n       when the active window is switched.\n\n*** Things You MUST Do\n\n+ use =send()= function instead of =Send=.\n\n+ use =alloc_tt()= function when you use =ToolTip=.\n\n+ call =pre_command_hook=, =post_command_hook= and =after_change_hook=\n  from your commands manually. Your command may looks like :\n\n  : my_command()\n  : {\n  :     run_hooks(\"pre_command_hook\")\n  :     do_something()\n  :     run_hooks(\"post_command_hook\")\n  : }\n\n+ use local variables as well as you can, to save namespace.\n\n*** Thigs You CAN Do\n\n+ hook some functions with =add_hook=\n\n  : add_hook(\"pre_command_hook\", \"my_pkg_pre_command_function\")\n\n+ run some hooks with =run_hoks=\n\n+ use =read_char()= function to steal a key input\n\n+ read =last_command= and =arg= value\n\n** Known Limitations, Bugs\n\n+ some commands are not recorded in keyboard macro\n  - =some commands= are -- commands that do not send keys to Windows\n\n+ registers are not available for now\n","funding_links":[],"categories":["AutoHotkey"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-phi%2Fewow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzk-phi%2Fewow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-phi%2Fewow/lists"}