Switching to Sublime Text from Vim in 2017
eduardobautista.com
eduardobautista.com
> Any popular editor usually has a “Vim mode” that you can install and you can achieve native Vim productivity.
I would editorialize this to say "closish to native vim productivity", since there are virtually no vim mode plugins for popular editors which offer a complete set of vim features. Even EVIL mode (as of the last time I checked it) has a few notable discrepancies which arise from mapping Emacs functionality to vim keybindings.
> I’d rather do my part to ensure good desktop software will continue to exist, even if it’s proprietary. I will not use shitty software just because it’s open source.
Perhaps I'm just a troglodyte, but I agree with this sentiment heartily.
I'm aiming to change that: https://github.com/lunixbochs/ActualVim
NeoVim needs a bit more remote UI work to enable every Vim feature, but it's still very powerful to embed right now.
I don't agree with all these as default.
Explorer (basically the nav tree): Just give me a toggle key and hide it by default please (I mean hide its icon nav too)
Search: really? something + F is fine for short key like the others do.
Git: I haven't even tried to use version control inside text editor. It is just illusion of ease. It's not significantly different from switching to a terminal. A terminal has its jobs to do, please use it. You will use it anyway for other tasks.
Extension: This is even worse to be default. I don't think I have something to frequently do with extensions.
I like its light computation compared to Atom. I had switched to VS Code for a while, then switched back to Atom. Maybe I'm just lazy to remember new keys.
Edit:: Just found it, "Hide activity bar". Sorry for being lazy :/
"workbench.activityBar.visible": falseThe domain of minimal code editors is well explored and quite mature, and the platforms upon which VC runs are all quite stable with well known performance characteristics. If we can't make software work well under these conditions, we have bigger problems that we need to address.
At the absolute minimum I need a port or something very, very similar to NERDTree and vim-easymotion in the new environment.
Much of the functionality that I used ST for I found Vim could do naturally, with no plugins. This presentation taught me alot (https://www.youtube.com/watch?v=3TX3kV3TICU), such as basic command completion.
There is some stuff that Sublime can still do that I don't think Vim can (multi-cursor editing comes to mind, and that's still really handy when I'm making edits to HTML). Other stuff can be done by both but I happen to like ST's better (the awesome GitHub package comes to mind).
And finally, I did pay $70 for an ST license, so I imagine I'll keep using it for another few years or so. But given that I do alot of remote administration on RHEL/CentOS boxes where vim is the only thing I can safely assume to be installed, it doesn't hurt to stay fluent in vim for such a day.
https://github.com/terryma/vim-multiple-cursors
I use this with NeoVim and it works perfectly.
My underlying thought is though, that if I can become fluent in Vim's world, the layer between thought and coding becomes thinner.
I do want to write a translators guide from ST to Vim. Simple things like 'Tabs = Buffers' (which are different to Tab pages) I had no idea about until recently.
I have previously been using ST too, though, and so far find two of its nicer features lacking in both Vim and Spacemacs:
1) Ctrl-Shift-P. ST's menu is really nice and I always seemed to search for the right words in order to find what I was looking for. You can emulate it with plugins in Vim, and Spacemacs' ´SPC :´ comes close, but they both end up being a bit more awkward than necessary (with emacs, it's mostly due to the function naming scheme and the terminology used).
2) I found the various flavors of multi cursor support in both Vim and Spacemacs not to be equally elegant as in ST. ST allowed you to do some amazing edits with Ctrl-F and some basic Regex knowledge (using Alt-Return). On the other hand, I learned that this can mostly be mitigated by the usage of mostly simple on-the-fly macros with Vim-syntax, so it's not that much of a problem.
There were definitely hackey things you had to do with regular Vim, but NeoVim adds a much better interface for plugins and lets you use whatever languages you'd like for making plugins...Not to mention that it has had proper async support for years now, much before regular Vim got it.
Using NeoVim, I can still do all my work in the terminal with tmux, and have the interface that I'm familiar with. Sublime is a great editor, and I use it as a quick little "paste-buffer", but I don't really feel I'm as productive with it as I am with my NeoVim + tmux combo.
For some users, the migration may be as easy as "move these files to these folders", but that's still a hurdle most people will say "why bother" with, especially since NeoVim doesn't offer anything that spectacular for users who don't write plugins.
Any advice on why I should switch?
All the plugins you know and love with Vim should work, and you can write new plugins in virtually language.
New features tend to reach NeoVim faster than with regular Vim; most notably async support.
NeoVim used the XDG system for configs, so it doesn't pollute your home folder with a bunch of dotfiles.
And this might just be in my head, but I just feel like the entire system is a bit snappier and runs faster.
===== EDIT: ====
falcolas pointed out that I was mistaken on the first point:
> The tab-autocomplete when you hit the ":" key gives out written suggestions.
That appears to be in regular Vim.
Can you explain this a bit more - how does this differ from vim's tab completion for ex commands?
:e ~/.vim^I
.vim/ .viminfo .vimrc
:help ctrlp-
'ctrlp-<c-p>' ctrlp-options [...]My bad!
"Why I'm no longer using vim and now using X" typically result from not digging into Vim enough. All the issues the OP is having have been resolved from either updates to vim, switching terminals, or just understanding vim basics.
NOTE: Plugs can be slow and the OP is correct that some are hacky, but typically there's the Vanilla Vim solution to a problem that takes a little bit of reading and/or finding to solve.
If plugin/loading speed is really an issue then switch to using Alacritty and Neovim, use vim-plug for async & lazy loading plugins. You get truecolor support and you're using your GPU to render everything. If plugin speed is still a problem, learn why they're loading slowly, then dig into why rather than just saying "they're hacky or clunky". Silver search is great, but if you understand how to execute terminal commands from vim (:!) then you can grep everything and remove the need for silver search. I use FZF (https://github.com/junegunn/fzf) which is another fuzzy searcher that's optimized for speed, built with Go.
For those that don't want to put in the time to optimize and learn vim, then by all means switch editors. But don't blame the editor ("I will not use shitty software just because it’s open source.") unless it's truly the root of the problems, explore and find better ways. A key thing to remember as a Vim user is there's always a faster way and your .vimrc will always be different from another's.
Edit: For those interested in my setup (https://github.com/hhsnopek/dotfiles/blob/master/.nvimrc)
I'd rather switch to an editor where I don't have to do that. After years of using Vim/Neovim, that's what I recently did. I'm planning to remove my Neovim config down to its bare essentials to speed it up and use it as a simple text editor, because that it does well; but even with a carefully tended for configuration, it's been a horrible experience as a programming environment.
Slow or buggy autocompletion (and I have tried it all with all types of configuration, deoplete, YCM, neocomplete, neowhatever, etc), problematic file management (NERDtree not playing well with the rest of Vim, netrw being buggy, VimFiler being slow), syntax highlighting being slow and often buggy compared to plugins from other editors... And then there's the whole having to glue together plugins that don't work nicely with each other, my god how many entire days have I wasted on that.
On the other hand, I have set-up Atom (for Elm) and VSCode (for everything else) with nearly no effort and no experience in very little time. And while their Vim-modes cannot compare, putting up with that is less stressful that putting up with a poor everything-else.
I have really high hopes for the Neovim project extracting all the text editing juice without the legacy, and to a lesser extent, the Xi editor (assuming Vim bindings are ever prioritised, otherwise it'll never be able to compete with Neovim); but right now, while Vim may be the best text editing experience it's nowhere near being in the same league of programming productivity of modern text editors.
I've been using various vi-alikes, including vim, since 1996, so, yes, I have used just about every vim plugin, used vi[m] on every terminal you can name, plus several you may have forgotten existed, and would guess I know the basics by now, considering 90% of what I've edited over the last 20 years has been through Vim and most of the other 10% has been through work-alikes.
Please don't insult people by making assumptions about their knowledge, experience and commitment. I - and the OP, I assume(!), have put the work in and have decided the grass might be greener elsewhere. Please respect that and be constructive. The OP seems to be trying to help others by pointing at what they did / are doing to try and live with another editor.
I'm fine with the OP switching editors, I could careless which editor someone is using or switching to, but don't place the blame on plugin performance, plugin bloat, or building an IDE; Vim isn't an all-in-one solution and that's okay, we can push it to be an all-in-one solution.
My constructive criticism is that these problems are in every editor, don't pin it on vim plugins or the amount of plugins you're loading into vim. "releativenumber" is a valid reason to switch editors, but the rest of the reasons are applicable to all editors.
Edit: "switching terminals" -> "switching editors"
I already do.
> Silver search is great, but if you understand how to execute terminal commands from vim (:!) then you can grep everything and remove the need for silver search
I used that for CtrlP and in my experience returned better results. I know how to use grep and I use it frequently outside of Vim.
If you were already using Alacritty and Neovim, you should expand on why these did not solve your problems as many if not all speed/optimizations can be matched or better than Sublime Text
https://github.com/richrd/suplemon
https://plugins.geany.org/geanyextrasel.html
Since they are all open source, if you don't like something, just change it.
I'd much rather give the Sublime Text devs money. I don't have the time or knowledge to create an editor as good as Sublime Text.
You can also help with documentation, translations, bug reporting, QA, etc.
I suggest taking a look at Atom before spending money on Sublime. The number of plugins and extension is just enormous. You might get surprised.
It's frustrating having to restart my editor because the Electron window gets stale and needs to be closed.
In my experience Sublime is _much_ slower than Vim.
Once installed, you'll also get shell extensions in bash/zsh also as a bonus (fuzzy auto-completion, fuzzy command history with Ctrl-R).
However, Vim always works. What do I mean by this? Chances are if you do any real development work, you are having to remote into another system. For sublime, VSCode, etc... you'll have to Mount the remote file system. Well that has failed me a few times, especially if the remote system does not support anything other than sshfs and you are on Windows machine. Terminal access means Vim. Vim just works 100% of the time.
So... I've come back full circle to Vim, because it just works and I don't have to change my workflow, because I'm in a different environment/borrowed machine.
> Also, why not Emacs? I wanted to change my editor, not my operating system :P.
He really made a mistake here, IMHO. Spacemacs is exactly the right solution here: can run on the console, can run in a GUI, meant to be extended (extending emacs isn't a hack: it's using emacs).
I find its configuration very nice — I don't actually use spacemacs regularly, but I miss how clean its package system tends to be over normal emacs configs.
And everyone should be a Lisp fan, since it's the best language we've managed to come up with yet.
> At that point it just wasn't worth the effort to me over using a more modern and straightforward editor.
I don't think there's any editor more modern than emacs; there's certainly none more powerful. More straightforward? Well, nano is probably the most straightforward, but I wouldn't want to use it regularly.
The file opener/finder ctrlp is kind of slow as well (there is a different search engine for it which is an order of a magnitude faster).
I really like the vim keybindings and just use ideaVim plugin for intellij which can do all the vim stuff i need and has the ide functionality on top. And it is faster as well (at least it can do relative line numbers without dying)
I honestly have no idea where this nonsense comes from.
Honestly the author just lacked the time and knowledge to go ahead and learn basic bash tools and utilize them.
This is one of the most annoying things about being in a node js project, whether you're just grepping or searching for a specific file it's a real pain point if you've forgotten to ignore it
On the topic about plugins, does anybody know of a plugin which allows me to give "names"/"tags" to files so that I can jump back to them with a shorter "name" instead of the full path?
https://github.com/VSCodeVim/Vim/blob/master/ROADMAP.md
Every "vim mode" plugin should have something like that
I don't think I'll ever be able to switch to a GUI editor unless I can navigate between that editor's splits and my tmux panes in the same way.