aboutsummaryrefslogtreecommitdiffstats
path: root/ftdetect
diff options
context:
space:
mode:
authorNathan Grigg2014-10-07 10:21:46 -0700
committerNathan Grigg2014-10-07 10:21:46 -0700
commitf8177b09626a0ac973912c633d95b604b9024371 (patch)
tree88b4e314ff4b2a450dc839aa3ccaadff7d1f121c /ftdetect
parentff555a0de143e2148d89564d221450cf743da14d (diff)
downloadvim-beancount-f8177b09626a0ac973912c633d95b604b9024371.tar.gz
Add ftdetect
Diffstat (limited to 'ftdetect')
-rw-r--r--ftdetect/beancount.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/ftdetect/beancount.vim b/ftdetect/beancount.vim
new file mode 100644
index 0000000..bf0556d
--- /dev/null
+++ b/ftdetect/beancount.vim
@@ -0,0 +1,8 @@
+" This is to avoid setting ft twice. Taken from vim-ruby.
+function! s:setf(filetype) abort
+ if &filetype !=# a:filetype
+ let &filetype = a:filetype
+ endif
+endfunction
+
+au BufNewFile,BufRead *.bean,*.beancount call s:setf('beancount')