5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

自動的にインデントするVimプラグイン作った

Last updated at Posted at 2014-06-19

airindent.vim

airindent.vim

このプラグインは、ファイルを編集し始めた時と編集を終了した時に自動的にインデントを形成するコマンドを実行します。

私の場合、インデントを気にすることがあまりに少なすぎるので、最低限の措置として作りました。

install

~/.vimrc
NeoBundle 'syui/airindent.vim'

$ vim +NeoBundleInstall

または、

$ curl -o ~/.vim/plugin/airindent.vim https://raw.githubusercontent.com/syui/airindent.vim/master/plugin/airindent.vim

setting

~/.vimrc

" airindent.vim {{{
" すべての範囲の自動インデントを有効にする
let g:auto_indent_all = 1

" 現在行の上の部分だけ自動インデントを有効にする
let g:auto_indent_up = 0

" gg=G,line(".") . G
nmap <Leader>- <Plug>(IndentMoveLine)
" }}}

注意点

更新情報はブログの方になると思います。

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?