Recent Changes - Search:

Home Page


Main

Downloads
Windows
macOS
Linux (via apt / rpm )
Linux wxWidgets
Release Notes

Wiki
Documentation
FAQ

Build CodeLite
Linux
Windows
macOS

Devs
Debug CodeLite Linux
Building Clang
Build wxWidgets (MSW)
Coding Guidelines
Create a Plugin

TipsAndTricks


Multiple Insertion Points:

If you do Ctrl+left click with the mouse, you get another caret at that point. Repeating this results in another caret each time. Why? Because each acts as an insertion point for typing. So if you want to add "bar" to several words, just Ctrl-click at the end of each, then type "bar". Do an ordinary click to exit. Yes, you could do this in other ways too e.g. Find/Replace, but it's there if you want it.

Since CodeLite 7.0 there's another way to do something similar in a multi-line selection: Edit > Split Selection into Lines, Ctrl-Shift-L by default, will put a caret at the end of each line in the selection; again this lets you add or delete to multiple lines at once. It's less flexible than Ctrl-click as it's only the end of lines, and only for continuous blocks of lines; but for a 50-line block it's faster to type Ctrl-Shift-L once than to Ctrl-click 50 times.

Block Select:

You can select a rectangular block of text with the Alt and Shift keys. With them pressed, use either the mouse or the cursor-keys to extend the selection. The caret changes size to match the height of the selection. One way this can be useful is to create an empty block-selection at (e.g.) the beginning of several lines. Letters typed will then be duplicated on each line.

Build Order for Multiple Custom Projects:

(This came from http://codelite.org/forum/viewtopic.php?f=11&t=1109) You can't set a build order for a custom build project. However you can work around this by creating a standard project without any source files, and make this the main build project. As this is a standard project it will have a build order, which you can adjust to order the custom project as you wish.

C++11:

Do you want to use C++ 11 features (e.g. lambda expressions) with CodeLite? See this forum thread.

Find Resource:

CodeLite has lots of ways of locating things. You can find files in the Workspace tab, strings using Search > Find and Find in Files, classes and functions using Outline and Cscope... However there's another that some people don't notice: Search > Find Resource, aka Sh-Ctrl-R. In its dialog just start typing a search string. You can find and goto files, classes, functions, macros, your house-keys... all from one place.

Code Folding:

How many lines of source-code may your files contain? Some people like lots e.g. the wxRichTextBuffer source file is over 13 thousand lines! Seeing its individual functions is hard. One solution (yes, there are others) is to fold the code. View > Toggle all Folds will fold all the functions, so that they occupy only a couple of lines. You can then unfold just the bits you are interested in.

Toggle all Folds doesn't do exactly quite that. Instead:

  • it ignores a single fold that would collapse the whole file, as would happen with #ifndef FOOH ... #endif in most headers.
  • it folds lazily: internal folds are ignored.

This is usually what you (or at least I) want. However since CodeLite 5.0 there's an extra option: Toggle Every Fold in Selection. This does what it says: only the selected code is touched, and it affects internal folds too. So if you want a particular function to have all its contents folded, select it, Toggle Every Fold in Selection, then unfold the function itself with Toggle Current Fold (or use the mouse). You can then unfold whichever individual areas you like.

Mimetypes: (Linux-specific)

CodeLite is 'associated' with the mimetypes application/x-codelite-workspace and application/x-codelite-project. This means that files ending in .workspace or .project can automatically be opened into CodeLite. However CodeLite probably won't be the first-choice application for doing this. To make it so, either use your desktop environment's Settings mechanism; or do it by hand: add to the file ~/.local/share/applications/mimeapps.list (create the file if necessary)

[Added Associations]
application/x-codelite-project=codelite.desktop;
application/x-codelite-workspace=codelite.desktop;

Can't change Theme?:

From a gitter discussion:

 Q: "...it is not changing the theme and every time i open it it asks me for fixing the theme and restarting the program"
 A: "There is an issue with the Windows accounts that have names with non ASCII characters (like ı, ü, ş, ğ). CodeLite can't create config file properly. For example there aren't any themes to select only default one."
Edit - History - Print - Recent Changes - Search
Page last modified on November 18, 2020, at 09:27 PM