Disable word-wrapping in editor #223
Comments
I second this suggestion. Although it seems a small issue, the soft-wrapping makes me walk away from sharelatex. |
I second this suggestion as well. Hard-wrapping is very important if you synchronize to GitHub and want to be able to check |
This isn't on our roadmap because we're always very cautious about adding more and more settings when the defaults work well for people, but I'll leave this open as an ongoing gauge of interest |
That is indeed a good policy! But I think that this would be a very important feature. Merge and diff algorithms are line-oriented; if you put an entire paragraph on one line, you make those tasks much more difficult. Especially when collaborating with authors that use their own editor and git instead of the online one (the "track changes" feature in the online editor makes this easier). I can help with the implementation if this feature is added to the roadmap. Meanwhile, a temporary solution is to use |
I certainly support this feature. In particular, soft wrapping makes working with tables with many columns challenging. I can only make my browser window so wide. |
I would also very much like that feature for the reasons above. |
I support hard wrapping. Soft wraps pretty much make navigation to specific locations very difficult. Hard wraps are needed for vim-mode. |
another vote for hard wrapping. cut/paste can be awful with vim-mode. |
I would also support this feature for the reasons mentioned above |
Hard wrapping would be really cool, currently working with Vim mode is awful. |
Tables are completely messed up without this feature. Please add it. |
Agree 100% about disabling soft wrapping and supporting hard wrapping! Hard wrapping is especially important, for all the reasons already mentioned |
Such editor line wrapping configuration would be very helpful. |
Very important for laptops. I agree with above. |
+1 |
Yes, please 👍 |
What is the current status on this feature? |
WorkaroundUse this bookmarklet:
|
@NilsEnevoldsen how to set e.g. 80 chars for hardwrap? |
@sebhahn Hard wrapping is not supported with the Ace editor (ajaxorg/ace#2865). I don't know if character wrapping is supported. You can set 80-character-width soft word wrap with this bookmarklet:
|
This saved my day! Thanks!
The URL basically tells the browser to execute the Javescript code which asks the online text editor (Ace) to turn off wrap mode. To turn the wrap mode back, simply refresh the page. |
This method also works on Firefox. It is such a useful feature I would love to see an option to enable/disable it on the Settings sidebar. |
Bump -- this would be awesome. |
dito |
I would benefit from hard wraps. I collaborate with someone using emacs (not in overleaf) and they hard wrap everything, so when I pull the changes in overleaf it's a mess. |
Agreed, hard wrap would make me want to use overleaf a lot more. |
Same here, please |
I have been using vim and hard wrapping for my tex editting, and just now I tried using overleaf the first time, and immediately identified this barrier. I would have definitely turned to overleaf from now on if this feature were in place. |
Would be appreciated. Note the workaround posted by @NilsEnevoldsen and explained by @Kee-Wang above |
Yes, would love hard wrapping as a vim user. |
Kinda sad that the workaround doesn't work for Microsoft Edge. Any suggestion? |
We always have an option to go to the javascript console (in Safari, for example, it's Develop -> Show JavaScript Console) and insert the script manually (copy-paste and hit Enter). Don't copy-paste But I do ask the developers to have this as an option in UI. |
The editor works very well overall on mobile (in both firefox beta for android and the Fennec firefox build for android), but unfortunately I don't know of any way to apply the workaround. It would really be nice to have this as a UI option. Long-shot related suggestion: add emacs's "fill-paragraph" and "fill-region" as keybinds for emacs mode. |
If you want that bookmarklet to work as a toggle, you can use |
If you've got TamperMonkey installed, the following user script will add a button to toggle text wrapping to the toolbar. // ==UserScript==
// @name Overleaf customisation.
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.overleaf.com/project/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(function () {
var toolbar = document.querySelector('div.toolbar-editor > div.toolbar-right');
var element = document.createElement('A');
element.textContent = 'Toggle wrap';
element.onclick = function() {
var editor = document.querySelector('.ace-editor-body');
let session = ace.edit(editor).getSession();
session.setUseWrapMode(!session.$useWrapMode)
};
toolbar.insertBefore(element, toolbar.children[0]);
}, 3000);
})(); |
@tillahoffmann , great (temporary) solution! Hey, devs, apparently, it will take you the entire couple lines of JS code to make life easier for us! |
@tillahoffmann would you be interested in integrating that into the official client and submitting a PR? |
@chrstfer, I'm unfortunately not a competent web developer, but anyone who has the skills to integrate it into the codebase is welcome to use whatever is useful from the snippet above. |
Hi! Thank you for taking the time to write up this issue. We are in the process of migrating to a monorepo at https://github.com/overleaf/overleaf and will mark this repository read-only soon. We are going to close this issue now to avoid any confusion about the inability to comment further. If you believe this issue still needs addressing, please create a new issue at https://github.com/overleaf/overleaf. Thanks again! |
So, I often work on small laptop screens; and I also prefer my code (including LaTeX documents) hard-wrapped (at 100 columns, for whatever it's worth.)
This isn't playing too well with the ShareLaTeX editor: I was shocked to see vim-command support, and that's really exciting; so I have high hopes that perhaps I could convince you to offer a flag to disable Ace's soft-wrapping entirely?
The text was updated successfully, but these errors were encountered: