6 ms·
Selecting text with shift and arrows, moving across words with the control key and arrow keys, using home and end keys, using CTRL F and CTRL G, all those are a
by jokoon 9y ago
Selecting text with shift and arrows, moving across words with the control key and arrow keys, using home and end keys, using CTRL F and CTRL G, all those are already plenty enough for me.
I honestly don't understand why people use VIM or Emacs. I'm much more productive just with notepad.
Most editors can fold code block, use syntax highlight to make code so much more readable (if you take time to choose the right colors), highlight braces, autocomplete (even sublime text can do a weak autocomplete which is already quite handy).
To be honest, when you learn to type, using the shift, control, home and end keys should be the second thing you learn. Forget about vim and emacs, those were for times when people were coding over SSH. Use Nano if you're in a terminal. Also most of what coders do is read code, not write it.
- 59nadir 9y ago> Forget about vim and emacs, those were for times when people were coding over SSH. If you're struggling and have the suspicion that it might not be worth it for you in the end, sure. For everyone else, don't be afraid to learn how to be more effective by using a more expressive feature set for editing. I think your advice is potentially harmful. Just because you didn't end up learning this doesn't mean it's useless to other people. It's quite possible that you're just not learning effectively enough and you're not grasping the tools correctly. There's no shame in that, but to then advise people to not learn it only because you couldn't is completely pointless.
- jokoon 9y agoI'm just curious what kind of indispensable feature an editor like emacs or vim has. I don't see the productivity gain. Ultimately, it might just be pleasurable to learn to use something new and use it. You "feel" like you do things differently, but to me it's just another nerdy gadget thing.
- deleted 9y ago[deleted]
- jstanley 9y ago> those were for times when people were coding over SSH I do substantially all of my coding over SSH, and so do most of my friends.
- symlinkk 9y agowhy? that screams "bad devops" to me
- w0m 9y agoBeing able to ssh <build farm> && tmux attach to reconnect to your development environment is powerful, especially when your testing environment consists of connecting to a number of different systems at once. Examle, a persistent tmux session with splits on a big monitor, Vim/Editor in one pane with live-UT results in another and documentation/misc details (scratch?) in another kicked off as I save. Once kiddo's go to bed I can simply 'tmux attach' from any machine with access and be up and running. I use IDEs and Vim, but there is clear value to working completely inside the terminal.
- jstanley 9y agoThe same reason IPv4, Unix, and unencrypted email are still dominating: it's good enough, and it's available everywhere, with no fuss. Coding over SSH is just so convenient. It doesn't matter whether you're using a Raspberry Pi or a DigitalOcean VM. When you're coding in vim, you're not losing all of your IDE and just getting vim. You're losing all of your IDE and getting all of the Unix userspace. Unix is a great IDE.
- ino 9y agoI can't stand editing more than a few lines on a VPS because of the latency and uncertainty. Some letters appear fast, others take a second or more, it's maddening.
- melloc 9y agoI do all of my development on a remote box. All of my work is in a screen session, so I can always reattach to it. Since that box is a lot more stable than my Mac is, it doesn't take much effort to restore my workspace after OS X crashes. I also regularly leave builds and tests running while my laptop's asleep, and, because they're remote, they never cause my laptop to overheat and kick on its fan.
- toastking 9y agoTo add to what others have said, VIM has a lot of features of modern editors. They have code folding, autocomplete, and more. Most of it's built in but there's a multitude of plugins for all this.
- jokoon 9y agoExcept letting you put a cursor with the mouse. I don't know what this feature is not widespread enough.
- alwillis 9y agoI honestly don't understand why people use VIM or Emacs. I'm much more productive just with notepad. If you think lowest-common denominator stuff like Notepad equals productivity because it's easy and "discoverable", then I got nothing for you. There's a reason why the subtitle of Drew Neil's book is "Edit Text at the Speed of Thought": https://www.amazon.com/Practical-Vim-Thought-Pragmatic-Programmers/product-reviews/1934356980/ref=cm_cr_pr_top_helpful https://www.amazon.com/Practical-Vim-Thought-Pragmatic-Progr... Because when you're reasonably proficient with Vim, you think of what to do and with a few keystrokes, you've done it without the interruption of reaching for a mouse, selecting a menu command, etc. For many edits, in the time it takes to grab a mouse, orient where the pointer is on the screen and begin the process of selecting a GUI command, etc., you'd already be done using Vim and you're off to the next thing you want to do. Anyone who's been in the flow of coding doesn't want something that interrupts that and Vim is great at keeping you there. And because Vim uses a language, it's composable in way that VS Code, Notepad, Emacs and all of the rest of editors aren't. Once you understand how to delete a word (`dw` in Normal mode), you also know how to delete sentences, paragraphs, etc. Plugins can add their own text objects to extend the usefulness of the language. More at "Why Vim Can't Replace Emacs/Sublime Text, etc.": https://medium.com/@mkozlows/why-atom-cant-replace-vim-433852f4b4d1 https://medium.com/@mkozlows/why-atom-cant-replace-vim-43385... Forget about vim and emacs, those were for times when people were coding over SSH. Apparently you're not a systems admin, web developer or in devops, where people have to connect to servers via SSH and edit configuration files, scripts, etc. pretty much every day. The beauty is you can use Vim on your desktop or laptop for local editing tasks (especially gVim) and for remote editing via SSH, FTP, rsync. Finally, I've used over a dozen different editors over the years on macOS and other platforms; I decided I wanted one editor that had enough headroom that I couldn't outgrow regardless of the task at hand. Even though I've been using Vim for 4 or 5 years as my primary editor, I've barely scratched the surface of what it enables me to do.
- jokoon 9y agoSublime Text is, to me, much more modern and useful than vim.
- 9y ago
- alwillis 9y agoIt's telling that Microsoft has opted to integrate Neovim in VS Code to enable its Vim plugin to have perfect Vim compatibility: https://github.com/VSCodeVim/Vim https://github.com/VSCodeVim/Vim Integrating Vim makes it a no-brainer for those projects where I have to use VS Code.
- somezero 9y agoEditor macros are one of the reasons you'll want to use Emacs or Vim instead of notepad. They're just like linguistic macros: You'll never know you need one if you haven't used one. However unlike linguistic macros -where choosing to use one is much more of a design decision than a necessary step- the only viable alternative to editor macros are doing their job by hand.
- jokoon 9y agoI guess this is just pre-filled if/else/while/for loops snippets? ST3 does it too I guess. I don't really think those are very useful, they don't save you that much time. Your editor cannot guess what kind of code you precisely want to type. Or maybe you're using a language that has too much syntax. Or maybe you're typing too much code, and that can be a bad thing too.
- tincholio 9y ago> I guess this is just pre-filled if/else/while/for loops snippets? ST3 does it too I guess. No, you seem to be simply talking out of ignorance.
- ethagnawl 9y agoI can't tell whether or not you're trolling, but I'll bite. To provide a contrived example of the sort of editor macro capabilities (I believe) somezero was referring to: Imagine you have N lines of hashrocket style Ruby hashes (`{:foo => "bar"}`) and you want to convert all of them to JSON style hashes (`{foo: "bar"}`). In Vim, you can create a macro which records the keystrokes/commands used while massaging first hash (moving :s, removing =>s, etc.) and then replay that macro over any other hashes you want to change. I just performed a very unscientific test of the example I've provided above and it took < 10 seconds to write/record and apply the macro to 100 hashes - all without touching the mouse or thinking too hard about what I was doing. I'd be interested to know 1) if a similar operation is possible using traditional GUI editors, 2) how long it takes, 3) whether or not the same operation can be performed without touching the mouse and 4) whether or not those "operations" can be shared.