-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fixes #247 - New layer: writeroom #4262
Conversation
layers/+tools/writeroom/packages.el
Outdated
(interactive) | ||
|
||
(spacemacs/set-leader-keys "aW" #'writeroom-mode)) | ||
(spacemacs/set-leader-keys "aW" #'spacemacs/writeroom-mode)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why you are defining a function on SPC a W
that has for goal to defines another function on SPC a W
:-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I saw this somewhere else, and the reason was lazyness. This was a while ago, on master as opposed to develop, and I forgot where I saw it. This layer has been sitting in my config for a while, and I copy & pasted and updated it for develop now.
I'll give it a go without the redefinition thingy a bit later, and will update the PR accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the witeroom
package is defining witeroom-mode
as ;;;autoload
it should work out-of-the-box. In the other case, you can simply add :commands (witeroom-mode)
and it should autoload the packages when called.
When activated, `SPC a W` will toggle writeroom-mode for distraction-free editing, a great way to edit large amounts of text. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Updated the PR, removing the |
Yes, please. I have a private layer for this. Always happy to find my tools in the official distribution. |
writeroom-mode is so nice! Thanks for sharing! |
I'm considering to try this for some days, and if it works well to do some lobbying on @syl20bnr to get this merged 😉 |
The only problem I found with it is that it doesn't work as well with which-key or the helm buffers. Write room is awesome tho, I'd love to see it merged. On 6 February 2016 15:47:04 GMT+00:00, Fabien Dubosson notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
Indeed. This should probably be asked upstream, to know if there are some possibilities to apply this on helm buffers also. For which-key this should also be asked there probably, but maybe @justbur have some thought on this before going upstream? |
Some remarks:
|
What's the problem exactly? |
@justbur When writeroom is enabled, which-key and helm still use the full width instead of the using the same width as the buffer. I read a little bit more about it and it seems writeroom takes care of being buffer-local, so as which-key and helm use another buffer, there is probably no easy way of making writeroom to apply to them at the same time. @vise890 I think you'll have to discuss this upstream if you want it, as it also happen on raw Emacs. |
@StreakyCobra I' think I can live with it. :) To be honest I'm more concerned about obscure/unwanted layers taking all the good shortcuts (especially under EDIT: specify that |
@StreakyCobra writeroom could adjust the frame parameters or use a hook to adjust which-key and probably helm. It's definitely possible. |
So @vise890 it's up to you if you want to try asking it upstream :-) |
@StreakyCobra I'm ok with it, it's not a big deal. 😄 As I said, I'm more concerned about the keybinding.. |
Yes |
I am happy to update the PR to change the keybinding and add extra docs. I will change to |
Great, but conflicts with |
Also I would like to have |
@syl20bnr ping 😸 |
I like the features of this plugin Vim |
So, it looks like this layer modifies the fullscreen mode of Emacs. If you have native mode (for os X) in your .spacemacs file, starting writeroom mode will pull you out of native mode. The experience is kind of annoying, but considering the layer is pretty much just "pull in the writeroom-mode" external mode, I'm not sure this can be fixed without rewriting writeroom. |
Ok, I think I figured out how to fix that. see this issue. A method of figuring out the current fullscreen mode and mirroring that seems like a good idea. |
Thank you for the PR. As in our contribution guidelines [0] we generally don't add basic layers which consists of adding a package and a hook or key binding. For this reason I close this PR. Thank you for your understanding. [0] https://github.com/syl20bnr/spacemacs/blob/develop/CONTRIBUTING.org#contributing-a-layer |
Sorry, its solved. |
When activated,
SPC a W
will toggle writeroom-mode for distraction-free editing, a great way to edit large amounts of text.