this post was submitted on 17 Jul 2024
83 points (97.7% liked)

Ask Experienced Devs

1064 readers
1 users here now

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

I'd like actual examples instead of "I work faster", something like "I can move straight to the middle of the file with 7mv" or "I can keep 4 different text snippets in memory and paste each with a number+pt, like 2pt", things that you actually use somewhat frequently instead of what you can do, but probably only did once.

you are viewing a single comment's thread
view the rest of the comments
[–] FizzyOrange@programming.dev 0 points 2 months ago (7 children)
  1. Ctrl-left/right jump to the beginning/end of words
  2. No exactly sure what you mean here.
  3. Page up/down let you scroll up/down quickly. Ctrl-P :123 lets you jump to a specific line, but I generally use editing history (alt-left) instead.
  4. I can type perfectly well...
  5. Ctrl-{ or } does this I think.

Do you have any more compelling examples?

[–] abruptly8951@lemmy.world 2 points 2 months ago (4 children)

Ooh fun, these all take 2-3 key presses

  • Delete the contents inside a function delimiter by {
  • Delete the next nine words
  • Delete the contents inside long text quotes

And these more/less key presses

  • Start a regex search with a single button
  • Perform the same edit 100 times in a jagged files (good luck not f'ing up your multi cursor)

But it misses the point, of course every editor can do just about anything, but there is a lot more mouse involved and learning it is more difficult because the keybinds aren't combinatorial

[–] FizzyOrange@programming.dev 0 points 2 months ago (3 children)
  1. Ctrl-shift-}
  2. How often do you want to delete exactly 9 words? It's much easier if this is interactive.
  3. Not a common task IMO.
  4. Ctrl-F and click a button. This is rare enough that a button click is fine.
  5. Not sure what you mean by "jagger files" but I find multiple cursors are a lot easier to get right than e.g. regex replace because they give you instant feedback. Vim sequences are more like "oh you got it wrong, better start from scratch".
[–] abruptly8951@lemmy.world 1 points 2 months ago* (last edited 2 months ago) (1 children)

1 is just going to highlight right?

2, how about 6 words, 10 words, 100 words

3, 4 I use all the time

5 if your edit locations don't line up so that you can alt drag a single column, this is what I mean by jagged. I would use a combination of find and repeat action.

Start from scratch - skill issue :p

[–] FizzyOrange@programming.dev 1 points 2 months ago (1 children)

how about 6 words, 10 words, 100 words

Yes exactly my point. How often do you need to delete exactly 100 words? Do you count them? Obviously not - you probably guess and delete 50, and then 25 and then 20 etc.

[–] abruptly8951@lemmy.world 0 points 2 months ago
load more comments (1 replies)
load more comments (1 replies)
load more comments (3 replies)