Menu

Tab indent size for each language

2006-11-17
2012-11-13
  • Nobody/Anonymous

    Hello,

    I would like to know if it's possible to define a tab indent size for each language.
    I have an assembly language where the tab indent should be 8, but when I open C/C++ files I want the tab indent to be 3.

    Is it possible to define this for each language, or do I have to change it manually each time?

    Thanks,
    Damien.

     
    • TomK

      TomK - 2006-11-17

      I second that.

      I have already filed an enhancement request for this:
      http://sourceforge.net/tracker/index.php?func=detail&aid=1598055&group_id=95717&atid=612385

       
      • Nobody/Anonymous

        I also request this enhancement.

         
        • Jeff Bateman

          Jeff Bateman - 2008-01-03

          Love using Notepad++, but the "one size fits all" approach to tabs is a real pain for multi-language usage. e.g., VHDL works best with a tab size of 2 or 3; C++ files typically use 4.

          The tab size should be selectable as a language feature.

          "Replace by space" also needs to be selectable per language, e.g. in-house guidelines prohibit tabs in VHDL files but not in C++ files.

           
          • GVC

            GVC - 2008-05-21

            Same is valid for EOL's.  Shell scripts running on Linux/Unix can't get DOS EOL's, for instance.

            Would also be nice if this could be set on a per-filetype base.

            Best rgds,

            --Geert

             
      • Norman

        Norman - 2009-07-14

        Is there any update on this? It's really the only feature Notepad++ is missing to become perfect, and it's more than two years old!

         
    • Rien

      Rien - 2008-05-21

      Hear! Hear!

      Rien

       
  • FriendFX

    FriendFX - 2011-01-06

    I also would like to have more flexibility with tab size.

    For example, TextPad allows you to set a tab size per open file window, which is quite handy when viewing files where the indent size is different from the tab size or mixed tab/space indentation (I find both incredibly annoying but apparently these styles are used by quite a few people/editors).

    Personally I prefer tabs to be 4 wide, but it would be nice if I could override this "default" value when viewing files from other people.

    Update on the date: more than four years old by now…

     
  • Mike Cowperthwaite

    Supposedly, 5.8.5 fixed the issue of the per-file-type tab-size not being saved. (The problem was that setting was stored in a file that was kept in the program's directory and access to it wasn't properly handled by the UAC.)

    Tab-size per buffer (not per "window" - I'd never want one view of file to have a different tabsize than a second view of the same file) was a feature in Codewright in the late '90s.

     
  • longjon

    longjon - 2011-10-27

    Hi, I'm using 5.9.5 on Win XP SP3 and I'm still unable to save the tab-size. It's a strange way to edit it too. The tab size (on the tab settings tab page of preferences) is displayed as a single digit which is a link, which when clicked pops up a single-field modal dialog box. I change the value from 4 (which it's set to for all languages) to 2, and then the only thing I can do is click on the little x in the top right corner of the box - there's no OK button. Doing this does not affect the tab size link which is not surprising since I had to exit out of the dialog using the 'x'.

    So in effect I cannot change this value, which is a bit of a pain, to be honest. Perhaps a regular field or drop-down box without the link & separate dialog box might be better? Or am I missing something?

    Apart from that npp is FANTASTIC and huge respect out to all the developers.

     
  • longjon

    longjon - 2011-10-27

    Oh I got it now - Enter! Der! It's still a bit of a weird way of doing it though…