Files
vim-polyglot/ftplugin/vala.vim
Adam Stankiewicz 7a0f2d974f Update
2019-12-07 12:21:37 +01:00

30 lines
737 B
VimL
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
" Insert a CCode attribute for the symbol below the cursor
" https://wiki.gnome.org/Projects/Vala/LegacyBindings
function! CCode() abort
normal yiwO[CCode (cname = "pa")]
endfunction
" Set Vala Coding Style
" https://wiki.gnome.org/Projects/Vala/Hacking#Coding_Style
function! ValaCodingStyle() abort
set ts=4 sts=4 sw=4 tw=0 wm=0
endfunction
command! -buffer -bar CCode call CCode()
command! -buffer -bar ValaCodingStyle call ValaCodingStyle()
if get(g:, 'vala_syntax_folding_enabled', 1)
setlocal foldmethod=syntax
endif
endif