Sublime Text web2py plugin

782 views
Skip to first unread message

Gergely Orosz

unread,
May 4, 2015, 6:28:55 AM5/4/15
to web...@googlegroups.com
Hi 4 All,

I've started to develop a web2py plugin for Sublime Text 3.
I've implemented a few command I found very useful on my daily work.
If you have any idea how can I make it better and useful please visit the below link and submit your feature request there
Thanks in advance

You can find the plugin: https://bitbucket.org/kfog/w2p

If you have any question please feel free to ask here or on the Issue tracker

All the best
Greg

eric cuver

unread,
May 4, 2015, 11:56:42 AM5/4/15
to web...@googlegroups.com
cool it's great

thank you

Massimo Di Pierro

unread,
May 4, 2015, 12:24:34 PM5/4/15
to web...@googlegroups.com
Nice. Thank you! I added link form the web2py examples/ app.

Gergely Orosz

unread,
May 5, 2015, 2:43:37 AM5/5/15
to web...@googlegroups.com
Thank you Massimo,

I am going to improve it continuously

António Ramos

unread,
May 5, 2015, 7:16:36 AM5/5/15
to web...@googlegroups.com
i installed it and get the message to add web2py to the project

what project?

you should do a 1 minute video to show how to use it

thank u

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cássio Botaro

unread,
May 5, 2015, 12:22:49 PM5/5/15
to web...@googlegroups.com
Nice!

I will test and update my_enviroment(https://github.com/cassiobotaro/my_environment )

Thanks to share.

Gergely Orosz

unread,
May 6, 2015, 1:52:41 AM5/6/15
to web...@googlegroups.com
Hi Ramos,

You should add a web2py application folder to a Sublime Text prokeject
1. Open Sublime go to the Project menu
2. Choose Add folder to project option
3. Browse your web2py application you like to work on

You are ready to use the W2P plugin

I am going to make the video tutorial on the weekend and also going to update the plugin read with these steps

Thank you letting me know

António Ramos

unread,
May 6, 2015, 4:44:20 AM5/6/15
to web...@googlegroups.com
Thank you
You say it can start and stop the server ...
how ?

Gergely Orosz

unread,
May 6, 2015, 5:06:25 AM5/6/15
to web...@googlegroups.com
Once you installed the plugin restart Sublime Text
After that you can use the command palette to check the available commands
All prefixed all web2py related command with W2P 
if you press CTRL+SHIFT+P and start type W2P you will see all the available commands

António Ramos

unread,
May 6, 2015, 6:22:55 AM5/6/15
to web...@googlegroups.com
I have seen the light....

Keep working on it. Its very good...

António Ramos

unread,
May 6, 2015, 6:25:31 AM5/6/15
to web...@googlegroups.com
From the controller i can open the view

From the view i should open the controller , not the view again...

thank u

António Ramos

unread,
May 6, 2015, 6:34:17 AM5/6/15
to web...@googlegroups.com
On more question.
i installed sublime repl but how do i get the web2py interactive console ?

thank u

Gergely Orosz

unread,
May 6, 2015, 8:09:38 AM5/6/15
to web...@googlegroups.com
You should use command palette again
Search for SublimeREPL: Web2py {your application name}
It should start interactive console for your web2py application

António Ramos

unread,
May 6, 2015, 9:05:31 AM5/6/15
to web...@googlegroups.com
Dont see it on my windows 7
I have sublime 3




JorgeH

unread,
May 6, 2015, 10:12:36 AM5/6/15
to web...@googlegroups.com
I installed in win 7.

Haven´t been able to get it working.

Gergely Orosz

unread,
May 6, 2015, 12:57:31 PM5/6/15
to web...@googlegroups.com
Have you run W2P: Add SublimeREPL support after installed the SublimeREPL plugin
It will setup the interactive shell for you

Gergely Orosz

unread,
May 6, 2015, 1:18:42 PM5/6/15
to web...@googlegroups.com
Can you see any error on Sublime Console when run any command?

António Ramos

unread,
May 7, 2015, 9:15:09 AM5/7/15
to web...@googlegroups.com
if i open console i see this before installing SublimeREPL

warning: mnemonic r not found in menu caption SublimeREPL
warning: mnemonic r not found in menu caption Ruby
warning: mnemonic p not found in menu caption Python
warning: mnemonic d not found in menu caption Python - PDB current file
warning: mnemonic d not found in menu caption Python - RUN current file
warning: mnemonic p not found in menu caption Python - IPython
warning: mnemonic f not found in menu caption F#
warning: mnemonic d not found in menu caption GDB
warning: mnemonic g not found in menu caption Groovy
warning: mnemonic h not found in menu caption Haskell
warning: mnemonic i not found in menu caption Io
warning: mnemonic l not found in menu caption Lua
warning: mnemonic m not found in menu caption Matlab
warning: mnemonic m not found in menu caption MozRepl
warning: mnemonic n not found in menu caption Node
warning: mnemonic o not found in menu caption Octave
warning: mnemonic p not found in menu caption Perl
warning: mnemonic s not found in menu caption PHP
warning: mnemonic p not found in menu caption PowerShell
warning: mnemonic r not found in menu caption R
warning: mnemonic n not found in menu caption Racket
warning: mnemonic r not found in menu caption Rails
warning: mnemonic b not found in menu caption SBT for opened folder
warning: mnemonic r not found in menu caption Scheme
warning: mnemonic r not found in menu caption Gauche
warning: mnemonic r not found in menu caption Petite Chez Scheme
warning: mnemonic scs not found in menu caption ScriptCS
warning: mnemonic s not found in menu caption Shell
Opening in new tab
Stoping web2py server with pid: 6192
Opening in new tab


Then clicking to install sublimeREPL nothing happens
 i see only in status bar
"Loading repositories" 
and as soon this messages disappears nothing happens and going back to search to install, there it is again in the list

W2P:Add sublimeREPL Support







Gergely Orosz

unread,
May 19, 2015, 5:00:58 AM5/19/15
to web...@googlegroups.com
Hi Ramos,

It some bug in SublimeREPL it is not related the W2P plugin.
I was away on holiday and the development slowed down a bit but I am going to make a tutorial video how to use the plugin
Also started implementing the open controller from view command

Ron Chatterjee

unread,
May 19, 2015, 7:43:25 PM5/19/15
to web...@googlegroups.com
This is great. I just started looking at sublime text. This is not a web2py question but since you are so familiar with sublime Gergely, let me ask the question anyway...in sublime, all I see a python terminal. I don't see a command prompt or ipython terminal. I have installed the ipython from install packages.  How do I add more terminal into sublime? Also, integrating Ipython with the project so all the variable shows up in the workspace. Any thoughts?

Gergely Orosz

unread,
May 20, 2015, 3:16:42 AM5/20/15
to web...@googlegroups.com
Hi Ron,

To be honest I am still learning the advanced features of Sublime, Python and Web2py :)
I am not familiar with ipython package unfortunately.
I am using SublimeREPL package to open interactive shell in Sublime. You can open as many interactive  shell as many you want. Sublime open a new tab for the shell and you can evaluate commands there.
What do you mean by "integrating project with ipython". Web2py has an option to start ipython shell I think if installed that is the default shell.

Hope I could help.

If you have any question drop me a mail

Regards
Greg

You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/OHRC9fH1zHA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Ron Chatterjee

unread,
May 20, 2015, 3:05:52 PM5/20/15
to web...@googlegroups.com, gerg...@gmail.com
Few good links for sublime I thought I can share within the community if anyone is interested. The django sublime interface walks you through the entire sublime setup. I am sure, web2py will be same. That said, I couldn't have the ipython and terminal working  like anaconda. Or may be this is the best sublime can do. 


António Ramos

unread,
May 21, 2015, 12:22:00 PM5/21/15
to web...@googlegroups.com
XDebug looks nice but is for php only ?

António Ramos

unread,
Jun 9, 2015, 11:38:25 AM6/9/15
to web...@googlegroups.com
I cant install web2py sublimeRepl via

W2p:Add sublimeREPL support

Just see on status bar "Loading Repositories " and nothing more
then i search for it and i get this only

Imagem inline 1

Any help ?
i´m on windows 7

Gergely Orosz

unread,
Jun 10, 2015, 1:30:08 AM6/10/15
to web...@googlegroups.com
Hi Ramos,

I fixed an issue in the Add REPL support command
I pushed the changes so w2p plugin should be updated automagicly via PackageControl.
If you still have issues please let me know

Regards
Greg

António Ramos

unread,
Jun 10, 2015, 8:12:31 AM6/10/15
to web...@googlegroups.com
I still have the same problem.
Should i see something like web2py in Tools -> Python ->?

thank u

Gergely Orosz

unread,
Jun 10, 2015, 9:18:12 AM6/10/15
to web...@googlegroups.com
It should create a new entry in Tools -> SublimeREPL -> Web2py {app_name}
I will check it again in the source code

António Ramos

unread,
Jun 10, 2015, 10:10:41 AM6/10/15
to web...@googlegroups.com
thank u

Gergely Orosz

unread,
Jun 11, 2015, 9:01:42 AM6/11/15
to web...@googlegroups.com
Hi Everyone,

I just tweaked the plug-in a little bit.
Please uninstall the plug-in completely and install it again to get it work
Steps are the following:
  1. Package Control -> Remove Package -> W2P
  2. Restart Sublime
  3. Package Control -> Install Package -> W2P
  4. Restart Sublime
Sorry for the inconvenience

Regards
Greg 

António Ramos

unread,
Jun 11, 2015, 9:08:23 AM6/11/15
to web...@googlegroups.com
SO COOL!!!!!! the w2py shell 

what is the admin password that it sets when starts the server ?

António Ramos

unread,
Jun 11, 2015, 9:16:15 AM6/11/15
to web...@googlegroups.com
just saw it in sublime-settings

António Ramos

unread,
Jun 11, 2015, 9:21:41 AM6/11/15
to web...@googlegroups.com
I got a "database locked error" opening web2py shell in sublime
I think this is a sqlite problem right ?

Ron Chatterjee

unread,
Jun 11, 2015, 2:29:46 PM6/11/15
to web...@googlegroups.com
Don't want to go Off Topic, but if we can just have auto complete in the web2py web based IDE, then what does the sublime provides extra over what we already have? I like sublime. That's not the point. I believe the current IDE is good for what it does just need the auto complete and few minor add ons.

António Ramos

unread,
Jun 11, 2015, 4:44:38 PM6/11/15
to web...@googlegroups.com
In my opinion we should leave the IDE to an external tool like Sublime that has a lot more power over the web2py web IDE and get the people behind the web IDE to concentrate just on web2py that need a litle "REVAMPING".

For me the webIDE its very usefull but not compared to sublime or other like it

Gergely Orosz

unread,
Jun 12, 2015, 4:41:49 AM6/12/15
to web...@googlegroups.com
When I started to use web2py I loved the idea of the web IDE.
As time passed by and I learned ins and outs of the framework and sublime text I started to use only Sublime.
I searched the plugins I need to do everything from sublime while do my daily tasks (commit to git repository, resolve merge conflicts, query database, deploy over SSH)
The one thing was missing is web2py 'integration' I call it integration but it a bunch of helpful stuff I use day after day while I work with web2py
I don't want to compete with the web IDE, I don't want to convert anybody to Sublime. 
I'd like to make my life easier and help others

That is the story behind the W2P plugin.

António Ramos

unread,
Jun 12, 2015, 5:05:24 AM6/12/15
to web...@googlegroups.com
+1

Massimo Di Pierro

unread,
Jun 12, 2015, 11:50:07 AM6/12/15
to web...@googlegroups.com, oroszgerg...@gmail.com
I do not use sublime but could you list a list of features missing/problems with:

that would help us improve it.
...

António Ramos

unread,
Jun 12, 2015, 12:27:38 PM6/12/15
to web...@googlegroups.com

António Ramos

unread,
Jun 12, 2015, 12:37:23 PM6/12/15
to web...@googlegroups.com

Ok.just some some...

António Ramos

unread,
Jun 17, 2015, 4:46:15 AM6/17/15
to web...@googlegroups.com
Thank you Gergely Orosz for your work.

Having the wep2y console and server console inside Sublime makes me a lot more productive.

Just what i was looking for.

Regards
António

Gergely Orosz

unread,
Jun 17, 2015, 5:08:23 AM6/17/15
to web...@googlegroups.com
You are more than welcome
If you miss some function, feature please let me know.
I try to put it into Sublime

Regards
Greg
Reply all
Reply to author
Forward
0 new messages