Re:Show HN: A Vim distribution inspired by Spacemacs
by hammerandtongs on Sunday March 26, 2017 @02:58AM
(#13959591)
As far as I remember you are foregoing text objects which are really one of the most powerful things in vim.
http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-d...
Ironically I think most of the IDE (ie intellij etc) vim plugins have them while you do not.
Re:Show HN: A Vim distribution inspired by Spacemacs
by chongli on Sunday March 26, 2017 @08:57AM
(#13960534)
Yeah, I'm aware of text objects (I used vim for years). I don't miss them as much as I thought I would. Most of them can be replaced by compositions of the primitive motion commands. Heck, you could probably even outright replace them with macros. I just haven't felt the need to.
Re:Show HN: A Vim distribution inspired by Spacemacs
by arvinsim on Sunday March 26, 2017 @05:45AM
(#13959954)
TIL that there are text objects for tags. Thanks!
Re:Show HN: A Vim distribution inspired by Spacemacs
by ezequiel-garzon on Sunday March 26, 2017 @06:04AM
(#13959995)
What programming languages do you use with nvi? Some seem awfully verbose without some kind of code completion.
Re:Show HN: A Vim distribution inspired by Spacemacs
by chongli on Sunday March 26, 2017 @09:07AM
(#13960579)
Lately I've been writing a lot of LaTeX rather than programming. Nvi has macros, mappings, and abbreviations so it's not hard to deal with verbosity. In the past, I've written in languages like python, Haskell, SQL, R, and even HTML. It's never been a problem. I've never had to write Java though, so maybe I'd use something else if I were forced to.
Code completion, like syntax highlighting, seems to be one of those tools that changes how you think and I'm not sure it's for the better. Being able to quickly bang out a bunch of glue code may be great for a 9-5 but I think it gets in the way of the creative process. That's just my opinion, though. I'm not aware of any research into this idea.
Since I switched to nvi I've learned way more about the powerful features of the base editor as well as shell tools like grep, fzf, fmt, column, wc, expand, pdftotext, pandoc, make, git... With tmux I have easy access to any REPLs and man pages I need. The main feature of nvi I need over the original vi is unlimited undo, though ex command history and file name completion are nice as well.
Part of the inspiration for me to switch from vim (and spacemacs) down to nvi was this post on stack overflow [1]. When I really grokked the power of this system I picked up O'Reilly's book on vi and vim [2] and read every page of the vi and ex stuff. There is soooooo much you can do with this editor that doesn't require plugins yet people reinvent them, often in a less powerful/flexible way.
Since learning to be productive in nvi, it's going to be very hard to go back to those bigger, more extensible editors. The temptation for bikeshedding is too great... Oh, and learning to read code with syntax highlighting turned off is really nice. It helps you write more clearly since you aren't relying on the highlighting to help the reader.
[0] https://sites.google.com/a/bostic.com/keithbostic/vi/
[1] https://stackoverflow.com/questions/1218390/what-is-your-mos...
[2] https://shop.oreilly.com/product/mobile/9780596529833.do