Daily vim vs emacs thread

I've been using Sublime for a while, checked out VSCode but I think Sublime is comfier with the right theme, recently though I've become attracted to the idea of having super specific keybinds set for everything to improve my workflow, which of course both emacs and vim are well known for.

So, based on keybinds alone and forgetting all the other shit (I don't care if my text editor can give me the news or not), which of Vim and Emacs is better?

Bonus question for emacfags - why emacs of spacemacs? Or is spacemacs better?

Attached: emacs vs vim.jpg (569x400, 82K)

nano

emacs is an environment that happens to have a text editor in it. you can use its scripting environment to automate most everything in a unix filesystem and have scripts execute from keybindings. Also because of emacs-lisp, your config will work flawlessly on all platforms typically. The best part about emacs is that if you can load something in a buffer then you can use all of the powerful searching and editing features of the text editor that you are most familiar with to modify the buffer and have it interact with other buffers in meaningful ways. for example, i have a server running in one buffer and i can pass commands from a notes org file my boss emailed to me (which i received via emacs) directly to that buffer simply by putting my cursor on that line and hitting a key combo. its pretty comfy desu

>Daily
it's the daily thread.
lets do this forvever
yay

Attached: 1494224762693-0.jpg (912x1280, 258K)

>daily
why not hourly?

default emacs is the best if you hate vim keybindings, just use vim if you like the vim keybindings

I swear this is a copypasta.

Hot opinion of someone who very recently/seriously tried to get into Emacs (as a neovim user):

Holy fuck, no. Emacs is just...too much.

The thing you have to understand is that most other text editors are just/primarily text editors. You edit text/code/etc. and maybe have simple commands to compile stuff. And that's it. Emacs is "if you can think of it and it's text-based, you can do it in Emacs" -- but, more than that, it's the *entire point* of Emacs. Customization is what makes Emacs king: yes, you can make it vim-like if you want and you can do all sorts of cool shit, but that comes at the cost of immediately not having a good (or even usable, tbqh) editing setup on some other computer. While the plugins of vim make it less portable, you can still do a *lot* with just the builtin syntax highlighting and good knowledge of the key commands.

Spacemacs/Doom-emacs/plain evil mode don't really change the "goal" of Emacs, which is customizing your editing flow to be *exactly* what you want. For whatever reason, as nice as a goal as that seems, I just don't want it.

is it possible to import settings between machines?

Yes. With Emacs, you'd copy ~/.emacs (a file) and ~/.emacs.d/ (a directory). With Neovim, you can copy ~/.config/nvim/ and ~/.local/share/nvim/ -- I don't remember specifically where vim stores settings/plugins, but it's also possible to import them.

what could i reasonably do with emacs that I can't with neovim? For the actual dev project stuff I still fall back to vs code since that's what the teams be using. I can't see a reason to pick up emacs without a goal in mind

Kakoune

I agree with this. Emacs is powerful for certain things (such as a server terminal) but for basic text editing there's probably better software.

Use neovim, and vscode > sublime.

Bonus: Vim 8 vs Neovim

Use Magit or Org mode. Both of them are killer apps/extensions that only Emacs has.

As an Emacs user, I completely understand. A very valid point. I mean, the whole reason I like Emacs is because how comfy it is to extend, customize and then use. Oh what I would give to see Firefox written in Lisp -- Emacs style.

Attached: 1526211391416.jpg (559x1024, 59K)

How is magit better than fugitive, and more importantly how is not better than just git?
Assuming it's some sort of git wrapper fuckery, judging by the name

Elisp for emacs provides a much better environment for writing complex key-bindings than vi(m). Vim has notoriously bad scripting (it can do a lot of things, but its so fucking frustrating to write it)

Elisp is so simple your standard Jow Forums dweller could write it.

(global-set-key (kbd "") 'elisp-function) [/cpde]

is how you setup a keybinding

Literally learning emacs and trying to make it vim for org mode.

Tell me about org mode. How is it more than a glorified todo list with some markup syntax?

Calendar, agenda, list, notifications, itemized, progress both items and percent.

no need for a holy war, use whatever editor you want
but if you're not using emacs I feel you are missing out, it's just so comfy

Not that you need to use any of that, I use org mode a lot and didn't know about the progress trackers

also tables with spreadsheet capabilities and seamless export to html and latex

emacs with evil mode

it just werkz

I use vim when I'm working on config files. emacs when I'm working on multiple config files. and vscode when I'm working on code project

I don't really think it's a fair comparison. I absolutely love vim and use it everyday, but emacs does so much more. You can even have emacs with evil to do all that vim does and more. I edit text with vim, but if I used emacs I know I could do a lot of stuff I can't currently do.

For everyday programming I'll use vscode locally but when I'm on my server or a server for school I'll use vi or vim. I used to use vim more but when I started doing webdev it was so much easier to user vsc with plugins than vim with plugins.

I used to use emacs a long time ago but stopped because learning lisp and things I could do in emacs made me unproductive.

If you just need a text editor, get Vim.
If you want a lot of different apps, get Emacs.

I prefer Emacs over Spacemacs. For me, the point of Emacs is to create your own text editor. Spacemacs is good for people who want to start with Emacs but don't want to built it from the bottom up. It's like NeoVim in this way.

Emacs is for news, vim is for typing

Tell me about your emacs news setup.

I really hate the idea of spacemacs. It's like oh-my-zsh in that its existence leads to less people just figuring out how to configure it themselves, and they end up with weird bloat.

Elfeed + elfeed-org

Kind of ironic that the whole point of ricing is to make something minimalist but it ends up becoming bloated with custom configurations, fonts and other shit.

Does Emacs have a good augocompletion engine that works well with large files? The worst thing about vim is that last I checked pretty much the only viable choice is YouCompleteMe, and that slows to a crawl if you have a moderately large file (like 1k lines or so).

ive used spacemacs for around a year and i have no complaints about its autocomplete. the only issues ive really had is with the error highlighting but I eventually just learned to live with out it.

There's also a great editor that deserves more love - acme, and unlike emacs it doesn't try to be an OS, it glues all your tools together in one window of extreme convenience, for example: when
you are editing a file there is a buffer with its' name, so you want to compile your .c file? Just type gcc before its name in the buffer, select it(text) and execute within acme. Do you wanna run it? Type ./ before it. Do you need a terminal window? It also does that.

I use Spacemacs (Emacs + Evil + bloat) and it works great for me. Like the Vim editing style, but Emacs has a lot to offer. It hangs sometimes in python (boo) but that's not enough to make me abandon it desu, and it works on my work machine, unlike whatever you guys may use on your PCs

this

>Kind of ironic that the whole point of ricing is to make something minimalist
Where did you get this idea?

Is there a text editor which can use space key as a modifier?
So I could , for example, hold space and copy with space + c and move within a text with space + l (for forward char) and space + o (for going to the end of the line) but at the same time If I just press space one time it would act like space.

Attached: 1529031477969.gif (320x240, 1.34M)

Yes. In Vim I set space as my leader key.

Seems like this wouldn't work well in a non-
modal editor.

>for basic text editing there's probably better software
If you mean that Emacs might be over-engineered for basic text editing then I agree. If you tried to imply that there is an editor with better functionality then I cannot agree since you can implement anything in Emacs Lisp.

I wish I knew how to touch type... so I could be cool like the people in that thread.

t. Don't know how to touch type

Thanks.
Vim is nice and it has all features that I need out of the box but I can't solve a couple of issues with it:
Registers look like pain in the ass. I remember that I did a config where I could past from anywhere with just p but I still had a problem with visual mode where GVim just couldn't yank highlighted text.

Attached: 1524443274829.jpg (1561x2048, 555K)

It allows you to stage just individual hunks. Mind-blowing how much git starts to make sense after you try Magit. I was vim user, used pure git in terminal, after switching to Emacs and trying Magit, I started to understand so many features and mechanisms around git.

Read this book

Attached: practical-vim.jpg (2250x2700, 857K)

>daily

Attached: 1516021918779.gif (200x200, 32K)

It's just easier (comfier) to use. The difference I see compared to fugitive (I just watched one vim cast) is that Magit abstracts a bit further from git. For example, the status window is a tree-like (2 levels deep afaik) structure that doesn't resemble regular git status output. It just lists the same things, but doesn't clutter it with #long comments that explain shit you already know. See pic related. Also, staging individual chunks is a bit easier. You don't need to open a separate window to select the chunks, you can see them from the status window. And if you don't want to see them, you can collapse them. If you want to select some part of a chunk, you just do that. It's easier to learn because there are pop-up menus for keybinds. When you press the first key - responsible for section (like "merging", "branching", "diffing" etc.) - it pops up the menu for that section which shows available commands and their keybindings. If you forget what key is responsible for the section, you press "?" and see keybindings for all sections. If you wonder what a displayed command does, you press "?" and then the key for command and help buffer for that command appears. It's just comfy.

Attached: status-solarized-dark.png (700x500, 72K)

Just write Firefox in Emacs Lisp you lazy twat.

I use emacs at work with intero which uses company for autocompletion. It handles 200k loc codebase without any issues.

only valid choices afaik: platform default text editor, ide builtin editor, editor you wrote yourself.

get typing of the dead to practice, the old pc version runs in wine and there's a recent one on steam

> It allows you to stage just individual hunks.
...So does plain git? I do that all the time

If you do decide to learn to touch type, you could also switch keyboard layout to a comfier layout like Colemak, Workman or Dvorak.

Sweet, gonna give this a try then. What language(s) by the way?

Found a few typing games in my apt repo', lmao I can touch type 18 words per minutes.
The absolute state of myself.

This, Workman on a matrix/ortholinear is fucking comfy

I used Workman on the Kinesis Advantage (Which is kind of like the Ergodox) for around one year. The thing which dragged me back was using vim. I just couldn't get a sensible layout without remapping all the keys. It's a shame.

>intero
Haskell

I'm actually using Colemak and I find it comfy enough to not sacrifice common dangerous shortcuts (Ctrl-Q, W) although I do see the concern made with Workman about H and D placement in Colemak. Indeed, I'm wondering whether upper row of middle and index finger isn't comfier than the middle of the home row.

>Holy fuck, no. Emacs is just...too much.
>For whatever reason, as nice as a goal as that seems, I just don't want it.

I have a similar sentiment. I don't see the value there, and don't want to have to buy into the whole ecosystem to get a text editor. I can do macro/scripted text processing just fine without it.

I've been a Haskellfag for several years now. I made some games and libraries and such. How do I get into it professionally? I'm really sick of OO in my day job. FP Is pretty much all I use at home.

No idea. I didn't get my job because of the language, but because it was interesting product for me. Try applying in shops known for FP, like Jane Street or Wire.
Also as far as i can tell, FP crowd doesn't give a fuck about games, nor is it impressed by them so you might want to focus more on networking or HPC.

Yeah this is my main concern right now, I haven't taken the time to give it much thought yet though. The solution will probably involve remapping hjkl to neoi and then whatever's normally mapped to n, e, o, or i to h, j, k, or I. Vim keybindings aren't ergonomic anyway so it should be fine - I know I have had very little trouble adjusting my muscle memory to the newly placed mnemonic shortcuts for the usual stuff like c, d, w, e, b, :, etc.

>want to adjust Vim keybindings to Colemak
>Ctrl-i is TAB
>give up

> Ctrl-i is TAB
What?

Ok thanks for the tips

In terminal is synonymous with because of historical reasons. There is no way to distinguish these two in Vim.

This goes to all the vim'ers. Im familiar with vim but kind of struggle when it comes to working with myltiple files. Always switching buffers is little nuisance for me, is there something that i miss?

> emacs vs vim
You can use both.
The End.

Yes, use tpope's vinegar with netrw

Nerdtree is shit and unnecessary bloatware

Learn windows and tabs: split your tabs into multiple windows, and setup keybindings to switch between tabs. Protip: tabs are more like workspaces, windows work like a tilting wm; don't try to use them like "windows" and "tabs" in normal GUI software.

Is the emacs mail manager any good?

OK guys I have been quite busy due to imminent release work happening in my company.
Just had a glance of notification from hackernews that "Gentoo" was hacked or something like that around June Mid.
What was it? Haven't update my gentoo pc in like 3 months. Should I be worried?

What benefit do emacs or vim have over something like visual studio code besides performance and better keyboard commands

Only the github mirror (which I honestly don't know why it exists in the first place). Assuming you were pulling from gentoo.org, you'll be fine. Well, as long as you keep your system updated, 3 months behind is quite a while.

It's just not easy and not accessible. Most used app/softwares are accessible to all because they are into some kind of business model. They want to make user experience as easy as possible even making compromises on efficiency and being bloat.
emacs and vim care about efficiency. using ctrl+n, ctlr+p is better navigation than using arrow keys.

Customisability, mainly. They both have several decades of extension ecosystem backing them. They're also guaranteed to be free of stuff like telemetry.

You could also reverse the question; what advantages does something like VScode have, other than perhaps better out of the box mouse support providing an easy learning curve? They're still slower and have worse keyboard commands.

Thanks. Will update this weekend.

So say as a vim user I want to try out emacs. Should I:
>install spacemacs, then once I'm familiar ditch it and make my own config based on what I've learned
>go the other way and install emacs with evil mode, and build my environment as I learn
>go in raw and learn vanilla emacs first, and only after I get the hang of that start customising it with evil mode and stuff

If you have time, do the later, if not, do the first.
I know everybody loves evil mode but desu I do not really get the point of it, if emacs tries to be vim, it will never truly be vim,and emacs is way more powerful when it's emacs as it can get.

Vim has objectively better editing, emacs is objectively more powerful as a platform. I'm not giving up modal editing though, at least not permanently.

Eww > Firecucks

Does emacs have a browser with javascript support?

No

It's shit then

xwidget-webkit since emacs 25. Although you need to resort to ugly hacks to make video work within emacs. But it's perfect for browsing docs, github and all the usual shit you'd need during development.

>No elisp hooks
Fucking dropped

>video
Who needs that, I can probably use youtube-dl and mpv. If it actually works on modern but mostly sane websites like github (and Jow Forums?), then that's absolutely perfect.

w3m > eww

It is not written in lisp. You can just run it in ansi-term and it wouldn't make a difference. + eww has pictures

You can edit the source yourself if you need it.
I don't, i'm just saying because multimedia is big part of the web these days so most people probably couldn't replace it for their browser. But i think someone got youtube working in it, somehow.
I only use it for work-related stuff. Afaik everything from ES5 works, at least our shitty internal webshit for code review requires ES5 and i haven't run into any issues.

you can just use an ~/.emacs.d/init.el instead of an ~/.emacs

yeah you can probably do that in emacs with evil-leader mode, or with hydra bindings

Bind keys to :bprev/:bnext. Use :ls to list buffers and type n to jump to the buffer n.

Editing in Vim is comfy as fuck, but VS Code Just Werks (TM) so I use that with the Vim extension.

You could try NeXt Browser, it's written in Lisp. Very extendable too. Needs more work but still cool

Go to Github /next-browser/next

>you can do anything with vim
>its not bloated like emacs
>keybindings make sense for human hads (you need to use your palm on the ctrl key for emac bindings to make sense). In fact, emac bindings are so shitty that even emac users use vim bindings via evil mode.
>vim binding "commands" are more precise. d2w to Delete 2 Words, w and b to navigate forward and back entire words, /[pattern here] to search, then n to go down and N to go up on all matches.
>vimscript is ez-pz and lets you do FUCKING ANYTHING, you can't to that with edumbs
>plugins if you're lazy, super cozy
>vim is a much faster workflow
need i say more?

Attached: The'MacsShouldFearTheVims.png (607x608, 335K)

or vimtutor