From e71eb1e789838d87134eaf24883ca9cd9186eb9f Mon Sep 17 00:00:00 2001 From: Chris Coley <chris@codingallnight.com> Date: Mon, 16 Sep 2019 19:18:42 -0700 Subject: [PATCH] Extract the Makefile settings into a plugin --- vim/ftplugin/make.vim | 4 ++++ vimrc | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 vim/ftplugin/make.vim diff --git a/vim/ftplugin/make.vim b/vim/ftplugin/make.vim new file mode 100644 index 0000000..85ef046 --- /dev/null +++ b/vim/ftplugin/make.vim @@ -0,0 +1,4 @@ +setlocal commentstring=#%s + +" Make vim turn *off* expandtab for Make files. We need the tab literal +setlocal noexpandtab diff --git a/vimrc b/vimrc index 14b6d83..3f97bbf 100644 --- a/vimrc +++ b/vimrc @@ -75,11 +75,6 @@ function! ToggleColorColumn() endfunction -" Make vim turn *off* expandtab for files named Makefile or makefile -" We need the tab literal -autocmd BufRead,BufNewFile [Mm]akefile* setlocal noexpandtab - - " Associate extensions to filetypes autocmd BufRead,BufNewFile *.gv setlocal filetype=dot -- GitLab