Shopping Cart (0)

Reindenting C Source Code Files With Notepad++

MikroC indented code

MikroC indented code

When you are working with source code it is nice to have the code properly indented. You can automatically reformat your unindented C / C++ files in Notepad++ to have proper indentation using the TextFX and NppAutoIndent plugins.

When using the mikroC compiler it is best to have your indentation done using 2 spaces instead of the tab character. For this task it is handy to have Notepad++ automatically convert the tab characters into spaces.

Note: The TextFX plugin was one of the first plugins created for the original ANSI version of Notepad++.  Since Notepad++ has switched primarily to Unicode the TextFX plugin needs some development work to support the latest features.

Let’s install and set up the TextFX Plugin and NppAutoIndent

1. Download and install Notepad++.

2. Download the Unicode version of the Notepad++ TextFX plugin v0.26

3. Now let’s install the TextFX Plugin. Start by unziping the ZIP archive

Next open Notepad++ and from the Settings menu  select Import > Import plugin(s)…

Import the new plugin into Notepad++.

Import the new plugin into Notepad++.

In the open dialogue select the NppTextFX.dll file. Notepad++ will then install the TextFX plugin into the Notepad++ plugins folder.

Import the TextFX notepad++ plugin.

Import the TextFX notepad++ plugin.

4. Let’s open Notepad++ and edit the tab settings. Go to the Settings menu and Select Preferences...

Edit the Notepad++ Preferences.

Edit the Notepad++ Preferences.

In the Preferences window open the Language Menu / Tab Settings section.
Click on the text Tab size and change the tab size to 2. This means a tab character is equal to two spaces.

Edit the Notepad++ Tab settings.

Edit the Notepad++ Tab settings.

Then select Available Items C to edit the settings for c code files.
Enable the replace by space option. This will change the tab indentation characters into spaces.

Click the close button to Close the preferences window.

Programs like MikroC want indentation done with spaces instead of the tab character.

  1. For a Canon PowerShot SD780 IS, I read your post in this group about CHDK and I was so excited, only to find out that under my menu options, I don’t have a firmware update section. I have searched for it, I can’t find it. Any suggestions?

  2. Hi Laura.

    You can still load CHDK on your SD780IS without using the firmware update menu item technique. What you need to do is make your SD memory card bootable with CHDK. Then when you start your camera up CHDK will load automatically from your SD memory card.

    Here is a blog post I wrote about loading CHDK on a SD780IS camera.

    If you are on Windows you need to use the Cardtricks utitlity to install CHDK and make your SD card bootable:

    If you are on Mac OS X you need to use the SDMInst CHDK installer:


  3. Thank You so Much!
    The information you gave me was very helpful and after about 2 to 3 hour of mind boggling finger pushing, I think I have accomplished the task at hand. I was really excited about the Raw capabilities of this software, I’m new to photography but I understand that Raw offers a much better quality photograph. I would appreciate any information you could offer me about how to utilize the Raw capabilities of this software or point me in a direction where I may be able to obtain additional information.
    Again I Truly appreciate the immediate and valuable information you’ve given me!

Comments are closed.