6 ms·
Then don't. Just learn the basics. Learn how to use insert mode, edit some files, ignore anything not directly relevant. Eventually you'll come across a particu
by bluedays 5y ago
Then don't. Just learn the basics. Learn how to use insert mode, edit some files, ignore anything not directly relevant. Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim.
You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you.
Eventually things will become easier in vim, and you'll just have another tool at your disposal.
It took me years to begin to appreciate vim. I don't have a .vimrc, I use all the base settings. However, now that I know how to use vim it's become invaluable.
The thing about vim is that it doesn't have to be complicated. It can be as easy or as hard as you want it to be.
- jpe90 5y ago> Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim. Imho there are strictly better options than vim for this nowadays for people who are not already invested in vim. Sublime text is easier for people that prefer GUIs. For CLI, Kakoune has better discoverability, better thought/more consistent commands, and actually usable colorschemes and syntax highlighting out of the box.
- civilized 5y agoYeah. It's pretty easy to delete a line in Sublime, and contrary to CLI fan wisdom, a single accurate trackpad gesture is simpler and faster than the barrage of commands needed to jump to a particular line. The studies that "prove" CLIs are faster than GUIs are decades old now, and my experience says they're obsolete.
- echelon 5y agoVim movements allow you to compose rich intentions with a matter of a few keystrokes. I find it very hard to believe that can be beat with a mouse unless someone is using gestures. More than anything, it's about not switching devices. Typing feels like playing the keyboard. Switching to the mouse feels like having to pick up a trombone between keys. (I know that's a bit dramatic of an analogy, but...)
- civilized 5y agoBringing up the old mouse makes this conversation sound so dated - as I said, I use a trackpad. Specifically, like millions of others, I work on a MacBook Pro with an incredibly precise trackpad right under the keyboard. I move my hand to and from that trackpad in about 0.1s, and I can click on anything I want in less than half a second. "Rich intentions in a few keystrokes" doesn't sound competitive with that IMO.
- rendall 5y agoI'd happily race using vim against anyone using any pointer device. Your very fast 0.1s accumulates over the day, the week, the year. Versus never moving your hand away from the keyboard.
- afiori 5y agotrackpads are the keyboard, on ThinkPad laptop for example you can use it entirely with only your thumbs.
- stnmtn 5y agoHow do you handle having to change a function's parameters, for instance? In vim, you just have your cursor inside the (...) and do `ci)`, which is (c)hange (i)nside `(, which instantly deletes all the test inside the (...) and you can type that stuff out easily For a trackpad, don't you have to manually select all that text, hit delete, then start typing again? Or is there a better way I'm not thinking of
- rendall 5y agoSo. Many. Shortcuts. And, if you use it as an extension to your IDE, say for VSCode, you can still use your pointer. Delete to line's end: d$ Delete to next blank line: d] Replace current character: r Surround the next 3 words with quotes: ys3w" (non standard, but out-of-the-box on VSCode) On and on
- jpe90 5y agoI develop with emacs using my keyboard exclusively and I'm 100% convinced there is no appreciable benefit for doing so, it's pure personal preference. I remember seeing John Carmack express that didn't feel it was worth it to become a text editor power user, and he was getting numerous twitter replies insisting he was missing out on enormous productivity benefits. Imagine saying that to one of the most productive programmers of all time. It cracks me up every time I think about it.
- deleted 5y ago[deleted]
- HeyZuess 5y agoI think there is merit to learning vim, and merit to using a GUI/IDE. Especially if you can combine both. Submlime, vscode etc all have reasonable vim bindings. I was an avid user of vim for many many years, and I would not describe myself as a vim expert, rather I know a lot of the core commands. I have since switched do vscode (for many reasons) and still use the vim bindings. I also don't believe it is just an issue about speed using the mouse. I believe it's also a movement issue. This is the benefit I get, if it is vim/vscode/jetbrains etc as long as it has vim bindings I know `dd` is going to delete a line etc, the editing experience is fairly static. Block editing and yanking, F, T, ctrl-D, ctrl-U, cw, de, cs"`, vwS(, ci", and many others are all great vim methodologies, just like cmd-p (mac) for sublime and vscode. Multicursor in vscode, feels broken do to me compared to block editing but even if I need to do mutlicursor across distributed lines (something missing from vim) I can use `gd`. I would say vim is more of a methodology than just an editor.
- dustintrex 5y agoThe great thing about vi(m) is that it's always there. SSH'd into some random server and need to edit some random config? vim. And Sublime is vim with a user-friendly-ish GUI wrapped around it.
- abhinav22 5y agoDoes sublime support vim keys?
- NegativeLatency 5y agoA lot of vim/vi plug-ins are buggy and support just enough to really drive you crazy
- weaksauce 5y agofwiw i've also thought that and moved to vscode with neovim as the backing editor for normal mode and it's generally fantastic. some rough edges but not that many... it's still neovim and vim in the background
- NegativeLatency 5y agoOh yeah well that’s a whole vim running in there. Ended up settling on MacVim.app which has nice window support. I’ve had good experiences with the visual studio vim plug-in that’s written in F#
- junon 5y agoYes but I've yet to come across an implementation that gets it right.
- simion314 5y ago>The great thing about vi(m) is that it's always there. SSH'd into some random server and need to edit some random config? vim I hate that, I ssh in, then maybe I want to edit cron and I am hit with vim(someone changed the simple nano with it), in the past you had no choice then google how to quit vim but now it will tell you how to do it(I ssh and change config files 1 or 2 times a year). I never learned how to quit, just o use EDITOR=nano command to get a simple editor, I don't need a powerful editor for config files.
- jiggawatts 5y agoPeople say things like this, as if other text editors don't have the same functions. The alternative is not "notepad.exe", it's Textpad, VS Code, or IntelliJ IDEA. Delete an entire line: CTRL-Shift-K in VS Code. Or just look at the end of the file: Ctrl-End in most editors. Etc...
- dijit 5y agoI can only speak to my experience, and I might be mistaken: but the reason I tend to reach for vim bindings is not because I already know them- it's because, mostly, it's consistent where as IDE key binds change depending on the platform and IDE. IntelliJ has programmable keys and they prompt you on first run which ones you'd like to use "Original?", "MacOS", "Linux". VSCode has it's own key binds for various movements (like indenting a block), I know sublime does too. It's all just too much hassle, and obviously that doesn't translate to being ssh'd into a server and needing to move some text around, which is harder than it ought to be in Nano. (but you only feel that after you've learned vim.. so.. that's weird, there has to be a universal law about that somewhere)
- jiggawatts 5y agoI get that, and consistency is great. But consistency only exists within a "culture", such as Linux or Windows. From the perspective of someone from Windows, VIM is hilariously inconsistent, to the point of absurdity. Most editors on Windows share a relatively consistent set of navigation commands. Ctrl-Left-Arrow for previous word, Ctrl-End for end of file, etc... VIM meanwhile is so far away from this it's basically from another planet. So then from your perspective VIM is consistent and consistently available. From a Windows user's perspective it is the Windows standard editors that are consistent and consistently available. That's why I've gone on rants previously about the bizarre hybrids like VS Code, where it does some things like VIM, but pretends to be a light version of Visual Studio. It's a garbled mess, but apparently I'm not allowed to criticise it because it is free and JavaScript people had nothing as good available to them before, so it must be the best thing since sliced bread...
- pbalau 5y ago
- KronisLV 5y agoTo be a bit snarky: sed 's/vim/nano/g' If you care about quick edits in a user friendly environment, you might as well use software that's simple to use and doesn't have a steep learning curve, instead providing user friendly shortcuts. In my eyes, Vim is better suited for more advanced text processing and more macro heavy edits, where you need to do lots of repeated actions. Of course, if you are used to Vim, might as well use it for everything, however if you don't that suggestion is possibly a suboptimal one. Though there's definitely a space that's also occupied by regular text editors (like Notepad++ or the *nix equivalents) if you're in a graphical environment where you even have the possibility of opening an IDE.
- chrismcb 5y agoI don't think I've ever come across a use case where opening an IDE didn't seem worth it. I've never come across a use case where I though vim was the better option. There are many times I had to use vim because I didn't have a choice. And usually it was with the thought, that I have to one again use a hacked up line editor.
- Zababa 5y ago> Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim. I'm not sure that's still relevant, given the popularity of VSCode > You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you. That might be just me, but 99% of my navigation is a ctrl+f (a search) or a ctrl+click (go to definition). Most of my "complex" editing needs are served well by the multi cursor and ctrl+left/right arrow (go over a "whole" word). I know that vim is a generalisation of that, and instead of having a specific thing like this you have a whole language to compose things, but I just don't see the point. I wonder if it's one of those thing that appear universal, but is in fact very personal, and "vim people" are different from "emacs people" and from "VSCode people" and from other people in a fundamental way that can't really change, and that is visible mostly through the editor choice.
- krageon 5y ago> VSCode It's not even good! This has to be the strangest cargo-cult following of all options you could have. If you're going to use a proprietary closed editor anyway, use something like a jetbrains IDE. At least then you will have a lot of very complete and well-integrated features.
- Zababa 5y ago> It's not even good! This has to be the strangest cargo-cult following of all options you could have. I don't think that's true. It's lighter and faster than big IDEs while being way more accessible than them and vim/emacs. It handles most of what you throw at it, has lots of very good extensions, and you can easily use your shell. If you don't understand what's good about it, that's a failure on your part. > If you're going to use a proprietary closed editor anyway It's open source though. > use something like a jetbrains IDE My experience with jetbrains has been mostly terrible. That doesn't mean that their IDE isn't good, but it means that they are worse than VSCode for me. > At least then you will have a lot of very complete and well-integrated features. I already have that.