Sublime text new line loses indentation

I have a problem that causes a lot of extra keystrokes in sublime text. When I create a couple of new lines, the indentation is correct. However, if I return to these new lines, the indentation will disappear, and I will return to position 0 (this happens for all file formats). I'm doing it wrong, is this intentional behavior? I like the gap in my code, so this is a pain.

Recreation: Write a function code, for example.

function Bob(){ | indent starts here } 

Things are good. Then I add a couple of new lines, an up arrow to the middle, and I get the following:

  function Bob(){ | indent starts here | indent starts here | indent starts here } 

I would like to:

  function Bob(){ | indent starts here | indent starts here | indent starts here } 

Any suggestions, please, besides changing the coding style :-) Thank you.

Edit : Apparently this is not expected. The preferences and plugins listed below, if intervened.

User settings:

 { "auto_complete": true, "auto_complete_with_fields": true, "bold_folder_labels": true, "caret_style": "phase", "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", "detect_indentation": true, "draw_minimap_border": true, "fade_fold_buttons": true, "folder_exclude_patterns": [ ".svn", ".git", ".hg", "CVS", "tmp", ".tmp", ".bundle", ".sass-cache" ], "highlight_modified_tabs": true, "ignored_packages": [ "Vintage" ], "line_padding_bottom": 1, "line_padding_top": 1, "soda_classic_tabs": true, "tab_size": 4, "theme": "Soda Light.sublime-theme", "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, "word_wrap": true, "wrap_width": 200 } 

Plugins

  • Emmet
  • Gitgutter
  • Package management
  • Pyv8
  • Sass
  • SFTP
  • Sidebar enhancements
  • Theme - Soda
+6
source share
1 answer

Add the following settings to your settings, and you should be set:

 "trim_automatic_white_space": false, 

The default value is true , and during installation, alignment of the space added by auto_indent when moving the cursor from the line.

+14
source

Source: https://habr.com/ru/post/958930/


All Articles