This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-09
Channels
- # 100-days-of-code (6)
- # announcements (4)
- # atlanta-clojurians (1)
- # aws (1)
- # beginners (65)
- # boot (21)
- # cider (9)
- # cljsrn (3)
- # clojure (186)
- # clojure-android (4)
- # clojure-conj (1)
- # clojure-dev (12)
- # clojure-germany (3)
- # clojure-italy (8)
- # clojure-nl (1)
- # clojure-russia (32)
- # clojure-spec (19)
- # clojure-uk (41)
- # clojurescript (83)
- # core-async (5)
- # cursive (18)
- # datomic (15)
- # emacs (5)
- # events (4)
- # fulcro (7)
- # hyperfiddle (4)
- # leiningen (4)
- # liberator (1)
- # off-topic (65)
- # overtone (4)
- # pedestal (5)
- # perun (1)
- # planck (3)
- # re-frame (1)
- # reagent (3)
- # rum (5)
- # shadow-cljs (8)
- # spacemacs (19)
- # testing (3)
- # tools-deps (4)
- # yada (6)
is it possible to truncate long lines (SPC t l) globally and always?
not per buffer
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 upnope, 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 @U0G75ARHCI'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 https://github.com/roman/golden-ratio.el
Golden ratio is already part of Spacemacs, so nothing to install.
That’s good one, thanks!