{"version":"2.1.282","anchor":"vim-j-count-now-follows-vim-and-the-cursor-lands-on-the-la","canonical_anchor":"vim-j-count-now-follows-vim-and-the-cursor-lands-on-the-la","heading":"Vim mode's counted join now joins the number of lines you ask for","tier":"notice","area":"Terminal UI","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282\/e\/vim-j-count-now-follows-vim-and-the-cursor-lands-on-the-la","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282","markdown":"### Vim mode's counted join now joins the number of lines you ask for\n\nIn vim mode, `3J` now joins three lines instead of four, matching Vim, and the cursor lands at the last join\n\n**What**\n\nIn vim mode, the prompt's editing keys behave like those of the Vim text editor. There, `J` joins lines together. With a count, `3J` now joins three lines in total, as Vim does, and any count joins at least two lines. Previously the count meant that many extra lines, so `3J` joined four.\n\nAfter the join, the cursor now sits at the last place where two lines were joined, rather than at the end of the original first line. The count recorded for the change is now the number of lines joined.\n\n**Why**\n\nThis fixes an off-by-one error. Anyone used to `J` in Vim now gets the result they expect.\n\n- Area: Terminal UI\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}