Comments (5)
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.
Wow, thanks for quick response. 👍 for your work
from brackets-command-line-shortcuts.
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.
Works as expected, many thanks!
from brackets-command-line-shortcuts.
Thank you also for feedback, please, feel free to suggest further extensions.
from brackets-command-line-shortcuts.
Related Issues (12)
- Choose project dir in config HOT 2
- Feature Request: Additional bin paths HOT 5
- Console not showing
- Closing Programs started with shortcuts HOT 1
- Migrate to Visual Studio Code
- Shortcuts don't work after once a command failed HOT 2
- Update overwrites config HOT 1
- The output could be abled to copy HOT 4
- Menu Item Missing HOT 6
- Nothing happens when I press the key combination HOT 5
- Suggestion: Make dir optional HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brackets-command-line-shortcuts.