satyagraha / gfm_viewer

An Eclipse plugin providing an accurate view of GitHub Flavored Markdown (.md) files
95 stars 27 forks source link

GitHub Flavored Markdown Viewer plugin for Eclipse

<a href="http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=900708" title="Drag and drop into a running Eclipse to install GitHub Flavored Markdown viewer plugin">

satyagraha: Build Status Nodeclipse: Build Status

This project provides an Eclipse view which provides a reasonably accurate presentation of GithHub Flavored Markdown files.

It is also new way to create Eclipse plugin help contents.

See installation options and version history below.

Usage

Note: Usage & Configuration were copied into built-in Help. When changing please delete here and add links into plugin/src/site/markdown

After installation (see below), the viewer may be accessed in any of the following ways:

The On/Off-line and Editor linked modes are by default on, but if set off their state will be automatically saved and preserved in the Eclipse workspace provided the GFM view is not closed.

When operating in Off-line mode, if the local cached HTML version of the markup file is out-of-date with respect to the markdown file, then the title bar of the browser has a '*' character preceding the file name, similar to the "dirty" indicator in editors.

The plugin uses Eclipse's default browser, e.g. Internet Explorer on Windows; if you use Ubuntu or other Linux distros, we recommend the WebKit browser; see:

If you want to view two (or more) markdown files simultaneously, simply open a new Eclipse window via menu Window -> New Window and there open another instance of the viewer: then any markdown files edited in that window will display in that window's viewer, independently of the original window and its editors and viewer.

If non-ASCII characters are used in the markdown file, the current implementation assumes UTF-8 character encoding, see also here.

Configuration

The GFM viewer plugin should work adequately without further configuration, however its operation may be customized via menu Window -> Preferences -> GFM Viewer. On that dialog page, properties may be set as follows:

Regarding the temporary formatted HTML files, when stored in the original markdown file directory note:

Installation from Update Site

In Eclipse, do the following:

Installation of Alternate Versions

The above installation mechanism will install the latest official version of the plugin. It is possible to install older or newer beta versions of the software by using http://dl.bintray.com/satyagraha/generic/x.y.z as the update site URL, where x.y.z is the desired version. You can see the available versions at http://dl.bintray.com/satyagraha/generic/.

Installation from Source Code

Should there be an issue with the update site, the following build and install process can be followed to build the plugin locally assuming a typical Windows 7+ environment:

Uninstall

Implementation

The GFM Viewer Eclipse view part implementation is quite straight-forward, and operates as follows:

Development

If you want to do development on the plugin, the following steps outline the process for a Windows 7+ development environment:

Then you can proceed as follows:

You can create an update site in the traditional way as follows:

An additional project GFM Viewer p2-repo is provided which is an experimental use of the Tycho P2 Repository generation facility, prompted by the deprecation of the update site mechanism. After a Maven Tycho build you may select the directory gfm_viewer/p2-repo/target/repository as a local update site as an alternative to the other one.

In order to update version:

mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=1.X.0

Make sure to do a search through all files to find any occurrences of the old version, as they will be present in some Eclipse plugin manifest and build properties files.

The repository has Travis CI configured (see buttons about), so every commit will be built and the result seen.

To Do

Areas possibly meriting further attention include:

Markdown Editors

The Winterstein Eclipse Markdown Editor plugin is recommended as an excellent general markdown editor which complements this viewer plugin well.

License

Eclipse Public License 1.0

Acknowledgements

History

with-Eclipse logo