Neovim 0.5 is overpowering
crispgm.com
crispgm.com
Vim's editing language feels most powerful when I'm using its text objects: "ciw" means "change in word", "cis" means "change in sentence", and so on. But Vim's built-in text objects are not always a perfect match for the code you're editing. Suppose you want to change the first argument of a function, for example; there's no built-in "first-argument" text object. But Treesitter integration makes it easy to create text objects that understand the AST. Without much effort, users will be able to make mappings like `cia1` to "change in argument 1", and these mappings will work across all languages with Treesitter support.
Treesitter builds the AST, making it easier to create robust text objects. And it provides a unified interface for a bunch of different languages, meaning that I don't need to have 10 different plugins, one for each language, just to get access to text objects.
I'm actually kind of excited about tree-sitter - it's not a neovim feature, it's an independent project that can be used a lot of places. I think the effect will be similar to how LSP changed the landscape from "every editor does some parts of handling language X well, but the parts each editor does are different from each other" to "all the editors get this feature when the language server does", just for syntax highlighting and syntax aware edition.
With Vim you basically just tell it to map any sequence of inputs to any other sequence of inputs. If you know how to do something in Vim you can define a keybinding for it. And because Vim is 100% controllable via the keyboard you can bind anything to a shortcut.
Little confession: I have no idea what e.g. the difference between "nmap" and "nnoremap" is. But after years of randomly mixing them in hundreds of bindings without a noticeable difference it doesn't seem to matter. Just use map, nmap, imap and vmap, avoid duplicates and everything will be fine imho.
The default behavior is to recursively expand and apply your mappings and "noremap" disables this recursion. For example if you do something like
:map j k
:map q j
:noremap w j
q is expanded to k, but w is expanded to jI generally don't use counts. If I want to go down a few lines, I don't count the number of lines and use 4j or whatever, I instead use / to search for the exact place I want to move to. This feels more natural and preserves the jump-list, so I can ctrl-o back to where I was.
Same if I want to delete a few words. I don't count how many I want to delete and do 4daw, instead I do daw and press . until I've deleted everything I want gone.
And I make heavy use of text objects when available. If I want to move to the next function, I use the keybinding for that instead of searching or counting lines.
``` " Does: " For wrapped lines, does gj/gk " For large jumps, adds a spot on the jump list function! tj#jump_direction(letter) let jump_count = v:count
if jump_count == 0
call execute(printf('normal! g%s', a:letter))
return
endif
if jump_count > 5
call execute("normal! m'")
endif
call execute(printf('normal! %d%s', jump_count, a:letter))
endfunction
```and map j and k to this
Examples:
\\w -> will highlight all words after \\b -> all words before \\e -> ends of words after \\ge -> ends of words before \\fe -> all occurences of the char 'e' after \\Fe -> 'e' before \\se -> 'e' in both directions \\j -> lines after \\k -> lines before etc.
but can even use it with traditional search:
\\n -> will highlight all search-matches found by a previous "/" or "?" search after current pos. \\N -> will highlight all search-matches before.
mega useful.
The vim model is "action-object" (eg dw, delete word). A more natural, friendly and interactive model is the opposite, "object-action": first you select the text, your editor highlights the text, then you apply actions to the selection, one by one, and see what happens after each one. Because the text is highlighted beforehand and you see the effect of each action in real time, building chains of commands is much easier and friendly for novices. If you make a mistake, you see its effects and correct it immediately. In vim you have to build the command chain beforehand and calculate in your head what will happen. If you memorize the commands its fine, but if you don't, it's painful.
This "object-action" model is used by kakoune (https://kakoune.org/why-kakoune/why-kakoune.html), along with native multicursor support I have found it to be a great alternative after years of not being able to memorize vim commands. Documentation is scarcer at this point, though.
When I tried Kakoune for a few days, I found it difficult to adapt to the differences, but that's probably to be expected no matter what. One thing I particularly missed was g-v ("restore previous visual mode selection"), which I use constantly in Vim. There's a good chance it's doable, though, and I just didn't figure it out.
The description you gave of the actions one takes in editing makes sense: in most non-modal editors, you select the text you want to take actions on, then choose the action to take. But, I can do that in literally every modeless editor! That's the way essentially all of them work.
But when people write of "Vim as a text editing language" as many comments here do, the action -> object model -- again, at least for me -- fits the pattern. We say "I'm going to the store," not "store I'm going to," unless Yoda we are. And, most programming languages that aren't purely object-oriented tend to follow a rough pattern of "action(parameter)". So in editors like Sublime Text (or VSCode or BBEdit or...) I tend to do editing in an entirely visual way, Vim approaches editing in a more language-based way, and when you describe edits in language, "[verb] the [noun]" is pretty natural.
I say that I am cutting the wood. But I select it first before marking it and cutting it.
I noticed that I use the visual mode of vim a lot. With easy motion to highlight words or other object boundaries to quickly jump to.
I tried kakoune and liked it. But after 15y of (neo)vim it's hard to change. That plus how good You completeMe is for vim.
So it’s not clear whether being more comfortable with selecting an object and then performing an action on it is innately easier for humans, or just what we’ve been conditioned to from using word processors, spreadsheets, or even GUI based file explorers.
But if you look at command line usage, it’s the opposite. Every command first requires you to stare the command, and then the object to act on.
I first type cd and then the folder I want to change directory to, compared to selecting the folder and then hitting enter/CMD+O/double clicking ont he GUI.
But people who have used both the GUI and CMD line rarely ever find the order of operation to be a concern for them, so I suspect the object-verb verb-object difference in vim is just a matter of convenience.
So you’d say that it’s object first because you first get the wood and saw and then decide to saw the wood with it.
I could argue it’s verb first because you first GET the wood and saw.
I’m not saying that I’m right and you’re wrong. In fact, quite the opposite. My point is that I don’t think real life actions can be broken cleanly into object-verb or verb-object, in the first place.
"I need some WOOD. I think I'll GET some WOOD."
How we formulate our actions in our head/speech to describe them is mostly irrelevant here.
For an English speaker. There are many human languages that put the verb at the end of clauses. Japanese is one example.
(These are also English-specific justifications)
However, you could say the natural order of reading is reversed: The naive way to read (f . g . h) might be "first f, then g, then h", opposite the actual order of execution.
x & h & g & f
And in shell script, this is written echo x | h | g | f
This operator is sometimes called the pipeline operatorAnyway, here is some ghci session exemplifying the usage of the & operator
$ ghci
λ import Data.Function((&))
λ a f g h x = x & h & g & f
λ b f g h x = (f . g . h) x
λ c = f g h x = f (g (h x))
λ a (+ 1) (* 2) (+ 3) 1
9
λ b (+ 1) (* 2) (+ 3) 1
9
λ c (+ 1) (* 2) (+ 3) 1
9
It's unfortunate that this is named & in Haskell and not |>. And what's worse, it's not in the prelude.`import "flow" Flow` gives you (|>) = ($), (<|) = (&), (<.) = (.) and (.>) (by analogy). I slightly wish it were part of base - the symbols are much more intuitive, and I think that's important for increasing adoption - but I tend not to use it because it's non-standard. Most potential/plausible Haskell users, after all, haven't used Haskell at all, let alone extensively. Such people need to be taken seriously in decision making processes even though they almost necessarily have no voice.
I don't think the number of characters is at all relevant to the decision though: being non-surprising and understandable are far more important than using one vs two chars which in this case pull in both directions and I reckon the balance lies with sticking to the standard.
I don't think there's anything special about that mapping, whichever way around. I'm not inclined to think I'd perceive things or act any differently if my main way of describing things (English) had a different grammar - a rose would smell just as sweet.
I can see some value, especially for beginners, in 'highlight while object selecting, then act' (which you can do in vim with visual select and then action, e.g. instead of c2w do v2wc - or v2w -wait no that's not what I want-).
I do prefer it as it is though, probably just because I'm used to it, but I think of it as 'up to' rather than 'define the object', since it is always anchored (at least, without any plugins doing differently like is being discussed with Treesitter here, adding context awareness) by the cursor position. So I'm thinking 'change from here to..'. I suppose if one wants to think about 'object first' you could argue vim already is that anyway - you move to the object before typing any of the command.
For sure any user of RPN would agree that it makes more sense to type the operation after the object. Not sure how that translates to modal text editing though.
Do you mean that you think "word change" instead of "change word"? To me this sounds like you have been programming in Java-like languages for too long :)
object-action may be a more natural order in some languages. I use a language which permits both. So I think you're overstating how much of a deal it is. That said, Kakoune has controversial design choices in a couple of areas:
* no explicit select mode means not only you're selecting text all the time as you move your cursor (which can be annoying). More importantly, it means there are very few keys left on the keyboard for user defined commands. This comes up all the time on the forums whenever someone asks for a new function or an unused leader key. "Fewer modes" is not a virtue in itself, because modes have other benefits like taking the weight off keyboard.
* Shell as a scripting language. Really. It's completely awful for maintainability.
* I continue to argue that multi-cursors are a poor man's search&replace. It doesn't show off-screen matches by default, so you don't know if you're matching anything off-screen or not.
There are Kakoune features I like very much, for example improved integration with commandline utilities. You can more easily use them to process the text inside editor.Personally, I also struggle with a relatively high rate of accidental (or mis-registered) key presses, or being in the wrong mode, which means that even if I have high confidence in constructing the right command in my head, my confidence in the right command being executed is significantly lower, and direct, always-on feedback thus feels enormously helpful to me.
So, no, I spent couple of years struggling with non-modal editors, where I had that feeling all the time “I have no idea how to do it effectively in this $EDITOR, while I know five keypresses which would do it for me in vim.” Finally, I have liberated myself and switched back to vim.
> “Basically, the only ‘intuitive’ interface is the nipple. After that, it's all learned.”
The nipple is not intuitive for everyone.
One of our children struggled mightily with the nipple and we had a miserable two or three months of breastpumping and finger-feeding before he finally figured it out.
> There is no intuitive interface, not even the nipple. It's all learned.
My wife and I are both sort of gluttons for punishment if we're convinced something is the right path.
'name1',
'name2',
'name3',
to: 'name1': Enum.Name1,
'name2': Enum.Name2,
'name3': Enum.Name3,
by the time I figured out a sequence of keyboard commands I'm pretty sure I could have multicursored it pretty easily, go to name1, create 2 cursors, select word & copy, start typing : Enum., paste selected word, select word, capitalize, type ,In vim it was something like qdyi'f,i: Enum.<Esc>pbvlUq and then repeat macro.
I found it very slow to even recall.
For some reason the multicursor solution feels faster to me most times.
You don't have to learn command. You simply need to know how to edit with VIM.
And multi cursors only work for tabular data. The macro recordings can work for the entire document where you call a macro on a word/regex you searched for, for example.
There are several plugins which allow for more complex use of multiple cursors.
:g/<regex>/<command>
is the general form for [g]rabbing lines that match a regex and applying a command over them. You can also chain the command:
:g/<regex1>/g/<regex2>/<command>
I'll admit this isn't exactly something you intuit as easily as a drop-down menu, but (neo)vim does have tools for all these things out of the box.
This was a bigger problem when Apple decided to go with those butterfly keys.
```
Vjj:s/\v'(.*)',/'\1': Enum.\u\1,/
```This is all just muscle memory. It seems impossible until you get used to it, and then it's the most natural thing in the world.
I know I’ve read that part of the documentation before, but probably not for over five years. In cases where I’ve wanted something like that, I’ve tended to reach for macros, visual block editing, and s/\=. A few days ago I did a somewhat more complicated one that s/\U wouldn’t be sufficient for:
:'<,'>s/.*/\=" pub const ".substitute(toupper(submatch(0)), "[^A-Z0-9]\+", "_", "g").": &'static str = \"".submatch(0)."\";"I also like using
:g/^/norm $normal_commands
to apply anonymous macros across all lines. It works with visual selections too: :'<,'>g/^/norm $normal_commands
And naturally you can replace the ^ with any regex to selectively apply the macro to only lines that match!Vi's not always about finding the most efficient way to do something, but having a composable language to do tricks like these comfortably builds up into your own dialect over time.
After that you can just select it again in visual mode and g Ctrl-A to get the right numbers.
If anything the g Ctrl-A part makes Vim way better than most multicursor editors.
Though I did make a mistake, if you selected everything it'd catch the name numbers too, so you'd have to go into visual block mode and only select the enum parts, then do g Ctrl-A.
That said the numbers probably weren't supposed to be taken seriously now that I think about it.
I saw a colleague doing the same thing (turn column of #defines into structs in an array) with multiple cursors in an IDE, took him much longer.
I paused to take a drag from my smoke while doing that.
I think you meant just vU, as you were only capitalising the letter under the cursor.
You can actually also achieve this without entering visual mode: gU{motion} changes to uppercase, so gUl uppercases the letter under the cursor.
Muscle memory is a marvellous thing.
I never became fully fluent, but I also didn't try too hard over the "don't repeat commands" thing. And I got lazy after about a year (but also used other editors a lot more, due to team members using them and such) and over time lost the ability. Some day perhaps I'll make a point to learn again, but for now I mostly use VSCode without vim mode...
It's frustrating to see. CMD-D in VSCode does 95% of what's needed, with no mental burden.
But hey, you can't "brag" that you "know VIM" if you use VSCode...
Right, there is mental overhead to calculate moves but often times you can extract out patterns into intuitive key mappings once you've solved the problem once.
For example, this is taken my vimrc:
nnoremap <silent> s* :let @/='\<'.expand('<cword>').'\>'<CR>cgn
xnoremap <silent> s* "sy:let @/=@s<CR>cgn
The basic idea here is I can either move the cursor on top of a word or select some text, hit s*, type what I want to change that text to and then hit dot (.) as many times as I want to repeat the change to the next match. It's like being able to use multiple cursors except without needing multiple cursors and I also get to see the result applied once before I start applying it to multiple things. It's also possible to skip matches using existing Vim mappings (n).I use the above all the time to make changes in spots where I would have used multiple cursors with VSCode.
Kind of wild: in taking apart your command, I learned three things about Vim that I didn’t know, each one of which is massively useful. And I use it every day!
Sure thing, if you can improve it let me know.
Here's an even wilder thing. I set those s* mappings up about 2 weeks after using Vim and I still don't know how they work in perfect detail but I was able to find them by Googling. There's definitely a stigma that you need to be some crazy wizard to use Vim but with a bit of repetitive learning and Google you can get pretty far.
Here's a link to my vimrc around a few mappings associated to finding / replacing and multi-cursor-like things: https://github.com/nickjj/dotfiles/blob/085c4ac827290bc7aeea...
And sorry I say insane, but not knowing the language, your macro looks absolutely absurd and as obscure as a sample of brainf*ck.
I refuse to learn such a complicated language just to create a macro that replaces cmd-d and cmd-z, just so I can brag that I use Vim.
Going from that to actual syntax parsing is a dream come true.
I look forward to all of this
I guess fromstart would work as well, but is probably best manually run like you do so a very large file doesn't bring the system to a halt.
:noremap <silent> <Space> :silent noh <Bar>echo<cr>:syn sync fromstart<cr>
This recalculates syntax highlighting as well as removes highlighting on search results/etc.Basically, whenever stuff "looks weird", just mash space in normal mode and it fixes it. The fact that I have this bound to something like space should tell you how often I end up using it. :)
Sounds like treesitter will have more flexibility, but for now the vim-angry plugin does what I need it to :-)
In an expression such as (foo, ba|r, baz), where | is the cursor, it does the following:
via - (foo, |bar|, baz)
vaa - (foo|, bar|, baz)
vaA - (foo, |bar, |baz)
I would actually pay (although relatively small amount) for better programming text objects. It would feel so much more natural than the currently burned in muscle memory workarounds...
I also don't like how there looks to be an upcoming split in the plugin community when Vimscript 9 releases and the neovim community will ignore it while plugin authors in the vim camp (e.g tpope) may start moving their plugins over to it.
That said, the built-in LSP for nvim is very good thing and I plan to migrate away from the node-dependent coc.nvim once nvim 0.5 releases.
Vim has a ton of Vimscript plugins but I wonder how long it will take the Neovim community to replicate most of their functionality in Lua. I'd guess that not that long.
I have to imagine it would be simpler in other languages. Vimscript is hard.
If vim had a more usable scripting language it would have easily surpassed emacs in plugins and more importantly, since plugins would have been more popular, vim would have been developed in a way to make it more extensible and nvim wouldn’t even be needed.
I think emacs having more plugins is a consequence of its design and philosophy, not the extension language itself. After all, emacs lisp is not the best language in the world and only a small group really knows it beyond the basics.
Emacs-lisp is a Lisp. It may not be the best of Lisps, but even a bad Lisp can be far more powerful than many other non-lispy languages. To understand what makes Emacs so awesome, one has to understand the philosophy of Lisp. Emacs Lisp is not just a text editor, IDE, email client, project management tool, scientific calculator, etc.
Emacs, first and foremost is a Lisp environment. Definitely not the most ideal, but certainly the best one we have today.
> I think emacs having more plugins is a consequence of its design and philosophy, not the extension language itself
I believe, Emacs held the crown of "the most malleable" tool for over forty years, specifically because it builds on top of Lisp.
Number of plugins is not an indicator. They also have to "play nicely" with each other. I just checked - I pull over four hundred Emacs packages in my config, including built-ins and dependency libs. I just cannot imagine any other IDE or text editor with 400 plugins installed. That's just not possible.
Early Emacs and the modern GNU/Emacs I think, are two distinct worlds.
I believe Lisp has shaped Emacs into its modern form. I just can't imagine the possibility of building something like Org-mode, with the same level of extensibility and flexibility in any other language that is not a Lisp.
I bet if you ask any serious Emacsen - authors and maintainers of Magit, CIDER, or any other serious Emacs package if they could replicate their work, for example, in Python. I have no doubts, they'd definitely say: "that's nearly impossible"
Some people like Ferrari. For some - the utilitarian value of it, is minimal. They'd rather have "a bucket of bolts and nuts" instead. They can't go camping in a Ferrari. They can't take their bullmastiff to a vet in it. They can't help a friend to move furniture.
Emacs is that - it's not akin to a shiny, expensive but not very useful car. It's like a transformer - you can build a pickup truck, a camper, an ambulance, or a race car.
But some people like Ferrari. And that's totally fine.
Having never written a line of Lua in my life, on the other hand, I was able to pick it up in exponentially less time than the small bit of VimScript that I "know". Lua is not a fantastic language, but it is infinitely better than VimScript.
Now, you can freely dream about the perfect extension language for UNIX, or vi, or TeX, or emacs, but it won't make any difference because nobody will move from something that works to an unproven extension language just because some people (usually the minority) feel that it is a more comfortable language for them.
Lua ia an extremely powerful and popular extension language. It probably has at least 10x the users that Vimscript has.
And people willingly choose Lua. Barely anyone chooses Vimscript, they're generally forced to use it.
If anything, Vimscript is the <<unproven>> extension language. It's in Vim because Bram made it the Vim language, but it was never voted on or designed. Vimscript will most likely die with Vim, because I'm quite convinced that outside of trolling attempts, no one will adopt it for another app ;-)
Which is just fine! Vimscript was created to create simple vim scripts, not to build full programs.
And if you need to do more than Vimscript can do, Vim already provides this: it has native bindings to Lua, among other languages. If Lua was such in demand to write vim scripts, at this point it should have taken over VimScript as the main extension language, but it hasn't, and I guess that unless something huge happens in the community, it won't.
Lua sucks, too, and it's hardly mainstream.
somehow being part of the ~50 year lineage of vi editors and scripting was fun to think about
How many decades do we continue to use, support and maintain a terrible DSL like vimscript? I personally don't want to be using vimscript in 2030.
It's time to move on. Lua is a solid choice
I think you mean "vimscript plugins are better for plugin adoption because they work with both vim and neovim".
From the language-design, performance, documentation, robustness/general codebase quality, and total number of users perspectives, Lua is overwhelmingly better than vimscript.
> I cannot fathom why people would want to do that considering that there is nothing that init.vim cannot already do
Ahh, yes, the Turing-equivalence fallacy: "technology A is theoretically capable of doing everything that B does, therefore they're equivalent". Brainfuck and Python are Turing-equivalent, and yet nobody would seriously argue that they're interchangeable.
Design matters.
> Ahh, yes, the Turing-equivalence fallacy: "technology A is theoretically capable of doing everything that B does, therefore they're equivalent".
Language design is not the full picture. init.lua is essentially a thinly-veiled init.vim with lua syntax. You will have to learn init.vim either way. It is extra work to do something in init.lua, and in using it you remove any chances of it ever working with an installation of vim (e.g. vim still has the best GUI options out there).
Even if ahead of Vimscript; from the language-design, performance, documentation and total number of users perspectives Lua sucks very very much.
Honestly Vimscript 9 always felt like a serious case of "not invented here". Bram could have easily chosen one of many existing languages, but instead decided to take Vimscript and make it even more bizarre (this was even more so the case at first as IIRC block delimiters for example were really odd).
Setting that aside, you could also argue that people moving their Vimscript plugins over to Vimscript 9 is a problem on their end because it makes the plugins incompatible with NeoVim. In other words, the argument is basically silly.
I even contributed some small patches to a couple of vim plugins which meant writing and debugging vimscript, I hated every second of it.
I'm not a huge fan of Lua either mind you, but I'll take it any day of the week over vimscript.
Apart from that, Lua was explicitly designed to be embedded. Python is designed as a scripting language that can bind to C code, and embedding seems to be an afterthought.
If you liked emacs-lisp, perhaps you should try Fennel. It's a tiny Lisp that compiles to Lua with zero overhead.
It's pretty dope.
The transition to lua can't come soon enough, imho. The biggest downside to vim is vimscript. Lua is a delightful little language and the sooner it replaces vimscript the better.
vim script is too limited and there are no other options, really.
Python plugins are a hassle.
There's API differences between vim8 and neovim that make it a pain to do certain tasks on both (UI manipulation or anything with asynchronous work). Supporting both in the same plugin is annoying. The split is already there and it's only going to get worse, so might as well go with a language that doesn't suck to write. I think upstream vim is the one needing to catch up. Vimscript sucks to write and maintain.
But, getting into optimal setup in neovim/vim involves lot of configuration. Here is mine if you want to refer:
https://github.com/varbhat/dotfiles/tree/main/dot_config/nvi...
1. First you start numbering with 1.
2. Then you start numbering with 0.
3. You provide links for all but the first element in the list, which, combined with my first 2 points, results in a juxtaposition of "2" and "0", suggesting to my subconscious that I missed something.
Well done.
FireNvim [1] is a browser plugin which embeds a Neovim editor window in HTML textareas
With that said, you can build things quite nicely with it. For example, I have a custom linter setup, custom loclist/quickfix list formatting and populating from LSP data, and a bunch of other things; all using the foundational work coming in NeoVim 0.5.
If anybody is curious, you can find my NeoVim configuration here: https://gitlab.com/yorickpeterse/dotfiles/-/tree/master/dotf...
p.s. In case anybody wonders "why Lua?", for me this mostly comes down to this: I hate Lua, but I hate Vimscript even more.
I actually was surprised to see the state of the LSP docs in general. Maybe I was missing it, but all the docs I could find only had C# examples of the various objects. I was surprised I couldn't find an exhaustive list of the JSON documents and JSON-RPC endpoints which make up the standard.
- 34 lines to set up plugin manager/install plugins
- 43 for keybinds
- 35 for documentation
- 50 for autocompletion
- 20 for customizing one language server for plugin development (sumneko)
It adds up for sure, and neovim/vim/emacs are not ever likely going to be as plug & play as vscode/intellij, but I would argue the target user for vim/neovim/emacs is someone who wants more customization, which is almost always going to mean the configuration is more verbose.
If you have concrete suggestions on cutting down this config in particular, you can file an issue/PR. The main reason I created this, was because we (core neovim team) get a lot of "I just want something that works" type feedback (which to many includes autocompletion and default keybinds, which are almost 1/3 of the config)
Neovim has already integrated many of the "obvious defaults" (see :help nvim-defaults), but if you're a user and feel that something is missed you should file an issue.
I personally don't mind that the defaults may not be what I'd like, as once they are set, I spend very little time modifying my system configuration. I realize this can be a barrier to new users though.
I haven't found this to be true. I've basically copied the configs from READMEs and have everything working.
Honestly the thing I like best about vim are the keybindings, and while many other editors try to reproduce them, they rarely get it right. The only one I’ve found that comes close enough is vs code and it doesn’t search properly (case insensitive) and it uses a sane regex language instead of whatever regex language vim uses.
I specifically dislike the vim philosophy that defaults should be insane and the user should have to configure things to their liking with all of the expertise that entails. VS code does a much better job in this regard (though it has its own quirks).
I think emacs is more likely to have breaking changes, but I haven't used it a terrible amount, so I can't really say.
Matter of fact - stuff in Emacs breaks all the time. Frankly, Emacs simply defies any logic - sometimes you feel it shouldn't work at all, yet it does.
You see, when talking about differences of configuring Emacs and any other text editor or IDE, one has to understand - there's really no "configuration" in common sense. Emacs is a Lisp environment where you run your programs. You can download, import, and use other programs. Very often those programs "talk" to each other. Sometimes (of course), the line of communication breaks, and then you have to step in and patch them up so they can continue working together.
That's the biggest headache and confusion for beginners. They shy away from learning Emacs Lisp, and they think they can focus on learning Emacs fundamentals by using some "minimal configuration".
But only after understanding the basics of Lisp - structural editing, evaluating s-expressions, macro-expansion, etc., one could appreciate the enormous capabilities of Emacs. And when something breaks, it's quite simple to spot the problem and put a workaround.
Now, some off-topic musings:
I switched to Emacs from vi in the 80's, and I put up with it for the many powerful packages it has. Lisp as a configuration language has served Emacs well for decades, but I've always been aware that it narrows the number of contributors to those that are comfortable with Lisp. Progress towards modernizing the Emacs extension language has been slow...and it will still be a Lisp like language (Scheme).
I'm rooting for Neovim and I'd like to see a project like this for Emacs that would modernize it's UI, UX and underlying extension language. This will likely never happen while I'm still programming. Imagine the difficulty of recreating just the org-mode package!
No affiliation and haven’t even used it - but it seems to have legs.
If you want to learn (Neo)Vim and don't mind a dose of hyperactive video learning, I recommend watching ThePrimeagen his youtube videos. I've been using Vim for years, but still learned new things over there: https://www.youtube.com/c/ThePrimeagen/videos?view=0&sort=da
Oh, also: I kinda instigated this thing, sorry TJ: https://clips.twitch.tv/PrettyAgreeableMagePanicVis-4IhDSOhr...
As a very casual Emacs user who never got excited enough for the "self-documenting and programmable editor" idea, VIM gets more appealing by the day for me. I am also using Spacemacs for a year or so and it's definitely better than normal Emacs. Haven't tried Doom Emacs and I doubt that I will, regardless of a lot of positive feedback.
I mean, Emacs is alright but I am just not in the club of the people who'll use 25% of their workday chasing an Elisp error and maybe fix a plugin in the process. Always hated the heavy IDEs like Eclipse and IDEA so this led me to Emacs but I still prefer stuff to come semi-configured out of the box. I know that NeoVIM will require some love for that but I'm prepared to do it because it looks like much less work than Emacs.
I'll try Emacs' `native-comp` branch for supposed quicker Elisp operation but I don't have much hope that it will help my grievances.
Sadly, my 19 years of casual Emacs usage are coming to an end soon.
I'm looking forward to trying NeoVIM.
For example, I don't want an extension to take care of git for me (magit), it's easier for me to just alt tab or bring a terminal in vim and do it there.
I find Emacs users prefer to do everything in the editor, while I'd rather have one tool do one job. Of course what job exactly should a tool do is subjective, and varies from user to user :)
Vim surely tales some "learning tax", new users are encouraged not to add every plugin they can find, instead, try to do things "the vim way". But that is also subjective.
My experience with Vim was just make it more friendly first (installing things like NerdTREE and making it behave more like other editors I was used to), then slowly learn how to do what those plugins do with just vanilla vim, and see if I can either remove them or replace them with a more "barebones" and "vim-compatible" plugin.
For example, I now use vim-dirvish which is like a better `netrw` (Vim's default file browser).
I am biased of course, but I think Vim/Neovim is just great, and always worth checking out.
Yes, experienced Emacs users do write some emacs-lisp all the time. But despite the popular belief, it's not about chasing and fixing Elisp errors.
I, for example, write emacs-lisp functions just because I can. Here are some typical examples:
- I have a GitHub link to an issue or a pull-request, I want to download the description of it and make it a proper Org-mode link.
- I want to automatically make a git branch name based on a ticket number (it retrieves the title and shortens it up)
- I want to turn a piece of EDN to JSON and vice-versa
- I want to diff two last pieces I copied into clipboard (side-by-side or otherwise)
- I want to grab a specific value for a Heroku app (based on the context I'm in)
And much more. Of course, one can use any scripting language to do all that, but it won't be integrated with your IDE.
But I get Elisp warnings and errors every day. And mind you, I did abandon my monstrous init file a year ago and just yielded to Spacemacs with very minimal changes like font, cursor customization et. al. -- basically just 7-8 of these. It has a ton of stuff in it though. Spacemacs isn't a lightweight Emacs. Being on macOS might be another thing, too, I don't know.
Even with that, there is trouble on a regular basis. I would think an all-in-one package deal would have better debugging and proper care but oh well. :(
Again, not here to degrade Emacs itself, I am only here to share that the amount of effort I am willing to invest to maintain my local installation is apparently not enough to have a well-running editor, and that I will be giving up on it because of that.
No, it's not. Many people make a mistake, thinking that Doom, Prelude, or Spacemacs are ready-to-use, out-of-the-box solutions. They are more like collections of recipes. You have to judiciously remove things. You need to know how to use the built-in profiler.
> and that I will be giving up on it because of that
And that's okay. I myself abandoned Emacs and moved back to other things several times, until I finally learned how to make it work for me.
Maybe I'm weird, but stock GNU Emacs as out of the box is perfect for me. Tried configuring it with various bells-and-whistles over the years, but I always come back to stock Emacs.
(And no, despite using Emacs for 25 years I don't write elisp.)
Other than that, there's 3 real showstoppers for me:
- the obsession with Lua (I personally don't like Lua much, and even to configure treesitter I have to inject little snippets of lua code into my .vimrc). You've got people even trying to rewrite their entire .vimrc in lua, which results in an enormously verbose mess if you ask me. Lua is also what drives the vim and neovim communities further apart.
- they removed gvim (which is what I use in most cases). There is no comparable third party GUI like gvim available. They're all either abandoned, unstable or simply very different with lots of bling and gimmicks.
- neovim feels less stable than vim. It just crashed on me a few minutes ago when I was trying to configure treesitter. I copy pasted the necessary snippet in my .vimrc and neovim crashes until I take it out. In the 20 years I use vim, I don't think I've ever had it crash on me. Neovim seems more of a "move fast & break things" development model, but I write code for a living so I prefer the rock solid stability of vim.
So I'll stay firmly in the vim camp. I appreciate neovim for what it did (kickstart the vim development, which was stagnating at a certain point) but I wished they had re-merged soon after that initial goal was met. Now the communities have split and are drifting ever farther apart. Soon with vimscript9 plugins on one side and lua plugins on the other, the spaghetti will be even harder to untangle.
I'm working on a project that might allow at least 90% or higher compat here: https://github.com/tjdevries/vim9jit
Of course, vim9script isn't complete yet, so the spec isn't all the way done, but it may someday be possible to run them in neovim.
Additionally, if someone actually just wanted to port all the C code to run or has some other way to make vim9script run, neovim is not opposed to making that happen.
I have a workflow. It's hard for me to adopt new things into my worflow because my workflow works so well. I finally made the switch to NeoVim just over a year ago because I wanted to see what the fuss was about. I have to say, it's now firmly entrenched in my workflow. It's to the point where I'd be annoyed if I had to go back.
The one sticky point about your post that I wanted to highlight:
>I personally don't like Lua much
I can say that almost anything is better than VimScript... I hate every moment I have to mess around with it. The hardest part is, I don't use it for anything else so every time I dive in, I have to remember how it works. At least Lua is a multipurpose language and documentation/help are plentiful.
But, I get that the whole intellisense, popup windows, bling... those things are not for everyone. If they don't enhance your workflow, then you're never going to desire them.
I’ve been using only stable Vim and Neovim and have not had either of them crash on me that I can remember.
The problem here is that people use treesitter to add more colours to distinguish more types of tokens. For me this is too much and the colours lose their meaning. I recently switched to a colour scheme that only changes the colours for strings, numbers and comments. Treesitter allowed be to add very targeted minimal highlighting. For example, I know highlight the first line of a function definition. This makes it very easy to see function scopes.
We don't really need more highlighting, but meaningful highlighting. With treesitter you can do both.
I'm not sure I understand what you're missing from neovim-qt?
https://github.com/equalsraf/neovim-qt
I suppose maybe we have diffuse cases - but I'm fairly certain I'm running qt neovim, and not nvim in a terminal - and I'm not aware of any issues?
Turns out now all that's needed for Ubuntu is sudo apt install neovim-qt. Thank you for prompting me to look at this again.
However, on running it, the window seemed very wide, so one of the first things I tried was `:set columns=80` — and nothing happened. Checking :h 'co`, it looks like it's supposed to work.
Ah, and it seems the (released version of) QT gui doesn't support ligature fonts yet. The FiraCode website says it works with NeoVim-gtk: https://github.com/tonsky/FiraCode#user-content-editor-compa...
Maybe I'll give that another go ...
The sheer complexity of going from vi, to vim (and plethora of plugins), to vim + LSP is simply insane to me. It does feel like we've all lost our minds.
An LSP is a program that parses and internalizes a project written in a particular language and serves information, diagnostics, and edits, to a generic editor. The protocol is broad enough to serve all the "smart" language-aware functions provided by full-blown IDEs.
This allows one LSP to be used in ... many different editors. The advantage to the users is obvious: if go has one standard LSP, people who use neovim, vscode, vim, emacs etc all have an interest in maintaining that one LSP and will contribute to it in various ways.
Let me give you a few reasons why not only is it fine that it's a separate process, but you want it to be in a separate process.
1. LSPs will be better written if they themselves are written using runtime and the language that they serve.
2. LSPs can potentially hold a lot of memory. Sometimes you need to manage them, and potentially even cut them off, for example if you have a few very large java projects that you're switching between. Generally if they are separate processes, you can just kill them without affecting the editor. Additionally this also means the editor itself doesn't risk a memory leak caused by a rouge LSP server.
3. Subprocess management is not that hard. The editors can do it. Neovim does it pretty well in my experience. The presenter acts as if the server is some totally separate thing that you have to manage yourself. In reality the language server process is launched, managed, and owned by the editor, and often just communicates over stdin and stdout, not that there's anything wrong with ports.
Using multiple processes to distribute work among programs that do one thing well has always been the UNIX way.
So I looked at the various memory hogs on the linux installation and could see that every Vim invocation had a node process hanging off of it as a child, that's the Coc code completion/language server client running. (Action => only trigger coc for certain filetypes)
And I had vscodium running too, and it had its own long lived subprocesses hanging off of it, for language support, etc.
A lot of apps are like this - humongous clusters of processes (firefox, teams, vscode, and also Vim with the right plugins...)
(I'm tjdevries)
Happy to answer any nvim questions while I'm here.
(I hope you are in on the meme, otherwise I am sorry for posting our "inside joke" response)
Consistent UI for users and great UI APIs for plugin devs would be a nice perk.
I have a couple of nvim plugins in flight and building the UI has been the hardest part so far. (A couple of examples: https://imgur.com/a/RZV2eYJ )
We want to create interfaces to make this simpler for people to use.
One example is here: https://github.com/mjlbach/neovim-ui which is just in a separate repo to make it easier to work on rather than one huge PR.
This is an extension of the ideas that I started in https://github.com/nvim-lua/popup.nvim and a few other places.
The idea would to be to create interfaces that users, plugins and/or GUIs could override to provide a unified experience while still being customizable for users.
(and as a self plug, I think we have a lot of interesting ideas in telescope.nvim about UI that could be upstreamed over time)
Vimscript sucks, using Lua will make it easier for people to contribute I think.
It's not a super-popular language and makes some things harder than necessary. Base 1 arrays means you are almost certain to bake in bugs accidentally. Meta tables are even worse though. They result in many subtly different object systems. Maybe that's not as bad in a unified project, but it's the path to a fractured ecosystem. The builtin string library is very barebones which isn't a great place to be in a text editor. Finally, the "regex" match function is hyper limited.
I'd argue that either Python or JavaScript would be better.
The OOP through meta tables is bit more interesting discussion. Meta tables also enable other dispatching mechanisms, if you want to get fancy. In my case I find it makes me reach for OOP less often, which in turn reduces code complexity. I agree that it's frustrating when different libs are each using own OOP implementation. It doesn't matter too much because all those implementations are light and don't pollute the code base. Fractured ecosystem is both good and bad thing.
The string handling is kind of a pain point, especially if you are spoiled by Python. I have no idea how Neovim + Lua handle Unicode text?
Python is huge & complex language, as well as 10x slower than Lua. JS has more rough edges due to historical baggage, also a fast VM would be much much harder to integrate than Lua. I'd say they would both be worse choices for maintainability and Neovim usability.
JS has better string builtins than Python IMO.
QuickJS is made for embedding and has similar performance to Lua (slightly slower). I don't think you'd want to embed a large VM like v8 anyway.
I say it's curious because I've always been surprised that Neo/vim is mainly celebrated as "that modal editor". Whereas for me I celebrate it as the most feature-packed and lightweight terminal editor. Neo/vim is sooo much more than merely its modal editing.
With this new release of Neovim maybe there's renewed interest in what Vim is beyond the stereotypes. I wrote a plugin a few years ago that intelligently disables Neo/vim's NORMAL mode [1]. It always seemed such an obvious idea when the majority of editors have their own plugins to intelligently enable Vim-style modality.
Easy mode, aka 'evim': https://vonheikemen.github.io/devlog/tools/vim-easy-mode/
For example, name me another editor where you can jump in less then a second to any letter of the text ? You always have to click. Contrary to that, editing in vim is like programming since you have editing DSL. All editors provide shortcuts to just some of the editing capabilities (duplicate/delete line, next word, prev word etc.) but not ALL of the imaginable and unimaginable scenarios like vim does, in a way that is instantly programmable to your liking without messing with configuration.
I'm curious about why, though? What parts of vi(m) do you get to keep that this makes sense for you?
Being able to move to a specific part of a file quickly, edit a specific part of a file quickly, repeat that edit on a different part of the file (with .), write out an editing action as pain text and save that as a macro... The list goes on.
The only thing I don't like about vim (normal mode) is that the keybinds and context are hardcoded. Sure, you can remap them, but that only gets you so far.
jkl; would make more sense, that's the only oddity.
If you search for "oldest computer keyboards" in your favorite image search utility, you'll notice that many keyboards there don't have arrows at all. I did not find any keyboards with the arrows on the left side, although it wouldn't surprise me.
They should be respecting their directions, like the arrow keys do. Think UHJK or IJKL. Plus they would need nubs or similar to make them stand out a bit.
At least for me.
I'm was actuall missing short and clear guide. It's actually easy. What I've struggled with are the ERROR and WARNING markers, they use default colors which doesn't match well the used theme (peachbuff).
Change it if required:
hi LspDiagnosticsVirtualTextError ctermfg=Red ctermbg=White
hi LspDiagnosticsVirtualTextWarning ctermfg=DarkYellow ctermbg=White
I recommend that all your projects setup use a specific C or C++ Version. Why? Because GCC 11 uses by default C++17 but CLANG 11 uses C++14 by default. e.g. with Meson: project('project_name', 'cpp', version : '0.99', default_options : ['cpp_std=c++17'])And navigating code is significantly fatser in an IDE than in Vim. This includes things like juping to definitions and implementations, finding call sites, fuzzy search on symbols (not text) and dozens and dozens of other things.
As someone who has to use IntelliJ when doing Kotlin/Java, I miss all the wonderful things that my Vim can do. Sure IntelliJ even lets me load my init.vim for maximum compatibility... and it's simply not that great.
Lastly, almost all modern editors suck down a ton of memory... whether it's Electron or JVM based. Sublime is an exception here.
You can speak that language in Vscode... kiiiiind of, just like you can speak evil to emacs. But these are dialects, vim is the real deal.
Neovim with a ton of plugins offers a lot of what an IDE brings to the table, and lets your fingers speak fluent vim at the same time.
So when you're randomly shelled in to some stock install that's got vi (realistically this is mostly vim but it doesn't have to be) you can keep speaking your native language for whatever text editing you might happen to do.
Ah and vim is text editor, not really an ide.
The difference for me, is that I only have what I want.
My requirements for an editor are:
1) Fast <- Most important 2) Autocomplete 3) Fuzzy finding 4) Prettier/eslint or equivalent
If I need to jump on a server, I do not suddenly forget how to use Vim without my .vimrc.
What I stayed for, is how much closer to the "metal" it makes me feel. I started programming in IntelliJ, but using that I always wondered what was going on in the background. If I click on the green "play" icon, what happens? That magic is gone when using something like Vim without plugins. Configuring it to do everything you ever need yourself, however, can be quite a pain. So I gradually added plugins, to delegate the nitty gritty config work to plugin creators, making sure I understand what those plugins are actually doing, in order to not get back to a "I have no clue what my editor does" situation.
> Vscode or other powerful IDEs do the work much better.
The thing about Neovim is that this quote is becoming less true by the minute. Also, nvim can do some things that I don't think are possible in other editors. Have you tried embedding IntelliJ in your browser? :)
vim's "killer feature" is its text editing language and modality. But plenty of other editors and IDEs offer vim emulation to varying degrees of success. So this can't be the reason to use (neo)vim-the-binary as my editor over, e.g., VSCode.
So for me the real advantage of vim is in its flexibility. I can make vim into whatever I want depending on the context. Because of this, I'm able to use the same vim in many different contexts, instead of having different tools for different tasks. Ironically, this is kind of like the emacs culture of doing everything inside of emacs.
For example, vim is my code editor, of course. But I also have a keybinding to pop up my wiki and immediately start editing a note in vim. I have another keybinding I use when I'm writing a long piece of text in a textbox (like now) -- the binding drops me into vim, I write my text, and when I exit the contents of the buffer are immediately copied to the clipboard for pasting into the textbox. In each of these contexts, I have access to the same familiar environment with all of my configuration, keybindings, etc.
I could probably wrangle VSCode into doing each of these things, but it would be clunky. Vim owes much of its flexibility to its lightweight terminal interface. I wouldn't want to open VSCode every time I want to write a quick note, for instance.
The real benefit of vim vs any editor is modality and there is AFAIK nothing similar in any editor even with emulators. Editing/moving over text is just way faster with vim then any other editor (not just slightly faster, light years faster). I use vscode now because vim requires A LOT of setup and even when automated its pain in the ass. VScode and its plugin sync on the other hand makes it very fast to install anywhere with your config and keys so it compensate for slower editing to me since I need to have my editor EVERYWHERE (literary hundreds of computers).
Text? Yes. Code? No. Since editing moving code is a subset of refactoring, and Vim has no knowledge about code.
"varying degrees of success" is rather short of "sufficiently to not cause problems"; in my experience they're only good enough to get into the uncanny valley of "will this work" hesitation before every keystroke outside the most common.
Better to have specialised tools for whatever they are good at than a tool that's isn't good at any, and you have to spend time cmolding it to be a pale imitation of specialised tools.
> I wouldn't want to open VSCode every time I want to write a quick note, for instance.
Why would you open VSCode? You open a note-taking app.
Better how?
As much as I respect VSC and IDEA authors - they are often 'too much' and too heavy. IDEA (and its children like Goland) in particular.
Also using IDEs vs text editors with plugins is a matter of preference (and flamewar) and I disagree with your last statement.
If I get on a linux machine other than my workstation, I'll generally not install any plugins and still be able to get the job done without getting frustrated.
Here's a list of more advanced functionality built into Intellij that would be difficult to replicate:
- Bullet-proof navigation and advanced refactoring that works every time across a wide variety of languages.
- Database integration: syntax highlighting for SQL code in strings, runnable sql, database introspection
- Debugging: consistency and polish across languages, not relying on external tools that might not be installed, visual debugger
Text-editors struggle with the "integrated" aspect of an IDE. It's not terribly difficult to coerce text editors to perform well for a single language. It's much harder to integrate plugins and provide a consistent experience.
There's good reasons to use text editors (learn how it all works, extreme customization, magit, lightweight) but there's many development tasks Intellij is just better at.
> Text-editors struggle with the "integrated" aspect of an IDE.
Neovim integrates a lot better with my terminal heavy workflows than IntelliJ does.
I've always thought this is a very silly reason to use vim, when almost any text editor can remotely access files via ssh, and FUSE tools like sshfs exist.
I use vim extensively as both an IDE and config file editor, but almost never actually run it remotely on servers. I would rather not lose my configs and have to have two separate sets of muscle memory.
I tried running it with neovim stable, but it always warned me that was unsupported and I got occasional bugs that required a VSCode reload. Thus, I’ve been on 0.5 nightly for a while. I didn’t know why the VSCode plugin demanded it. I think after reading this post, it’s the LSP support.
As a neovim user who is just having neovim load my vimrc - nothing neovim specific -, I don't see a huge difference. Are there features I am missing out on?
I do like the idea of having everything in my vimrc so I could still use it with vim on a server if needed.
Besides that, I think the only big difference I've noticed is the nvim exclusive plugins.
```:s%/search term/replacement ```
it will load preview window showing the replacements you'd implement. neat feature I always like
It's set by `set inccommand=nosplit`
I permanently moved to neovim because of the forward looking vision and community around it.
Made the switch originally because of swifter highlighting, less display issues and the builtin terminal.
My setup also still basically works with vim too
Here, LSP and VSCode set the bar pretty high. I'm glad to see a healthy ecosystem thriving when Windows, WSL, Linux, and various tools start mixing and sharing.
Asking because maybe it's time to try NeoVim out, but it'd be a limitation for my work if I had to go through extra hops for editing remote files and running remote jupyter kernels.
I suppose it does, so I'd be grateful if vimmers out there would share their favorite solutions.
Not really like tramp mode (doesn't magically (s)ftp files around), but there's headless and tcp connect support, like:
https://github.com/Kethku/neovide#remote-tcp-support
https://neovim.io/doc/user/remote.html
However - this looks closer? "Seamlessly editing remote files in (Neo)Vim with Netrw and scp" https://gist.github.com/RRethy/ad8a9a3b1112a48226ec3336fa981...
https://github.com/neovim/neovim/milestone/19
I've been using a neovim nightly along with VSC and Alexey Svetliakov's Neo Vim extension. His extension requires 0.5.
BTW: unlearning and editor is almost harder than learning a new one. I started with 'ed' in 1984, then 'vi' and plain text terminals (HP-2621) until the mid 1990s, when I get my first actual XTerminal. Then VIM from the mid 1990s until now.
The command aspect is highly underrated by people that don't know the commands. The ability to :>% a full block. Things like that.
I think that is why most long term Vim users sound like they are insane to other people. Note: In the early 2000s, I worked with a guy that only ever programmed on Windows with Visual Studio. We were coediting (side by side) a large file during some architectural changes, discussing it as we went, and I did one of those :g/this_old_thing/s//new_thing/gp changes on the file and he just yelled "stop". I though I had broken something. He just said what did you just do and how did you do that? So I undid, and slowly retyped the line explaining what each step did, and hit enter. He went out and got a vim book that night. I have to apologize for the mental damage that might have caused him (lol). He picked it up quickly, I showed him a couple plugin I use. (I don't use many, mostly plain stock Vim).
I have messed with VSCode a little. I may take a look at Neovim. I looked at it about four years ago, and I guess it just wasn't really ready yet.
The integration needs to be done per-language, though helper packages like emacs-tree-sitter [1] exist. Afaik, C# mode currently uses it [2] though I'm not sure whether any other languages use it yet.
[1] https://github.com/ubolonton/emacs-tree-sitter [2] https://github.com/emacs-csharp/csharp-mode/blob/master/csha...
I'm missing out on this. Is it on par (at least potentially - in terms of what it enables you to implement) with JetBrains IDEs and ReSharper already?
IDEA is hyper optimized for their target languages, from what I know Intellij builds custom engines for every language, so at least in some aspects (large scale refactoring) and at least for now, IDEA and its siblings are a step ahead.
But for 90%ile tasks, LSP is good enough.
Isn't a language server an engine custom built for a particular language?
> at least for now, IDEA and its siblings are a step ahead.
For the languages they supported back then, they have been [almost] as good 10 years ago as they are today. The step seem really huge if there still is nothing nearly catching up.
btw I'm tj :]
The items here are really exciting.
VSCode is fine. I use IntelliJ sometimes for larger shared projects. Both I setup with their vim plugins for keybindings because I think in 'vi', but it's not 1:1. I usually can't do things like '!!sh' I have habits for.
I have a smattering of plugins that cover most of my language needs, but it would nice to have that more on-par with an IDE or whatever weird space VSCode sits in between an IDE and a text-editor.
At the very least something that lets me view the repo status and stage selections would be good.
not sure how it compares feature wise but I've found it extremely helpful.
For Neovim Git Plugins ,see [1]
Fast startup times are solved by never quitting emacs :) Really, emacsclient starts nearly instantly, and all the heavy stuff like language servers and emacs proper just run in server mode.
(Disclaimer: I know enough vi and often use it.)
My issue is I don't really like emacs' mode of operating, and even with evil-mode it still seeps through.
I also don't like lisp.
You don't like programming? That is precisely how that sounds.
Most programming languages in use today, one way or another, were influenced by Lisp.
If you seriously into programming, I suggest re-evaluating your point of view about it. Learning and understanding Lisp will make you a better programmer. I am not trying to sound like a patronizing dick. I honestly wish someone gave me that advice a long time ago. Who knows, maybe I would've become much more accomplished today.
It’s not feature complete but I’ve been using it for a few days and have been happy with it, as an ex-magit user
Can't say I really care about more syntax highlighting or lua. Less config is better.
-- m-x sent-from-my-emacs
For those in the know, when is it reasonably expected to be released?
I can't be alone in only wanting to port my init file to lua ONCE.
I'm a die-hard Vimmer who uses Emacs, and it's now clear to me that when talking about Vim and Emacs, one has to emphasize their foundational values, ideas at the root.
Vim is an amazing, incredible idea. It's the most satisfying and productive way to navigate around any kind of text. And as long as we have keyboard input and keyboards, Vim will stay relevant.
And Emacs is based on another fantastic idea. Arguably - the greatest idea in Computer Science to this day. Lisp. And understanding Lisp is a prerequisite required to appreciate the power of Emacs.
From my personal experience, when people try to compare one to another - there's usually one-sided incomprehension. They either don't have sufficient experience using Vim, or they lack understanding Lisp.
Use all the plugins highlighted here except telescope, which I've been holding off on from fears of slowness, but maybe I'll take the plunge this weekend and test it on some of the larger repos I work in :)
Does Neovim support webviews in extensions? Can it?
There are a lot of useful visualization tools that VS Code allows that require them. It's one of the most powerful features of the editor, imo.
(Yes, I know people don't do a lot of SSH-ing and coding these days)
It's also neat to be able to code from an iPad by SSH'ing with Termius :)
Happy to answer questions: tom@meagher.co or Twitter DM (@awkweb)
even though there's an expected minor performance hit, it still faster than vscode
Everytime I try to do that, I don't see immediate benefits and vim kind of catches up or plugins start to support vim and I just go back to vim as all my script keeps working there.
Just run it within Terminal? I recall that unlike on Ubuntu, there was some scrolling lag to it that might have required some tweaking. Not sure if that's the case anymore.
There are some ideological advantages of Neovim over Vim, too, but those are relatively minor; neither is evil software, and it can be argued that Vim has some ideological advantages over Neovim, too.
For a plugin dev or vim/neovim dev, there may be other practical advantages one way or the other.
VS Code used to take up the 1.8GB left from my measly 4GB.
What do you mean by this? Is it some kind of same address space thing rather than LSP servers over sockets?
I use Sublime for almost everything, but sometimes I edit code I have on some servers where I don't want to manage a whole git repo and do pushes/pulls. I have vim and a .vimrc on those -- I could imagine replacing them with neovim if it had something shiny enough.
I also sometimes end up just popping open a file locally, e.g. a config file or a one-off script, and I don't want another sublime window for it. I think I may even have less bound to open up vim, for syntax-highlighting reasons.
I'm not saying other people need to do what I do, just explaining that some folks like me like good terminal editors, even if we've moved a lot of daily driving into other applications.
Edit: Microsoft also funds some of the work on the Haskell compiler as I understand it. On the other hand I unfortunately now have to use crap like Outlook and Office 365 at work, so it's not like I don't understand the dismissive "inferior microsoft products" but we really can't say that any longer when talking about development environment tooling (which is what TFA is about) and programming languages.
I switched from Emacs to VSCode because I liked the feel of the more modern UI, but it certainly wasn't because Emacs was less good as an IDE. I can't think of anything I do in VSCode that I didn't have configured in Emacs.
2) Simplicity. Even with all my vim plugins, I never have issues with "IDE hogging all my ram" or "intellij crashes when loading a working set including this commit" (it worked for me...).
3) Ease of access. When remoting into my boxes, I can just tmux attach and continue editing where I left off, even on a shitty connection (using mosh). Very useful on train/conference wifi.
In the spirit of your first clause, these are personal reasons that work for me. I have not listed the cons, of which there are many, and don't expect my reasons to apply universally.
- I do a lot of work in a terminal. VSCodes terminal support is pretty bad. It might be better when they get nicer terminal tab support (not what they recently added)
- vim + terminal is considerably lighter and faster