From 6d5ca731ed5ace7c9b78a51bcd26a37708277eb7 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Mon, 19 Nov 2012 12:14:41 -0800 Subject: [PATCH] Set up JavaScript to use 2 spaces at work and 4 on my own --- vim/ftplugin/javascript.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 vim/ftplugin/javascript.vim diff --git a/vim/ftplugin/javascript.vim b/vim/ftplugin/javascript.vim new file mode 100644 index 0000000..941f7e9 --- /dev/null +++ b/vim/ftplugin/javascript.vim @@ -0,0 +1,13 @@ + +set noexpandtab " expandtab converts tabs to spaces +set shiftwidth=4 " unify +set softtabstop=4 " Pressing backspace works like tabs +set tabstop=4 " real tabs should be 4, but they will show with set list on + +if $BS_ENV == 'work' + set expandtab " expandtab converts tabs to spaces + set shiftwidth=2 " unify + set softtabstop=2 " Pressing backspace works like tabs + set tabstop=2 +endif +