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

Allow resizing wasavi #36

Closed
denilsonsa opened this issue Sep 11, 2014 · 4 comments
Closed

Allow resizing wasavi #36

denilsonsa opened this issue Sep 11, 2014 · 4 comments

Comments

@denilsonsa
Copy link

Nice, I'm writing this comment using Wasavi! But what if I want to resize the editor? Can I? It doesn't seem possible.

The editor includes :set columns and :set lines, but setting them does nothing.

As a side comment (probably worth opening a new issue), can I change the font size? On gvim, we have :set guifont.

@akahuku
Copy link
Owner

akahuku commented Sep 13, 2014

Currently editor's dimension and font size are depend on original textarea element, so columns and lines are read only.

To make these configurable, the following changes will be need:

  • introduce new boolean option autosizing. default value is true.
  • if autosizing is true, columns and lines are read only.
  • if autosizing is false (noautosizing), changing columns and lines causes an update of editor's dimension.

How about you this plan?

@denilsonsa
Copy link
Author

Sounds a bit overly complicated. Why do we need a new boolean and make columns/lines read-only? We could just make them always writable.

In addition… textareas in Chrome usually have a resizing handle at the bottom-right corner (see resize CSS property), but that handle is hidden/not-available in wasavi. Maybe enabling that handle in wasavi is the best solution (best as in easier/faster/better for the user). What do you think?

@akahuku
Copy link
Owner

akahuku commented Sep 21, 2014

Because wasavi listens the resize event of original textarea and follows latest size of textarea.
So changing lines or columns directly will break the relationship.

However, the plan I wrote may be too complicated.
Allow overriding lines and columns, and in this case, they actually changes the size of original textarea (of course, then, wasavi also follows) -- how's that?

About resize handle, it is good interface, but we must define lines and columns behavior first.

@denilsonsa
Copy link
Author

Some people might prefer having the wasavi size being independent of the textarea size. For instance, I might open wasavi in a large size while editing something, but after I finished I might prefer that the textarea had kept its original size.

So, maybe an option syncsize to keep textarea ↔ wasavi sizes in sync (if textarea gets resized, so does wasavi; and also the other way around).

Regardless if this option gets implemented, I like the idea of lines/columns being writable, and that changing the wasavi size, and also changing the textarea size (if that option is true). This behavior seems consistent. Likewise, updating lines/columns if the textarea gets resized and so does wasavi. Seems consistent, with fewest surprises to the user. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants