4 ms·
Vim is unnatural. It basically boils down to writing programming language commands to edit text. For example 4dd to delete 4 lines. Now, why exactly would I wan
by nnoitra 5y ago
Vim is unnatural. It basically boils down to writing programming language commands to edit text. For example 4dd to delete 4 lines. Now, why exactly would I want to go into edit mode to type 4dd to delete 4 lines instead of select and delete.
It's just our minds don't work that way when thinking about editing text. The way I view text is visual. I don't think in terms of delete 4 lines, go line 435 and dw to delete a word. Copying and pasting text is a nightmare. Navigating from insert mode to visual mode to select and paste text. It's impossible to design a less intuitive text-editor.
- 2pEXgD0fZ5cF 5y ago> For example 4dd to delete 4 lines. Now, why exactly would I want to go into edit mode to type 4dd to delete 4 lines instead of select and delete. The thing is that you can do both in Vim. 4dd is faster but harder to learn and commit to, it's not in any way required though and you can stick to vim basics and go the regular select and delete route too (via mouse, v, etc.)
- nnoitra 5y agoBut those are features of vim. The default settings of vim are nonexistent. I needed to spend hours just to get it to sort of work. It was not even showing line numbers let alone syntax highlighting.
- bmj 5y agoI needed to spend hours just to get it to sort of work. Some people consider this a bug, others consider it a feature. I use both VS Code and (Neo)Vim on a regular basis. A huge advantage of VS Code is that for many languages, it works pretty darn well out of the box. I do a lot of ECMAScript development, and I have exactly two extensions installed for VS Code: ESlint and GitLens (plus some themes, but I don't consider those functional). My init.vim file is nearly 400 lines long, and that includes everything to provide a reasonable IDE-like experience (fuzzy finder, Ctrl-P, NerdTree, Airline, Git, various mappings, etc). Granted, I did not type all 400 lines (that is, they are copied from other user's configuration files), but I still stitched a lot together. And that's fine, for me. I get that some people don't want to spend their time tweaking their tools to that degree. VS Code is still a convivial tool[0], in my opinion. It simply starts from a different place. [0] https://en.wikipedia.org/wiki/Tools_for_Conviviality https://en.wikipedia.org/wiki/Tools_for_Conviviality
- lawn 5y agoVim feels very natural when you grok it. > Now, why exactly would I want to go into edit mode to type 4dd to delete 4 lines instead of select and delete. Because it's faster and more flexible. > The way I view text is visual. Vim allows you to select text easily. For example V4j will select this and the 4 lines below, vi{ will select all lines between curly brackets and vt( will select characters from this up to the character before (. > Copying and pasting text is a nightmare. Copying and pasting text is a bliss. > It's impossible to design a less intuitive text-editor. The learning curve is steep for sure, but with a little bit of effort you will edit text in a more convenient, flexible and faster way than before.
- least 5y ago> It's impossible to design a less intuitive text-editor. Intuitiveness (or lack thereof) isn't a strong reason for dissuading use of a tool that you'll be using over a lifetime. Any tool you're using that you hope to be competent in requires learning and practice to become proficient in. > It's just our minds don't work that way when thinking about editing text. The way I view text is visual. I don't think in terms of delete 4 lines, go line 435 and dw to delete a word. Visually, if you want to delete a paragraph, how would you go about that? In most text editors you might grab your mouse and click on one end and drag through to the other end of the text and press backspace. In vim you can just tell your editor to delete the paragraph. Or maybe you want to change what's inside the parentheses, so you tell your editor you want to change what's inside the parentheses and you do that. If anything, the 'normal' way of text editing has almost nothing to do with how my mind models editing text while vim allows me to tell the editor exactly what I want it to do and it performs it.
- nnoitra 5y ago>In most text editors you might grab your mouse and click on one end and drag through to the other end of the text and press backspace. In vim you can just tell your editor to delete the paragraph. Or maybe you want to change what's inside the parentheses, so you tell your editor you want to change what's inside the parentheses and you do that. If anything, the 'normal' way of text editing has almost nothing to do with how my mind models editing text while vim allows me to tell the editor exactly what I want it to do and it performs it. That's the problem with telling the editor to do exactly what you tell it to do. Telling a machine to do exactly what you want is programming. For text editing doing what I want with 95% percent precision is more than enough. If that fails I can press CTRL + Backspace to delete few more words. How would you delete a paragraph in vim? I reckon something like: 1) Visually see the line where the paragraph is 2) Jump to that line with 100 gg 3) Run another command to delete the paragraph. Now again some thinking needs here is it a code block between curly braces {} or is it a textual paragraph but why is that thinking required when I can actually see it in front of me and select it. 4) Get back to insert mode In a normal text-editor: 1) Visually see the line and select it with cursor and delete it.
- 5y ago
- rhizome31 5y agoVim has a visual mode that you may find more intuitive. I use it all the time for multi-line editing, particularly through the `V` command.
- wruza 5y agoIt's just our minds don't work that way when thinking about editing text Please speak for yourself, sir. I do 2-5 line rearrangements and jumps very often and hate to do “home home shift+ down down down shift- ctrl_x scroll scroll scroll scroll …” instead of “4dd'a”. When it’s hard to count lines, you can “V/something<CR>” or “V30j” and adjust with jk to select more or less. When it’s a block, “%v%”. Vim always has less-movement ways even when you can’t calculate precisely and my mind can’t work in a “wait for 50 key-repeats” mode. But I’ve felt what you’re describing at the time when my knowledge was shallow and I didn’t really know the essential part of vim. It's impossible to design a less intuitive text-editor. This one I agree with.