Home Download Buy Blog Forum Support

PerlTidy for ST2

PerlTidy for ST2

Postby rbo on Sun Feb 13, 2011 4:54 pm

Hi all,

I have adapted the perltidy plugin to ST2, you can find my version on github [1].

Many thanks to the author of the original pluging [2].

Cheers
Robert

[1] https://github.com/rbo/st2-perltidy
[2] http://sublime-text-community-packages.googlecode.com/svn/trunk/PerlTidy/
rbo
 
Posts: 2
Joined: Fri Feb 11, 2011 9:33 pm
Location: Munich/Germany

Re: PerlTidy for ST2

Postby bosborne on Fri Jun 17, 2011 8:27 pm

Robert,

Thank you for your code. As a Sublime neophyte I must be missing something though. On Mac OS X, here's what I see after a re-start of the app:

523 ~/Library/Application Support/Sublime Text 2/Packages/PerlTidy>ls
total 1064
4 Default.sublime-keymap 4 PerlTidyCommand.pyc 4 README.txt
4 PerlTidyCommand.py 4 PerlTidyCommand.py~ 1044 perltidy

So I view some Perl, do a select-all, but after a ctrl-t or a ctrl-shift-t I'm not seeing any "tidying". Should I?

This is ST2, alpha, build 2065.

Thanks again.
bosborne
 
Posts: 4
Joined: Fri Jun 17, 2011 8:21 pm

Re: PerlTidy for ST2

Postby bosborne on Fri Aug 26, 2011 8:39 pm

Fixed now, after re-install, no explanation.
bosborne
 
Posts: 4
Joined: Fri Jun 17, 2011 8:21 pm

Re: PerlTidy for ST2

Postby Navery on Thu May 31, 2012 7:10 pm

So I know this is a SUPER old post, sorry to bring it back. But I am trying to get this plugin to work on my windows machine and no matter what I do I cannot get it to work! I use Perl a lot and have to revert to using either the command line or notepad++ (*shudders*) to get it formatted the way I want. I would LOVE to do this inside of Sublime so I don't have to keep switching between tools! Can anyone offer any help as to how to get this setup?

Thanks!

Nathan
Navery
 
Posts: 4
Joined: Wed Sep 01, 2010 2:20 pm

Re: PerlTidy for ST2

Postby KES on Tue Aug 14, 2012 7:59 pm

CTRL+`
What shows?
KES
 
Posts: 41
Joined: Sun Aug 05, 2012 12:13 pm

Re: PerlTidy for ST2

Postby KES on Tue Aug 14, 2012 8:01 pm

I get this errors, after adding: "perltidy_cmd": "perltidy"
I have perltidy in PATH
Code: Select all
run
perltidy
perltidy
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 362, in run_
  File ".\PerlTidyCommand.py", line 35, in run
  File ".\PerlTidyCommand.py", line 83, in tidy_region
  File ".\subprocess.py", line 701, in communicate
  File ".\subprocess.py", line 911, in _communicate
UnicodeEncodeError: 'ascii' codec can't encode characters in position 53-57: ordinal not in range(128)


And for "perltidy_cmd": "/C/Perl/site/bin/perltidy" I get
Code: Select all
Unable to open /C/Documents and Settings/KES.HOMEUSER/Application Data/Sublime Text 2/Packages/User/Distraction Free.sublime-settings
run
/C/Perl/site/bin/perltidy
/C/Perl/site/bin/perltidy
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 362, in run_
  File ".\PerlTidyCommand.py", line 35, in run
  File ".\PerlTidyCommand.py", line 83, in tidy_region
  File ".\subprocess.py", line 701, in communicate
  File ".\subprocess.py", line 911, in _communicate
UnicodeEncodeError: 'ascii' codec can't encode characters in position 53-57: ordinal not in range(128)
KES
 
Posts: 41
Joined: Sun Aug 05, 2012 12:13 pm

Re: PerlTidy for ST2

Postby vifo on Tue Nov 20, 2012 1:36 pm

Hi folks,

the current open bugs for the PerlTidy plugin have been fixed and I've sent a pull request to Robert, to accept the patches (https://github.com/rbo/st2-perltidy/pull/9). Meanwhile, you can get the latest version of the plugin here: https://github.com/vifo/st2-perltidy.

Cheers,
V.
vifo
 
Posts: 4
Joined: Tue Nov 20, 2012 11:02 am


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 20 guests