Menu

Auto ident on selection

VIB
2008-08-11
2012-09-26
  • VIB

    VIB - 2008-08-11

    Hello, I've already searched for this in both google and this forum but I could not find the answer.

    Most editors have an option to auto-ident / format selection the current selection, or the whole text file (ex.: ctrl+k, ctrl+f on VS2008). On Dev-cpp I'm aware there is the auto-ident for new lines option, and the add/remove ident hotkeys (shift+ctrl+i and shift+ctrl+u). But I could not find how to auto-ident a whole selection of existing lines.

    Is there such option somewhere? Maybe some plugin or extension adds it?

    Thanks,
    VIB

     
    • cpns

      cpns - 2008-08-11

      No.

      I simply use VC++ 2008 Express to format code. And then if I need to, paste it back into Dev-C++. I generally only do that if I am specifically testing some aspect of GCC (typically in order to investigate a problem posted here) since VC++ 2008 Express is superior in any case, so I otherwise stick with that. In fact since I reformatted my PC, I did not even bother installing Dev-C++. Besides, you can get VC++ 2008 Express IDE to build a GCC project directly - you can even use a Dev-C++ generated makefile t, so yu might want to relegate Dev-C++ to a makefile generator, which is probably its only significant feature in any case.

      Another way of doing it is to install something like GC GreatCode, and then integrate it using the Tool menu customisation. Unfortunately to make it work you have to manually ensure you have saved the file before running it, and GC is only good for C code. Moreover it is cumbersome to configure get the code just the way you want.

      Clifford

       
    • VIB

      VIB - 2008-08-12

      I did not want to use VC2008 because I wanted the light weight of dev-cpp and to compile with mingw. But I just found that Code::Blocks can do all that. It will open my dev-cpp projects, compile with mingw and is easy to install plugins including one to auto-format the whole file.

      So I'll just be using CB instead. Thanks anyway.

       
    • cpns

      cpns - 2008-08-12

      Fair enough. Although these days you need something to fill all that hard disk space up with and VC++ provides a lot of functionality for all its weight - the resultant application builds are not significantly different in size, personally I think that your concern about 'light weight' may be misplaced. What are you trying to achieve from your 'light weight' development environment? Other than perhaps satisfying a need to run it on out-of-date hardware or OS I can think of few benefits.

      Another, perhaps more ubiquitous solution is Eclipse with the CDT plug-in. Try EasyEclipse for C/C++ for an already integrated C/C++ development solution. It can also work with MinGW (or even MSVC++ for that matter).

      Personally I dislike both Code::Blocks and Eclipse from a usability point of view. However both provide a better debug solution than Dev-C++, but neither beat VC++ on that score.

      Clifford

       

Log in to post a comment.