Skip to content

Conversation

Jaykul
Copy link
Contributor

@Jaykul Jaykul commented Sep 18, 2013

Not much to say here, just a long overdue push request to get this updated to PowerShell 3
NOTE: there's no WorkFlow or DSC syntax here -- just straight PowerShell.

Make it work for PowerShell 3 (and 4), fix MOST of the test cases
Fix variable highlighting
(It's still not quite 100%, but it'll work for me)

Fix syntax highlighting!
(It's still not quite 100%, but it'll work for me)
@FichteFoll
Copy link
Member

You should take a look at the AAAPackageDev: Rearrange YAML Syntax Def command. Running it now will remove your comments, but I highly recommend running AAAPackageDev: Convert to YAML and Rearrange Syntax Definition when switching to a YAML def.

@guillermooo
Copy link
Member

I'm confused. Are you guys working on ST2?

@Jaykul
Copy link
Contributor Author

Jaykul commented Sep 18, 2013

I'm not usually working on ST2, but when I needed to fix the PowerShell syntax, I (re)installed 2 so I could use AAAPackageDev to work with the JSON/YAML format rather than edit the tmLanguage file xml which I've never bothered groking (especially since that's how this syntax was obviously done originally).

Is there some other option that works on ST3?

@FichteFoll
Copy link
Member

PackageDev will at some point be ST3 compatible, hopefully within the next few weeks. I don't know of any other plugin that does the syntax thing.

@Jaykul
Copy link
Contributor Author

Jaykul commented Sep 22, 2013

So I'm confused -- is there anything preventing this being merged?

@guillermooo
Copy link
Member

@Jaykul No, it's just me. This will be merged when I find the time.

@FichteFoll Actually, it might be a good idea to start porting AAAPackageDev bit by bit? I might take a look at making the syntax translations work in ST3. So basically it'd be two tasks: silencing errors in ST3, making the syntax translations work and ensuring that everything keeps working in ST2. Ok, three tasks :)

@FichteFoll
Copy link
Member

"bit by bit" is a thing ... well, it shouldn't actually be much work, I just need to find some time in my schedule. I'll see if I can do this tomorrow.

Also, there are some weird issues with relative imports in newer ST3 builds that might be a problem. I could work around it by hardcoding import AAAPackageDev.fileconv for the time, but of course the better solution would be fixing relative imports. And I should test how modifying sys.path works with .sublime-package zip archives

@Jaykul
Copy link
Contributor Author

Jaykul commented Sep 22, 2013

Yeah, I tried getting it working in ST3 based on changes someone else made
... but I never got past the "from . import lib" thing. I didn't spend
much time on it, just got fed up and reinstalled 2 side-by-side.

@mkanet
Copy link

mkanet commented Nov 10, 2013

Any chance we'll see an updated PS3 version anytime soon? There are plenty of people like me who don't post here, but been waiting months for an update..

@guillermooo
Copy link
Member

I definitely want it (I'm the original author), but I don't have the time to look into it for now. Perhaps in a few weeks.

@ntwb
Copy link

ntwb commented Nov 12, 2013

I don't know all of the ins and outs of all the above that's mentioned above.

I just installed @Jaykul's fork in ST3 3047 portable on x64 Windows 8.1 and for the basic PowerShell needs I use it for it appears to be working for me.

@mkanet
Copy link

mkanet commented Nov 24, 2013

Sorry, I know this is the wrong place to ask, but curious if anyone here uses Bracket Highlighter? If so, has anyone updated it to recognize Powershell comment blocks? i.e., <# comments go here #>

@ntwb
Copy link

ntwb commented Mar 30, 2014

@Jaykul Do I need to have 'ConEmu' installed to work with your most recent commits? (I'd prefer not)

@Jaykul
Copy link
Contributor Author

Jaykul commented Mar 30, 2014

You shouldn't need ConEmu -- those changes are isolated in their own file, and it's just a couple of commands (which you'd have to associate a keystroke or something before they do anything)

I'll probably make a separate ConEmu addon ... it's just as useful with Python (or bash, or anything else that runs in ConEmu) as PowerShell...

@gwojan
Copy link

gwojan commented Jul 9, 2014

@Jaykul have you seen the stposh package? It seems to address a lot of the issues you've been trying to address and then some. I just started using Sublime so my comfort level is still quite low...

@mkanet
Copy link

mkanet commented Jul 9, 2014

@gwojan (or anyone), which ST package currently has more complete Powershell Version 3/4 support? I'm currently using Jaykul's version, labeled "Powershell v2"

@gwojan
Copy link

gwojan commented Jul 9, 2014

@mkanet I'm not really sure at this point. The stposh package seems pretty full featured at this point. I only recently found @Jaykul 's updates which I haven't had a chance to 'build' since I'm still struggling with Sublime. If I have a chance to fit it in in the next few days I'll report my findings back here.

@vors
Copy link
Member

vors commented Sep 11, 2014

@guillermooo any updates about this pull request? I'd like to help with adding support for PowerShell v5. Should I use @Jaykul 's fork as a baseline?

Areas that I want to address:

  1. DSC support: Configuration and Node keywords + scopes.
  2. classes support: lots of thing, since classes are new feature in September 2014 preview.
    3*) Auto-generate list of parameters for built-in cmdlet, so we will have autocomplition for parameter names.

@guillermooo
Copy link
Member

It will probably take me some more time to merge this. But if someone can verify it could be merged without further review, that'd be great. Thanks for your interest, BTW!

@vors
Copy link
Member

vors commented Sep 11, 2014

Great! I will help with merging this request. Thank you for a quick response :)

@@ -1,591 +1,588 @@
# encoding: utf-8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use original CRLF line terminators so changes can be reviewed more easily.

name='PowerShell',
version=PACKAGE_VERSION,
description='PowerShell support for Sublime Text.',
author='Joel Bennett',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, preserve original authors as well

@vors
Copy link
Member

vors commented Sep 11, 2014

@Jaykul thank you, good work! I left few comments inlined. I didn't test .ps1 build scripts, although. Please, reduce the size of PR with preserving original ending (CLRF) in files that I mentioned. We may convert them to unix-style later, as a separate checkin. Now, it prevents effective reviewing.

@Jaykul
Copy link
Contributor Author

Jaykul commented Sep 11, 2014

I can do all of that. The ConEmu changes, honestly, I did not mean to include in this PR, I just forgot to make a branch. I'm on vacation this week (and have a late night tonight) but adding PS5 support has been on my todo list for this vacation, so since there's movement over here, I'll try to at least fix the changes tomorrow night :-)

@Jaykul
Copy link
Contributor Author

Jaykul commented Oct 3, 2014

OK, my deepest apologies to anyone who was tracking my fork (@vors), but ... the simplest thing was to just revert and --force my branch to get rid of all those ConEmu changes which should have been in a separate branch/repo.

@guillermooo
Copy link
Member

I've tried this briefly and everything seems to be ok. This is one of the first syntax defs I created, so we'll probably need to revisit many things, but that can wait.

Thanks JayKul (and sorry for the long wait)!

guillermooo added a commit that referenced this pull request Oct 3, 2014
Update PowerShell (to YAML and to PS3/4 syntax)
@guillermooo guillermooo merged commit 25ebc65 into SublimeText:master Oct 3, 2014
@vors
Copy link
Member

vors commented Oct 3, 2014

Sweet

@Jaykul
Copy link
Contributor Author

Jaykul commented Oct 3, 2014

Great! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants