How can I make my C editor support Intellij keymap? - c

I'm used to the keyboard shortcuts used in JetBrains products such as Intellij IDEA and PyCharm.
I'm now using CodeLite to work on C code, and it's really annoying that the keyboard shortcuts are different.
Is there a way to make CodeLite support pretty-much the same key-mapping as PyCharm? If not, what C editor (apart from the paid-for CLion) supports this?

CodeLite has no builtin maps (I might consider this as a feature request if you will open one here: https://github.com/eranif/codelite/new)
You can change the current default keyboard bindings from the main menu bar:
Settings->Keyboard Shortcuts
Just type in the search box the description you want to change, for example:
If you will type build you will get list of all actions associated with the build keyword, double click one and you will open the edit dialog.
HTH,
Eran

Related

How to code a CLI menu interface similar to octave documentation menu interface in windows operating system in C programming language

After opening Octave in CLI mode and searching for help, I landed in the beautifully managed Documentation Menu Context in Windows CLI even a highlighted arrow key movement and status bar at bottom.
Screenshot:
In Linux, ncurses is generally used to create beautiful CLI Application Interfaces. I just want to know how they managed to do this Menu Context in Windows CLI (since Windows doesn't support ncurses)?
It would be better if anyone can supply an example with code.
[Note: Don't suggest novice ways for creating menu contexts]
Octave is using ginfo from the texinfo package (https://www.gnu.org/software/texinfo/) to display the help.
It (texinfo) attempts to compile using ncurses, but can also use termcap for console functions instead.
In octave in windows, it is using termcap (https://www.gnu.org/software/termutils/manual/termcap-1.3/html_mono/termcap.html)
which provides information on the commands that can be sent to the terminal to move the cursor, scroll, set windows, change text appearance and more.
When stdout is not redirected you can use the low-level Windows console API to draw text in a foreground/background color of your choosing at a specific position.
Use SetConsoleCursorInfo+SetConsoleCursorPosition to control the cursor, ReadConsoleInput to read input events and WriteConsoleOutput or FillConsoleOutput* to write to the console window.

qpython what is the alt button (previous command)

Does anyone know how to use/setup the alt button in qpython 2.7
2? I would like to trigger alt+p for previous command. This is on a galaxy s6. There is a special key menu but I do not see anything for alt. Under preferences I see options for control key, fn, or alt sends esc.
Unfortunatly the feature you are trying to access isn't developed in QPython. It is not possible to access previously entered commands in QPython's console. Up and down arrows just display escape sequences asyou can see on this question.
The QPython3 on the other hand has this feature and it seems that the app is better developed. So If you can use python3 syntax instead of python 2.7, I recommend you go for it.

Making icon for a Windows Form: How to make it show up correctly?

OK, so I have built a Windows Form application. I now want an icon for it. So I use the Icon Editor built into Visual Studio 2012. Draw it all out to look nice and purdy. Once I am done, I have a .ico file and I make it the default icon for the project, and also the icon for the one WinForm in the application.
Unfortunately, it does not show up as I have created it! It is displayed as the default icon file as it existed before I modified it in the icon editor. It's a 32x32 4 bit icon. If I change the extension to .bmp it shows up as the default.
It looks like the VS icon editor is editing something else, not the appearance of the icon. Can someone tell me what I am doing wrong?
I used to have a progam called IconArt that would create icons that looked like icons when I used them in VS. IconArt is now abandonware and won't run on my 64bit Windows workstation.
Since I didn't get any answers within the time I was hoping, I posted this question also in the MSDN Visual Studio forum, and got a good answer that I thought I should post here. Credit to Reed Copsey, Jr, for the answer!
This is it:
You'll need to put your design in all of the different versions. ICO
files contain multiple versions of the same image, for different
screen resolutions.
My personal preference is to not use VS - there's an ICO plugin for
Paint.Net (all free) which allows you to make a single image
(typically 256x256), and save multiple versions within an ICO file in
one shot. It's very useful for building icons.
See
http://forums.getpaint.net/index.php?/topic/927-icon-cursor-and-animated-cursor-format-v37-may-2010/
for the plugin.
Since I am a Paint.Net user, the plugin sounded like a great idea, and I tried it. Bingo! This works very nicely.

Displaying android's commands through code in Codename One

I have an android build of codename one
Can i show the command menu through code in codename one for android build?
Right now , i need to click on the menu option to access the commands. Is there any code snippet through which I can make the commands appear on the screen (invoke the menu) ?
Not at the moment since we don't support showing the native command menu and the command menu might not exist (think ActionBar on Android 3.x and newer).
However, showing the "lightweight" menu might work for some cases. Be warned that this is unsupported officially and this is in no way a recommendation to doing this!
You can call Form.getMenuBar().showMenu(), again this will work great in the simulator but on the actual devices your millage might vary in terms of device look/feel.

Visual Studio - Quick way to search for an object's usage in the code behind

In Visual Studio, is there a quick way to search for an object's usage in the code behind?
This is something I do constantly and the way I am currently doing it seems a little clunky.
I am using VS2005, WinForms, VB and CodeRush/RefactorPro.
Currently I do the following steps:
In Design View
Click the Object.
In the Properties Dialog, double click the Name of the object
Copy it to the clipboard (Using Ctrl-C or Right Click and selecting Copy)
Press F7 to bring up the code behind editor
Press Ctrl-Home to position to the top of the file.
Press Ctrl-F, which brings up the Find Dialog
Press Ctrl-V, to paste in the name of the object into the "Find what:" text box.
Tap ENTER to start the Find.
Ideally, I would like to click the object in Design View then hit a hot key
to do these other steps.
If VS2005 does not have anything built in, should I research using a Macro?
I don't know about any functionality like that, built-in visual studio, however, you can use the wonderful plugin Resharper from JetBrains which has that functionality, as many other excellent features...
There is also another add-on called CodeRush, I haven't used it but it seems to be worth a look.
If 3rd party addons are allowed, install R# and use the Find Usages tool. Although not sure R# would be worth it just for this feature alone.
Tab To Next Reference - CodeRush Or CodeRush Xpress
This feature allows you to cycle through all references to an identifier simply by placing your caret within the identifier and hitting [TAB]
Find All References - CodeRush
The use of the [Shift-F12] combo in CodeRush will bring up the References toolwindow which will then display all references to the identifier currently at the caret.

Resources