<commit_before>#+TITLE: OSX layer
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../css/readtheorg.css" />

[[file:img/apple.png]]

* Table of Contents                                         :TOC_4_org:noexport:
 - [[Description][Description]]
 - [[Philosophy][Philosophy]]
 - [[Install][Install]]
   - [[Layer][Layer]]
     - [[Use with non-US keyboard layouts][Use with non-US keyboard layouts]]
   - [[Coreutils][Coreutils]]
 - [[Key Bindings][Key Bindings]]
 - [[Future Work][Future Work]]

* Description

Spacemacs is not just emacs+vim. It can have OSX keybindings too! 
This layer globally defines common OSX keybindings. ~⌘~ is set to
~super~ and ~⌥~ is set to ~meta~. Aside from that, there's nothing
much, really.

While in =dired= this layer will try to use =gls= instead of =ls=.

* Philosophy

While this layer enables common OSX bindings, it does not implement
OSX navigation keybindings. Spacemacs is meant to be used with evil,
and we encourage you to do so :)

* Install

** Layer

To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =osx= to the existing =dotspacemacs-configuration-layers= list in this
file.

*** Use with non-US keyboard layouts

If you need the ~⌥~ key to type common characters such as ={[]}~= which is usual
for e.g. Finnish and Swedish keyboard layouts, you'll probably want to leave the
~⌥~ key unchanged by setting the =osx-use-option-as-meta= variable to =nil=:

#+BEGIN_SRC emacs-lisp
  (setq-default dotspacemacs-configuration-layers '(
     (osx :variables osx-use-option-as-meta nil)))
#+END_SRC

If you have problem entering symbols that are behind the ~⌥~ key you may want to added this to the user-init in the .spacemacs-File. This will allow you to use the right ~⌥~ key to write symbols. The left ~⌥~ key can be used as the Meta key. 

#+BEGIN_SRC emacs-lisp
  (setq-default mac-right-option-modifier nil)
#+END_SRC

** Coreutils

To get =gls= install coreutils homebrew:

#+BEGIN_SRC sh
  brew install coreutils
#+END_SRC

* Key Bindings

| Key Binding | Description       |
|-------------+-------------------|
| ~⌘ =~       | Scale up text     |
| ~⌘ -~       | Scale down text   |
| ~⌘ q~       | Quit              |
| ~⌘ v~       | Paste             |
| ~⌘ c~       | Copy              |
| ~⌘ x~       | Cut               |
| ~⌘ a~       | Select all        |
| ~⌘ w~       | Close window      |
| ~⌘ W~       | Close frame       |
| ~⌘ n~       | New frame         |
| ~⌘ z~       | Undo              |
| ~⌘ Z~       | Redo              |
| ~⌃ ⌘ f~     | Toggle fullscreen |

* Future Work

- Allow user to choose from either ~hyper~ or ~super~ as ~⌘~. This is an option
  that is supported cross-platform.
- Configurable option to keep the OSX and spacemacs clipboards separate<commit_msg>Clean up osx layer readme<commit_after>#+TITLE: OSX layer
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../css/readtheorg.css" />

[[file:img/apple.png]]

* Table of Contents                                         :TOC_4_org:noexport:
 - [[Description][Description]]
 - [[Philosophy][Philosophy]]
 - [[Install][Install]]
   - [[Layer][Layer]]
     - [[Use with non-US keyboard layouts][Use with non-US keyboard layouts]]
   - [[Coreutils][Coreutils]]
 - [[Key Bindings][Key Bindings]]
 - [[Future Work][Future Work]]

* Description
Spacemacs is not just emacs+vim. It can have OSX keybindings too!
This layer globally defines common OSX keybindings. ~⌘~ is set to
~super~ and ~⌥~ is set to ~meta~. Aside from that, there's nothing
much, really.

While in =dired= this layer will try to use =gls= instead of =ls=.

* Philosophy
While this layer enables common OSX bindings, it does not implement
OSX navigation keybindings. Spacemacs is meant to be used with evil,
and we encourage you to do so :)

* Install
** Layer
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =osx= to the existing =dotspacemacs-configuration-layers= list in this
file.

*** Use with non-US keyboard layouts
If you need the ~⌥~ key to type common characters such as ={[]}~= which is usual
for e.g. Finnish and Swedish keyboard layouts, you'll probably want to leave the
~⌥~ key unchanged by setting the =osx-use-option-as-meta= variable to =nil=:

#+BEGIN_SRC emacs-lisp
  (setq-default dotspacemacs-configuration-layers '(
     (osx :variables osx-use-option-as-meta nil)))
#+END_SRC

If you have problem entering symbols that are behind the ~⌥~ key you may want to
added this to the user-init in the .spacemacs-File. This will allow you to use
the right ~⌥~ key to write symbols. The left ~⌥~ key can be used as the Meta
key.

#+BEGIN_SRC emacs-lisp
  (setq-default mac-right-option-modifier nil)
#+END_SRC

** Coreutils
To get =gls= install coreutils homebrew:

#+BEGIN_SRC sh
  brew install coreutils
#+END_SRC

* Key Bindings

| Key Binding | Description       |
|-------------+-------------------|
| ~⌘ =~       | Scale up text     |
| ~⌘ -~       | Scale down text   |
| ~⌘ q~       | Quit              |
| ~⌘ v~       | Paste             |
| ~⌘ c~       | Copy              |
| ~⌘ x~       | Cut               |
| ~⌘ a~       | Select all        |
| ~⌘ w~       | Close window      |
| ~⌘ W~       | Close frame       |
| ~⌘ n~       | New frame         |
| ~⌘ z~       | Undo              |
| ~⌘ Z~       | Redo              |
| ~⌃ ⌘ f~     | Toggle fullscreen |

* Future Work
- Allow user to choose from either ~hyper~ or ~super~ as ~⌘~. This is an option
  that is supported cross-platform.
- Configurable option to keep the OSX and spacemacs clipboards separate
{'fraction_non_alphanumeric': 0.13090779382914214, 'fraction_numerical': 0.0003566969859104691, 'mean_word_length': 2.5538656527249683, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1032423', 'n_tokens_mistral': 1899, 'n_tokens_neox': 1835, 'n_words': 685}