Quantcast
Channel: Vimタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 5608

インデントの設定をExモードで変更する

$
0
0
Vim Script
lets:coding_styles = {}
lets:coding_styles['DefaultTab'] ='setl tabstop=4 shiftwidth=4 shiftwidth=4 softtabstop=4 noexpandtab'lets:coding_styles['Default'] ='setl tabstop=4 shiftwidth=4 shiftwidth=4 softtabstop=4 expandtab'lets:coding_styles['ShortExpandStyle'] ='setl tabstop=2 shiftwidth=2 shiftwidth=2 softtabstop=2 expandtab'lets:coding_styles['ShortExpandStyleTab'] ='setl tabstop=2 shiftwidth=2 shiftwidth=2 softtabstop=2 noexpandtab'

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"}}}

ExモードからCodingStyle Defaultみたいな形で呼び出してます。


Viewing all articles
Browse latest Browse all 5608

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>