Fork me on GitHub

is it possible to truncate long lines (SPC t l) globally and always?


and if possible - how? 🙂 thanks


@kirill.salykin I believe so, although havent tried it. There are a few ways you can add this to the dotspacemacs/user-config section of .spacemacs Set global visual line mode to true, this wraps lines and is a minor mode around truncate lines

(setq-default global-visual-line-mode t)
I use the following which works for org-mode:
;; turn on visual-line-mode for org-mode only
  (add-hook 'org-mode-hook 'turn-on-visual-line-mode)
You may have to reload your configuration or restart Spacemacs for this to be picked up


nope, doesnt work


I cant help with this minimal response, sorry.


nothing happened, no errors and lines not truncated


I’d like to provide as much as possible, but don’t actually know what else I can tell


what modes are not truncating lines? do the lines truncate in those modes manually ? are you using horizontal splits in your windows? are you using master or develop? did you reboot after changing the config? did you try both forms of config suggested?


@kirill.salykin maybe try (add-hook 'prog-mode-hook 'spacemacs/toggle-visual-line-navigation-on)


@U05254DQM sorry for delay: - clojure mode - yes, when manually toggle - it truncates - no, not horizontal, but vertical - develop - yes, I reboot - yes, both


(add-hook 'prog-mode-hook 'spacemacs/toggle-truncate-lines-on)
worked for me thanks @U05254DQM and @U0G75ARHC


I've never needed to truncate lines / visual-line when writing Clojure, or any other programming language so apologies for not understanding what you were trying to do. Thanks @U0G75ARHC, that is how I would do it. I've only used it for org-mode, hence the example. I usually switching it off when creating wide tables in org-mode.


No need to apologize. Thanks a lot for your help! And yeah, our code should be a bit shorter)


I tend to avoid longer lines in Clojure code as personally I find it easier to read Clojure that way. Spacemacs does a good job of auto-indenting, more so in vim insert mode though. And TAB is always handy for tweaking the indents on lines or regions.


but sometimes 2 vertical windows side-by-side on 13" cant fit all…


I agree with your points!


@kirill.salykin have you tried using golden ratio, SPC t g. it will automatically make the active buffer bigger relative to the other windows you have open. when you switch buffers then the new active buffer becomes bigger. For an example, see Golden ratio is already part of Spacemacs, so nothing to install.


That’s good one, thanks!