Productive Text Editing      with Vim           Bryan Bibat       pangkaraniwang developer
Really old text-editors      vi – 35 years old     vim – 20 years old
Present in most *nix machines
Not just a weird editor with an        “Insert mode”
i – insert mode<esc> – normal mode   :e – open file     :w – write     :q – quit
vi – a language for editing
Tip 1:Use insert mode only as needed.
Tip 8:Plugins are fun.
Tip 3:Normal mode is faster for      navigation.
Tip 2:“i” is not the only way to go to           insert mode.
i – insert mode at currenta – (append) insert at next   I – insert at beginning A – append at end of line
o – new line at nextO – new line before
Tip 3:Normal mode is faster for      navigation.
Tip 3.1:Feel free to use the arrow keys   over h-j-k-l (though you  shouldnt use them much).
0 – beginning of line         $ – end of line         w – next word     e – end of next word         b – prev wordf[char] ...
* – next same word# – prev same word
/[pattern] – search for pattern ?[pattern] – search backward            n – next         N – previous
Tip 4:  Learn the many textmanipulation commands.
. – repeat last action       u – undo     <ctrl>r – redo
y – yank (copy)
Tip 4.1:Using certain commands twicewill apply the command to the          current line.
d – deletec – change (go to insert)
Tip 5:You must learn combining commands with motion      commands.
ct[space] - replace everything          until space
Tip 6:Visual mode allows you to select             text.
v – enter visual modeV – enter visual line mode
Tip 7:Split screen and tabs can makeprogramming more convenient.
:split – horizontal split  :vsplit – vertical splitctrl-w[direction] – switch   :tabnew – new tab     gt – change tab
Tip 8:Plugins are fun.
Tip 9:Learn a new thing every       day/week.
Thank you for listening!      github.com/bryanbibat            @bry_bibat         pd.bryanbibat.net
Thank you for listening!      github.com/bryanbibat            @bry_bibat         pd.bryanbibat.net
Productive text editing with Vim
Productive text editing with Vim
Productive text editing with Vim
Upcoming SlideShare
Loading in …5
×

Productive text editing with Vim

1,154 views
1,052 views

Published on

Quick lightning talk for PyConPH 2012

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,154
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Productive text editing with Vim

  1. 1. Productive Text Editing with Vim Bryan Bibat pangkaraniwang developer
  2. 2. Really old text-editors vi – 35 years old vim – 20 years old
  3. 3. Present in most *nix machines
  4. 4. Not just a weird editor with an “Insert mode”
  5. 5. i – insert mode<esc> – normal mode :e – open file :w – write :q – quit
  6. 6. vi – a language for editing
  7. 7. Tip 1:Use insert mode only as needed.
  8. 8. Tip 8:Plugins are fun.
  9. 9. Tip 3:Normal mode is faster for navigation.
  10. 10. Tip 2:“i” is not the only way to go to insert mode.
  11. 11. i – insert mode at currenta – (append) insert at next I – insert at beginning A – append at end of line
  12. 12. o – new line at nextO – new line before
  13. 13. Tip 3:Normal mode is faster for navigation.
  14. 14. Tip 3.1:Feel free to use the arrow keys over h-j-k-l (though you shouldnt use them much).
  15. 15. 0 – beginning of line $ – end of line w – next word e – end of next word b – prev wordf[char] – find char on same line t[char] – til char
  16. 16. * – next same word# – prev same word
  17. 17. /[pattern] – search for pattern ?[pattern] – search backward n – next N – previous
  18. 18. Tip 4: Learn the many textmanipulation commands.
  19. 19. . – repeat last action u – undo <ctrl>r – redo
  20. 20. y – yank (copy)
  21. 21. Tip 4.1:Using certain commands twicewill apply the command to the current line.
  22. 22. d – deletec – change (go to insert)
  23. 23. Tip 5:You must learn combining commands with motion commands.
  24. 24. ct[space] - replace everything until space
  25. 25. Tip 6:Visual mode allows you to select text.
  26. 26. v – enter visual modeV – enter visual line mode
  27. 27. Tip 7:Split screen and tabs can makeprogramming more convenient.
  28. 28. :split – horizontal split :vsplit – vertical splitctrl-w[direction] – switch :tabnew – new tab gt – change tab
  29. 29. Tip 8:Plugins are fun.
  30. 30. Tip 9:Learn a new thing every day/week.
  31. 31. Thank you for listening! github.com/bryanbibat @bry_bibat pd.bryanbibat.net
  32. 32. Thank you for listening! github.com/bryanbibat @bry_bibat pd.bryanbibat.net

×