Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to switch to one-line mode? #1601

Closed
JamesChenX opened this issue Sep 29, 2019 · 3 comments
Closed

Is there any way to switch to one-line mode? #1601

JamesChenX opened this issue Sep 29, 2019 · 3 comments

Comments

@JamesChenX
Copy link

JamesChenX commented Sep 29, 2019

monaco-editor version: 0.18.1
Monaco editor is powerful but I want to use it in one-line mode(no multiline).
And I didn't find any relevant options for it.
So, did I miss something?

@alexdima
Copy link
Member

alexdima commented Oct 3, 2019

Such a mode is not built-in, but you can build it yourself... It is possible that you size the editor in such a way that it has precisely the height of one line, and that you hide the scrollbars, and that you override Enter to not insert \n, and that you listen on content changes and strip \n if they are introduced via pasting, etc...

@mx2323
Copy link

mx2323 commented Oct 19, 2019

Would there be a way to still show the autocomplete drop down even if it is one line?

@alexdima
Copy link
Member

Yes, there would be no problem and autocomplete would continue to work.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants