- Learn how to learn
vimtutor
:help user-manual
- Never stop learning
- Pick up one new thing each week
What does Control-R do? :help <C-r>
How do I use completion in insert mode? :help ins-completion
How do I split the window? :help :split
/ :help usr_08.txt
How do I enable / use spellchecking? :help spell
T.I.L. :helpgrep [search_term]
exists!
- Stick with it
- vim can really suck in the beginning
- 30 min to work, 1 week for basic proficiency, 1 month to exceed
- Constant improvement after that!
Learning curve meme
| _________
| |
| |
|_|_________
More realistic curve
| /
| .-'
| /
|_|_________
- Keep an eye out for repetition
- Always ask, is there a way to do this better?
- Repeat with
.
- Record a macro with
q[register]
- Add a
[count]
to your actions - Visual Block
:help .
/ :help single-repeat
:help q
/ :help macro
:help count
const id = user.get('id');
const name = user.get('id');
const age = user.get('age');
- Roll your own vimrc
- Start simple and build it up over time
- Look at others, but don't copy a full configuration
- Great way to encourage learning
:help usr_05.txt
- Learn how to move around
- Arrow keys aren't that helpful
- Find the right motion for the desired outcome
- Take time to think about what you want to do
import React from 'react';
const greeter = (lang) =>
lang.toLowerCase() === 'spanish' ? 'Hola' : 'Hello';
const MyComponent = ({ name }) => (
<div>
<h1>{geeter()}!</h1>
<p>Your name is {name}</p>
</div>
);
export default MyComponent;
- Learn vim's language
[command][quantity][motion]
:help text-objects
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at orci sit amet orci auctor elementum blandit ac justo. Praesent volutpat leo quis pharetra mollis. In bibendum ante ornare pellentesque auctor.
Aliquam erat volutpat. Nam blandit ligula at mauris interdum, ac scelerisque nibh accumsan. Sed in nibh diam. Integer ullamcorper et nisl et placerat. Nam rutrum ac tellus at finibus. Etiam tincidunt vestibulum nulla quis molestie. Aliquam erat volutpat. Nam consectetur eleifend diam in lobortis.
<div>
<h1>List</h1>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</div>
You got this!