-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
Check for existing issues
- Completed
Describe the feature
Currently when using editor::JoinLines it joins the next line with a space in between the join. I suggest join lines should always join without adding a space.
If you want a space it's easy to do Ctrl-J [space] quickly. Whereas it's hard to do Ctrl-J [DeleteToNextWordBegin]. (note: DeleteToNextWordBegin doesn't exist in zed, so it's Ctrl-J [left key] [delete] you'd have to do)
Important is also #9157 to keep multiple cursors when joining the lines, so that if you wanted to join multiple lines, you can add the space in one go for all joins.
#21232 (comment) is somewhat similar, but seems focused on vim mode. The point is there may be many needs what to use after joining, could be a space or - or _ or | or no space. When starting with no space, it's very easy to add the desired additional character(s).
Zed Version and System Specs
Zed: v0.168.3 (Zed)
OS: macOS 15.2.0
Memory: 32 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help present your vision of the feature
Use case, suppose this piece of code:
Person.where(name: name)
.preload(:team)
.each do |person|
...
end
What I want is put the cursor anywhere on the first line, hit Ctrl-J twice, and it should look like:
Person.where(name: name).preload(:team).each do |person|
...
end