GithubHelp home page GithubHelp logo

brackets_macros's Introduction

Brackets autocomplete macro

The macro helps to work with brackets, resembling behaviour of such IDEs as PyCharm. It will be shown on example of (, but user defines the set of brackets, or similar objects, such as quotation marks or dollar signs

  • typing ( will also create )
  • selecting text and pressing ( will wrap it - (text) and text will be selected (hence, it can be wrapped with multiple brackets) (currently, it works quite slowly on long strings)
  • typing ( and then pressing Backspace will erase both ( and ) (if any other key was pressed/the mouse was moved this behaviour won't appear)
  • typing ), when there's already ) right after the cursor and there's an unmatched ( before cursor (on the same line) will cause cursor to move left instead of typing ) (though, this yet doesn't work for cases when opening and closing "brackets" are the same - e.g. pressing $ will always create $$)

List of brackets can be set in main.ahk:

  • brackets_start - dictionary with keys - hotkeys, values - array of length 3: opening_bracket, closing_bracket, [data_about_hotkey]. data_about_hotkey is dictionary with fields that can change behaviour for current hotkey (actually, there were more than 1, but they turned out to be redundant):
    • ru_char - char printed if keyboard layout is Russian (since some characters on it differ from the english layout)
  • brackets_end - to skip closing brackets instead of printing them (as described earlier). Same parameters as in previous: unclosed opening_bracket - will be searched.

To run script, run main.ahk.

To temporarily turn the script off (or turn it on after that), press Ctrl+J

brackets_macros's People

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.