Page 1 of 1
tab key skip empty row
Posted: 18.11.2024 14:39
by SamC
Hello,
When select multi-lines and use tab key,the empty line will be skipped. Is there an option can make tab key works for empty line?
Thanks~
Re: tab key skip empty row
Posted: 04.12.2024 16:15
by main Alexey
i don't like that you post pictures with 13 number.
if you do it I wont help you.
Re: tab key skip empty row
Posted: 05.12.2024 01:22
by SamC
main Alexey wrote: ↑04.12.2024 16:15
i don't like that you post pictures with 13 number.
if you do it I wont help you.
Very sorry for didn't notice that,pictures has been replaced. Thanks for the reminder.
Re: tab key skip empty row
Posted: 25.02.2025 19:24
by main Alexey
sorry for the long delay. I forgot about this topic. now I see that Tab-key on selection makes 'Indent selection' command. and this command skips empty lines in selection. it is like in SublimeText 4. do you suggest to indent also empty lines? it will be bad IMO. why to do this?
Re: tab key skip empty row
Posted: 04.03.2025 05:25
by SamC
main Alexey wrote: ↑25.02.2025 19:24
sorry for the long delay. I forgot about this topic. now I see that Tab-key on selection makes 'Indent selection' command. and this command skips empty lines in selection. it is like in SublimeText 4. do you suggest to indent also empty lines? it will be bad IMO. why to do this?
It's mainly due to python indent requirement. When I use cuda to write python code,sometimes want to indent all the rows to make(or delete) a loop or function. Then I need to select some rows and then type tab-key(shift+tab). For the empty rows,I need to make additional tab key,because the empty lines in selection is skiped.
Thanks!
Re: tab key skip empty row
Posted: 04.03.2025 06:59
by main Alexey
it is OK if empty lines in selection are skipped, Python don't need indents for empty lines in a block. for that reason, Sublime also don't indent empty lines.
why do you need to indent empty lines?
+
Re: tab key skip empty row
Posted: 04.03.2025 07:16
by SamC
Sure, in python IDE,the empty lines can be handled properly.
However,sometimes,I use cuda plugin "exterminal " to run python script. This plugin is with a command called run selection,in this case,if the selection is with empty row which is not properly indented,the script will throw error.
Also,I like to used color indent plugin to read code,if the empty row is indent,the file will be more readble.
Thanks!
[item4]
section=commands
caption=ExTerminal\Run selection from editor
method=run_selection
Re: tab key skip empty row
Posted: 04.03.2025 07:45
by main Alexey
1st, this is too exotic case - using python.exe as shell_windows in ExTerminal.
it is more properly to adapt ExTerminal.
it is possible to filter out empty lines from selection block. in python if 'block' is list of lines, then
block = [s for s in block if s]
will filter out empty lines from 'block'.
can you adapt ExTerminal?
2nd, coloring of indents - it is OK to keep blank lines here too. no coloring of indents => empty line. it is readable ok.
I don't want to add exotic option for this case.
Re: tab key skip empty row
Posted: 04.03.2025 11:43
by SamC
Good idea,I will try it later.
Thanks!
main Alexey wrote: ↑04.03.2025 07:45
it is possible to filter out empty lines from selection block. in python if 'block' is list of lines, then
block = [s for s in block if s]
will filter out empty lines from 'block'.
can you adapt ExTerminal?