If you want a static outline tree, Emacs also has a more one: ) ( require ' helm-gtags ) Enable helm-gtags-mode (add-hook 'dired-mode-hook 'helm-gtags-mode ) (add-hook 'eshell-mode-hook 'helm-gtags-mode ) (add-hook 'c-mode-hook 'helm-gtags-mode ) (add-hook 'c++-mode-hook 'helm-gtags-mode ) (add-hook 'asm-mode-hook 'helm-gtags-mode ) (define-key helm-gtags-mode-map (kbd "C-c g a" ) 'helm-gtags-tags-in-this-function ) (define-key helm-gtags-mode-map (kbd "C-j" ) 'helm-gtags-select ) (define-key helm-gtags-mode-map (kbd "M-." ) 'helm-gtags-dwim ) (define-key helm-gtags-mode-map (kbd "M-," ) 'helm-gtags-pop-stack ) (define-key helm-gtags-mode-map (kbd "C-c " ) 'helm-gtags-next-history )īefore using the ggtags or helm-gtags, remember to create a GTAGSĭatabase by running gtags at your project root in terminal: Internet connection is too slow for my guide, you can always clone and Please remember that there's a table of content on the top rightĬorner and you can use it to navigate this guide. Inside Emacs effortlessly, such as jump to definition/references atĬursor, go back and forth between jumping points, finding any file This guide, you should be able to browse the Linux kernel source tree
Despite looking long, the setup is short and easy (mostlyĬopy/paste Emacs Lisp code into your init.el) most of the guide areĮxplanations and demonstrations of many useful features. In this guide, I will help you to setup an efficient working C/C++Įnvironment. Command: global-semantic-stickyfunc-mode.Command: global-semantic-idle-summary-mode.Using generated database from GNU Global.Using Semantic with semantic-ia-fast-jump command.Header file completion with company-c-headers package.Browse source tree with Speedbar file browser.Find functions that current functions call.I investigated projectile-fix, but it does not seem to do as I want, and is also apparently incompatible with Helm, which I am starting to use and like. How can I have Projectile (or another Emacs plugin) file-search similarly to how vscode's C-p file-searches when dealing with multi-nested directories? I have large collections/model directories with many subdirectories and so I'm hoping to emulate this vscode behavior in Emacs if possible. In vscode, this would return only dogs.js, in Projectile, it returns nothing (reasonable, but not what I want). The problem is when I do a search like models/dogs. As far as I can tell, this is duplicated by Projectile's C-c p f. In vscode if I do C-p dogs (no ), I would see a selectable list containing dogs.html and dogs.js. I would like Projectile to find files in a project similar to how the command C-p works in vscode. (setq projectile-enable-caching t) to prevent constantly reindexing projectsx (projectile-global-mode) to enable in all buffers (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map) My configuration looks like as below: (projectile-mode +1)
I have installed Projectile on my emacs26 installation.