How to use ZealLookup plugin for Eclipse

Zeal is an offline documentation browser which can be used to lookup help for most popular libraries and APIs. The ZealLookup plugin (also called ZealEclipsePlugin) enables you to lookup help in Zeal right from inside Eclipse! :-)

Install

  • Shutdown Eclipse.
  • Download the plugin .jar file from here and place it in the plugins directory of your Eclipse installation.
  • Start Eclipse.

Usage

  • You need to configure a keyboard shortcut for ZealLookup. Go to Window -> Preferences -> General -> Keys. Look for Lookup in Zeal command and set a keyboard shortcut for it.

  • I use Vrapper, so I set the keyboard shortcut as \z which is the same as what I use to call Zeal from within Vim.

  • To lookup a word in Zeal: highlight the word and press the keyboard shortcut you have set earlier. Zeal should open with the documentation for the word. I found that sometimes Zeal stays in the background, but it has looked up the word.

  • For use with Vrapper, I mark the current word using viw (visually mark inner word) and then press the ZealLookup keyboard shortcut.

Tried with: ZealLookup 1.0.0, Eclipse 4.4.2 and Ubuntu 14.04

How to use Synergy in Ubuntu

20150522_synergy

Synergy is a tool that can be used to share a keyboard and mouse across multiple computers. In this post, I will describe how I used Synergy to share a keyboard and mouse between two computers running Ubuntu.

Install

  • Server is the computer whose keyboard and mouse you want to always use.

  • Client is the computer whose display you want to control using the server’s keyboard and mouse.

  • Make sure the server and client are connected on the same wireless network or LAN. Make sure you can ping the server from the client and the client from the server.

  • Install Synergy on both the server and the client computers:

$ sudo apt install synergy

Setup the server

  • Type Synergy in the Dash or synergy at the shell to open the GUI of Synergy.

  • Choose the Server option. Choose an encryption method from the dropdown and provide a password.

  • In the main dialog, make sure Configure interactively is chosen.

  • Click on Configure server. In the Screens and links tab, you should be able to see a blue display, which represents the server. Drag down the blue display (in the top-right corner) to a box neighboring the server display. This new display you added represents the client. My client display on my desk is to the left of my server, so I dragged the blue display and placed it to the left of the server display.

  • Double-click on the display you added. In the Screen Settings dialog, provide a Screen name to the client. This can be anything, it is just used in the grid of displays. Add an alias: you have to give the hostname or IP address of the client here.

  • Click Start to start the server. It will minimize to the system tray at the top.

Setup the client

  • Type Synergy in the Dash or synergy at the shell to open the GUI of Synergy.

  • Choose the Client option. Choose the encryption method from the dropdown and password that you had used on the server. They have to be the same!

  • In the main dialog, type in the IP address of the server and press Start. Your client is now connected to the server! :-)

Usage

  • Remember that I have placed my client to the left of the server in the grid. So, when I want to switch to my client display, I hit the mouse to the left side of the display on my server. It will appear in the client! All the keys I type on the server keyboard now appear in the client. To switch back, hit the mouse to the right side of the client display.

Tried with: Synergy 1.4.12 and Ubuntu 14.04

How to get relative line numbers in Eclipse

Relative line numbers in Eclipse

Relative line numbers in Eclipse

Being able to view relative line numbers in Vim makes it very easy to move around and operate in the editor. This is because a lot of Vim commands involve line counts that are relative to the current line.

If you are using Vrapper in Eclipse, you might be missing having relative line numbers. It is possible to get them by installing the Relative Number Ruler plugin.

Install

To install, go to Help -> Install New Software -> Add and use the URL http://matf.github.io/relativenumberruler/updatesite/ You should be able to choose the plugin and install it from there.

Usage

20150521_relative_number_1

  • Right-click on the line number ruler, this is the editor column where the line numbers are displayed. From here, you can enable or disable both line numbers and relative line numbers.

  • If you would like to have the hybrid mode, where the current line shows the absolute line number and the rest show relative line numbers, that is supported too. Go to Window -> Preferences -> Relative Number Ruler and enable this feature.

Tried with: Relative Number Ruler 1.1, Eclipse 4.4.2 and Ubuntu 14.04

Include browser of Eclipse

Include graph of term.c in the Vim source code

Include graph of term.c in the Vim source code

The include graph of a large C++ project can be really gnarly. Sometimes, you end up with compile errors due to circular inclusion of types or headers and cannot figure out the origin of the error. Other times, you might want to know the path of header files through which a certain type is available in a source file. To view these details, I generate a header include graph using Doxygen.

However, if you are using Eclipse CDT you have something that is easier and more convenient: its Include Browser! :-)

  • To open it: Go to Window -> Show View -> Include Browser. It will typically be displayed at the bottom of Eclipse.

  • To view the include graph of a source or header file: Go to the Project Explorer, find the file and drag its name into the Include Browser window.

  • By default, the include graph of the includes of the file are displayed.

  • You can also view which other files include the current file.

  • If the include graph is too cluttered, you can disable display of system includes. These are typically standard C++ header files.

  • You can also disable display of includes in inactive code.

Reference: Eclipse help on Include Browser

Tried with: Eclipse 4.4.2 and Ubuntu 14.04

Lucidor

20150518_lucidor

Lucidor is a an EPUB reader for Linux that is based on Firefox. I have found it to the best among the EPUB reader options available on Linux.

Installation is easy. Remember that it requires that you already have Firefox. Download the .deb package from here and install using GDebi.

The features I like about Lucidor:

  • Table of contents displayed on the left of content. This is the #1 reason I had to stop using FBReader, because it could not show the TOC beside the content.
  • Auto-size option to scale content to fit window size.
  • View different books in tabs. I wish every ebook reader did this!
  • A personal bookcase to which your books are added.

Tried with: Lucidor 0.9.10, Firefox 37.0.2 and Ubuntu 14.04

Okular

Okular is a fantastic application to use for viewing and annotating documents like PDF and ebooks.

Okular is written using the KDE framework, so expect its installation to be heavy:

$ sudo apt install okular

I like to use Okular because:

  • Okular supports viewing a whole bunch of formats for viewing: PDF, DjVu, EPUB and other ebook formats.
  • There is full zoom-in, zoom-out, continuous or separated page viewing options.
  • Table of contents are shown for ebooks, PDF and DjVu files that have it.
  • Thumbnails of current and neighboring pages can be viewed.
  • Okular uses a printing backend that is different from the one used by Evince, the default document viewer in Ubuntu. So, if you have printing problems in Evince, try Okular.
  • Annotating documents by adding notes, highlighting and freehand is easy.

Tried with: Okular 0.19.3 and Ubuntu 14.04