2

In Vim I have relative numbering which is turned on most of the time but it's turned off when in insert mode or when the window losses focus (both when changing to another Vim window or when changing to another tmux window).

How do I set this up in Spacemacs?

I think my main issue is that I don't know how to make Spacemacs do certain actions only when in certain evil-modes (I'm really new to Emacs, I've been using Vim until I discovered the wonderful Spacemacs).

  • 1
    You'll need to both enable and disable relative numbering at the right conditions for this to work. Use hooks triggering for the respective events. evil-normal-state-entry-hook and evil-normal-state-exit-hook look like good candidates for state changes, focus-out-hook could cover program focus, but there is no ready-made candidate for switching window focus, so I'd either play around with window-configuration-change-hook or advise select-window. – wasamasa Dec 7 '15 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.