summaryrefslogtreecommitdiffstats
path: root/indent/litcoffee.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2017-03-23 11:28:19 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2017-03-23 11:28:28 +0100
commit0801eac01aab5940fc1e4409ba749383cc353bc2 (patch)
tree9034c9f6cd0c7592a09e6c65521c6948c3a983af /indent/litcoffee.vim
parent9f735b1fe77072e001a593f7f6660703bf4a8c9c (diff)
downloadvim-polyglot-0801eac01aab5940fc1e4409ba749383cc353bc2.tar.gz
vim-polyglot-0801eac01aab5940fc1e4409ba749383cc353bc2.zip
Update
Diffstat (limited to '')
-rw-r--r--indent/litcoffee.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/indent/litcoffee.vim b/indent/litcoffee.vim
new file mode 100644
index 00000000..55398462
--- /dev/null
+++ b/indent/litcoffee.vim
@@ -0,0 +1,26 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1
+
+if exists('b:did_indent')
+ finish
+endif
+
+runtime! indent/coffee.vim
+
+let b:did_indent = 1
+
+setlocal indentexpr=GetLitCoffeeIndent()
+
+if exists('*GetLitCoffeeIndent')
+ finish
+endif
+
+function GetLitCoffeeIndent()
+ if searchpair('^ \|\t', '', '$', 'bWnm') > 0
+ return GetCoffeeIndent(v:lnum)
+ else
+ return -1
+ endif
+endfunc
+
+
+endif