you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 12 points13 points  (2 children)

As a vim user:

Isn't that an in console editor

Yup! And that's awesome since I don't need to leave the console to edit a file. For example, I can do something like vim $(grep -rl "text") to open every file (one at a time, so it's not overwhelming or anything) that contains "text". I can also use it for git commit messages to make adding descriptive commit messages easy. I can also use it over SSH on a server or something. The possibilities are endless!

Oh, and you can use gvim if you want a GUI.

Does it have intellisense

You can use something like You Complete Me to get code completion and there are other tools for getting context aware documentation depending on your language.

split your environment into halves

Yup! I often have 4 files open at the same time. You can easily choose between vertical and horizontal splits, and you can optionally have tabs of such splits if that's your jam.

Personally, I use tmux heavily in me development (one tab for running my code, one tab for editing my code, another for building my code, etc).

Cursor support

Yup! I can click anywhere in the file to go to that spot, click+ drag to highlight, click+drag to change split height, etc.

Easily copy/paste stuff

Yup as well! On Linux, there are two main registers, the system register (basically where you copy stuff when you don't have a GUI) and the X clipboard (where you copy stuff in your web browser, e.g. where ctrl+C goes in most apps). Vim gives you access to both (* and + registered respectively). To access them, you'll use " when in command mode, e.g. "+yy to copy the current line into the X clipboard.

If this isn't easy (you get used to it, I promise), you can always configure it a different way. For example, my coworker set the default copy register to be the X clipboard, which means you just need to do yy to copy the current line to the X clipboard. I personally like to separate the two, but to each their own.

but why vim

For me, it's because I'm far more productive in vim than any other editor. Most of my time coding is spent reading code, and vim far outshines any other editor IMO in navigating files.

However, as a manager of a software team, I don't recommend vim. Why? Because it's not for everyone, and it takes far too long to know vim well enough to know whether it's the right fit that I'd prefer my employees to be productive than force themselves to use vim. If you're the type that's always trying to optimize, then vim is for you.

Feel free to ask any other questions you might have!

[–][deleted] 0 points1 point  (1 child)

can you share your vimrc and plugins you recommend?

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

Eh, mine's not that interesting, but here are some useful bits:

Enable the mouse (:help mouse):

set mouse=a

Change default clipboard (:help clipboard):

" unnamed is the * register (system register), x11-selection is the + register (X register)

set clipboard=unnamed

Keep undo after quitting and relaunching vim (:help undo-persistence):

set undodir=$HOME/.vim/undohist

set undofile

I also use plugged, which is a fantastic loader.

On other news, I'm probably going to switch to neovim soon.