r/vim • • Oct 14 '19

SpaceVim: A Vimmer's Eval

https://medium.com/@JethroCao/spacevim-a-vimmers-eval-d2020118b517?sk=54d2f94d9cd95aeaa5feb223abea7d51
84 Upvotes

20 comments sorted by

55

u/[deleted] Oct 14 '19

I think that we can all agree on one thing.

The best thing about vim is that people can run vim differently than you and that's ok.

49

u/random_cynic Oct 14 '19

I'm sure many find this useful. However, as a regular vim user, I think this project is kind of misguided in its attempt to emulate Spacemacs. Emacs and Vi, although they are often compared against each other and fanatics from each camp fight each other viciously online, they are fundamentally different as to their editing philosophies. Emacs was designed to be a sophisticated text manipulation system (I wouldn't go as far as calling it as an OS) powered by a Lisp interpreter. It was created by Lisp hackers from TECO and was heavily customized by each to the point no two versions could be recognized as coming from a common source. Emacs is shipped in a very basic configuration with most of the functionalities provided by external Lisp packages and functions. It is expected that a new Emacs user will heavily customize Emacs to make it fit for their use after installing all necessary packages. A new user's .emacs file can and often starts with more than 150-200 lines. In theory you can implement any editing philosophy in emacs including Vim (as demonstrated by evil-mode). So for this kind of system, a project like Spacemacs can be very useful for those used to Vim like editing who don't have the necessary Lisp background to customize it themselves.

Vi, on the other hand, is different. It was designed to be a lightweight yet powerful text editor very much in line with the Unix philosophy of doing one thing well. Most of the core functionalities were included in basic installation and keybindings were carefully designed to allow maximum efficiency. It is often argued that these keybindings have their own separate language which any new vi user must grok. A new user can start with 5 lines of .vimrc and continue happily for years (I know I did). Later many other features were added with Vim. This doesn't mean that Vim is not programmable/customizable. That is, in fact, one of its main strengths. However, that customization is best achieved when they are consistent with and fits perfectly well with the existing command language and philosophy. Because Vim was designed with the Unix philosophy in mind, the makers ensured that it should be effortless to connect vim to external shell applications each of which are designed for a specific thing that can be combined in any way the user chooses to accomplish almost all conceivable text editing tasks. So for Vim, it pays to adhere to its core philosophy and make customizations that augment the core facilities instead of replacing them.

2

u/[deleted] Oct 29 '19

Boy, I don't know how many times I have read that stack overflow post. Still fresh, still enlightening. A true, timeless, gem.

https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

8

u/mayor123asdf Oct 14 '19

nice article

60

u/-romainl- The Patient Vimmer Oct 14 '19

Yeah, learn to configure SpaceVim because you don't have time to configure Vim.

46

u/calvinball-z Oct 14 '19

On one end of the spectrum there are code editors that come pre-packaged with a lot of common software development functionality; things like semantic autocompletion, git integration, fuzzy searching, to name just a few.

On the other end of the spectrum, you have Vim, with its incredible editor, ex commands, and infinite customization, but it is fairly spare in terms of easily-discoverable features right off the bat.

So, if you want to use Vim for all its incredible editing advantages, but also want all the functionality you'd find in something like Visual Studio Code, what is the correct middle ground?

From what I can tell, there are three options:

  1. Start from vanilla Vim and add the functionality as you see fit. If you're coming from something like VSCode, you'll immediately see the gaps in Vim and will start attempting to roll your own functionality via plugins and mappings and who knows what else. First, you'll get into the weeds of "vim-plug vs pathogen vs dein", followed by "YCM vs coc vs ncm2 vs deplete", and so on until infinity. The upside is that you will ultimately have an editor that is 100% customized to your own personal needs, the downside is that you just wasted an awful lot of time, and it's hard to say if you'll make up those losses in improved productivity.

  2. Use a pre-rolled version of Vim that is intended to somewhat standardize these choices for you and bridge the gap between "native Vim" and "comprehensive IDE". The upside is the plugin choices are made for you and you'll likely save time by not needing to set up the most commonly used extended features out of the fox. The downside is that there is a level of misdirection between your editor and core Vim, which will complicate customization.

  3. Use a source code editor like VSCode, and enhance it with a Vim plugin. The upside is the easily-discoverable functionality you expect is already there. The downside is you're no longer using native Vim, and every Vim plugin for IDEs is imperfect in some way. None of them truly mimic the native experience of using Vim's editor. Plus, the customization ability you know and love from Vim is gone, gone, gone.

With those three options laid out, what is the best option for this particular use-case?

Romain threw Dismissive Shade (his trademark) at option #2, and it received a lot of upvotes, but in my opinion that is a totally valid option for this situation. For users who want IDE-ish features in Vim (of which there are many, whether you like it or not), it makes sense for there to be a project that consolidates the best practices and standardizes them in a way that can give these users a head start. That is part of the beauty of Vim.

Do you have to use it that way? No. Is it the right choice for someone else, depending on their requirements? Possibly!

TL;DR a) There are a lot of ways to use Vim. b) Everyone has their own hopes and dreams. c) For one subset of the Vim-population, SpaceVim is the right choice for them. d) Romain is unable to consider the thoughts and feelings of anyone outside his own head; there is only Romain.

15

u/Jwkicklighter Oct 14 '19

Point d is why I rarely even pay attention to this sub anymore. It's pretty obnoxious.

3

u/Madermaker Oct 15 '19

I do think that this time he has a valid point. There is more value in learning how to configure vim, than some over engineered and bloated project.

4

u/habamax Oct 15 '19

TL;DR ... d) Romain is unable to consider the thoughts and feelings of anyone outside his own head; there is only Romain.

Well, his message was sarcastic indeed, but this... is just bad.

1

u/[deleted] Oct 15 '19

This is par for the course on this board. Expect Romain to shit up any thread that isn't bout using pure unadulterated vim.

-5

u/Travaches Oct 14 '19

The right vimmer mindset

-4

u/albasili Oct 14 '19

The Patient vimmer mindset!

7

u/habamax Oct 14 '19

I personally would go either for basic 10 lines vimrc with older vim or novimrc at all for default 8+ vim (it has defaults.vim I am ok with) instead of any other's set of configurations SpaceVim included.

Well, different strokes for different folks.

15

u/loopsdeer Oct 14 '19

Different keystrokes ehhhh

7

u/crashorbit Oct 14 '19

I think that I'd rather go back to just one line in my vimrc:

set nocompatible

13

u/eggnogeggnogeggnog :set makeprg=yes Oct 14 '19 edited Oct 14 '19

You can just have an empty vimrc and nocompatible will be set.

EDIT: My system vimrc also sets nocompatible.

4

u/[deleted] Oct 14 '19

Yep, I've never used vi (except the basic motion with less and man) and I know enough default commands to get around a fresh vim install. Pretty much of my config is niceties or for speed improvements. I think that's why I did not like spacevim (feels like trying to steer an oil tanker when you're used to a kayak (the task is to cross a placid lake)) .

2

u/[deleted] Oct 14 '19

I feel like whenever i would need a vim with more features ootb I'd just go for doom emacs. Vim is my ssh and quick edit tool. Everything should be configured with intent or you're just defeating the purpose.

2

u/ellipticcode0 Oct 14 '19

I suggest use empty Vimrc file and add little by little by yourself, after a while you will realize you did not need any plugin because you just programming your editor

1

u/dragopepper Oct 15 '19

I try spacevim and failed badly. I was already so used to it to "my perfect vimrc" that the prospected convinienc was not that worth to switch.

I think the personal vimrc has to be evolved with your skill set, with your work environment and also with your tooling. Every time when i am editing my rc file I also asking me, is this or that setting/plugins needed.

So normally you should have already the perfect vimrc right now for your actual workflow.