pangloss / vim-javascript

Vastly improved Javascript indentation and syntax support in Vim.
http://www.vim.org/scripts/script.php?script_id=4452
3.79k stars 357 forks source link

dot chained indentation problem #1206

Open Groude opened 4 years ago

Groude commented 4 years ago

Hello Everyone! I saw a few topics about my problem, but didn't found a solution for this:

I will try to show with code example and a screenshot what I mean.

So here is my chained function:

document
  .querySelector('.btn-roll')
  .addEventListener('click', play)

if I will add on a new line more chained function it will look like this in Vim(insert mode)

document
  .querySelector('.btn-roll')
  .addEventListener('click', play)
.anotherFunction();

it does not keep previous indentation.

image

is there a way to fix it?

Groude commented 4 years ago

I found kind of a solution that provides plugin:

May-09-2020 00-25-31

But does anyone know any other solution?