Set default EDITOR to vim and set vimrc options

This commit is contained in:
Kevin Gallagher 2017-03-08 15:19:59 -08:00
parent 48a5cc9b9c
commit 0458368089
2 changed files with 22 additions and 0 deletions

View File

@ -5,4 +5,5 @@
- include: add_github_ssh_hostkey.yml - include: add_github_ssh_hostkey.yml
- include: hostname.yml - include: hostname.yml
- include: motd.yml - include: motd.yml
- include: vim.yml
- include: auto_upgrades.yml - include: auto_upgrades.yml

View File

@ -0,0 +1,21 @@
---
- name: Set default EDITOR to vim.
command: update-alternatives --set editor /usr/bin/vim.basic
- name: Enable syntax highlighting.
lineinfile:
dest: /etc/vim/vimrc
regexp: "^\"syntax on"
line: "syntax on"
- name: Enable filetype detection.
lineinfile:
dest: /etc/vim/vimrc
regexp: "^\"filetype on"
line: "filetype on"
- name: Disable swap files.
lineinfile:
dest: /etc/vim/vimrc
regexp: "^\"set noswapfile"
line: "set noswapfile"