Ctags: Illegal option-R

Source: Internet
Author: User

When ctags is used on Mac, the following error occurs:

Ctags: Illegal option -- r

The problem is that the pre-installed ctags are Mac versions, and the ctags we usually call exuberant ctags. The above-R command can be used only by the latter.

The solution is to reinstallExuberant version of ctags:

Http://gmarik.info/blog/2010/10/08/ctags-on-OSX

Run in Shell

Ctags-R

The new version of ctags is installed successfully.

Run in VIM:

:! Ctags-R

The above error message still appears. Because Vim calls :! Ctags indicates to use the shell tool ctags in the shell. The borrowed shell does not know where the newly installed exuberent ctags are, it can only continue to call the ctags pre-installed on Mac. Therefore, the error persists.

The solution is to make every shell (no matter where it is opened or borrowed) have to recognize the new ctags.

Open ~ /. Bashrc: export the bin path of the ctags you just installed to $ path.

For example:

Export Path = "/usr/local/bin: $ path"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.