170 points · by iloverss · 4y ago · 95 comments
Now, if there is one feature I would add to Vim, it would be "cat detection". I have a ginger cat that is irritatingly in the habit of jumping on the keyboard when he wants food.
You can only imagine how, in command mode, he effectively summons the textual equivalent of the Nine Hells of Ba'ator upon my open documents if I am not quick enough...
There's always [u]ndo. Or you can use
:earlier 2m
to go back 2 minutes in time.
Honestly this is single-handed my favorite thing about vim.
Not the ability to fluently traverse through text (and apparently time).
But that you can use it for a almost decade, and still have a stranger on the internet blow your mind with simple features you didn't know existed. There's so many of those one-off commands that are so useful, yet you've somehow never heard of them?
Wut.
~27 years of using vim, you just blew my mind.
I normally use u (undo) though.
If you have `set backupdir` enabled, any and all savepoints on a file are backed up with timestamps and a revision number.
A friend of mine I met through my own similar (free) library is developing this like a madman: https://kindavim.app
It costs $3/month (coffee) but for a Vim person like me I gladly pay. Making this work across macOS is a total mess and a full-time job, and it's not trivial work.
If you want a free version, I have https://github.com/dbalatero/VimMode.spoon as a Hammerspoon plugin that works pretty OK, but I'm not actively developing it and prefer the kindaVim app at this point.
- C-u and C-d to jump up/down
- [ and ] to go prev/next empty line (I have a macro to clear empty spaces at the end of lines so this works well for jumping functions in code)
- from the article: 50% to go the halfway point of a document
- 100gg to go to line 100
- 100k to go 100 lines down
Are there any more good ones?
Edit: occurs to me that you might have remapped kkk to escape normal mode. At one time I had done this for jj. Now I just use C-[ as it’s portable to vanilla vim setups and less of a stretch than the escape key.
I thought it meant that you were laughing like haha (a leas in Brazil)
I didn't know it had bad connotations
The problem comes in when the IDE struggles to keep up, or is busy trying to move my cursor somewhere that I don't want it to be.
IntelliJ is really bad about this, I'll often type something and hit esc to go back to normal mode. Mentally I'm moving to another line using a Vim motion, but IntelliJ lags, and eventually moves the cursor to some problem it thinks I need to solve right now (and I might or might not be back in insert mode).
It's frustrating, but probably less frustrating than not using the Vim bindings. Maybe it's something with the Vim plugin, or something I've done. It's more of a minor headache as opposed to a migraine.
Agree completely. Even completely common Vim actions are often just way too sluggish. Not to mention I've remapped "<Esc>" to "jj", which is often unsupported by Vim extensions.
This is before even mentioning all the "helpful" features like parenthesis-completion that IDEs like to foist on me. Word processors don't try to insert matching double-quotes, why do I want an IDE to insert matched parens?
he seems to have tried that and it didn’t work out, more likely to happen for advanced or power user.
Edit: typo
(A tip... if you do `echo "import fs" >> ~/.bashrc`, the 'fs' command library—which contains the vim command—will be automatically imported into the current shell's execution context.)
The complaint in that ticket is that you can't make it the default for all the other ways of scrolling
And just in case you missed it, you may gj gk to navigate visual lines or remap j, k (and <Up>, <Down>) to gj gk to make that default.
I have a genuine question why use nvim at all if it has such issues with presenting text in a window.
When we broke our sourcemaps for a bit, I was the dedicated human source map for a while and vim was an absolute life saver.
[1] https://github.com/neovim/neovim/wiki/Related-projects#gui [2] https://github.com/qvacua/vimr
[0]: https://neovim.io/
There are GUI versions for Windows/Linux/Mac/etc: https://www.vim.org/download.php
I use GVim (without the menu/tool bars).
What I noticed that people build "their own" IDE installing and configuring third party plugins and spend a lot of time to maintain this configuration. And there is no guarrantie it will be better then what is already supported in vsCode for example. So as an alternative one can go other way around and just install vim plugin.
Or maybe I’m missing something here too, what “gui” means for you?
Edit: oh I see from other comments. No, this type of gui vim doesn’t do.
* Use an LSP client plugin, whichever you prefer. It's better than any ctags circus you can do. coc.nvim is more feature rich but also heavier. Vim-lsc if you prefer more barebones.
* FZF.vim; fuzzy searching files as well as lines in same file.
On a related note, does anyone know proper parenthesis / bracket completion plugin? I never got that functionality to work as good as IntelliJ.
> [...]
> viper - 1995 for Emacs
One can add "vi.el" (approx 1985/86) and "vip.el" (approx 1986/87) to the list too. Both of these were obsoleted in 2014, but are still distributed as part of Emacs.