How Did Vim Become So Popular?
231–240 of 507 posts
Re: How Did Vim Become So Popular?
#232Earlier quoted context omitted.
100% concur with this. I learnt Vim many years ago and I genuinely don't know what I'd do without it. It's always just there when I ssh into a new server. And the JetBrains suite has an awesome vim mode meaning I can use most (but not all) vim shortcuts with an actual IDE. I don't think vim itself works well as an IDE substitute, and wouldn't use it for hardcore web dev for example - but for quickly editing random fi…
If one wants to do web dev on vim I strongly recommend neovim setup with coc.nvim. I know some people strongly disagree with transforming vim into and IDE, but this is a really productive setup for creating code (works like a charm for my current React project) Personally I’ll sometimes use VSCode to browse big files or explore the codebase, but when it comes to editing them neovim with coc, fzf and a language pack i…
Re: How Did Vim Become So Popular?
#233Earlier quoted context omitted.
Thanks for the feedback. vscode has regex find replace, but I don’t use it very often. It does show every match highlighted in the current file while entering the find value, which is nice. It does the same for multi files if needed and gives a nice preview of every change. Word navigation I use a great deal (especially with multi-cursor editing). Ctrl+left/right jumps words, home, end to begin end of line. Ctrl+f Z…
Ctrl+arrow is almost as bad as going to the mouse. The thing with vim is you rarely have to leave the home row. Some other random things I use constantly (I am not the person you're replying to): C — replace to the end of the line xp — swap two characters (which I have to use more frequently than I'm willing to admit.) ci( — replace everything in brackets (like the arguments of a function, this also works with " or '…
Re: How Did Vim Become So Popular?
#234For me it is being able to efficiently navigate a file without leaving the home row (Gotta learn touch typing first). Once you understand the commands follow a composable grammar it is really like a superpower for dancing around text. „Go down 5 lines, move right two word, replace the contents of the brackets“. I don‘t use the actual editor all that often but have vim mode enabled in all my „real“ editors like VSCode…
Look at the beginning of a target line, remember the number (takes up a slot in our limited short-term memory), switch to command mode, type the command.
vs
Hold/mash "down" button until cursor is there.
After watching a few vim coding screen-casts I have the impression that the second way is more popular in vim too.
Re: How Did Vim Become So Popular?
#235Does anyone have a good video comparing vim speed coding vs vscode using built in editor features? I’ve been using vscode for years and the YouTube videos that demo vim features are shallow (like how to enter a blank line - really?). I can do the same thing I have seen in vim videos without memorizing a bunch of strange key bindings all while being able to edit code instantly without changing modes. I would love to s…
Re: How Did Vim Become So Popular?
#236Earlier quoted context omitted.
Hated Vi at first. Absolutely loathed it. I was all about emacs. But I gave vi another shot, and I'm so glad I did. The learning curve can be steep, and it's really unintuitive at first (or it was for me). But once it clicks a little bit, and you settle in.. Wow. I felt way more productive using it than any other editor.
(Helpful tip) map caps lock to escape: https://vim.fandom.com/wiki/Avoid_the_escape_key
ctrl-[ (for right hand) or ctr-3 (left hand, thanks teddyh) => escape
ctrl-i => tab
ctrl-h => backspace
ctrl-m => return
ctrl-w => delete prev word
ctrl-u => clear line
ctrl-o => cmd mode for 1 cmd
...and many, many more, including all the completion options.
Re: How Did Vim Become So Popular?
#237Does anyone have a good video comparing vim speed coding vs vscode using built in editor features? I’ve been using vscode for years and the YouTube videos that demo vim features are shallow (like how to enter a blank line - really?). I can do the same thing I have seen in vim videos without memorizing a bunch of strange key bindings all while being able to edit code instantly without changing modes. I would love to s…
One vim hack I like is multi-line macro application. It's a good fallback in case, as I often forget the syntax for certain things. To facilitate this, I've remapped ctrl-space in visual line mode to apply my `q` macro to every selected line. As an example, say I need to add a comma to a bunch of lines. I will record the macro on that line appending a comma to the end, visually select all of the other lines to copy t…
Vj (3)
:'norm A, (8 - The angular brackets are automatically added by vim)
Vs qq (2)
A, (3)
q (1)
Vj (3)
(2)Re: How Did Vim Become So Popular?
#238i tried to switch to emacs+evil, but i can't bring myself to do it. partly because I'd have to invest a lot of time in getting an equivalently productive environment, but partly because of the following 1. vi is everywhere, and... 2. vi with no plugins is still super powerful, which is helpful on random hosts / coworker's machines / basically anywhere, and... 3. since vi is still so powerful out of the box, i only ne…
When you see what influential programmers use, its clear that a disproportionate number of them are on vim/emacs.
Re: How Did Vim Become So Popular?
#239Does anyone have a good video comparing vim speed coding vs vscode using built in editor features? I’ve been using vscode for years and the YouTube videos that demo vim features are shallow (like how to enter a blank line - really?). I can do the same thing I have seen in vim videos without memorizing a bunch of strange key bindings all while being able to edit code instantly without changing modes. I would love to s…
Vim can jump to definitions and stuff too. It integrates with ctags. It can also do code completion and everything else. I have it bound to clang-format with ctrl-k.
Re: How Did Vim Become So Popular?
#240Earlier quoted context omitted.
I cannot remember the last time I wanted to use CapsLock--more than 30 years ago, anyway. By far the most irritating thing about others' keyboards is they have not disabled it yet. Second most is that Ctrl isn't there instead.
How do you TYPE_A_CONSTANT for the first time, or an ENUM_VALUE (perhaps somewhere you don't have autocomplete)? I keep a caps lock on my programmable keyboard for this (Fn+K). I also like SQL to be formatted with capital letters for keywords.
type_a_constant ctrl-[ vawU
That sounds more than it is. Really I just touch type it without thinking consciously about it.Probably don’t even need visual mode that’s just how I work.