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~
tab key skip empty row
tab key skip empty row
Last edited by SamC on 05.12.2024 01:20, edited 1 time in total.
-
- Posts: 2327
- Joined: 25.08.2021 18:15
Re: tab key skip empty row
i don't like that you post pictures with 13 number.
if you do it I wont help you.
if you do it I wont help you.
Re: tab key skip empty row
Very sorry for didn't notice that,pictures has been replaced. Thanks for the reminder.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.
-
- Posts: 2327
- Joined: 25.08.2021 18:15
Re: tab key skip empty row
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
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.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?
Thanks!
-
- Posts: 2327
- Joined: 25.08.2021 18:15
Re: tab key skip empty row
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?
+
why do you need to indent empty lines?
+
Re: tab key skip empty row
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
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
-
- Posts: 2327
- Joined: 25.08.2021 18:15
Re: tab key skip empty row
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.
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
Good idea,I will try it later.
Thanks!
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?