爲了便於分組CouchDB的功能 我創建一種文件格式,基團一起使用YAML我如何在vim中爲特定語法熒光筆分配縮進塊?
它基本上包含在name.ext: |
形式,隨後的代碼在語言配件的意圖塊.EXT
爲更舒適的編輯我想有VIM使用正確的語法熒光筆他們
編輯
個一些代碼示例的要求
簡單:
map.coffee: |
(doc) ->
for item in doc.items:
emit [doc.category, item], null
return
reduce: _count
更加複雜:
map.coffee: |
(doc) ->
emit doc.category, {items: 1, val: doc.value}
return
reduce.coffee: |
(keys, values, rereduce) ->
ret = {items: 0, val: 0}
for v in values
ret.items += doc.items
ret.val += doc.val
return ret
http://stackoverflow.com/questions/6864420/change-filetype-or-other-vim-settings-blockwise-in-a-file顯示特殊情況下的一個可能的起點 – Ronny
您可以提供更多詳情,可能包括一些代碼作爲例子? – mMontu