General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lawrence D’Oliveiro
DistroTube
comments
Comments by "Lawrence D’Oliveiro" (@lawrencedoliveiro9104) on "Vim Can Save You Hours Of Work" video.
Quoth Jamie Zawinski: “A programmer has a problem, and thinks: “I know—I’ll use a regular expression to solve it”. Now they have two problems.”
4
Emacs has built-in help to ease this sort of thing. Type CTRL/H, then for example A (“apropos”) to find commands matching a keyword, C to look up the meaning of a keystroke, etc. “?” gives you a list.
3
13:56 So you needed two separate command runs, one to put quotes at the starts of the lines, the other to put them at the ends, rather than being able to put them into a single keystroke macro. #TheEmacsWay
2
@vitiok78 It’s not either/or.
1
Not only that, but it has a stupid and counterintuitive convention for positioning the cursor.
1
7:50 Do you have keystroke macros? Here’s an example, when I was creating my Python binding https://github.com/ldo/qahirah for the Cairo graphics library, one of the tasks was to translate the list of operator constants from C: typedef enum _cairo_operator { CAIRO_OPERATOR_CLEAR, CAIRO_OPERATOR_SOURCE, CAIRO_OPERATOR_OVER, CAIRO_OPERATOR_IN, CAIRO_OPERATOR_OUT, CAIRO_OPERATOR_ATOP, ... } cairo_operator_t; into Python: OPERATOR_CLEAR = 0 OPERATOR_SOURCE = 1 OPERATOR_OVER = 2 OPERATOR_IN = 3 OPERATOR_OUT = 4 OPERATOR_ATOP = 5 ... Yes, a lot of repetitive operations were involved. How would you have automated it?
1
2:28 #TheEmacsWay Ctrl-Shift-Backspace,Arrow, Ctrl-Y. Use whichever arrow (up or down) depending on whether you are exchanging the current with the previous line or the next line.
1
Does screenkey do mouse buttons properly? The old key-mon did. My update of key-mon is here: https://github.com/ldo/key-mon .
1
VSCode is an IDE, and IDEs want to impose a particular build system on you. In the Open Source world, we deal with a variety of projects that use a whole variety of build systems. It’s not like Windows, where everthing is based on Microsoft’s tools. This makes text editors more versatile than IDEs, because a good text editor, like Emacs, can drive any build system.
1
@armpitpuncher Emacs doesn’t need “customizing” to use any build system: it can already invoke the necessary build commands.
1
@armpitpuncher It runs the commands you give it.
1
@armpitpuncher Visual Studio is an IDE, you yourself said.
1
Vim insists on treating files as being divided up into lines, though. In other words, it is really only good for editing text files. Whereas I have successfully patched binary files using Emacs.
1
Here’s a challenge for vim users: editing Python code. Ordinary editors may have commands for jumping between, e.g. “{” and ”}” symbols, but Python doesn’t use these as statement brackets. Instead, it uses indentation. How do you jump between lines with matching indentation? To make things a bit easier, I write my Python code with “#end” lines to mark the ends of blocks, e.g. if «cond» : ... stmts ... else : ... stmts ... #end if This gives you something to jump to at the end of the block. How would you define commands to implement such navigation? I wrote my own in elisp #TheEmacsWay.
1
6:42 Can’t you just make a selection and indent that?
1