How to configure Ctags for Sublime Text 3

I am using a Sublime Text 3 project with Ruby On Rails.

Some time ago I set up CTags using this tutorial .

It was perfect, but suddenly stopped working. I get the following error when trying to rebuild project tags.

/ bin / sh: ctags_for_ruby: command not found

These are my files:

/ Usr / local / bin / ctags_for_ruby:

#!/usr/bin/env ruby
system "find . -name '*.rb' | ctags -f .tags -L -"

if File.exist? './Gemfile'
  require 'bundler'
  paths = Bundler.load.specs.map(&:full_gem_path).join(' ')
  system "ctags -R -f .gemtags #{paths}"
end

~ / Library / Application Support / High Text 3 / Packages / Custom / CTags.sublime-settings

{
    "debug"           :  false,
    "autocomplete": false,
    "command"   :  "ctags_for_ruby",
    "filters"         :  {
        "source.python": {"type":"^i$"}
    },
    "definition_filters": {
        "source.php": {"type":"^v$"}
    },
    "definition_current_first": true,
    "show_context_menus": true,
    "extra_tag_paths" :  [ [["source.python", "windows"], "C:\\Python27\\Lib\\tags"]],
    "extra_tag_files" : [".gemtags", ".tags"]
}

And the variable $PATHincludes a directory /usr/local/bin.

Why can't Sublime find / execute a file ctags_for_ruby?

+4
source share
1 answer

/usr/local/bin $PATH, Sublime. , ~/Library/Application Support/Sublime Text 3/Packages/User/CTags.sublime-settings "command" "/usr/local/bin/ctags_for_ruby". , Ruby /usr/bin, /usr/local/bin/ctags_for_ruby #/usr/bin/env ruby Ruby - , which ruby .

+3

All Articles