raguay.customct Posted January 1, 2015 Share Posted January 1, 2015 (edited) Alfred EditorThis is a simple editor that makes use of NW.js Toolbox to run. Therefore, you need to install that workflow first. It can be found on my GitHub account below since it is too large for Packal. After installing this workflow, you need to execute ae:install to install the data files and the help files into their proper location. You will have a command line program called ae you can use to open files from the command line.The following commands are then useable:ae:openeditorThis simply opens Alfred Editor without a file.ae:editThe currently selected file in Path Finder or Finder is opened in Alfred Editor. You also have an Alfred Browser command for opening files as well. An external command for opening files is available as well.ae:openThis script filter gives several important directory locations that can be opened in the Alfred browser or Finder.ae:themeThis script filter lists all the available themes. If you select one, that will be the new theme for windows opened in Alfred Editor. If you hold the **command key** while selecting, that theme will be opened in Alfred Editor to edit.ae:createthemeThis allows you to create a new theme to use in Alfred Editor. It will request a new name, create the new theme from lesser-dark them, and open in Alfred Editor to edit. You will still have to select the theme for it to be used.ae:windowlistThis will list each available Alfred Editor window name. The one selected will be brought to the front using the Hammerspoon Workflow. The Hammerspoon workflow has to be installed for this command to work.ae:keyboardThis command allows you to choose either the Sublime keyboard layout or the Vim keyboard layout to use in Alfred Editor. If the Sublime layout is chosen, then the status line will always show it to be in insert mode.This workflow is a work in progress. I am using it to teach myself how to use the Node Webkit program for developing desktop applications using web technologies. I am currently working on a command prompt similar to Sublime with expandability using plugins. I also currently have only three themes. If you want to help me create themes, just send me the json file for your theme and I will include it. License: MIT Version: 1.2 Packal: http://www.packal.org/workflow/alfred-editor GitHub: https://github.com/raguay/MyAlfred Custom Computer Tools: http://customct.com/alfred-2-workflows Edited January 16, 2015 by raguay.customct Link to comment
raguay.customct Posted January 2, 2015 Author Share Posted January 2, 2015 Hi, just updated it again. I had a misspelling on the ae:windowlist command. It should now work if you have Mjolnir Workflow installed as well. Link to comment
raguay.customct Posted January 2, 2015 Author Share Posted January 2, 2015 Editor Features: - syntac highlighting for: HTMLCSSMarkdownFoldingTextMarkdownPHPgoFoldingTextSASSSCSSSchemePythonC, C++PListXMLShellLuaSQLHamlJadeCoffeeScriptLispRubyErlangScala - Full Vim and Sublime keyboard support - Regular expression search/replace - Multiple cursors - code folding - Emmet expansions!!!! - Themes (currently just three - help me make more!) - more coming (ex: plugins, commands, external control, etc). There are still several bugs I am working on. But, I was wanting some user feedback and help making themes. Link to comment
raguay.customct Posted January 16, 2015 Author Share Posted January 16, 2015 Just updated to work with NW.js instead of Node Webkit. Working on major upgrade to the Ace JavaScript library for the editor instead of CodeMirror. CodeMirror messes up all the time in scrolling. Not sure how Brackets work okay. Link to comment
cands Posted June 3, 2015 Share Posted June 3, 2015 Thanks for this workflow! I have used it now and then and find it quite handy for quick edits etc. However, recently it stopped working, the editor window is not shown anymore even though the posted notifications tells me that the selected file is opened. Any ideas (Alfred 2.7.1, OS X 10.10.3)? Link to comment
raguay.customct Posted June 4, 2015 Author Share Posted June 4, 2015 Thanks for this workflow! I have used it now and then and find it quite handy for quick edits etc. However, recently it stopped working, the editor window is not shown anymore even though the posted notifications tells me that the selected file is opened. Any ideas (Alfred 2.7.1, OS X 10.10.3)? If the following file has text in it, it is assuming that the editor is already open: ~/Library/Application Support/Alfred 2/Workflow Data/com.customct.AlfredEditor/windows.txt where '~' is your home directory. Delete that file and the editor should open again. I have a bug in the logic for determining if an editor is open. The problem being, NW.js doesn't allow more than one instance open at a time. Therefore, I am trying to use a secondary loader to spawn a new window instead of a new instance. But, it keeps getting off here and there. I am currently migrating to the Ace editor instead of CodeMirror editor. More robust in functionality. Keep watching for updates. Link to comment
cands Posted June 4, 2015 Share Posted June 4, 2015 Thanks for the info. No, that file did not have any text in it, I tried to delete it anyway but it didn't solve the problem. Hopefully it will be solved after your next update, I'll keep watching for updates. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now