Is there an easy way to do this? On Aptana I used Control+click and I wish there was a way to do something similar on Atom.
Use atom-ctags as a package for C language with all things you need:
Here are the shortcuts for both mac and windows:
For Mac: command + G
For Windows: CTRL+ALT+G
This feature has been built-in into Atom editor (see: symbols-view package), but you need to generate ctags symbols file for your project GH-9, GH-20.
To do that, install ctags
command (e.g. brew install ctags
on macOS), then:
Append, link or copy ctags-config
to your ~/.ctags
, example on macOS:
ln -vs "$(find /Applications/Atom.app -name ctags-config -print -quit)" ~/.ctags
Go to your project folder and run:
cd your/project/directory
ctags -R .
Restart Atom editor.
Alternatively you can use symbol-gen package to generate ctags symbols file for your project based on the options found in .ctags file. You can install it from Atom Package Manager by: apm install symbol-gen
. Then hit CMD-Alt-G to generate tags file for your project.
After following above, you can use Go To Declaration option from the context menu.
On macOS you can use also use the following keyboard shortcuts:
For Typescript users, the "atom-typescript" package adds a typescript aware symbols view, you can trigger it with Cmd+R, and it works great to jump to methods-
https://atom.io/packages/atom-typescript#alternative-to-symbols-view
Check out goto package:
This is a replacement for Atom’s built-in symbols-view package that uses Atom’s own syntax files to identify symbols rather than ctags. The ctags project is very useful but it is never going to keep up with all of the new Atom syntaxes that will be created as Atom grows.
Commands:
- cmd-r - Goto File Symbol
- cmd-shift-r - Goto Project Symbol
- cmd-alt-down - Goto Declaration
- Rebuild Index
- Invalidate Index
Link here: https://atom.io/packages/goto (or search "goto" in package installer)