vim / vim

The official Vim repository
https://www.vim.org
Vim License
36.6k stars 5.46k forks source link

indentkeys regression introduced in 8.0.1041 #2114

Closed jbodah closed 7 years ago

jbodah commented 7 years ago

I maintain the vim-elixir repo and got an issue coming in about problems regarding indent keys:

The reporters noticed that some of the indentkeys directives (in particular 0=end) were not being respected in HEAD vim. I did a binary search on vim versions and noticed that the 8.0.1041 patch introduced the issue.

Repro steps:

  1. Install vim-elixir
  2. Type the following:
def hello do
  :hello
  end
  1. If end deindents on typing the d (based on the 0=end directive) then it works properly. Otherwise then it is not working as expected
brammool commented 7 years ago

Josh Bodah wrote:

I maintain the vim-elixir repo and got an issue coming in about problems regarding indent keys:

The reporters noticed that some of the indentkeys directives (in particular 0=end) were not being respected in HEAD vim. I did a binary search on vim versions and noticed that the 8.0.1041 patch introduced the issue.

Repro steps:

  1. Install vim-elixir
  2. Type the following:
def hello do
  :hello
  end
  1. If end deindents on typing the d (based on the 0=end directive) then it works properly. Otherwise then it is not working as expected

Christian made this change.

-- hundred-and-one symptoms of being an internet addict:

  1. You get a tuner card so you can watch TV while surfing.

    /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\ \\ an exciting new programming language -- http://www.Zimbu.org /// \\ help me help AIDS victims -- http://ICCF-Holland.org ///

brammool commented 7 years ago

On Mo, 18 Sep 2017, Bram Moolenaar wrote:

Josh Bodah wrote:

I maintain the vim-elixir repo and got an issue coming in about problems regarding indent keys:

The reporters noticed that some of the indentkeys directives (in particular 0=end) were not being respected in HEAD vim. I did a binary search on vim versions and noticed that the 8.0.1041 patch introduced the issue.

Repro steps:

  1. Install vim-elixir
  2. Type the following:
def hello do
  :hello
  end
  1. If end deindents on typing the d (based on the 0=end directive) then it works properly. Otherwise then it is not working as expected

Christian made this change.

I'll have a look

Christian -- Unwissende werfen Fragen auf, welche von Wissenden vor tausend Jahren schon beantwortet sind. -- Goethe, Maximen und Reflektionen, Nr. 968

chrisbra commented 7 years ago

I checked it out and it seems to work properly. Please give a reproducible example that break (preferably without installing any additional plugins). So I installed vim-elixir as package below ~/.vim/pack/dist/opt and did vim --clean --cmd 'packadd vim-elixir' foobar.ex The I entered your mentioned steps:

def hello do
  :hello
  end

and it does de-indent on typing the d of the end. This is with vim 8.0.1144.

jbodah commented 7 years ago

This was recently patched in https://github.com/elixir-editors/vim-elixir/pull/372; I'll see if I can come up with a more minimal example

chrisbra commented 7 years ago

okay thanks

chrisbra commented 7 years ago

not needed anymore. duplicate of #2151 posted a patch at the vim-dev list

jbodah commented 7 years ago

Good to know. Thanks for looking into this

chrisbra commented 7 years ago

fixed by 1b38344