vim: add custom pom.xml indentation, shift width, etc.
authorColin Patrick Mccabe <cmccabe@alumni.cmu.edu>
Fri, 5 Dec 2014 21:18:28 +0000 (13:18 -0800)
committerColin Patrick Mccabe <cmccabe@alumni.cmu.edu>
Fri, 5 Dec 2014 21:18:28 +0000 (13:18 -0800)
Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>

.vim/ftdetect/pom.vim [new file with mode: 0644]
.vim/indent/pom.vim [new file with mode: 0644]
.vim/syntax/pom.vim [new file with mode: 0644]

diff --git a/.vim/ftdetect/pom.vim b/.vim/ftdetect/pom.vim
new file mode 100644 (file)
index 0000000..fc929a8
--- /dev/null
@@ -0,0 +1 @@
+au BufRead,BufNewFile pom.xml set filetype=pom
diff --git a/.vim/indent/pom.vim b/.vim/indent/pom.vim
new file mode 100644 (file)
index 0000000..29b5f0e
--- /dev/null
@@ -0,0 +1,13 @@
+if exists("b:did_indent")
+   finish
+endif
+
+let b:did_indent = 1
+
+" 2-column indentation with soft tabs
+set sw=2
+set ts=2
+set et
+
+" No column limit
+set tw=9999
diff --git a/.vim/syntax/pom.vim b/.vim/syntax/pom.vim
new file mode 100644 (file)
index 0000000..91804d8
--- /dev/null
@@ -0,0 +1,7 @@
+if exists("b:current_syntax")
+   finish
+endif
+
+" Use XML syntax highlighting for pom.xml files
+source $VIMRUNTIME/syntax/xml.vim
+let b:did_indent = 1