Sublime Text 3 Rtags plugin. See https://github.com/Andersbakken/rtags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests Add stub test for multiple options Dec 10, 2014
Default (Linux).sublime-keymap Added find virtual function implementations to *all* keymaps. Aug 28, 2016
Default (Linux).sublime-mousemap Update to last `UnitTesting` package, added limit option and new keyb… Oct 19, 2014
Default (OSX).sublime-keymap Added find virtual function implementations to *all* keymaps. Aug 28, 2016
Default (Windows).sublime-keymap Added find virtual function implementations to *all* keymaps. Aug 28, 2016
Main.sublime-menu
README.md Added 'rc_timeout' to documentation. May 13, 2017
rtags.py Merge pull request #35 from tillt/till/rc_timeout Aug 9, 2017
sublime-rtags.sublime-settings Added 'rc_timeout' to settings. May 13, 2017
unittesting.json Update to last `UnitTesting` package, added limit option and new keyb… Oct 19, 2014

README.md

About

Sublime Text 3 C/C++ code completion, navigation plugin. It is based on rtags.

Installation

Make sure you Install rtags:

git clone https://github.com/Andersbakken/rtags
cd rtags
mkdir build && cd build && cmake ..
make install

Via Package Control

  • Install Package Control
  • Run “Package Control: Install Package”
  • Install "RtagsComplete"

Manually

cd <sublime-text-Packages-dir>
git clone https://github.com/rampage644/sublime-rtags

Features

  • Symbol navigation (Goto definition/declaration)
  • Find usages (Find symbol references, Find virtual function re-implementations)
  • Symbol information
  • Code completion

Usage

It is a very unstable plugin. There are a number of limitations:

  • You have to run rdm daemon manually. Better run it before Sublime starts, because plugin creates persistent connection to daemon
  • There is no rdm's project management yet. So it's your responsibility to setup project, pass compilation commands (with rc --compile gcc main.c or rc -J). For more info see LLVM codebase, rtags README, Bear project.

So, the typical workflow is:

  1. Start rdm
  2. Supply it with JSON compilation codebase via rc -J or several rc -c calls.
  3. Start Sublime Text 3

Default keybindings

Keybindings inspired by Qt Creator.

  • Symbol navigation - F2
  • Find usages - Ctrl+Shift+u
  • Find virtual function re-implementations - Ctrl+Shift+x
  • Symbol information - Ctrl+Shift+i
  • Use Alt+/ explicitly for auto-completion
  • Mouse button8 to go backwards (mouse wheel left)

Customization

Keybindings

Customize your own keybindings via "Preferences - Package Settings - SublimeRtags - Key Bindings - User"

[
  {"keys": ["ctrl+shift+u"], "command": "rtags_location", "args": {"switches": ["--absolute-path", "-r"]} },
  {"keys": ["ctrl+shift+x"], "command": "rtags_location", "args": {"switches": ["--absolute-path", "-k", "-r"]} },
  {"keys": ["ctrl+shift+i"], "command": "rtags_symbol_info", "args": {"switches": ["--absolute-path", "--symbol-info"]} },
  {"keys": ["f2"], "command": "rtags_location", "args": {"switches": ["--absolute-path", "-f"]} },
  {"keys": ["ctrl+shift+b"], "command": "rtags_go_backward" },
]

Settings

Customize settings via "Preferences - Package Settings - SublimeRtags - Settings - User"

{
  /* Path to rc utility if not found in $PATH */
  "rc_path": "/home/ramp/mnt/git/rtags/build/bin/rc",

  /* Seconds for rc utility communication timeout default */
  "rc_timeout": 0.5,

  /* Path to rdm daemon if not found in $PATH */
  "rdm_path": "",

  /* Max number of jump steps */
  "jump_limit": 10,

  /* Supported source file types */
  "file_types": ["source.c", "source.c++", "source.c++.11"],
}

If you need auto-completion to trigger upon ., -> or :: add following to "Preferences - Settings - User"

  "auto_complete_triggers":
  [
    {
      "characters": ".>:",
      "selector": "text, source, meta, string, punctuation, constant"
    }
  ]