diff --git a/ftplugin/drupal.vim b/ftplugin/drupal.vim
new file mode 100644
index 0000000..f8528cf
--- /dev/null
+++ b/ftplugin/drupal.vim
@@ -0,0 +1,29 @@
+" This file contains common Drupal-related settings.  It is :source'd by the
+" *_drupal.vim files in this directory; there is no drupal filetype.
+
+setl nojoinspaces            "No second space when joining lines that end in "."
+setl autoindent              "Auto indent based on previous line
+setl smartindent             "Smart autoindenting on new line
+setl smarttab                "Respect space/tab settings
+setl expandtab               "Tab key inserts spaces
+setl tabstop=2               "Use two spaces for tabs
+setl shiftwidth=2            "Use two spaces for auto-indent
+setl textwidth=80            "Limit comment lines to 80 characters.
+setl formatoptions-=t
+setl formatoptions+=croql
+"  -t:  Do not apply 'textwidth' to code.
+"  +c:  Apply 'textwidth' to comments.
+"  +r:  Continue comments after hitting <Enter> in Insert mode.
+"  +o:  Continue comments after when using 'O' or 'o' to open a new line.
+"  +q:  Format comments using q<motion>.
+"  +l:  Do not break a comment line if it is long before you start.
+
+" Custom SVN blame
+vmap <buffer> gl :<C-U>!svn blame <C-R>=expand("%:P") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR>
+
+" Lookup the API docs for a drupal function under cursor.
+nnoremap <buffer> <LocalLeader>da :execute "!open http://api.drupal.org/".shellescape(expand("<cword>"), 1)<CR>
+" Lookup the API docs for a drush function under cursor.
+nnoremap <buffer> <LocalLeader>dda :execute "!open http://api.drush.ws/api/function/".shellescape(expand("<cword>"), 1)<CR>
+" Get the value of the drupal variable under cursor.
+nnoremap <buffer> <LocalLeader>dv :execute "!drush vget ".shellescape(expand("<cword>"), 1)<CR>
diff --git a/ftplugin/javascript_drupal.vim b/ftplugin/javascript_drupal.vim
new file mode 100644
index 0000000..17afa0b
--- /dev/null
+++ b/ftplugin/javascript_drupal.vim
@@ -0,0 +1,13 @@
+" Source the default ftplugin so that it does not change our settings.
+" Uncomment the next line if it is needed.
+" runtime! ftplugin/javascript.vim
+
+" Get common settings and mappings for Drupal.
+source <sfile>:h/drupal.vim
+
+" Settings specific to javascript/Drupal go here.
+
+" Is javascript a case-insensitive language?
+
+" setl ignorecase              "Ignore case in search
+" setl smartcase               "Only ignore case when all letters are lowercase
diff --git a/ftplugin/php_drupal.vim b/ftplugin/php_drupal.vim
index 93f8e6b..08276b4 100644
--- a/ftplugin/php_drupal.vim
+++ b/ftplugin/php_drupal.vim
@@ -1,34 +1,12 @@
-" Source the default ftplugin so that it does not clobber our settings.
+" Source the default ftplugin so that it does not change our settings.
 " Specifically, the 'comments' option gets clobbered by html.vim.
 runtime! ftplugin/php.vim
 
+" Get common settings and mappings for Drupal.
+source <sfile>:h/drupal.vim
+
 setl ignorecase              "Ignore case in search
 setl smartcase               "Only ignore case when all letters are lowercase
-setl smartindent             "Smart autoindenting on new line
-setl smarttab                "Respect space/tab settings
-setl expandtab               "Tab key inserts spaces
-setl tabstop=2               "Use two spaces for tabs
-setl shiftwidth=2            "Use two spaces for auto-indent
-setl autoindent              "Auto indent based on previous line
-setl textwidth=80            "Limit comment lines to 80 characters.
-setl formatoptions-=t
-setl formatoptions+=croql
-"  -t:  Do not apply 'textwidth' to code.
-"  +c:  Apply 'textwidth' to comments.
-"  +r:  Continue comments after hitting <Enter> in Insert mode.
-"  +o:  Continue comments after when using 'O' or 'o' to open a new line.
-"  +q:  Format comments using q<motion>.
-"  +l:  Do not break a comment line if it is long before you start.
 setl comments=sr:/**,m:*\ ,ex:*/,://
 "  Format comment blocks.  Just type / on a new line to close.
 "  Recognize // (but not #) style comments.
-
-" Custom SVN blame
-vmap <buffer> gl :<C-U>!svn blame <C-R>=expand("%:P") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR>
-
-" Lookup the API docs for a drupal function under cursor.
-nnoremap <buffer> <LocalLeader>da :execute "!open http://api.drupal.org/".shellescape(expand("<cword>"), 1)<CR>
-" Lookup the API docs for a drush function under cursor.
-nnoremap <buffer> <LocalLeader>dda :execute "!open http://api.drush.ws/api/function/".shellescape(expand("<cword>"), 1)<CR>
-" Get the value of the drupal variable under cursor.
-nnoremap <buffer> <LocalLeader>dv :execute "!drush vget ".shellescape(expand("<cword>"), 1)<CR>
