Using ctags and cscope
Using ctags and cscope
我在c ++中的项目上做了一个ctags -R,在目录/project/ntopng中。现在,当我使用 cscope -R 启动 cscope 并搜索 main.cpp 时,它会打开。但是,当我在 main.cpp 中的 #include"ntop-include.h"上按 ctrl-] 时,找不到错误消息。头文件位于/project/ntopng/include 的子目录中。但是,ctags -R 是递归的,为什么我会收到错误?我正在使用带有最新版本的 ctags 和 cscope 的 Ubuntu 12.04。谢谢。
我给出了以下答案Ubuntu 12.04
1. Open any file with vim
2. type :echo &tags ,It will show what path vim is using for tags file.
如果不是预期的标记文件路径类型: :set tags=path_to_your_tag_file (ex /project/ntopng/tags)
请记住,它仅对当前会话有效,现在如果需要永久更改,则有两个选项。
对于所有用户(需要根权限) --
1. cd /etc/vim
2. vim vimrc
3. Go to end and add set tags+=tags;path_to_your_tag_file
对于个人用户:
1. cd ~
2. vim .vimrc (This file may not exists in that case newly created)
3. set tags+=tags;path_to_your_tag_file
让我知道它是否适合您。
相关文章:
- C++核心准则 C35 对于接口类"A base class destructor should be either public and virtual, or protected and nonv
- 为什么C++逐位AND运算符在不同大小的操作数中表现为这样
- 为什么 Clang 不允许"and"作为函数名称?
- 位阵列上的快速AND运算
- 是否可以在 C++03 中定义'move-and-swap idiom'等效项
- BoostPython and CMake
- OpenSSL BIO and SSL_read
- Gurobi GRBModel and GRBmodel in C++
- std::visit and std::variant usage
- SHBrowseForFolder with BIF_BROWSEFORCOMPUTER and SHGetPathFr
- Directx12 and keystrokes
- different between int **arr =new int [ n]; and int a[i][j]?
- C++ getenv and setenv
- Inference pytorch C++ with alexnet and cv::imread image
- Visual Studio 2019 C++ and std::filesystem
- 保证逻辑 AND 表达式中的函数调用
- python ctypes and C++ pointers
- C++ const char with .begin() and .end()
- Threads with Classes and std::packaged_task
- Using ctags and cscope