this post was submitted on 05 Aug 2023
677 points (96.9% liked)

Technology

34883 readers
44 users here now

This is the official technology community of Lemmy.ml for all news related to creation and use of technology, and to facilitate civil, meaningful discussion around it.


Ask in DM before posting product reviews or ads. All such posts otherwise are subject to removal.


Rules:

1: All Lemmy rules apply

2: Do not post low effort posts

3: NEVER post naziped*gore stuff

4: Always post article URLs or their archived version URLs as sources, NOT screenshots. Help the blind users.

5: personal rants of Big Tech CEOs like Elon Musk are unwelcome (does not include posts about their companies affecting wide range of people)

6: no advertisement posts unless verified as legitimate and non-exploitative/non-consumerist

7: crypto related posts, unless essential, are disallowed

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago (1 children)

peak/goto definition

Plugins are available for most popular languages. I rarely need to see the type of a value, and if I want to see the signature of a function, I usually want to go to the implementation as well.

find usage

I just use grep. I'm already in a terminal, so I have all of those features available. Since I use tmux, I just switch over to another pane and run my search there. For changing the name of a function (which is very rare), I just use sed or do the change manually with vim $(grep ...) if it's more than just a name change (usually I'm changing the signature too).

real time linting

I use a plugin for that, and it works really well.

beginning or end of file useful

Beginning of file: look for an import/constant

End of file: add new function, or a shortcut to the last brace to jump to the start of the class/function. I try to keep files small and single-purpose, so it's usually what I want (jump to end and match braces).

And yeah, I occasionally miss context-aware search/refactor, but again, it's so rare that it's not a big deal. I save far more time with macros than I lose doing manual renames. If I know I'll be doing a lot of that (and usually it comes in bursts), I have VSCode installed as well. But I don't launch it very often.

My whole workflow is very command-line oriented, so using a GUI tool just gets in the way for me.

[–] [email protected] 1 points 1 year ago (1 children)

That is valid man, we all have different workflow, hence different priorities.

[–] [email protected] 2 points 1 year ago (1 children)

Yup, use what works. Most of my coworkers use VSCode, and I'm the oddball with ViM (though I have VSCode installed w/ ViM extension).

Whatever you use, master it. I recommend learning some CLI editor in case you end up needing one.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

That is great advice. Vim was actually the first editor I properly learned. I find many of the keybinding very nice and useful especially for cursor movement.

I eventually moved away from it since I find I spend more time learning it than using it. I personally dont use that many feature of a editor, I find IDE features more important to me.

But I still have many global keybinding inspired by vim, like ctrl + jkhl;^ for cursor movement. They are absolutely essential for me at this point.

[–] [email protected] 2 points 1 year ago

Hjkl is the one core ViM feature that I actually rarely use. I use Dvorak keyboard layout, so those keys are in an awkward location, so I use other movements instead.

I have just enough IDE features in ViM that I don't feel the need to switch for most tasks, and if I ever did, there are plugins that fill in the gaps.

So I guess we're just opposite sides of the same coin. :)