Skip to content

Conversation

@tyru
Copy link
Contributor

@tyru tyru commented Feb 8, 2016

See vim/vim#578 for details.

With set shiftwidth=0, gg=G in filetype=vim buffer will result in removing all indents.
Because indent/vim.vim doesn't use shiftwidth() instead of accessing &sw directly.

This is same as vim-git.

@tpope
Copy link
Owner

tpope commented Feb 8, 2016

Can we do this in a backwards compatible way?

On Mon, Feb 8, 2016 at 2:18 PM Takuya Fujiwara notifications@github.com
wrote:

See vim/vim#578 vim/vim#578 for details.

With set shiftwidth=0, gg=G in filetype=vim buffer will result in removing
all indents.
Because indent/vim.vim doesn't use shiftwidth() instead of accessing &sw
directly.

This is same as vim-git.

You can view, comment on, or merge this pull request online at:

#36
Commit Summary

  • Use shiftwidth() function instead of &sw

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#36.

@tyru
Copy link
Contributor Author

tyru commented Feb 8, 2016

Hm, Okay...
I didn't think it was necessary because

  1. shiftwidth() is implemented over 3 years ago.
  2. I suppose someone who wants to use a latest indent plugin fetching from GitHub, may have a recent version of Vim.

But if you prefer the backwards compatible way, I will do that :)

@tpope
Copy link
Owner

tpope commented Feb 8, 2016

OS X still ships a Vim without it; that alone is a sizable concern.

@tyru
Copy link
Contributor Author

tyru commented Feb 8, 2016

Okay :)
I'll do that.

@tyru
Copy link
Contributor Author

tyru commented Feb 8, 2016

Can we do this in a backwards compatible way?

Well, is that same for tpope/vim-liquid#13 and tpope/vim-haml#76 and tpope/vim-cucumber#39 ?

@tpope
Copy link
Owner

tpope commented Feb 9, 2016

Yeah same for all.

@tyru
Copy link
Contributor Author

tyru commented Feb 11, 2016

@tpope
Copy link
Owner

tpope commented Feb 11, 2016

Wow, I see that this is the officially endorsed solution in :help shiftwidth(), but boy is it convoluted. I'll be going with something more straightforward.

@tpope tpope closed this in b92af5f Feb 11, 2016
@tyru
Copy link
Contributor Author

tyru commented Feb 11, 2016

Ah, certainly b92af5f is enough.
Thanks however :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants