I devoted a weekend to learn Vim and by the end of it was proficient. In the years since I've bonded with it to stage where I really struggle when I go back to ISPF. Luckily my emulator (Vista) supports keyboard shortcuts like CNTL+D to delete words, CNTL+left/CNTL+right to jump words and CNTL+E to jump to the end-of-line.

Vim is only useful if you can touch type. If you have to look at the keyboard it's not worth the effort.

On 1/03/2021 3:46 am, Tom Brennan wrote:
Thanks! I really need just take a couple of hours and learn about it, instead of always just jumping in without a bit it self-training.

On 2/27/2021 11:45 PM, David Crayford wrote:
On 27/02/2021 8:22 am, Tom Brennan wrote:
You take that back!! :)

Sorry... I just used vi a minute ago and although I finally remembered shift-g to move to the bottom, I had to goggle how to move back to the top.  gg  Of course! It's so obvious.


:1 will also jump to the top. 'g' isn't a command, it's used to escape although people assume it's goto as it's used to jump around the buffer.

I can remember when I first started learning vim I didn't find it particularly intuitive. Once I got over the initial learning curve it all made perfect sense. People like vim because its design philosophy echos that of Unix. In both Unix and in vim, you have a collection of atomic commands that perform one task well. More complicated tasks are done by combining the smaller predefined tasks. For example, the vim command dl deletes the next character,  dw deletes the next word, and db deletes the previous word. Here, d represents the delete operator and must be followed by a movement task. lt means move to the next character. w for the next word and b for the previous word. d2b will delete the previous 2 words. dtx will delete every character up to the next x in the current line.  Once you grok this you won't want to use another editor as you will find them unproductive. I also use Slickedit and Intellij IDEA and I have Vim emulation running in both. The key design is maximum economy of keystrokes. Your hand should be glued to the home row. I've remapped the Windows caps lock key to ESC (single key) and CNTL (multiple keys) to make this easier.

BTW, no need to google. Vim has excellent help. Just type :h motion and use CNTL-] to follow links.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to