8000 $VIMRUNTIME/indent/vim.vim の GetVimIndent() がshiftwidth=0に対応していない · Issue #806 · vim-jp/issues · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$VIMRUNTIME/indent/vim.vim の GetVimIndent() がshiftwidth=0に対応していない #806

Closed
tyru opened this issue Jan 23, 2016 · 5 comments

Comments

@tyru
Copy link
Member
tyru commented Jan 23, 2016

問題

shiftwidthを0に設定すると、filetype=vimの時のgg=Gするとインデントが亡くなり無くなります。

修正箇所

https://github.com/vim/vim/blob/e3faf44bef029d07f37a457bd0050653b628058f/runtime/indent/vim.vim#L34-L97

修正方法

&swの代わりにshiftwidth()関数を使う必要があります。
runtimeファイルの修正はこの関数が追加された後なので、
この関数が使えるかのバージョンチェックも不要で、ただ置換すれば良いと思います。

会話ログ

@rbtnnさんが見つけてくれました。

http://lingr.com/room/vim/archives/2016/01/23#message-22976509

@tyru
Copy link
Member Author
tyru commented Jan 23, 2016

Pull Request投げました。 vim/vim#578

@crazymaster
Copy link
Member

実は shiftwidth() を使っていないのが結構あってですね 😓
#714 参照

@tyru
Copy link
Member Author
tyru commented Jan 24, 2016

oh...

@crazymaster
Copy link
Member

@tyru
Copy link
Member Author
tyru commented Jan 24, 2016

あ、あのPRの最初のコミットのみ取り込まれちゃったのか。
2コミット目で全てのindentプラグインの修正をしたのですが。
まぁおそらくindent/vim.vimのdiffはスキップしてもらえば大丈夫かな…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0