Power of vi

  • 1,899 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,899
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
0
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Power of vi© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
  • 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. 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. 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. 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. 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. 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. 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. Any Queries?© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.