when indenting several lines spaces are inserted instead of

Solved bugs are moved into this topic...
Post Reply
bul
Posts: 10
Joined: 14.01.2018 15:44

when indenting several lines spaces are inserted instead of

Post by bul »

bonjour à tou[te]s

if you select several lines to insert a tabulation, spaces are inserted

➜ tab
. space

origine

Code: Select all

if True:
➜   a=1
b=2
c=3
d=4
ok

indent line 3

Code: Select all

f True:
➜   a=1
➜   b=2
c=3
d=4
ok

indent lines 4 and 5 simultaneously

Code: Select all

if True:
➜   a=1
➜   b=2
....c=3
....d=4
IndentationError: unindent does not match any outer indentation level

not important except with Python !

Sincerely
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

Seems one of "indent_" options ("indent_size") has not Ok value, post here your file 'user.json'?
bul
Posts: 10
Joined: 14.01.2018 15:44

Post by bul »

thank you for your attention

user.json

Code: Select all

{
  "allow_wide_chars" : true,
  "caret_shape" : 4,
  "font_name__linux" : "Hack",
  "font_size__linux" : 14,
  "font_size_b__linux" : 13,
  "font_size_i__linux" : 13,
  "font_size_bi__linux" : 13,
  "ui_font_name__linux" : "Hack",
  "ui_font_size__linux" : 10,
  "gutter_bookmarks" : false,
  "gutter_fold" : false,
  "indent_kind" : 3,
  "links_regex" : "(https?://|ftp://|ssh://|mailto:|magnet:|www\\.)[\\[\\]A-Za-z0-9/:%_+.,;#?!@&=-]+",
  "log_sessions" : false,
  "margin" : 80,
  "numbers_center" : false,
  "ovr_on_paste" : true,
  "ovr_sel" : true,
  "pylib__linux" : "libpython3.9.so.1.0",
  "ruler_show" : true,
  "saving_trim_spaces" : true,
  "show_cur_column" : false,
  "show_cur_line" : true,
  "staples_style" : 0,
  "tab_size" : 4,
  "tab_spaces" : false,
  "ui_max_history_edits" : 0,
  "ui_max_history_files" : 0,
  "ui_max_history_menu" : 0,
  "ui_menu_show" : true,
  "ui_non_text" : 4,
  "ui_notif_confirm" : 0,
  "ui_one_instance" : true,
  "ui_reopen_session" : false,
  "ui_sidebar_show" : false,
  "ui_statusbar_show" : false,
  "ui_tab_variable_width" : true,
  "ui_title_path" : true,
  "ui_theme" : "util",
  "ui_theme_syntax" : "util",
  "ui_toolbar_show" : false,
  "unicode_proportional" : true,
  "unicode_wide_allowed" : false,
  "wrap_indented" : false
}
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

Ok in user.json, but what is your "lexer Python.json" ? "indent_" options in it?

PS. if you won't find "indent_" options in Python-config, send me your "settings" folder to email support(at)uvviewsoft.com
bul
Posts: 10
Joined: 14.01.2018 15:44

Post by bul »

python.json

Code: Select all

{
  "tab_spaces": false,
  "tab_size": 4,
  "indent_size": 4
}

edit : mail envoyé, merci !!
Shovel
Posts: 141
Joined: 31.12.2019 10:16

Post by Shovel »

I just checked this for myself, and encountered a bit of weird behavior, maybe related?
On fresh install of v1.139.0.0, in new untitled tab, on pressing Tab multiline selection is indented by two spaces regardless of what I set in statusbar for tabulation. I can set it to "Tab: 10" and it will still be 2 spaces.
It is fixed if I set any lexer for the document and switch back to "no lexer"
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

@bul
See Cud's descrption of option "indent_size"

Indentation for Indent/Unindent commands
N>0: indent is N spaces
N<0: indent is abs(N) tabs
N=0: indent is from options "tab_size" and "tab_spaces"

so you must set it 0 ! current '4' means '4 spaces'.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

@Shovel, I see the issue, posted to https://github.com/Alexey-T/CudaText/issues/3581
bul
Posts: 10
Joined: 14.01.2018 15:44

Post by bul »

user.json

Code: Select all

"indent_size" : 0,
lexer Python.json

Code: Select all

"indent_size": 0
it works
sorry for the unnecessary inconvenience
I was sure I put 0!

thanks again
Post Reply