Skip to content

Instantly share code, notes, and snippets.

@Layzie
Created December 8, 2011 03:54
Show Gist options
  • Save Layzie/1446040 to your computer and use it in GitHub Desktop.
Save Layzie/1446040 to your computer and use it in GitHub Desktop.
" コーディングスタイル切り替え
let s:coding_styles = {}
let s:coding_styles['Default'] = 'setl tabstop=4 shiftwidth=4 shiftwidth=4 softtabstop=4 noexpandtab'
let s:coding_styles['ShortExpandStyle'] = 'setl tabstop=2 shiftwidth=2 shiftwidth=2 softtabstop=2 expandtab'
command!
\ -bar -nargs=1 -complete=customlist,s:coding_style_complete
\ CodingStyle
\ execute get(s:coding_styles, <f-args>, '')
function! s:coding_style_complete(...) "{{{
return keys(s:coding_styles)
endfunction "}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment