DEV Community

My editor journey: sublime, vim, emacs, vscode

lucasprag on August 04, 2018

I will talk about my experience using each of those text editors, maybe it could be useful for someone evaluating text editors to invest time learn...
Collapse
 
heast profile image
h_east

Your survey is too shallow.

Vim does not depend on GitHub.

See document.
github.com/vim/vim/blob/master/CON...

Patches are welcome in whatever form. Discussions about patches happen on the vim-dev maillist. If you create a pull request on GitHub it will be forwarded to the vim-dev maillist. You can also send your patch there directly. An attachment with a unified diff format is preferred. Information about the maillist can be found on the Vim website.

You can confirm the contributor with the following command etc.
:h patches-8
:h patches-8.1

Collapse
 
lucasprag profile image
lucasprag

hey thanks for your comment. I see, that process is not that common.
I'm not saying that it's wrong, I'm only saying that I didn't like it and I don't feel that it gives proper credit for people's contributions.

Collapse
 
lucasprag profile image
lucasprag

yeah, thinking about it twice, I agree, I was too shallow.

Collapse
 
evantypanski profile image
Evan Typanski

I can definitely say that vim or emacs or any other text editor like that is not for everyone. I've been pretty well into vim almost since I started coding and love it. What I think might set that apart is how barebones I try to make vim; my vimrc is almost all quality of life simple configuration, no cool plugins or trying to make vim more than what it should be. I just stick to the basics.

Now, my mindset is sorta stupid in most cases. I often put vim before all else, sticking to it even if it doesn't fit the job well. The reason is I think it's making me a better developer. I don't have code completion, I have nothing telling me that my syntax is wrong. It's up to me to fix it. That sorta goes into what you're saying about vim being great for editing files: it's so good to make one extra block because you don't have to keep track of 50 curly braces. The second you do, vim becomes a hindrance.

So, yeah, vim or emacs can be trumped by a fully featured IDE any day. But, that can also be half the fun, at least for me.

Collapse
 
lucasprag profile image
lucasprag • Edited

Thanks for your comment. Yeah, I see your point, it's fun to hack emacs or vim and do stuff. It's so simple, we don't really need anything else. But some plugins like easymontion can help us to do a better job when moving between lines of code, maybe you should give it a try.

Hey I see you have a configuration for something called.wtf. It looks like a todo list integrated with your terminal or tmux maybe, I'd like to know what it is please.

Collapse
 
jasonm23 profile image
Jason Milkins

It's for wtfutil wtfutil.com

Thread Thread
 
lucasprag profile image
lucasprag

Thank you

Collapse
 
evantypanski profile image
Evan Typanski

Yeah! wtf is a terminal-based dashboard utility. It has modules that you can place in boxes in the terminal, ones I use most are the todo list and git integration (both tracking a local repo and tracking pull requests on other repos). Its configuration is just a grid, so you just say what rows and columns something will take up, how much space to give each row and column, and there you go.

For a todo list it's a bit eh, there's no priority or date markings you can integrate with, but it's good for just a list of stuff. You can reorder it though.

You can integrate it with lots of different things as well like Google calendar and weather, basically I wanted something to put next to my web browser in a workspace and it fit that role perfectly for me.

And as a note, I found out about it from hacker news

Thread Thread
 
lucasprag profile image
lucasprag

Awesome, I'll definitely try it out. Thanks

Collapse
 
sleepful profile image
Jose Vargas • Edited

I use Doom emacs, let me address each of these:

cmd + p to open files using fuzzy search is faster and more intelligent (it puts recent files on top)

SPC SPC fuzzy search all project files
SPC , fuzzy search all open files
SPC > fuzzy search all open buffers (like a vscode tab)

shortcuts are more similar with browser shortcuts which makes my life easier as web developer

  1. you customize your emacs keybindings to whatever you want, you can't have leader keys in vscode
  2. vim plugin in vscode is so far from complete, evil for emacs on the other hand though

config files are JSON files and there is no need for too much customization (my config file has 22 lines and that's all)

Good for plug-and-play kind of experience, not so good when you want to get creative. TBF it took me longer than a week to figure out a good configuration for TypeScript/JSX on emacs.

the integrated multiple terminal works really well and it has splits like tmux

it does

vscode is maintened by Microsoft which I think it's great to have a team working on it and adding features that integrate well with each other

or rather, you are vendor-locking yourself, and you have poor ability to edit/fix your own editor. You haven't seen issues, but "Find all references" never worked for me, ctrl + click broke often on large projects, etc. Also, telemetry

I don't need to debug vscode and I didn't find any bug so far

It's not so much that you do not need to debug vscode, as it is that you are unable to do so.

I don't need to install too much plugins

This is one of the vscode strengths, you can be productive with minimal effort. But with time you might want to change things... I had about 26 plugins installed, probably used only half of them, and a lot were almost good enough but I couldn't configure them how I wanted. On the other hand Emacs packages are very configurable.

jump to definition for React

Install either LSP or Tide for emacs and you get the same functionality and more. Tide's "Find all references" and "Rename symbol" have worked tons better for me than they did in vscode.

Just to give you an idea of the fun things you can do in emacs, if I press SPC g p while in normal mode my emacs will create a git commit automatically with all modified files, pull from repo any changes, and then push my commit. Few keystrokes to keep my notes in sync with remote. :)

Collapse
 
dmfay profile image
Dian Fay

This won't be changing your mind at all but you can in fact hot-reload config changes in vim with :so $MYVIMRC, or even configure your vimrc to auto-reload by adding an autocommand group:

augroup myvimrc
  au!
  au BufWritePost .vimrc,vimrc so $MYVIMRC
augroup END
Collapse
 
lucasprag profile image
lucasprag

btw, I ended up doing like this:

" reload vim configuration (aka vimrc)
" :e reloads buffer to trigger the FileType event, useful if you don't want to put files into ftplugin
command! ReloadVimConfig so $MYVIMRC
  \| execute 'e'
  \| echo 'config reloaded!'

github.com/lucasprag/vimlociraptor...

Thanks

Collapse
 
lucasprag profile image
lucasprag

Awesome! I knew is was possible but not that it is that easy. Thanks
As I see, when I write a .vimrc or vimrc buffer it will also run the command to load my vimrc. Nice.

Collapse
 
dmfay profile image
Dian Fay

Right -- I have ~/.vimrc symlinked from ~/.dotfiles/vimrc so the buffer could have either name, if you don't have that setup you can obviously adjust the name detection as needed.

Collapse
 
sublimevidas profile image
Sublime Vidas • Edited

I may have to try out vscode once more. I used vscode quite a few times before and I didn't quite like it in the past. For one, I didn't get the key binding to work like vim or sublime so it was a pain to navigate in vscode. For two, which is a bigger reason than one, I find atom/vscode to be slower in performance than sublime. When I launch sublime, bam! I can start typing and get my ideas into reality right away. With vscode, I had to wait and wait.. And by the time, the editor is ready, I already half way lose the thought on what I wanted to write. Of course, that can be solved by having vscode open and running in the background 24/7

Edit: I just gave vscode another shot, and boy, it is certainly a huge improvement from v1.0. The keybinding support works flawlessly on 1.25.1, and it has become much more intuitive to install extensions/plug-ins. The launch time is still slower than sublime 2 and 3, but it is definitely much faster than what I experienced with v1.0 and pre 1.0 releases. Kudos to Microsoft. If they can make vscode launch faster than sublime, I would have no excuse to switch over. But at this time, I am half way sold.

Collapse
 
lucasprag profile image
lucasprag

Yeah, I agree with you, sublime is incredibly fast, even when opening large files.

Collapse
 
elabftw profile image
eLabFTW

Pretty surprised to see this thing with the vim repo where contributors don't get to be author in the repo. Anyone knows why is that?

Collapse
 
ninjaaron profile image
Aaron Christianson • Edited

It's because vim has been around looooong before GitHub, and was only moved to GitHub (relatively) recently. Bram is old-school and probably just uses the project management strategies he always has. Most vim development takes place on the mailing list anyway. I'm not saying it's great how he does it, but it's not super realistic to expect a project that's been around since 1991 to fit the normal GitHub workflows.

There are other good reasons to use neovim, but this one is anachronistic, in my opinion.

Collapse
 
lucasprag profile image
lucasprag

Now I see, yeah, I agree with you.

Collapse
 
lucasprag profile image
lucasprag

yeah, I don't know that either and I can't find an answer by searching on Google. =/

Collapse
 
gisu profile image
sascha fuchs

I find VS code quite nice but it's like Sublime, an editor I can enhance with plugins. I was a fan of Sublime until I started making an IDE out of it. You can get close but not quite. The whole plugin skeleton is like a house of cards, which prefers to collapse on Mondays :D
For me the best thing about VS code is the VIM mode (better than in Sublime), but I'm not really a fan. Too often the VSCode happens at 100 - 300% CPU load and the editor slows down the whole system.

So I'll stay with PHPStorm and Vim. Storm for the big stories and Vim for the stories where I don't need special IDE features.

I haven't really gotten to Emacs yet, if I ever did it.

Collapse
 
lucasprag profile image
lucasprag

I see your points. Do you get 100 - 300% CPU load when using vscode? I'm keep an eye on mine to see if I'm getting that too. Thanks

Collapse
 
gisu profile image
sascha fuchs

Yes, this is one of the problems that always spoils my fun with VSCode. 2 or 3 VSCode helpers each causing 100% CPU load on its own. I think it will depend on a plugin, but that's just the same problem that has already bothered Sublime, which is why I prefer to use PHP Storm (most of it is a core plugin)

Thread Thread
 
lucasprag profile image
lucasprag

Just because you said, I got vscode using too much memory/cpu and getting really slow.
I guess I wasn't slow before because I wasn't using that many programs in the same time.
I switched back to my tmux+vim setup just to compare and even my batery takes less time to dry out.

Not sure if I will continue with vscode after this =/

Collapse
 
katylava profile image
katy lavallee

I really want to switch from vim (well, neovim) to VSCode because I feel like the IDE features are just better and require less configuration and hassle. However, I want the whole app to respond to vim-like key bindings. I don't want to have to Cmd+anything, and certainly not Cmd+Opt+Shift anything. I wish the whole damn thing was modal.

Collapse
 
lucasprag profile image
lucasprag

yeah, I agree with you. it would be a lot better if the whole vscode could respond to vim-like key bindings, but it's good enough for me right now. I'm really focused on creating and publishing projects and vscode has helping me with that goal.

Collapse
 
katylava profile image
katy lavallee

totally fair. i'm adaptable in most things but i have a lot of trouble hitting the right keys when i have to hit multiple at once, unless it's Ctrl+, for some reason.

Thread Thread
 
lxndrcx profile image
Alexander Cox

Note that Oni2 should be able to do this kind of thing when finished

Collapse
 
a__m profile image
antonio miranda

but I had to use the mouse a lot initially

How do you manage this now? Can you have a full session without mouse, say create a new branch, work on a feature, commit new code and PR? All that without a mouse?

Collapse
 
rubberduck profile image
Christopher McClellan

If you’re heavily using the multi-terminal feature of VSCode, I have some essential keybindings for you.

Switch between terms:

gist.github.com/rubberduck203/5777...

Collapse
 
lucasprag profile image
lucasprag

Thanks =D

Collapse
 
rubberduck profile image
Christopher McClellan

You’re welcome!
I get downright frustrated when I jump onto a pair station that doesn’t have these.

Collapse
 
wagyourtail profile image
wagyourtail

What about Atom?

Collapse
 
migueldeleon profile image
Miguel De León

Atom isn't good as VSCode.

Collapse
 
lucasprag profile image
lucasprag

I've never tried Atom, not sure why. Do you really like it? What do you think is best and worse on Atom?

Collapse
 
adityavarma1234 profile image
Aditya Varma • Edited

I have read vim resources like practical vim and mastering vim books. They helped me a lot when i was switching from sublime to vim. You can have a look at them when you are free.

I am just curious to know have you read the above mentioned resources? I am using mvim right now and after reading your post it seems I am missing out on a lot of things by not giving vscode a try.

Collapse
 
lucasprag profile image
lucasprag

Thanks for your comment. I didn't read those books, but I was used to read a lot of blog posts, other people's config files and see talks from youtube (thoughtbot mostly).

I'm reading about mastering vim and it looks very interesting, I will take a deeper look on that later, thank you for you recommendation.

Collapse
 
mnaderian profile image
Mahdi Naderian

I liked VS Code at first but when I saw that a text editor like that takes too much of my system resources I decided to give something else a try, and guess what, now I love Vim and I don't wanna use anything other than this lovely beast.

Collapse
 
oliverschwendener profile image
oliverschwendener

Why do you have to debug your editor to make simple things happen?

Collapse
 
lucasprag profile image
lucasprag

Because most of the plugins don't integrate with each other, like multiple cursors and simple code completation based on context, I updated my macOS and I started seeing errors so I had to fix that, make true colors work on both ubuntu/debian and macOS.

It's fun when we are programming our editor to do stuff for us like snippets or automate some task with macros or something, but not when we have to debug the editor and plugins to have basic stuff like colors for syntax.

Collapse
 
dkamer profile image
David Joseph Kamer

Atom is vscode but is true to itself. vscode is the Wii to atom's Xbox/PlayStation. Use vim and react plugin with atom and it already has git integration!

Collapse
 
lucasprag profile image
lucasprag

Thanks for you comment. vscode has git integration too, but I don't use it. I prefer to use the command line for git. Are you a heavy user of the git integration for atom?

Collapse
 
dkamer profile image
David Joseph Kamer

I use it sometimes, but really just as a visual tool to see changes across multiple files for a big project. The project's pane also uses color coding to show what files are new, have changes or are current with your git repo.

GitHub integration is also a perk.

One last thing is the easily custom themeing. I only had to know css and follow some instructions to make and publish a theme. It's built to be modular and themes and plugins can be added through settings directly from apm with a very accurate search.

Honestly, everything I've used is by far inferior and Atom is a picture for the future of IDEs

Collapse
 
lucasprag profile image
lucasprag

wow, I've never heard of Acme. Do you use it to code in a day-to-day basis?

Collapse
 
antonrich profile image
Anton

Man, thanks for sharing the video. Thanks for the cunningham's law.

Collapse
 
raguay profile image
Richard Guay • Edited

You should try Onivim2. It’s still Alpha, but very usable. It’s vim with all the Vscode extensions. It’s a lot faster than vscode. I’m using it everyday and loving it.

Collapse
 
thewoolleyman profile image
Chad Woolley

Jetbrains IDEs. They do pretty much everything you want, out of the box, with a consistent experience across languages, which is important in a polyglot world.

Collapse
 
dimist profile image
mistriotis

Have you tried PyCharm by any chance?

Collapse
 
lucasprag profile image
lucasprag

hey thanks for your comment. I've tried RubyMine which is similar and also created by jetbrains, but I'm not a fan of IDEs, I like text editors because with a few plugins I can have good enough features alongside with 2 second or less of load time.

 
lucasprag profile image
lucasprag

yeah, both are made using Electron, but vscode handles it a lot better as I heard. Never tried it tough, I give it a try in the next weekend. thanks you all

 
lucasprag profile image
lucasprag

Nice