Open ghost opened 5 years ago
Please clarify and fill in the template properly. You removed key sections from the issue template, Please fill in all areas. The whole information is required https://raw.githubusercontent.com/platformio/platformio-atom-ide-terminal/master/.github/ISSUE_TEMPLATE.md
ctrl + l
to clear the screen.Expected behavior: ctrl + l
should work for clearing the screen.
Actual behavior: ctrl + l
did not clear the screen, just remove the cursor.
Reproduces how often: Every time.
Thank you for filling in the information.
Seems weird though that in macOS you are mentioning ctrl
and not cmd
so Im unsure if this is a bug report or a feature request.
A look around doesnt show ctrl
+l
mapped to clear in platformio-ide-terminal,
I did find the command platformio-ide-terminal:clear
but that destroys the terminal and recreates one
https://github.com/platformio/platformio-atom-ide-terminal/blob/680b6e24787537b75bfdb376975e5ac178e0dde7/lib/status-bar.coffee#L329-L331
Also ctrl + l
keymap is taken by Atom.
Some clarification needed below.
The
ctrl + l
doesn't work for me for it does not refresh the command line after clear, and need another type to make that shell refresh. It is the same to python in that shell, but not for ghci.
I also have no idea what you meant by It is the same to python in that shell or ghci,
Thx.
Edit: Related to #488
Sorry for my poor expression. ctrl
+ l
is always the shortcut for clearing the screen (old contents move up from screen, pop up a new line, kinda like enter
in normal terminal) in the terminals I've ever tried (which is equal to clear
in usage), so I wonder if I can use that standard command in platformio-ide-terminal
.
The problem is, platformio-ide-terminal
seems to have some refreshing problem with that. That is, ctrl
+ l
should do two things (I assume the two steps, I don't really know about the mechanism in terminal)
It seems that platformio-ide-terminal
gets stuck before step 1, the cursor disappear entering ctrl
+ l
. But when type any thing in, it just jumps to the point after step2. It would be easier to explain my problem if I can record a gif with my command.
I've searched #488 find it is just a brief expression of mine.
Then, python
and ghci
or ipython
by my words are interpreters can be opened in platformio-ide-terminal
which are also capable of using ctrl
+ l
to clear screen in normal terminal (i.e iterm2). And I find these different interpreters perform differently in platformio-ide-terminal
.
Note that this is a bug report though it may have nothing to do with platformio-ide-terminal
(maybe I think).
Thanks.
Sorry for my poor expression.
ctrl
+l
is always the shortcut for clearing the screen (old contents move up from screen,
In macOS there is no ctrl
key which is part of my confusion shouldnt in your case be cmd
+ l
?
Im going to test this in Windows 10 PRO 1803.
This is how ctrl
+ l
it works on regular powershell.
So I think its working except it wont actually clear what you typed unless you press Enter
after and then ctrl
+ l
this works 100%.
In platformio-ide-terminal behaves exactly the same way.
So how does the command platformio-ide-terminal:clear
work for you? Does it satisfy your need?
See #426
platformio-ide-terminal uses and depends on term.js which is a project thats has been abandoned now for 3/4 years, its bugged, and some of these bugs could be related to that. For instance newer terminals use xterm.js
and are more robust and compatible with native shells and terminals.
Thanks for explaining.
It has nothing to do with platformio-ide-terminal:clear
(this is a window close command) or macOS's cmd
or ctrl
(ctrl
+ l
on unix also means clear
). ctrl
+ l
by my words is perhaps the cmd
+ l
in your opinion. Ignoring that misleading word, I mean that there is a "ctrl
+ l
-like" bug on my platformio-ide-terminal
and it may be related to #426 .
I've recorded two gifs for explanation.
Above this the keyboard follows, there is a time period that cursor disappeared.
pwd
then enter
ctrl
+ l
(it got stuck)cd ..
then enter
(it seems to finish refreshing work on c
)And the second gif shows the behaviour the platformio-ide-terminal
should have with a replacement of clear
.
The clear
mentioned above may not be a good example, since I use clear
+ enter
to make it refresh that command line. But it do demonstrate the meaning as it refresh it successfully.
It has nothing to do with
platformio-ide-terminal:clear
I know it not the same, but it exists and works. You have it in context menu and on command menu.
(this is a window close command)
Its actually a destroy and recreate terminal command see the actual code.
Basically, what I want to know is, will platformio-ide-terminal:clear
work as a replacement for your immediate needs or not.
If it does Ill consider adding 'ctrl-alt-l': 'platformio-ide-terminal:clear'
If its a no answer, then this issue will remain open forever until someone updates term'js
to xterm.js
because #543 also which means any fixes/features are community generated,
In Windows however it works well enough, haven't tried Linux yet, but for me typing a clear command is faster than pressing some shortcut.
You have several alternatives.
1) use platformio-ide-terminal:clear
2) type clear
and press Enter
3) use another terminal like the one in atom-ide-ui which is already xterm.js based.
4) implement xterm.js
in this project.
If it does Ill consider adding
'ctrl-alt-l': 'platformio-ide-terminal:clear'
In response to that, clearly in the view of mine, destroy the old and create a new session is unacceptable. We use clear
to do some screen scrolling in order to reach a greater visual effect and make it handy to type new things, sometimes may scroll down back again to check some ouput. But session destroy remove the content and may cause some temporary command session settings reset.
Thanks for friendly and warm response.
Yw =)
Sorry that doesnt suit your usage, I do see that 'platformio-ide-terminal:clear' is too evasive a method, If I ever come up with something else, I'll ping back.
I have tested this in actual macOS mojave 10.14.2 and works by pressing key combo twice, not ideal, but considering this is using old not maintained term.js, dont expect any fixes to this unless someone adds xterm.js support instead.
O(∩_∩)O~~
I have tested control + L
on macOS catalina 10.15.2 and it works as expected.
Description
The
ctrl + l
doesn't work for me for it does not refresh the command line after clear, and need another type to make that shell refresh. It is the same to python in that shell, but not for ghci.Steps to reproduce
ctrl + l
to clear the screen.Expected behavior:
ctrl + l
should work for clearing the screen.Actual behavior:
ctrl + l
did not clear the screen, just remove the cursor.Reproduces how often: Every time.
Versions
OS name and version:
macOS Mojave 10.14
Platformio-ide-terminal version:2.9.0