mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-14 11:45:25 +00:00
Sagi Dayan
02c7409957
- shell functions - vim plugins - ansible tweaks - added alias `vim=nvim` - Updated theme to gruvbox
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
- name: Install vim (RHEL based)
|
|
become: true
|
|
package:
|
|
name:
|
|
- neovim
|
|
- the_silver_searcher
|
|
state: present
|
|
when: ansible_facts['os_family'] == "RedHat"
|
|
|
|
- name: Install vim (Debian based)
|
|
become: true
|
|
package:
|
|
name:
|
|
- neovim
|
|
- silversearcher-ag
|
|
state: present
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
- name: Prepare vim config directory
|
|
file:
|
|
path: ~/.config/nvim/
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Setup vim plug
|
|
file:
|
|
path: ~/.local/share/nvim/site/autoload
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Install vim Plug
|
|
get_url:
|
|
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
dest: ~/.local/share/nvim/site/autoload/plug.vim
|
|
|
|
- name: "Copy vimrc file"
|
|
copy:
|
|
src: dotfiles/vimrc
|
|
dest: "~/.config/nvim/init.vim"
|
|
mode: preserve
|
|
changed_when: false
|
|
|
|
- name: "Set vim colorscheme"
|
|
ansible.builtin.lineinfile:
|
|
path: "~/.config/nvim/init.vim"
|
|
regexp: "^colorscheme"
|
|
line: "colorscheme {{ theme }}"
|
|
changed_when: false
|
|
|
|
#- name: "Set vim lightline colorscheme"
|
|
# ansible.builtin.lineinfile:
|
|
# path: "~/.vimrc"
|
|
# regexp: "^let g:lightline.colorscheme"
|
|
# line: "let g:lightline.colorscheme = '{{theme}}'"
|