10 ms·
History and effective use of Vim (2019)
- daptaq 4y ago> Some of the clones: > [...] > 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.
- azalemeth 4y agoI love vim. I am not one of those users who has a huge number of plugins and takes part in an extended eco-system that they perhaps do not fully understand -- for the last ~20 years of my life I have been trying to learn a little more vim each time I use it. I often don't, but it just has so many surprises that when I feel frustrated, I try to work out the "vimmish" way of doing things. Occasionally I give into temptation and take this to extremes -- for example, writing macros that look like alphabet soup to make certain coding tasks easier. I'm never sure if this is really a good use of my time -- but I do enjoy it. I'm so grateful it exists -- it's everywhere, insanely fast, lightweight, and I've never crashed it. 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...
- vaylian 4y ago> 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.
- sriku 4y ago<shaking head> you always learn something old about vim every day!
- herodoturtle 4y ago> to go back 2 minutes in time. Wut. ~27 years of using vim, you just blew my mind.
- kekebo 4y ago[distant yelling of human segmentation faults]
- tomcam 4y agoYeah same. I feel like a new man.
- deckard1 4y agocrazy thing with vim is every person I've seen uses a different subset of functionality, which always contains a few things I've never seen before. Which is also pretty cool in my book. No two people use vim the same way.
- mrintegrity 4y agome Monday morning: :later 8h One can dream...
- wodenokoto 4y agoOkay I might need to start using vim!
- Fnoord 4y agoTo save some typing, seems :ea is an alias for it, unless you got more commands starting with ea. I normally use u (undo) though.
- tpoacher 4y agoYou can do something very similar with nano. If you have `set backupdir` enabled, any and all savepoints on a file are backed up with timestamps and a revision number.
- squirt 4y ago> 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?
- ykonstant 4y agoAny sufficiently advanced Vim macro is indistinguishable from catwords.
- sriku 4y agoAm a similarly profiled (neo)vim user .. but without cat. Sometimes I catch strange letter combinations like "gqip" in my emails that baffle the recipients. Want vim keys everywhere!
- christophilus 4y agoThis is me all the time. The worst is “kkk”. I can’t remember why I type it in vim (it’s muscle memory, and I’m not at a computer to try it out), but it has really bad connotations here in the US south, so… no bueno.
- h0l0cube 4y agoUnsolicited advice for scrolling without spamming j and k: - 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.
- benrow 4y agoI like using L and H to go to bottom or top of screen to initiate scrolling with j or k. You can scroll up or down without moving the cursor using Ctrl-Y and Ctrl-E but I find those a bit hard to get used to.
- AdieuToLogic 4y ago> Are there any more good ones? I find these handy, especially after doing a search (quoted from :h z): - z. redraw, cursor line to center of window - z<CR> redraw, cursor line to top of window - z- redraw, cursor line at bottom of window
- Izkata 4y ago:set relativenumber The line the cursor is on is now shown in the left sidebar as 0, counting up for each line away from the cursor. So now it tells you what number to use for "10j" and "10k" to move up and down a specific number of lines. m[a-z] `[a-z] Mark a point in a file into a register, and jump back to that point. Or even more interesting: m[A-Z] `[A-Z] Same as above, except capital marks are global and work across files. Also, `` Jump back to the last place you jumped from (but only within the same file).
- rob74 4y agoCounter-intuitively, cats seem to prefer keyboards over mice when "working" at your PC...
- yakubin 4y agoIf Vim was a GUI application (and could smoothly handle long lines), it would the perfect editor for me. Alas, the best I've seen so far is Neovim's discontinued GUI frontends.
- asicsp 4y agoNot sure I understood your point. There are GUI versions for Windows/Linux/Mac/etc: https://www.vim.org/download.php https://www.vim.org/download.php I use GVim (without the menu/tool bars).
- yakubin 4y agoIt's still a TUI. I would like Vim to be able to e.g. draw a normal line instead of changing the background of a column of characters, when cc is set. Also not needing to patch fonts to get things like powerline. That and other things of this nature.
- asicsp 4y agoAgain, I don't understand your point. GVim is GUI, not TUI.
- yakubin 4y agoA GUI can draw vector graphics, like lines, arcs, arrows etc. GVim still behaves like a terminal, which just has a grid of characters to work with. Any such vector graphics is done awkwardly with fonts, which doesn't give the best result, and patching fonts is not the best UX.
- asicsp 4y agoThanks for further clarification. I haven't needed such capability in a text editor, but probably I should look into what that provides. And I don't see how such features are necessary to rule GVim as GUI. I have a fairly basic classification: TUI runs in a terminal, GUI have their own windows.
- rob74 4y agoExtra kudos for mentioning on which Fish Disk (https://en.wikipedia.org/wiki/Fred_Fish https://en.wikipedia.org/wiki/Fred_Fish) the first published version of vim could be found. I still have fond memories of poring over a list of Fish Disks and ordering those that sounded interesting by mail order. Those were the days...
- izhak 4y agoJust asked my Emacs to open the link, read it and summarize it out loud for me with emacspeak.
- mellavora 4y agoJust opened Emacs in evil mode, and asked it to summarize the report back to front. Noticed a cloud of black smoke in the room and emacs asking me something about trading my soul for improved keybindings.
- tpoacher 4y agoIt's ok, just tap C-X C-B C-S C-T C-C, which is the standard keybinding for rescinding the soul binding contract request procedure.
- mianos 4y agoWhat amazed me is pathogen does not seem to be used anymore. Maybe I'll have to try the new way.
- petepete 4y agoI was a Pathogen user for a long time, from about 2009-2020. It was a total gamechanger. I'd still use it except for the fact that with vim-plug I can more easily keep my config under version control. git submodules are a hassle.
- nerdponx 4y agoI don't really need it now with :packadd[!] and the pack/ */{start,opt} directories, which do a similar job.
- DoneWithAllThat 4y agoI’ve used vim for decades and have utterly failed at switching away every time I tried to. I miss everything about it too much. My only real complaint is I have a hard time using IDEs, because my vim muscle memory is too strong and despite many offering vim key bindings they never offer all the features/keys I typically use. Often missing are recording/playback, visual mode, anchors, vim’s (unique) regex syntax, buffer manipulation, etc.
- pak9rabid 4y agoMany IDE's have a VIM editor plugin, so you can have the best of both worlds :)
- oumua_don17 4y ago>> despite many offering vim key bindings they never offer all the features/keys I typically use he seems to have tried that and it didn’t work out, more likely to happen for advanced or power user. Edit: typo
- enoyls 4y agoIn my experience it's rarely the best of both worlds, it's more of a case where the IDE becomes more tolerable. 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.
- mhink 4y ago> 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. 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?
- lotw_dot_site 4y agoI don't know exactly when I started "porting" vim into Linux on the Web (it's actually a complete rewrite in JS). It's been a few years at least. You can play with it by going to http://lotw.site/shell http://lotw.site/shell and then entering `import fs && vim` at the prompt. (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.)
- scrapheap 4y agoVim is a bit like playing a RPG, every so often you level up :)
- _kblcuk_ 4y agoI was about to comment "what, vim-plug had a release this year", but then noticed that article is from 2019.
- chakkepolja 4y agoI don't use many plugins. But there's 2 plugins I find very useful. * 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.
- barnawee 4y ago