Vim: vim-commentary has a math problem

Created on 25 Apr 2018  路  3Comments  路  Source: VSCodeVim/Vim

Issue Type: Bug

What happened:
Commented additional line.

How to reproduce it (as minimally and precisely as possible):
type gc2j.
This should comment the current and the next line but it does comment not only the next but the 2 next lines. so it is actually a gc3j

Extension version: 0.11.5
VS Code version: Code - Insiders 1.23.0-insider (36e6cbb7667e7874748d8fbf2021b743d2d90afc, 2018-04-25T05:25:16.735Z)
OS version: Darwin x64 17.5.0


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (8 x 2800)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled|
|Load (avg)|5, 5, 4|
|Memory (System)|16.00GB (0.05GB free)|
|Process Argv|/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron -psn_0_2175507|
|Screen Reader|no|
|VM|0%|


statuby-design

Most helpful comment

This seems like expected behavior to me. d2j in vim will delete 3 lines: the current line, the next line, and the line after that (which is the line the cursor would have landed on if you'd entered 2j)

All 3 comments

This seems like expected behavior to me. d2j in vim will delete 3 lines: the current line, the next line, and the line after that (which is the line the cursor would have landed on if you'd entered 2j)

Yeah this is expected behavior. To comment the current and next lines only, use 2gcc or gcj.

ok thank you.

Was this page helpful?
0 / 5 - 0 ratings