Sublime Forum

Goto definition broken?

#1

Hi guys,

On one of my WIndows 7 PC’s some features are not working. The most annoying is the goto definition. I tried reinstalling a fresh Sublime free 3103 (x64) right now. Opening a new Project and adding the files I wanted to use. Unfortunately, the symbols and functions are not indexed.

I tried view.indexed_symbols() in the console and it only shows “[((751, 767), ‘COM_H_INCLUDED’)]”.

Any ideas?

Not sure if this is unrelated to my other problems:
“CTRL + SHIFT + ALT + P” and “CTRL + `” are not working.

Thanks you for your time and help.

eimer

0 Likes

#2

“CTRL + SHIFT + ALT + P” and “CTRL + `” are not working.

The release notes for build 3103 state:

Windows: ctrl+alt+p is no longer bound by default, due to compatibility issues with some keyboard layouts

on one of my machines, I find for some reason that my ctrl + ' key is read by Sublime Text as ctrl + backtick - checked by executing sublime.log_input(True) in the console and then pressing the key combinations. You can still get to the console from the View menu -> Show Console and the scope from the Tools menu -> Developer -> Show Scope Name. I’m sure if you search the forum you can find people that have posted how to re-enable the keybinding, if you want to do so.

0 Likes

#3

Thanks you for the reply, I am new to Sublime so im didn’t check the release notes. Totally my bet. It is just odd to me because on one machine it works on the other it does not.
I will put some thought into it.
The Tools-Developer-ShowScope will definately do for now.

0 Likes

#4

about goto definition and the indexed symbols, what syntax are you using? can you share a sample file that exhibits the problem?

0 Likes

#5

I sure can.

Here is the code related to my first post.

`//
/*!
*
*/
/
/

/* ========================================================================= /
#ifndef COM_H_INCLUDED /
prevents compiler from double- /
#define COM_H_INCLUDED /
processing this header file /
/
========================================================================= /
#ifdef __cplusplus
extern “C” {
#endif
/
========================================================================= */

/* === library/ api includes =============================================== */
#include <stdbool.h>
#include <stdint.h>

/* === application includes ================================================ */
#include “COM_conf.h”

/* === public macros ======================================================= */

/* === public types ======================================================== */
typedef enum {
I_COM_TE_ERR_NONE,
I_COM_TE_ERR_LASTENTRY
} I_COM_TE_ERROR;

typedef enum {
I_COM_TE_CON_NONE,
I_COM_TE_CON_GUI,
I_COM_TE_CON_MC,
I_COM_TE_CON_WDC,
I_COM_TE_CON_LASTENTRY
} I_COM_TE_CONNECTION;

typedef enum{
I_COM_TE_PRIO_NONE,
I_COM_TE_PRIO_LOW,
I_COM_TE_PRIO_MID,
I_COM_TE_PRIO_HIGH,
I_COM_TE_PRIO_LASTENTRY
} I_COM_TE_PRIORITY;

/* define function callback type */
typedef void (iCom_Cb_t)(I_COM_TE_CONNECTION const comConnection, / Calling connection /
void * comData); /
data to be returned */

/* === public variables ==================================================== */
typedef enum {
I_COM_TE_TEST_NONE,
I_COM_TE_TEST_LASTENTRY
}I_COM_TE_TEST;

/* === public functions (interfaces) ======================================= /
I_COM_TE_ERROR iCOM_send( I_COM_TE_CONNECTION const comConnection, /
sent through this connection /
I_COM_TE_PRIORITY const comPriority, /
priority of message /
void * const comData, /
data to be sent /
uint8_t * const comDataSize); /
data size */

bool iCOM_registerCallback(iCom_Cb_t comCallback); /* callback function to register */

/* ========================================================================= /
#ifdef __cplusplus
}
#endif
/
========================================================================= /
#endif /
COM_H_INCLUDED /
/
========================================================================= */

/************************ </ end of COM.h > ***************************/
`

0 Likes

#6

On dev build 3109, in my view.indexed_symbols() list I get: [((318, 332), 'COMH_INCLUDED_'), ((1322, 1326), 'void'), ((1699, 1708), 'iCOM_send'), ((1945, 1966), 'iCOM_registerCallback')]

it looks like there are a few changes in the syntax definition for C++ since build 3103 (see https://github.com/sublimehq/Packages/tree/master/C%2B%2B) so you may need to switch to a paid dev build or wait for an updated beta build

0 Likes

#7

That is unfortunate. Well, now i get the same return for the example file, but I still can’t use the function in any other file as auto-complete :frowning:
What do you mean with a payed dev version?

0 Likes

#8

https://www.sublimetext.com/3dev

Sublime Text 3 dev builds are currently available to registered users only.

0 Likes