Live data from Hacker News

Vim after 15 Years

statico.github.io

151–160 of 176 posts

Re: Vim after 15 Years

#151
post #14

I'm an avid tmux+neovim user, too, though working with Reason is a lot easier in VS Code. Making the switch from actual vim to fake vim (ie JS emulation) sucks. Recently, VSCodeVim merged #1725 to add actual neovim as an editor - it's using NeoVim's embedding API so you're using neovim to edit the text file inside of VSCode's chrome, including all of VSCode's type hints and popups. Info here: https://github.com/VSCod…

My work setup is Windows -> Linux VM with TMUX and Neovim. I have my VM configured to use SAMBA so I can access all my files from Windows.

I was pretty impressed when Oni for windows handled my legitimate .vimrc (init.vim now) without any issue.

- https://github.com/bryphe/oni

- https://news.ycombinator.com/item?id=15060417

- https://www.reddit.com/r/programming/comments/5gm5wa/oni_a_i...

- https://devhub.io/repos/extr0py-oni (gif dump)

Other neovim frontends:

- https://github.com/neovim/neovim/wiki/Related-projects#gui-p...

(I tested the QT one on windows and was a bit disappointed).

Re: Vim after 15 Years

#152

"The vim-surround plugin is so useful that it should probably be built into Vim." I couldn't agree with this more. Also undotree [1] should be built into Vim as well. Vim represents undo/redo under the hood as a tree, which is absolutely incredible once you have a plugin that unlocks it, but the built-in facilities for traversing that tree could be charitably described as "dismal". Vim's undo tree makes a solved prob…

> without the plugin, it's effectively inaccessible

I wouldn't say that. Plain Vim does have the `:earlier` and `:later` commands, which aren’t too hard to use in the case you described. For example, `:earlier 40sec` takes you to the state of the file as you saw it 40 seconds ago, no matter where in the undo tree you are or were. I agree that undo-tree is usually easier to use, though.

Re: Vim after 15 Years

#153
post #14

I'm an avid tmux+neovim user, too, though working with Reason is a lot easier in VS Code. Making the switch from actual vim to fake vim (ie JS emulation) sucks. Recently, VSCodeVim merged #1725 to add actual neovim as an editor - it's using NeoVim's embedding API so you're using neovim to edit the text file inside of VSCode's chrome, including all of VSCode's type hints and popups. Info here: https://github.com/VSCod…

This is great. Just enabled it and it's really nice having a full version of vim inside of vscode. I actually switched from vscode to atom a while back because the vim emulation in it was a little bit better, but I'm definitely going to switch back because of this. Thanks again for the heads up :)

Re: Vim after 15 Years

#154
post #102
post #63

Earlier quoted context omitted.

> (and t is not a stretch on my keyboard layout) Colemak?

t? How does that not ruin "to" movements?

Why would it? In the Colemak layout, 't' is on the left-hand index finger, it couldn't be more convenient.

Re: Vim after 15 Years

#155
post #149
post #106

I've been using vim about 20 years now. Maybe I'm weird but I don't use any plugins. When I want more than what Vim does I use something else. Autocomplete, find usages, etc? I'll use an IDE for that. When I need to refactor a 500MB text file without hanging my machine, I'll use vim.

You're not weird, but you're not a vim user, or the target of this post.

Not a vim user?

I suppose your right. I use it as a continuation of vi. Instead of a nerdtree plugin, I use a real file browser to manage the files in my project. Instead of split windows, I open multiple instances. To refactor a piece of code, I use some ex commands, buffers and maybe a macro. In that sense I'm not a Vim user. Vim is the vi implementation I use.

Re: Vim after 15 Years

#156
post #97
post #34

I made a Vim plugin to use 'normal' sublime/atom-like keybindings: https://github.com/tombh/novim-mode I have an almost identical setup as that described in this post. Being in the terminal and integrating with tmux is a wonderful environment - lightweight and immersive. And all these Vim plugins are of such good quality - are Vim plugin authors perhaps of a different, geekier, ilk? So it's a shame that vanilla Vim i…

Many newcomers using your plugin will have a huge problem when using vanilla VIM. The same problem exist with Spacemacs, Spacevim or other weird things. If someone don't want to use VIM modal editing why not to stay with Sublime/Atom/VSCode or any other editor? They also have very rich plugins ecosystem. Not mentioning that Sublime is like crazy fast... To clarify it's not an attack on anyone. For instance evil mode…

Because the composability of Vim is its killer feature, which these other editors lack.

See "Why Atom Can't Replace Vim"--https://medium.com/@mkozlows/why-atom-cant-replace-vim-43385...

Re: Vim after 15 Years

#157
post #96

Earlier quoted context omitted.

Apologies if this is incorrect (on my phone atm) but I've been using as leader for two years now, and have never ever noticed lag in insert mode. Perhaps it's a setting you have enabled/disabled, or unrelated to vim?

This lag is introduced by vim, to wait for the next keys and see if you are actually inserting them or using mapped key sequence. It is configurable in vim, but then either you have a lag and you are able to use your key sequence, or you don't and sequences cannot be used. So maybe I have something configured that sets it wrong, but I do not see how to reconcile both things.

Unless you’re deliberately enabling certain key mappings in insert mode, then yes you’ve configured something wrong. And if you have deliberately enabled these bindings, you’re probably misunderstanding Vim.

The whole point of Vim’s normal mode is to free up “modifier-free” key mappings for commands rather than inserting characters. So by extension, using “modifier-free” key mappings for commands in insert mode is a Vim anti-pattern (if you want custom mapping’s in insert mode, use mappings for them with modifier keys).

Regarding your issue, I suspect your defining your bindings with the `map` keyword when you should be using `nmap` (or better yet `nnoremap‘).

Re: Vim after 15 Years

#158
post #94

Earlier quoted context omitted.

That's what I don't get: for years, vi (and vim) mocked the emacs community (with some justification) for throwing everything and the kitchen sink into our editor. We were building an entire operating environment, while vi was providing a nice, solid, fast text editor. But with vim & neovim, people are building a complex operating environment in a terrible language, and ignoring the man-centuries of effort which have…

I've given emacs 3 tries. First just main emacs, then with Evil mode, and last time as Spacemacs. Every time the issue is the same: there is won't be any significant improvement to justify the re-learning curve of everything. Imo fuzzy finding and git plugins isn't a huge stretch for a editor. I still wouldn't like to read my email from vim.

I'm using Spacemacs with evil mode only for note taking and work tracking with org-mode. For the rest I'm still using Vim, but the org-mode was for me absolute worth it - now doing it for almost three years. Still for development still using Vi(m), because it's on every (remote) machine, is so much more responsive. Just to say, org-mode alone is worth emacs with evil mode.

Re: Vim after 15 Years

#159
post #158

Earlier quoted context omitted.

I've given emacs 3 tries. First just main emacs, then with Evil mode, and last time as Spacemacs. Every time the issue is the same: there is won't be any significant improvement to justify the re-learning curve of everything. Imo fuzzy finding and git plugins isn't a huge stretch for a editor. I still wouldn't like to read my email from vim.

I'm using Spacemacs with evil mode only for note taking and work tracking with org-mode. For the rest I'm still using Vim, but the org-mode was for me absolute worth it - now doing it for almost three years. Still for development still using Vi(m), because it's on every (remote) machine, is so much more responsive. Just to say, org-mode alone is worth emacs with evil mode.

> Still for development still using Vi(m), because it's on every (remote) machine, is so much more responsive.

Try TRAMP, which enables you to edit remote files in a local (spac)emacs (and also local files with sudo or su). It's pretty awesome.

Re: Vim after 15 Years

#160

Earlier quoted context omitted.

FWIW, in all the times I've tried to use Emacs with Evil, it's still not been quite good enough. Enough friction here and there to bring me to a dead halt and make me reach for vim again.

same with me. tried everything to use evil with emacs (since i really wanted to use orgmode), but it's just not the same. the emacs keybinds get in the way of vim mode imho.

You definitely need to add a bunch of extra emacs configuration on top of the standard evil-mode stuff to get a fully intergrated emacsvim environment. On top of that, for most meta modes (e.g. dired, magit) you'll have to either find an evil-compat set of bindings, write your own, or get used to the emacs way of doing things in these special buffers.
Post reply on HN