4 ms·
People 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 ID
by jiggawatts 5y ago
People 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> VSCode has it's own key binds for various movements (like indenting a block) Like tab or is something more elaborate?
- dijit 5y agoSorry, I wasn’t clear; I meant multi line indentation. In vim and vim emulators you select multiple lines with visual mode and press > Or you do “10>>” and it will indent the next 10 lines. This is how you do it in vscode: https://code.visualstudio.com/docs/editor/codebasics#_multiple-selections-multicursor https://code.visualstudio.com/docs/editor/codebasics#_multip... This is how you do it in IntelliJ: https://www.jetbrains.com/webstorm/guide/tips/multi-cursor/ https://www.jetbrains.com/webstorm/guide/tips/multi-cursor/
- lou1306 5y agoTry "Delete until the 3rd closed parenthesis", or "Delete everything within the {} block currently under the cursor". In Vim it's pretty natural, because commands are compositional. It's like you can "talk" with the editor and tell them exactly what you want, rather than just moving around and inserting/removing/selecting characters. Granted, it's not easy to learn and perhaps not for everyone. I think it takes a certain kind of... disposition, maybe?, to appreciate it.
- _v7gu 5y agoToday I learned there was a better way than "dt)..", but that is still one of the things I like most about vim: verb+adverb+subject goes a really long way instead of trying to learn millions of keyboard shortcuts. Each new verb really expands your options rather than doing a single thing like a keyboard shortcut.