Tuesday, November 29, 2011

Making Eclipse look better on Ubuntu

The steps below are things to remember when I do a new Ubuntu install (so, I may revisit this when/if I reinstall Ubuntu again).

1. Tab bars in Eclipse are too big when run in Ubuntu:

There are 2 things for this:

1.1: Install Extended VS Presentation (update site: http://andrei.gmxhome.de/eclipse/)

1.2: Make menu bar smaller

Short version

gedit ~/.gtkrc-2.0

paste:

style "gtkcompact" {
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=0
GtkToolbar::space-size=0
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
}
class "GtkWidget" style "gtkcompact"

Full explanation in http://ubuntuforums.org/showthread.php?t=1465712


2. Window buttons are not in the right:

Short version:
Alt+F2, gconf-editor, apps/metacity/general, button_layout, menu:minimize,maximize,close

Full version: http://www.howtogeek.com/howto/13535/move-window-buttons-back-to-the-right-in-ubuntu-10.04/


3. Set proper theme:

System > preferences > appearance (get online theme): Clearlooks Compact (customize colors: selected items: #969696 (150,150,150))


4. Set fonts

Copy Windows fonts from C:\Windows\Fonts to ~/.fonts (tahoma and consolas) -- yes, I really like those fonts :)

System > preferences > appearance: use tahoma 8 for app/doc/desktop, sans bold 8 for window and consolas 9 for monofont (in windows I use consolas 10, but it seems Linux will render the fonts a bit bigger, so, a smaller size is needed).

Rendering: subpixel smoothing.


By request, a picture of how it looks (click to see it full):

Wednesday, November 02, 2011

PyDev 2.2.4 released

PyDev 2.2.4 is now out.

Major changes include:
  • Cython support
  • Better handling for external files (especially the ones under a folder/zip file in the PYTHONPATH)
  • Modules/packages appear in the globals browser (Ctrl+Shift+T)
  • Some improvements in the debugger

Along with a bunch of other things (more details on the release may be gotten on http://pydev.org )

Thursday, October 27, 2011

PyDev & Cython

The current PyDev nightly build has integrated Cython support :)

Instructions to get the nightly are available at: http://pydev.org/download.html

This is something I wanted to do quite some time already but hadn't found a good way to support Cython (mostly because the grammar support seems to be undocumented and all manually done).

So, I gave up for now on a full blown Cython parser and settled on parsing what needs to shown in the outline: classes, functions and Cython specifics: cdefs and ctypedefs -- without actually trying to do anything fancy with it (mostly showing things in the outline). It's still missing the actual scoping of things, so, items will appear flat in the outline -- but that should be fixed soon.

So, this means that code-analysis will gather much less things (right now I think it'll only gather mixed indentation analysis and duplication of function/classes).

As for the code-completion, it should be working for things that are context insensitive (i.e.: builtins, templates and global tokens for the auto-import). Some more testing needs to be done for the context-sensitive code-completion (not sure how much more can be done without a full blown parser behind it).

Aside from those shortcomings, most editor features should be working (anyone interested, please test it and let me know if there's something missing -- although I've used Cython on a few occasions, I'm hardly an expert in the area, so, feedback is much appreciated -- this should appear in a final release in a short time).

Note that to use the Cython editor, just open any .pyx file with the regular PyDev editor and things should work properly (it uses the regular PyDev editor, just customizing the parsing process).

Thursday, October 06, 2011

PyDev 2.2.3 released

The new version is out already.

Major in this release were: a bugfix related to zip files (in short, the PyDev indexes related to zips got corrupted, so, any attempt to use a zip file in the PYTHONPATH wouldn't work properly), some performance improvements and a bunch of bug-fixes.

Tuesday, August 02, 2011

IPython & PyDev

In the current nightly build (see: http://pydev.org/download.html to get it), IPython can be used as the backend for the PyDev interactive console.

IPython is a Python shell that provides many improvements over the standard Python shell (more details may be found at http://ipython.org/ ).

To use it, install IPython (0.10.x or 0.11) in your Python interpreter (if you use easy-install, just do easy_install ipython), make sure that the IPython paths are properly added in your interpreter configuration inside of PyDev ( http://pydev.org/manual_101_interpreter.html ) and start up the interactive console in PyDev ( http://pydev.org/manual_adv_interactive_console.html ). If all is properly configured, the interactive shell should use IPython as the backend (if it's not found, it'll fallback to the standard PyDev shell and warn that IPython could not be found).

Another improvement in the shell is that the output for a long running command will now be printed while it's executing, and not only after it returns.

I'm waiting for feedback to know if there's something missing in the integration before a final release is provided with the integration...