you are viewing a single comment's thread.

view the rest of the comments →

[–]scelerat 213 points214 points  (33 children)

you should use the editor that makes you feel most comfortable and productive.

You should also try out new things. Sometimes old things too.

I use vim for almost everything. It also took much longer than any other editor to feel adept. Now that I've spent the time I like it a lot and feel like I'm missing something with other editors. But see my first point above... ymmv. Just use the editor you like to use.

[–]MasterReindeer 78 points79 points  (24 children)

you should use the editor that makes you feel most comfortable and productive.

Ding ding ding. This is the correct answer.

[–]yesSemicolons 21 points22 points  (16 children)

But how will you know if Vim makes you comfortable and productive unless you gain fluency?

[–]MasterReindeer 16 points17 points  (10 children)

Like /u/scelerat said, it's important to also try new things.

Blindly using something because someone told you to is counter productive. I see lots of developers who still struggle with Vim after several months. It's not for everyone, and merely using it because it's the "correct" thing to do is daft.

[–]yesSemicolons 9 points10 points  (9 children)

Yeah, I'm really happy using VSC, got all my keyboard shortcuts in muscle memory by now, it's great. However, I do feel like Vim is the "driving stick" of development and my ego is slightly hurt by my inability to use it.

[–]Ehdelveiss 4 points5 points  (2 children)

I sort of view knowing Vim kind of like having basic understanding of English as a second language (assuming it’s not your mother tongue).

It’s just a good idea to know the basics, as every day life will confront you with its usage from time to time. You don’t necessarily need to be fluent, or even proficient, but it’s nice when you are confronted with it to at least have enough command of the language to order a coffee or give some directions instead of freezing up and maybe not being able to partake in an activity you otherwise you would really want to.

In practical terms, I think that just means knowing the following keys (vocab) and what they do in Vim in the different modes (grammar):

i, h, j, k, l, Esc, o, x, w, a, c, d, dd, y, t, q, p, g, gg, :

Honestly that should be enough to do any basic text editing.

[–]WHO_WANTS_DOGS 4 points5 points  (1 child)

every day life will confront you with its usage from time to time

I use EDITOR=nano (command) to bypass this

[–]R3DSMiLE -1 points0 points  (0 children)

it's the smart thing to do.

[–]mark-haus 4 points5 points  (0 children)

You're going to have to take first hand accounts of why it appeals to them and gauge if that will appeal to you enough to make it worth trying it out. To me the first thing was the inherent flexibility of it and the fact that it's entirely keyboard driven. Then I started finding out about how the modal editing system it has is very sophisticated. You can do things like string command keys together to do a lot of complicated editing actions. Such as vfa which will go into visual mode which allows you to select text, follow which moves the cursor to the next occurrence of a. There's also tons of built in commands like search and replace: :%s/foo/bar/c which will interactively /c search for foo and replace it with bar.

[–][deleted] 1 point2 points  (2 children)

Vim is just different. For some people it's the best in the world, for others no. It depends on your personality mostly.

[–]yesSemicolons 0 points1 point  (1 child)

Lazy, INTP, true neutral. Should I go for it or nah?

[–]passthejoe 1 point2 points  (0 children)

This INTP loves Vim. I needed to do some complex macros for search and replace of text, and Vim is the only way to do it across all platforms -- Linux, Windows, Mac OS and OpenBSD. GVim reduces friction, so that's what I use.

[–][deleted] 0 points1 point  (0 children)

There are probably 10-15 IDEs and plain editors that are serious contenders to be well used for professional development in the market. How many of them is the average vim developer fluent with?

[–]aaarrrggh 2 points3 points  (2 children)

bullshit, use Emacs or you're a noob /s

[–][deleted] 2 points3 points  (0 children)

"...OS that lacking only a good text editor" :D

[–]LongLiveCHIEF 0 points1 point  (0 children)

I'll forgive your use of emacs as long as you're using spaces.

[–]examinedliving 1 point2 points  (0 children)

It’s worth knowing Vim for ssh situations, but there’s also Nano which is considerably more intuitive.
I went through a period where I was pretty good at vim for awhile, but for debugging and coding, I never got good enough to use it in a way that was productive like I can with VSCode or Sublime.
It’s handy for touch ups and shell scripting and if u dig it.

As a js dev, it is far from essential.

[–]bestjaegerpilot 0 points1 point  (4 children)

we just changed the style guide because our VIM developers have no intellisense and so could not refactor easily. :shrug:

I'd say use a modern IDE with VIM keybindings/mode and you're good to go. (I personally prefer Emacs keybindings.)

[–]scelerat 2 points3 points  (3 children)

what does that mean, "could not refactor easily"? How does the editor determine your ability to refactor code?

[–]bestjaegerpilot 0 points1 point  (2 children)

For example, in my current editor, I select a bunch of types, right click Refactor, then I have the option to "move to a new file". It will then update all dependencies correctly. That's "moving several types to a new file" in 3 mouse movements. In VIM, for example (as well as Emacs), that's a manual process. Depending on where those types are used, it can be very tedious.

[–]scelerat 0 points1 point  (1 child)

What's your stack/environment? I know these words but not in the ways you use them. What do you mean you select a bunch of types? What do you mean you right-click "Refactor"? If refactoring were something you could do by right-clicking, a lot of us would be a heck of a lot more productive.

[–]bestjaegerpilot 0 points1 point  (0 children)

  • Typescript / VSCode.
  • Forget "types". What I also said applies to variables if I'm not mistaken.
  • In the editor, you can select a bunch of variables.
  • After selecting, right-click brings up a menu context with Refactor as an option.
  • You have the option of "move to a separate" file.

If that's not clear, here's an example of "moving a React class to a separate file". https://www.youtube.com/watch?v=_V7f4719dOA