Skip to content

A sublime plugin for formatting java code files with google-java-format

License

Notifications You must be signed in to change notification settings

ankitshubham97/google-java-format-sublime

Repository files navigation

google-java-format-sublime

A sublime plugin for formatting java code files with google-java-format

Platforms supported:

Currently, it is only supported in OSX and Linux(Ubuntu).

Sublime version supported:

Currently, it is only supported in Sublime Text 2. However, it may run successfully for Sublime Text 3 as well.

How to install the plugin

OSX platform

  1. Open Sublime.
  2. Go to "Preferences -> Browse Packages".
  3. This would open a Finder with the package path. For me, it opens up this path: "/Users/ankitshubham/Library/Application Support/Sublime Text 2/Packages/".
  4. Clone the repo or download and extract the archive file at this location. After performing this step, I have google-java-format-sublime at the path "/Users/ankitshubham/Library/Application Support/Sublime Text 2/Packages/google-java-format-sublime".
  5. Its done.

Linux(Ubuntu) platform

  1. Open Sublime.
  2. Go to "Preferences -> Browse Packages".
  3. This would open a Nautilus with the package path. For me, it opens up this path: "/home/ankit/.config/sublime-text-3/Packages/".
  4. Clone the repo or download and extract the archive file at this location. After performing this step, I have google-java-format-sublime at the path "/home/ankit/.config/sublime-text-3/Packages/google-java-format-sublime".
  5. Its done.

How to run:

OSX platform

Control+Shift+g

Linux(Ubuntu) platform

Ctrl+Shift+g

Reference:

https://github.com/google/google-java-format