Vim vs. emacs

I've tried learning vim, and it's alright for some things, but it is taking way too long to get used to.
Should I try learning emacs instead? I'm really scared for the integrity of my pinkies if I do.

Other urls found in this thread:

philosecurity.org/2009/03/23/pirates-and-ninjas-emacs-or-vi
twitter.com/NSFWRedditGif

You probably should. Learning either of them will make writing code a much more pleasurable job. Though I wonder what it is about Vim you found so slow to learn.

You want to know if you should throw out the progress you've made so far so you can start all over again in another equally complicated learning process?

Stop using HJKL while you're learning.

This.

FWIW OP, I was very frustrated for my first month or two learning how to edit with vim, but it is worth it. You don't have to force yourself to stop using mouse/arrows/getting frustrated and just opening up a different editor while you're just learning. But if you keep at it you'll find it useful, and editing text plainly will seem just as frustrating!

Should one be using HJKL much at all in vim? search navigation is really annoying. I find myself relying on { } w W b B a lot. Even that feels like a crutch.

Just use notepad++ and stop trying too hard to follow the crowd

Both.

Emacs for your main workstation, Vim for everything else.

Evil mode, done.

Besides what you already said, f/F/t/T are very useful for horizontal movement on a line, while page scrolling (ctrl+u/d/f/b), and searching are useful vertically.

Maybe try out relative line numbers (:set relativenumber), so you can just glance at the line you want, and [number]j/k to it. A lot of people like it.

Try vi instead of vim.
Also, learn how to use ex commands effectively, they make regex more useful.

Spacemacs is cool too.

Keep going it'll be worth it. I did like 100% immersion in Vim and I don't regret it at all.

OP here, thanks for the encouragement guys. I'll try sticking it out a little longer.

I've heard to stop using the arrow keys, but HJKL? Aw man.

No, use the arrow keys. HJKL is not worth learning long term since it drops in favor of line and word navigation. Arrow keys are fine in the meantime.

Alright. Supposing I wanted to learn vim alongside C (being already proficient at C++), do you have any plugins or settings you'd recommend? Or should I introduce those a little later?

C is really easy, and K&R's book is written well. I myself consider it to be a genuinely good book.
Also, hjkl reduces the travel time your hand needs to take, so use those instead of the arrow keys if you need to. It's faster to keep your hands on the main part of the keyboard.

Ignore this guy. Nobody writes code continuously and fast enough that they need to minimize the travel time between the main row and the arrow keys.

One of the most overplayed benefits of Vim.

You can write more than just code in a text editor. Config files, short stories, anything.
Especially for short stories, having the fastest flow possible helps prevent me from being distracted, and helps me write.

If you switch to emacs, you'd still be using vim hotkeys with the EVIL plugin. Because coding is retarded otherwise. Generally, you'd switch because of some customization problem, which I sympathize with.

Well, there are Emacs people and Vim people. Pirates and Ninjas..

>philosecurity.org/2009/03/23/pirates-and-ninjas-emacs-or-vi

Both can be amazing if you mastered them. Also you can have both - Vim AND Emacs - in SpaceMacs.


But personally I prefer Vim.

Emacs is OK in the beginning, but there are endless combinations to learn and whenever you work at someone else's Emacs your helpless since it's highly customized.

In Vim you can also cutomize things (editing your vimrc file), but the core functionality (which is the important part) is always the same. So can just open a Vim somwhere and go freaky.


Yes, in Vim the start is pretty difficult, but if you force yourself to use it for 2 weeks, you'll be already decent.

Just learn moving arround, open/close files and splitscreen and recording macros and you'll already be pretty fast.

And once you learn some hacky combinations, youll get even faster.

Try this (creates numbers from 1 to 100):

i 1 # puts 1
[Esc] # leave insert mode

qa # record macro, put it to variable a
yy # copy line
p # enter text to next line
[Ctrl] + [Shift] + a # raise number under cursor +1
q # stop recording

98 @a # run macro 98 times

Not too bad, right?

Oops, last line doesn't belong to the code..

SUBLIME
U
B
L
I
M
E

I'm gonna sound like a retard and people are guaranteed to get mad at this question but since this is a vim thread fuck it, I'm gonna ask anyway.

I've messed around with vimtutor for a bit and it seems alright, but my question is is there a separate vim text editor that doesn't run in terminal or is that just part of vim? I just ask because how would you really go about getting syntax highlighting for languages and other things like that.

Well there is GVim, which is basically Vim with a Graphical user interface for Win, Linux and Mac.

But you already have Syntax highlighting in Vim. Just open a code file (:e filename.txt) and see for yourself.

You can also switch the colorscheme in Vim:
-Type ":colorscheme" (or shorter: ":colo") in vim to see the current scheme.

-Type ":colo " (with a blank) at the end and use [Tab] to go through every available colorscheme.

-You can also add schemes yourself by putting them into the "color" folder at your Vim folder.


For certain langauges you need plugins. Just ggole your way through and ask where you don't know what to do.