From a239ad5a4695532fb21accd606fef71eaa0889b4 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Tue, 1 Sep 2015 14:10:54 -0500 Subject: [PATCH] add autocmd for crontab editing This fix prevents the "crontab: temp file must be edited in place" error message on OSX --- nvim/nvimrc.symlink | 1 + vim/vimrc.symlink | 1 + 2 files changed, 2 insertions(+) diff --git a/nvim/nvimrc.symlink b/nvim/nvimrc.symlink index 8bdf2c1..2b3ec1b 100644 --- a/nvim/nvimrc.symlink +++ b/nvim/nvimrc.symlink @@ -122,6 +122,7 @@ if has('autocmd') && !exists('autocommands_loaded') autocmd FileType *.md.js :call SyntasticReset autocmd FileType markdown,textile setlocal textwidth=0 wrapmargin=0 wrap spell autocmd FileType .xml exe ":silent %!xmllint --format --recover - 2>/dev/null" + autocmd FileType crontab setlocal nobackup nowritebackup "autocmd WinEnter * setlocal cursorline "autocmd WinLeave * setlocal nocursorline diff --git a/vim/vimrc.symlink b/vim/vimrc.symlink index 849b1e8..56bd05b 100644 --- a/vim/vimrc.symlink +++ b/vim/vimrc.symlink @@ -56,6 +56,7 @@ if has('autocmd') && !exists('autocommands_loaded') autocmd FileType *.md.js :call SyntasticReset autocmd FileType markdown,textile setlocal textwidth=0 wrapmargin=0 wrap spell autocmd FileType .xml exe ":silent %!xmllint --format --recover - 2>/dev/null" + autocmd FileType crontab setlocal nobackup nowritebackup "autocmd WinEnter * setlocal cursorline "autocmd WinLeave * setlocal nocursorline