Reputation: 1468
I have code that looks like this:
DataAssociator::Impl::Impl(const VoxelHasherSettings& settings_voxelhasher,
const CameraSettings& settings_camera)
{
initialize(settings_camera);
}
When I position my cursor on the c
of the first const
and press either +
or <CR>
I move to the next const
.
However pressing d+
/ d<CR>
deletes too much and leaves this:
{
initialize(settings_camera);
}
I am using neovim.
Thanks in advance, Richard
Upvotes: 3
Views: 77
Reputation: 172520
When you check out :help +
, this mentions linewise. So when you use +
in normal mode, it moves (as documented) to the first non-blank, but after an operator (like d
or y
), all touched lines will be included by default.
You can change that default behavior on a case-by-case basis via :help o_v
: So dv+
instead of d+
.
Alternatively, you can first go into visual mode; the selection will provide feedback on what text you'll be covering: v+d
. A complication here is that depending on your 'selection'
setting, this may select one character too much (with the default inclusive
selection).
Upvotes: 6