Git Product home page Git Product logo

icm-shortcuts's Introduction

ICM Shortcuts for AutoHotkey

Productivity shortcuts for Windows using Autohotkey.

Run the script to get the shortcuts, or install as described below.

By default, they all use the Tab key to activate them. Very occasionally this can trigger unexpected (and confusing) behaviour with tab-completion, but it happens surprisingly rarely.

Examples

Most used:

  • Abbreviations:

    • btw+Tab -> "by the way "
    • eg+Tab -> "e.g. "
    • etc+Tab -> "and so on. "
    • ie+Tab -> "i.e. "

    (although, consider not using eg, ie, and etc at all).

  • TODO+Tab: inserts an initialled and dated TODO like this, where you can then start typing:

TODO: ICM 2022-12-24: <type here>
  • Similarly HACK, REV (review), and SMELL ("code smell"):
HACK: ICM 2022-12-24: <type here>
(REVIEW: ICM 2022-12-24: <type here>)
SMELL: ICM 2023-12-26:
  • Note that for convenience these all work in lower case!

  • Signature: SIG+Tab: inserts an initialled and dated signature tag like this:

-- ICM 2024-06-22
  • rule+Tab: inserts a set of rulers (rules) useful for judging line length where you don't have visible rulers, columns, right-hand margins, or column markers. Starts with a default selection of these:

    • Numbers
    • Git short message
    • Git message/plain text email wrap point
    • 80 character line length

    that looks something like this:

12345678901234567890123456789012345678901234567890123456789012345678901234567890
50------------------------------------------------
72----------------------------------------------------------------------
80------------------------------------------------------------------------------

There are examples for coding:

  • by+Tab currently gives Doxygen-style comments using the Windows username:
//! @author <Username>
//! @date   2022-12-24

Examples for HTML/XHTM:

  • body+Tab, h1+Tab give:
<body>(cursor here)</body>
<h1>(cursor here)</h1>

(Some of the shorter ones require the leading < to avoid mis-triggers, like <a, <b, and <p.)

  • hre+Tab inserts an <a> anchor, using the URL in the clipboard for the href attribute, like this:
<a href="https://example.com/">(cursor here)</a>

Examples for Textile (and old-style Confluence wiki):

  • {code+Tab and {panel+Tab
{code:none}<type here>{code}
{panel}<type here>{panel}

Installation

Edit the UserInitials at the top of the file: this is used to customize some of the shortcuts, such as todo and hack.

To run automatically at startup in Windows 10, see Add an app to run automatically at startup in Windows 10. This can be summarized as:

  • Windows logo key + R to open Run dialog.
  • shell:startup to open the (your?) Start-up folder.
  • Copy the script file and Paste shortcut into the Start-up folder.

icm-shortcuts's People

Contributors

ayeseeem avatar

Watchers

 avatar  avatar

icm-shortcuts's Issues

output a trailing whitespace after i.e. and e.g.

The hotstrings that turn ie and eg into i.e. and e.g. would be better if they also output a space afterwards. Or at least, find a way to do that and then try it: see if it is better.

The tab that triggers them is suppressed: it does not get output. But a space would be nice.

fix `btw` to end with a space not a tab

btw is the simplest example in the script. As such, the tab key used that triggers it also appears after the translation.

Compare this with #1 where we want a space but there is neither a space nor a tab: look at the difference in how the different rules are implemented.

Convert `etc` to "and so on"

Not only is it part of our general approach to plain English, it's also
mentioned by
UK Gov style guide:

’etc’ can usually be avoided. Try using ‘for example’ or ‘such as’ or
‘including’. Never use ‘etc’ at the end of a list starting with ‘for
example’ or ‘such as’ or ‘including’.

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.