Sublime Forum

CodeWright to Sublime and looking for a Function list for open *.c files

#1

I have a rather simple request that may have been answered in a previous forum entry. I am switching from CodeWright to sublime. The one thing that I depend on is a listing of a modules entry (function) points. When I open a *.c file in CodeWright it lets me see all of the functions in the file. I would like the same behavior in Sublime. I can see a section on the right hand side of the pane that look like it’s the function entry points for the entire project however that pane is so small that I can’t read a thing and is therefore completely useless to me. So if that pane is the answer how do I make it readable. Any and all help is appreciated.

Tony

0 Likes

#2

Use Ctrl + R to see all symbols in a file and Ctrl + Shift + R to see all symbols in a project.

 
Use Ctrl + P to show a list of files in a project & type a file name followed by the @ character to view all symbols within that particular file.
( this also works with the # & : operators for terms & line numbers )
 



###More info @:

Goto Anything

Symbols

0 Likes

#3

Thank you for your reply. “Ctrl + shift + R” works to see all the symbols in a project but “Ctrl + R” only displays a box with an @ sign in it. Am I doing something wrong or do I need to enter something ??

0 Likes

#4

That implies it did not find any functions in the current file.

If you are having trouble with the C syntax finding functions, the latest dev build has a revamped C syntax that improves the old one significantly. However, the dev builds do require a license. Alternatively you can use the instructions at https://github.com/sublimehq/Packages#installation to install the latest syntaxes with the beta version.

0 Likes

#5

The file that is currently opened is full of “C” functions. There are about 30 - 40 functions in the file.

0 Likes

#6

Can you post the file somewhere, or send it to me via email (kept in strict confidence, of course)? That way I can confirm if there is an issue with syntax definition and the file.

0 Likes

#7

I would be glad to send the file since it’s open source Infiniband there should be no problem sending it to you. So I need an email address to send it or can I simply attach it somehow?? I tried upload but it does not like .c files

0 Likes

#8

You can upload the file to some site like pastebin.

0 Likes

#9

OK it’s uploaded to PasteBin User name tony-marine paste is c-code

0 Likes

#10

Can you paste a URL?

0 Likes

#11

http://pastebin.com/rkyupLzs

0 Likes

#12

I opened the file and can see a full list of functions when pressing cmd+r (ctrl+r on Windows/Linux).

Perhaps check and make sure the Syntax is set to C. Use the View > Syntax > C menu to ensure it is set properly.

If that doesn’t work, try taking a screenshot of what happens when you have the file open and press ctrl+r.

0 Likes

#13

@wbond syntax highlighting breaks for me on ~line 315:

You can see that there are two “invalid” scopes and all following functions do not get assigned the appropriate entity.name.function scope, which if and for in the struct’s body get instead.

0 Likes

#14

I don’t see that on my machine with the C syntax. Are you using a different syntax?

0 Likes

#15

Oh yeah, sorry. That’s with C++.

Works perfectly fine with C.

0 Likes

#16

OK looks like when I did view > syntax > c it showed “c” but I selected it anyway and it fixed my problem.

I really appreciate all the help I received on this.

Tony

0 Likes

#17

I’ve committed some changes to the C/C++ syntaxes so this file is properly handled by C++.

1 Like