Power of vi

2,405
-1

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,405
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Power of vi

  1. 1. Power of vi© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
  2. 2. What to Expect?Versions of viHandy TutorialPatterns in viMagic with vi © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 2 All Rights Reserved.
  3. 3. vi Versionsvi stands for “visual” First in its series After the line editors like ed Dates back to QWERTY keyboard days Designed to get maximum with minimumvim – vi improvedgvim- graphical vim © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 3 All Rights Reserved.
  4. 4. visual Editor BenefitsKey to Productivity Initial learning curve But goes down fast with practice Delivering more in long run Including generating codeSpeed without being Typist No mouse & Minimized keypad usage Short cutsUnique features like Recording © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
  5. 5. Handy Tutorial for Starters“vimtutor”Type it on your shellAnd try it right nowFollow what it saysAnd there you go using vim © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
  6. 6. Patterns in viModes: Command (Esc), File (:), EditEdit Modes: a, i, o and A, I, OOperations: c, d, r, s, y Prefix: Repeat for line, w for word Capitals: Till end of lineUndo: u, Redo: Ctrl+RPrefix numbers for repeatingSearch: / ? © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
  7. 7. Magic with viWrite a program to print from 1 to 1000 Without using any loops, conditionals, gotosPrint all in 4-digit formats prefixed by 0sNot really 0s but spacesMany more things ... Including recording across multiple files © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.
  8. 8. What all have we learnt?Versions of vi: vi, vim, gvimHandy Tutorial: vimtutorPatterns in vi: Command SetMagic with vi: Recording © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 8 All Rights Reserved.
  9. 9. Any Queries?© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.

×