Earlier quoted context omitted.
Alas, the emacs install base is fraction of vi/vim.
I am also surprised by this. What are you basing it on? For arbitrarily comparable online communities, it looks like emacs.stackexchange.com is twice as active as vi.stackexchange.com
How Did Vim Become So Popular?
261–270 of 507 posts
Re: How Did Vim Become So Popular?
#262Earlier quoted context omitted.
copy 10 lines from the current position into buffer q, go to the start of function jnk, copy 5 lines into buffer w, jump to line 10, paste contents of q, contents of w, and contents of q sequentially one after the other: "q10yy /jnk "w5yy 10G "qp "wp "qp now, go to the start of the document and indent the next 20 lines by 10 spaces: 0G .,+20s:^: : ok great, now find JUNK and replace 'a1' with 'A1' in the 15 lines tha…
Thank you for that example! Just thinking out loud how to do that in vscode for comparison: - I don’t think repeating actions a specific number of times makes sense in most use cases. Counting 10 lines would take longer than doing shift up/down n times (which would be exact with feedback) to select the desired lines. - Multiple Copy Paste buffers sounds interesting, I might look up a vscode extension for that. (Had a…
Vim get round that by providing the option of relative line numbers to the current line.
That’s accessed via
:set relativenumberRe: How Did Vim Become So Popular?
#263Earlier quoted context omitted.
>>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 files there's nothing that comes close. Exactly my thoughts, you need vim and emacs these days if you want to munge through large amounts of text. The thing is in these days of Kibana and Elastic search. You don't do much of this kind of work anymore. Code is text. But it's…
I'll argue that the IDE is Unix, not vim, I recently started and endeavour to vanilla Vim and I was baffled by what is possible even without plugins, granted I mostly work with C and a bit of Python, but one thing to consider is that most people using Vim come from an IDE background, so horse for course I guess. https://sanctum.geek.nz/arabesque/series/unix-as-ide/ Edit: Link
Re: How Did Vim Become So Popular?
#264Speaking personally, I've been a professional developer for almost decade and even in my relatively short career I've seen a lot of technologies come and go. I was reluctantly roped into it by my first boss, an enthusiastic Vim advocate. And since, almost nothing else (save for maybe git) beat learning vim from a return on investment perspective. From the default mac OS installation to some old Fedora box that has no…
This is really interesting. I'm quite the opposite. I keep trying to make vim my main devtool but I just can't stay away from a fully fledged ide. At the same time, having heard from literally everyone that once you do get used to it, vim is way faster to do everything in. What advice do you have for someone like me to proper get used it once and for all? Are there any good resources you used to learn all the vim sho…
Re: How Did Vim Become So Popular?
#265Earlier quoted context omitted.
> switch to command mode Why? Just use the 'relativenumber' option and do 5j. > the second way is more popular in vim too. Maybe for moving down 5 lines, but (I hope) not for things like "replace the inside of the brackets with what's in my A register". Otherwise you're really better off using a different editor.
> Why? To be sure that the editor isn't in insert mode. Using another slot of short-term memory to keep an editor's mode seems wasteful.
Besides, it might just as well become something you don't need to use memory for at all - just press Esc to make sure. If you're in command mode, nothing happens. If you're in insert mode, you've entered command mode.
Re: How Did Vim Become So Popular?
#266Earlier quoted context omitted.
>>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 files there's nothing that comes close. Exactly my thoughts, you need vim and emacs these days if you want to munge through large amounts of text. The thing is in these days of Kibana and Elastic search. You don't do much of this kind of work anymore. Code is text. But it's…
I'll argue that the IDE is Unix, not vim, I recently started and endeavour to vanilla Vim and I was baffled by what is possible even without plugins, granted I mostly work with C and a bit of Python, but one thing to consider is that most people using Vim come from an IDE background, so horse for course I guess. https://sanctum.geek.nz/arabesque/series/unix-as-ide/ Edit: Link
Re: How Did Vim Become So Popular?
#267Earlier quoted context omitted.
Honestly, I can do almost all of these things with any standard editor as well, with standard shortcuts. The ones I can't do directly, I can do via Search/Replace functionality that is also standard in most modern editors. Your example about refactoring a function by using text editing capabilities is actually pretty bad unless you mean Vim can actually parse your programming language and perform the refactoring over…
Here's the real question - So you are convinced you don't need Vim, right? Why are you on this thread? No one's saying vim is superior. However, you need to have an open mind to understand the alternatives. It's not like Vim is a paid product and by you not using it, Vim is going to die out soon or anything. If you dont' like it, great? You are happy with the alternative, great. You seem like you just want to deliber…
Re: How Did Vim Become So Popular?
#268Jokes aside, I don't really work with VIM but understand the concepts and have mastered basic usage of changing text files without too much effort. Never really coded in VIM aside from small scripts. But it is a dependable text editor that survived the ages. Most modern IDE will never reach this because they are far less dependable and far less wide spread. Installing VIM on your system never hurts.
Re: How Did Vim Become So Popular?
#269Earlier quoted context omitted.
copy 10 lines from the current position into buffer q, go to the start of function jnk, copy 5 lines into buffer w, jump to line 10, paste contents of q, contents of w, and contents of q sequentially one after the other: "q10yy /jnk "w5yy 10G "qp "wp "qp now, go to the start of the document and indent the next 20 lines by 10 spaces: 0G .,+20s:^: : ok great, now find JUNK and replace 'a1' with 'A1' in the 15 lines tha…
Ok, also am curious about multi-insertion with cntr-left/right that vscode does: For example, let’s say I have a json object with variety of field names, one per line and I want to remove the quotes. With vscode, I can alt select all lines, Home Ctrl+right del cntl+right del. The trick is the field names are different length, does vim have multi-edit with the ability to navigate relative to each insertion point? Edit…
For example you could use the visual block mode (ctrl-v) and highlight to the end of the line using $ and then use A to edit the end of every line at the same time. That works with lines of different length.
Or you could use a regex inside of a block selection.
Or there's a multi-cursor plugin available for the same approach as you're currently using in VSCode:
https://github.com/terryma/vim-multiple-cursors
Vim Golf is an excellent resource for seeing how to efficiently edit things in Vim: https://www.vimgolf.com/
Re: How Did Vim Become So Popular?
#270Earlier quoted context omitted.
Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive. Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who…
(Funnily enough ctrl-[ is one of my most used shortcuts in vim. It’s a convenient alternative to escape if you map caps-lock to ctrl)
I switched back to vim+tmux (nvim) a few weeks ago from a number of years using vs-code with the vim keybindings.
I'm still trying to configure my plugins so that I don't feel like I'm repeating myself too often.