1. Ben Bluemel
  2. IndentByFold
  3. Issues


Issue #3 wontfix

Indent based on tabs only

Anonymous created an issue

Similar to Issue #2 "Reintent problem". Should be easier to implement.

Currently creating a new line will indent based on the amount of whitespace (tabs and spaces), which isn't desirable when using the smart tab format. (Tabs for indentation, spaces for alignment.)

To correct this I suggest this pseudocode: {{{ //Had to use spaces, tabs don't work here $indent=""; if (regex("^.")=="\t") { //begins with tab $indent=regex("^\t+"); //copy tabs } else { //For people who use spaces do_what_is_normally_done() } if (is_fold_point()) {$indent+="\t";} }}}

I only found out about this plugin today, it's going to be very useful when I have to deal with the code of other people :)

Comments (2)

  1. Ben Bluemel repo owner

    I believe this is most likely an issue with scintilla, and it treating the spaces as part of the indentation, basically the plugin tries to be agnostic to whether indentation is based on spaces or tabs. There maybe a hack for it to try to work out whether smart indentation is used.

  2. Log in to comment