<commit_before>---
- name: install packages by homebrew
  homebrew:
    name: "{{item}}"
    state: latest
    update_homebrew: yes
  with_items:
    - nvim
  tags: [vim, package]

- name: create a symlink, mvim
  file:
    src: /Applications/MacVim.app/Contents/bin/mvim
    dest: /usr/local/bin/mvim
    state: link
  tags: [vim]

- name: create a symlink, vim
  file:
    src: /usr/local/bin/nvim
    dest: /usr/local/bin/vim
    state: link
  tags: [vim]

- name: create a symlink, vi
  file:
    src: /usr/local/bin/vim
    dest: /usr/local/bin/vi
    state: link
  tags: [vim]

- name: install packages by pip
  pip:
    executable: pip3
    name: "{{item}}"
    state: latest
  with_items:
    - neovim
  tags: [vim, package]

- name: create ~/.vim dir
  file:
    path: ~/.vim/dein
    state: directory
    mode: 0755
  tags: [vim]

- name: download vimrc
  get_url:
    url: https://raw.githubusercontent.com/rewse/dotfiles/master/vim/{{item}}
    dest: ~/.vim/{{item}}
  with_items:<commit_msg>Add neovim package by pip2 to vim role<commit_after>---
- name: install packages by homebrew
  homebrew:
    name: "{{item}}"
    state: latest
    update_homebrew: yes
  with_items:
    - nvim
  tags: [vim, package]

- name: create a symlink, mvim
  file:
    src: /Applications/MacVim.app/Contents/bin/mvim
    dest: /usr/local/bin/mvim
    state: link
  tags: [vim]

- name: create a symlink, vim
  file:
    src: /usr/local/bin/nvim
    dest: /usr/local/bin/vim
    state: link
  tags: [vim]

- name: create a symlink, vi
  file:
    src: /usr/local/bin/vim
    dest: /usr/local/bin/vi
    state: link
  tags: [vim]

- name: install packages by pip3
  pip:
    executable: pip3
    name: "{{item}}"
    state: latest
  with_items:
    - neovim
  tags: [vim, package]

# MacVim Kaoriya doesn't support Python3
- name: install packages by pip2
  pip:
    executable: pip2
    name: "{{item}}"
    state: latest
  with_items:
    - neovim
  tags: [vim, package]

- name: create ~/.vim dir
  file:
    path: ~/.vim/dein
    state: directory
    mode: 0755
  tags: [vim]

- name: download vimrc
  get_url:
    url: https://raw.githubusercontent.com/rewse/dotfiles/master/vim/{{item}}
    dest: ~/.vim/{{item}}
  with_items:
{'fraction_non_alphanumeric': 0.13656783468104222, 'fraction_numerical': 0.006738544474393531, 'mean_word_length': 2.5126182965299684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3722425', 'n_tokens_mistral': 888, 'n_tokens_neox': 857, 'n_words': 226}