Vim Configuration (ii): Use Ctags to read the kernel source code

Source: Internet
Author: User

1. Installing Ctags
[Email protected]:~#apt-get Install Ctags


2. Setting the ctags of the kernel directory
[Email protected]:/study/linux-git/linux-git/linux-3.18.3# ls
Arch documentation include kernel NET security
Block drivers init Lib README sound
COPYING firmware IPC maintainers reporting-bugs Tools
CREDITS fs kbuild Makefile samples usr
Crypto git-test.txt Kconfig mm scripts Virt
[Email protected]:/study/linux-git/linux-git/linux-3.18.3#pwd
/study/linux-git/linux-git/linux-3.18.3
[Email protected]:/study/linux-git/linux-git/linux-3.18.3#Ctags-r


3. Create a tags file in the directory at this time
[Email protected]:/study/linux-git/linux-git/linux-3.18.3# ls
Arch documentation include kernel NET security virt
Block drivers init Lib README sound
COPYING Firmware IPC maintainers reporting-bugsTags
CREDITS FS Kbuild Makefile samples Tools
Crypto git-test.txt Kconfig mm scripts usr
[Email protected]:/study/linux-git/linux-git/linux-3.18.3#


in Vim, execute the following command using tags:
Set Tags=/study/linux-git/linux-git/linux-3.18.3/tags
Or add this vim command in. VIMRC, you can jump with Ctrl +] and ctrl+t.


4. Using the Ctags function
CTRL +] jump to Definition
CTRL + T jumps back to the distance

Vim Configuration (ii): Use Ctags to read the kernel source code

Related Article

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.