Vim for Humans
181–190 of 251 posts
Re: Vim for Humans
#182Earlier quoted context omitted.
As someone who only uses Vim casually, what's an example of a bad default? For someone who is new to Vim, they wouldn't know if the controls are bad, or tough to learn e.g. using jkl; instead of arrow keys.
Vim used to have very very conservative defaults, but it was fixed in Vim 8. Some very useful features like persistent undo are still not enabled by default.
Re: Vim for Humans
#183Earlier quoted context omitted.
I always thought that if I were ever to write a book on vim, I'd start with a thorough introduction to ed, followed by a thorough introduction to ex, finally followed by a thorough tutorial on all the features of plain-old vanilla vi, only then to introduce the vim parts and macros and graphics and things.
I can't tell if your comment is sarcastic or not, but I, too, would love to read that.
Re: Vim for Humans
#184Earlier quoted context omitted.
hjkl (not jkl;) are a) ergonomically bad because they are one key off of home row position and b) completely useless for anyone who types with a different keyboard such as Dvorak, and presumably some foreign language ones. also, HJKL actually IS the arrow keys... but it's the arrow keys from an ancient computer that no longer exists. People get all uppity about it being the "right" way but there's no logical argument…
out of interest - as hjkl are one offset from the default jkl; home row position, do you opt to use the index for both h and j or shift your hand one key over to the left? I notice from observing other people type that there is an aversion to moving hand position, whereas the idea of moving hand position is not unfathomable to me, perhaps as I have played piano and violin. For example, I generally use middle finger t…
I notice from observing other people type that there is an aversion to moving hand position, whereas the idea of moving hand position is not unfathomable to me, perhaps as I have played piano and violin.
I'm not averse to moving hand position, and I don't use the strict one-finger-per-key rules either, but I do try to minimise hand movement overall since it means faster typing.
Re: Vim for Humans
#185A little background. I am familiar with vi and use it only when I ssh into a server. But I never really felt it was more convenient or an improvement over a GUI based text editor or IDE on my development machine. Eg- gedit for simple text editing, Android Studio for android development, Atom for python coding. Everything works out of the box with minimal tweaking required. Genuine questions: -At what point on the lea…
My simple whys. No mouse needed is the biggest. It is like when you watch someone not use short cuts in your OS or they use mouse to select the word and then right click for copy. diw to delete whole word. yy then 5p to repeat the line 5 times instead of copy paste. / for search is really nice. gg to go to the top or G to go to the bottom. These things make it worth using vim for me. I use vim mode on all the editing…
to delete a word.
to duplicate a line. [0]
for search.
to go to the top or bottom.
I'm increasingly unconvinced that vim has much to offer in terms of shortcuts when compared to actual modern editors, rather than some kind of strawman notepad.
[0] No numeric repetition, but I was never convinced by that feature TBH. In most cases, the mental overhead of working out the appropriate number for a situation was greater for me than just spamming a button a few times.
Re: Vim for Humans
#186Earlier quoted context omitted.
> With a keyboard and a mouse, I have to reach over, select the whole line (being careful not to over or under select), hit Ctrl+C, move the cursor down to the beginning of the next line, and hit Ctrl+V. Sure, but who does that? In any text editor on the Mac its: - Command-Left to move to the beginning of the line - Shift-Command-Right to select to the end of the line - Command-C to copy - Command-V to paste One anno…
- [2] Command-Left to move to the beginning of the line - [3] Shift-Command-Right to select to the end of the line - [2] Command-C to copy - [2] Command-V to paste Total keypresses: 9 Total keypresses for yyp: 3 (4 if you have to esc to normal mode first) My point being that even the simple and straightforward actions you provided are more complex than they seem.
Secondly, that's just using the minimal set of shortcuts that work anywhere. If you're in an actual editor, it almost certainly has a shortcut like Ctrl-Shift-D for duplicate line.
And I think a lot of vim users might be surprised how simple and straightforward things can be in a modern editor.
Re: Vim for Humans
#187The folks behind the "Head First!" series seem to understand the appeal of making content approachable. So did the creators of the "For Dummies" series. Hell, Reagan used jelly beans.
It feels dishonest, somehow. Just call it a vim book, or whatever.
Re: Vim for Humans
#188A little background. I am familiar with vi and use it only when I ssh into a server. But I never really felt it was more convenient or an improvement over a GUI based text editor or IDE on my development machine. Eg- gedit for simple text editing, Android Studio for android development, Atom for python coding. Everything works out of the box with minimal tweaking required. Genuine questions: -At what point on the lea…
Well, it depends on what you're doing. For example, if I want to duplicate a line in vi, I can type 'yyp' and _bam_: duplicate line. With a keyboard and a mouse, I have to reach over, select the whole line (being careful not to over or under select), hit Ctrl+C, move the cursor down to the beginning of the next line, and hit Ctrl+V. If I want to change the contents of a quoted string, I can type 'f"lct"' and start ty…
e.g. in Sublime:
>if I want to duplicate a line
Ctrl-Shift-D
>If I want to change the contents of a quoted string
Ctrl-Shift-M selects inside parens. It doesn't do quotes by default, but there might be a way to enable that.
EDIT: I looked this up afterwards, and discovered Ctrl-Shift-Space selects a quoted (or parened) block, although it includes the quotes.
>If I want to change each line from the current line to the next blank line to a continuous quoted string
Okay, this seems a bit contrived, and I'm not convinced the average vim user would bother with this rather than just doing something like I"}kA" or whatever.
Unless you're bulk editing, in which case I think Sublime's regex find and replace would be similarly effective, and probably easier to get right than typing the whole command in one.
I will note however that selecting text and pressing a paren key wraps it in parens, and as above it might be possible to make that work for quotes.
Re: Vim for Humans
#189What Vim, and a lot of other programs, really need is a single plastic-covered card which tells you how to use the program. You can squeeze a summary of calculus on one such card. Is it too much to ask for software? (I really, really want that for Blender. The Blender hotkey document is 9 pages and years out of date.)
Re: Vim for Humans
#190Earlier quoted context omitted.
- [2] Command-Left to move to the beginning of the line - [3] Shift-Command-Right to select to the end of the line - [2] Command-C to copy - [2] Command-V to paste Total keypresses: 9 Total keypresses for yyp: 3 (4 if you have to esc to normal mode first) My point being that even the simple and straightforward actions you provided are more complex than they seem.
Firstly, that's 6 keypresses, because you don't need to lift your finger off Command. Secondly, that's just using the minimal set of shortcuts that work anywhere . If you're in an actual editor, it almost certainly has a shortcut like Ctrl-Shift-D for duplicate line. And I think a lot of vim users might be surprised how simple and straightforward things can be in a modern editor.