User forums > Help

`Goto declaration` hotkey not working

<< < (2/2)

BlueHazzard:
maybe an other manifestation of the F2 bug?

[Edit:] i have no default hotkey for this menu entry.
and if i add the short cut ctrl+shift+.  everything works

Pecan:
It might be because your file has an extension of .cc
Does anyone know if the parser even looks at file extension of ".cc" ?

oBFusCATed:

--- Quote from: sgi05431 on March 21, 2018, 07:41:38 pm ---Have you actually tried? The hotkey not working, at least on my machine, is the whole point of this post.

--- End quote ---
Yes, I use them (Ctrl+. and Ctrl+Shift+.) all day long and they work perfectly fine.

pmlonline:
I have a fix for this bug on the Lubuntu, which I hope will also work on Ubuntu. Should I post here or create a new thread? BTW this is not a bug in Windows.

Edit the file codeblocks-17.12/src/plugins/codecompletion/codecompletion.cpp

Goto line 680 and change Ctrl-Shift-. to something else (e.g., Alt-Ctrl-Shift-.) because it's a key duplicate to "Goto declaration" I set it to Ctrl-. and then changed "Goto implementation" to F8.

For some reason on my OS, Lubuntu 18.10, nothing works that's assigned to Ctrl-Shift-. Perhaps OS related? I disabled all of the shortcut keys in Lubuntu that I'm aware of by going into Preferences -> LXQt settings -> Shortcut keys. So on line 677 change from Ctrl-Shift-.  to something else. I changed it a single key press F7 because I use it a lot.

On line 678 I change Ctrl-.  to F8 but you can change it to whatever you like or leave it as Ctrl-.

Next you need recompile the source code:

While in the directory codeblocks-17.12 type make

Then type sudo make install




For anyone who would like to compile the source code, here's everything I did. Please note there might be a few lines that do nothing. Sorry I haven't taken the time to strip out the lines that do nothing. I was just in hurry to install the required libraries and stuff, so I think there are a few times I typed the wrong name, but it's not a problem. Apt-get install will simply tell you there's no such thing. If you find out which steps do nothing, then please let me know.

How to make/compile CodeBlocks IDE 17.12:

Download codeblocks_17.12.tar.xz into your Downloads directory.
Type the following lines

tar xvf codeblocks_17.12.tar.xz codeblocks-17.12/
cd codeblocks-17.12/
sudo apt install autoconf
sudo apt-get install build-essential libtool
sudo apt-get install libwxgtk2.8-dev wx-common libgtk2.0-dev
sudo apt-get install apt.cache
sudo apt-get install wx2.8-headers libwxgtk2.8-0 libwxgtk2.8-dev
sudo apt-get install wxWidgets
sudo apt-get install libwxgtk2.8-dev
sudo apt install libwxbase3.0-dev
sudo apt install libwxgtk3.0-dev
sudo apt install libwxgtk3.0-gtk3-dev
wx-config --version
cd Downloads/codeblocks-17.12/
sudo apt-get install gtk2.0
autoreconf -fi
./configure
make
sudo make install
sudo ldconfig



To start codeblocks and have the ability to set breakpoints and debug I created a file called cb in my home directory ~. Here’s how to create the file in your home direction.

cd ~

nano cb

While inside the file cb type:
codeblocks admin:///root/

Make cb an executable:
chmod +x cb

Type the following in your home directory to start codeblocks:
./cb


I hope this helps someone.

Navigation

[0] Message Index

[*] Previous page

Go to full version