Question about C++ Code::Blocks projects and editor settings and the C++ GVIM editor

This is a discussion on Question about C++ Code::Blocks projects and editor settings and the C++ GVIM editor within the C++ Programming forums, part of the General Programming Boards category; I have been using the GVIM C++ editor and the usual g++ compiler in the Ubuntu Linux environment, but since ...

  1. #1
    Registered User
    Join Date
    May 2013
    Location
    United States
    Posts
    58

    Question about C++ Code::Blocks projects and editor settings and the C++ GVIM editor

    I have been using the GVIM C++ editor and the usual g++ compiler in the Ubuntu Linux environment, but since Code::Blocks was highly recommended by the experts in this forum, I have also installed "Code::Blocks. I have the following two questions about Code::Blocks.

    1) After I have edited a .cpp file with GVIM, and after I have closed the GVIM editor, if I restart re-editing the same .cpp file with the Code::Blocks editor, this time some of the indentation is lost. For example, when I use Code:: Blocks to open a cpp file that has already been edited with GVIM, this time the indentation levels of braces, and the indentation of various lines is actually lost, and the code looks difficult to read. Is there anything I can do in order to make sure that the C++ editor of Code::Blocks recognizes the indentation done with the GVIM?

    2) Since I am beginning to learn Qt in order to create menus for C++ Linux programs, I have installed the "QT Creator (Qt 4)" from the Ubuntu Software Center (by using the automatic menu that directly installs the items available from Ubuntu), and this is excellent. However, having noticed that Code::Blocks also has the capability to generate Qt projects, I wanted to start using Code::Blocks for Qt projects as well. But when I tried to create a Qt project from Code::Blocks, the project manager asked me to enter the location of the Qt: "Please select the location of Trolltech QT4 on your computer. This is the top-level folder where QT4 was installed. This folder must contain the folders "include" and "lib" ".
    But since I have originally installed Qt Creator directly from the Ubuntu Software Center menu, it seems to me that the "include" and "lib" directories do not have a unified top-level QT directory, and so I am unable to give Code::Blocks project manager the information it needs.
    Of course, as a last resort I can certainly download the tar file to install Qt Creator manually, and in this case I assume that there will be a unified top-level QT4 folder containing both the "include" and "lib" folders, as the Code::Blocks project manager needed. But would such a manual re-installation of Qt Creator disturb the previous settings? What would you recommend doing to enable Code::Blocks to create Qt projects?


    Many thanks!
    Last edited by FortranLevelC++; 07-03-2013 at 03:14 PM.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,602
    About your first problem, it's because of the way tab is processed by cb's editor. By default, codeblocks inserts 1-4 spaces instead of a tab. Also, maybe your font isn't isometric.
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    35
    Quote Originally Posted by GReaper View Post
    About your first problem, it's because of the way tab is processed by cb's editor. By default, codeblocks inserts 1-4 spaces instead of a tab. Also, maybe your font isn't isometric.
    I think you mean a monospace font. Like this:

    Code:
    This is a monospace font.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code Blocks vs Windows settings?
    By LeonK in forum C++ Programming
    Replies: 2
    Last Post: 06-20-2011, 06:16 AM
  2. code EDITOR
    By terminator in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 04-24-2008, 07:25 AM
  3. Which is the best editor for C code etc?
    By esbo in forum Tech Board
    Replies: 39
    Last Post: 01-29-2008, 05:10 PM
  4. Favorite Code Editor
    By jmd15 in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 05-02-2007, 11:48 AM
  5. Source Code Editor
    By manofsteel972 in forum Tech Board
    Replies: 4
    Last Post: 08-07-2004, 03:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21