Giter Site home page Giter Site logo

Comments (5)

amoilanen avatar amoilanen commented on July 18, 2024

Thanks for filing an issue, this would be a useful feature and should be fairly straightforward to implement. The current selection is available via the method ProjectManager.getSelectedItem() http://brackets.io/docs/current/modules/project/ProjectManager.html, we can add a couple of variables in the configuration like $CURRENT_FILE to be used in cmd and $CURRENT_FILE_DIR to be used in dir.

from brackets-command-line-shortcuts.

dvorapa avatar dvorapa commented on July 18, 2024

Wow, thanks for quick response. 👍 for your work

from brackets-command-line-shortcuts.

amoilanen avatar amoilanen commented on July 18, 2024

Implemented in the commit 009ff20. The variable for currently selected file is SELECTED_ITEM and for its parent directory SELECTED_ITEM_DIR.

Example configuration fragment:

[
    ...
    {
        "name": "Display contents of the currently selected file",
        "dir": "$SELECTED_ITEM_DIR",
        "cmd": "cat $SELECTED_ITEM",
        "shortcut": "Ctrl-Alt-C"
    }
    ...
]

The new version is not yet in the extension repository, but you can just check out the sources and overwrite the installed extension in the directory /home/username/.config/Brackets/extensions/user/aivanov.command-line-shortcuts (for Linux). Be careful not to overwrite your customized configuration file.

from brackets-command-line-shortcuts.

dvorapa avatar dvorapa commented on July 18, 2024

Works as expected, many thanks!

from brackets-command-line-shortcuts.

amoilanen avatar amoilanen commented on July 18, 2024

Thank you also for feedback, please, feel free to suggest further extensions.

from brackets-command-line-shortcuts.

Related Issues (12)

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.