Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

…In the remotest galaxy… There’s Known as… planet a EARTH…

Slide 5

Slide 5 text

Jaime ponders… True story

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

• Edit text at the speed of light • Precise like a surgeon • 100% keyboard driven • It’s on every platform • Highly configurable • Very extensible via plugins • Great documentation • It’s free • Worthwhile long-term investment (since 1991/1976)

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

“You are a surgeon performing emergency surgery.” “That’s how I feel when I am using Vim” “With very precise moves and using the right tools you quickly slice, extract, and inject new code.” “Laying on the bed is the patient, your code. “

Slide 10

Slide 10 text

“Vim is just a programming language for editing text” “edit text at the speed of thought”

Slide 11

Slide 11 text

• Maximize what you can do with as few keystrokes as possible • It’s all about editing text efficiently • VIM Modes By using different modes you avoid the need to use weird combinations

Slide 12

Slide 12 text

• VIM Modes Normal or Command Insert Visual Command-line etc…

Slide 13

Slide 13 text

• You spend more time editing and manipulating text than writing it in the first place • That’s why the initial mode is the NORMAL mode

Slide 14

Slide 14 text

• The most important things are at the tip of your fingers You can move around right from the home row

Slide 15

Slide 15 text

• Vim commands build upon each other with outstanding results d delete a character dw delete a word d2w delete two words

Slide 16

Slide 16 text

• Vim commands build upon each other with outstanding results d2wword delete two (operator, count, motion)

Slide 17

Slide 17 text

• Jedi Youngling • Jedi Padawan • Jedi Knight • Jedi Master • Jedi Grand Master

Slide 18

Slide 18 text

1. Learn touch typing 2. Normal and Insert modes 3. Basic commands

Slide 19

Slide 19 text

• i -> insert mode, ESC back to normal mode • x -> delete character • dd -> delete current line (and copy) • p -> paste • y -> copy character (yank) • yy -> copy current line • hjkl -> mode around (←↓↑→) • :help • :w -> save, :q -> quit, :wq -> save and quit

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

1. Learn more commands! 2. Combine operators, counts and motions 3. Commands in caps are big versions of commands in lower case 4. The .(dot) command repeats the last change 5. The search and find commands 6. The visual mode 7. Code completion 8. Macros

Slide 22

Slide 22 text

• a -> instead after character (append) • w -> go to the beginning of next word (word) • b -> go to the beginning of last work (back) • e -> go to the end of next word (end) • u -> undo last change (undo) • cw -> change word • o -> insert new line after the current one • gg -> go to the beginning of the document • $ -> go to the end of the line, 0 -> go to the beginning of the line

Slide 23

Slide 23 text

• c2w -> change two words • d$ -> delete until the end of the line • daw -> delete all word (word and whitespace around it) • d2p -> delete two paragraphs • dt) -> delete until the parenthesis (not incluse) • di” -> delete inside quotes • da” -> delete inside quotes and quotes • % -> go to matching bracket • d2/hello -> delete until second occurrence of hello

Slide 24

Slide 24 text

Taken from “Learn Vim Progressively” http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/

Slide 25

Slide 25 text

• I -> insert at the beginning of the line • A -> append at the end of the line • D -> delete until the end of the line (shortcut for d$) • C -> change until the end of the line • O -> new line before the current line • G -> go to the end of the file • J -> append previous line

Slide 26

Slide 26 text

• Vim is design to tackle repetition • Use the . command to repeat the last change • Use . to repeat the last command • Learn which combos are more repeatable

Slide 27

Slide 27 text

• / to seach for patterns (e.g. /hello) • n for next occurrence • N for previous occurrence • * runs search for word under cursor • f find next occurrence of character in current line • ; next character in same line • , previous character in same line • F find but in reverse • t, like f but sets the cursor before the character

Slide 28

Slide 28 text

• The visual mode lets you select text and perform operations on that selection • v -> go into visual mode with character selection • V -> go into visual mode with line selection • -> go into visual mode with block selection • Useful for instance for: • J -> join all lines together • < > -> add indentation • = -> autoindent

Slide 29

Slide 29 text

• In insert mode you can have code completion • Use and

Slide 30

Slide 30 text

• You can record useful chains of commands for later use • Use q to start recording a macro • Type register where to store macro • Record macro • Save macro with q • If they are really useful you can save them permanently

Slide 31

Slide 31 text

• ReSharper is very keyboard friendly • Use ReSharper for macro refactorings • Use Vim for micro changes and moving around

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Vim is a fast and efficient text editor that will make you a faster and more efficient developer. It’s available on almost every OS—if you master the techniques in this book, you’ll never need another text editor. In more than 100 Vim tips, you’ll quickly learn the editor’s core functionality and tackle your trickiest editing and writing tasks. It’s Maciej Certified!

Slide 38

Slide 38 text

Learn Vim Progressively http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/ http://pluralsight.com/training/Courses/TableOfContents/smash-into-vim Smash into Vim Vim Adventures http://vim-adventures.com/

Slide 39

Slide 39 text

Don’t overwrite Visual Studio and reSharper’s Key Bindings in the beginning

Slide 40

Slide 40 text

Windows Mac

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

http://bit.ly/more-instantly-better-vim “More Instantly Better Vim” http://bit.ly/expert-level-vim “Write code faster: Expert-level vim”

Slide 43

Slide 43 text

http://www.derekwyatt.org/vim/vim-tutorial-videos/ Vim tutorial videos http://vimcasts.org/ Vimcasts, Practical VIM

Slide 44

Slide 44 text

No content