Fork me on GitHub
#spacemacs
<
2016-06-20
>
reefersleep12:06:42

When I try to write { (Alt-Shift-8) or [ (Alt-8) in Insert mode, Spacemacs executes some commands instead. Is there some smart way to change or avoid this?

reefersleep12:06:30

It's a bit hard to program Clojure without those chars 🙂

reefersleep12:06:37

I'm on a Mac btw

reefersleep12:06:17

I think I might have found something.... https://github.com/syl20bnr/spacemacs/issues/973 . Refers to a fix using a layer variable called osx-scandinavian-keyboard-layout.

reefersleep12:06:15

Just can't figure out how to add the configuration 😕

tord12:06:15

@reefersleep: I don't know, but is there any reason why you have to use a Scandinavian keyboard layout? As a Scandinavian myself, I find the Scandinavian layouts to be unbearably painful for any kind of programming (Alt+Shift combos for curly braces? Seriously?). I always use a US layout when programming, as do most of the other Scandinavian programmers I know. When I need to type something in Scandinavian, I just switch input method to latin-1-postfix.

tord13:06:40

In addition to the various characters being easier to type on a US keyboard layout, a further advantage is that most of the standard vim/spacemacs key press sequences are more comfortable.

reefersleep13:06:08

@tord: I recognize the comfort of a vim-friendly layout, but I would prefer staying with a Danish keyboard layout - I've already got confusing configurations going on, remapping CapsLock and Tab, and certain key combinations. And I'm still in a learning phase with Emacs. I'm very comfortable (usage-wise, perhaps not ergonomics-wise 😉 ) with the Danish keyboard layout for Vim. And I'm trying to be easy on other people using my computer as well 🙂

reefersleep13:06:30

btw, I've also tried following the instructions on https://github.com/syl20bnr/spacemacs/tree/master/layers/osx , but I haven't had any luck. Maybe I'm not applying the options correctly in my .spacemacs.

reefersleep14:06:26

I finally figured it out, it was not a spacemacs-specific solution, though

reefersleep14:06:58

I added (setq mac-option modifier nil) to my user-config thusly:

reefersleep14:06:12

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
 This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
  (setq-default evil-escape-key-sequence "jk")
  (setq-default evil-escape-delay 0.2)
  ;; Make linums relative by default
  (global-linum-mode nil)
  (linum-relative-toggle)
;;  (evil-want-fine-undo nil)
  (setq mac-option-modifier nil)
  )