SlideShare a Scribd company logo
1 of 35
Download to read offline
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 current
a – (append) insert at next
   I – insert at beginning
 A – append at end of line
o – new line at next
O – 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
  shouldn't use them much).
0 – beginning of line
         $ – end of line

         w – next word
     e – end of next word
         b – prev word

f[char] – find char on same line
        t[char] – 'til char
* – next same word
# – prev same word
/[pattern] – search for pattern
 ?[pattern] – search backward
            n – next
         N – previous
Tip 4:

  Learn the many text
manipulation commands.
. – repeat last action
       u – undo
     <ctrl>r – redo
y – yank (copy)
Tip 4.1:

Using certain commands twice
will apply the command to the
          current line.
d – delete
c – 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 mode

V – enter visual line mode
Tip 7:

Split screen and tabs can make
programming more convenient.
:split – horizontal split
  :vsplit – vertical split
ctrl-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

More Related Content

What's hot

What's hot (12)

Vim Editor And Basic Scripting (Ch-7)
Vim Editor And Basic Scripting (Ch-7)Vim Editor And Basic Scripting (Ch-7)
Vim Editor And Basic Scripting (Ch-7)
 
Vi editor
Vi editorVi editor
Vi editor
 
Linux text editors
Linux text editorsLinux text editors
Linux text editors
 
Vi editor
Vi   editorVi   editor
Vi editor
 
Linux fundamental - Chap 07 vi
Linux fundamental - Chap 07 viLinux fundamental - Chap 07 vi
Linux fundamental - Chap 07 vi
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
An approach to Programming Contests with C++
An approach to Programming Contests with C++An approach to Programming Contests with C++
An approach to Programming Contests with C++
 
Est 8 2 nd
Est 8 2 ndEst 8 2 nd
Est 8 2 nd
 
Turing machine by_deep
Turing machine by_deepTuring machine by_deep
Turing machine by_deep
 
Turing machine - theory of computation
Turing machine - theory of computationTuring machine - theory of computation
Turing machine - theory of computation
 
Vi editor
Vi editorVi editor
Vi editor
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 

Similar to Productive text editing with Vim

Similar to Productive text editing with Vim (20)

Presentacion vim
Presentacion vimPresentacion vim
Presentacion vim
 
07 vi text_editor
07 vi text_editor07 vi text_editor
07 vi text_editor
 
andrew's guide to vim
andrew's guide to vimandrew's guide to vim
andrew's guide to vim
 
lectuer 21-22.pptx
lectuer 21-22.pptxlectuer 21-22.pptx
lectuer 21-22.pptx
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to Vim
 
Vim Cheat Sheet.pdf
Vim Cheat Sheet.pdfVim Cheat Sheet.pdf
Vim Cheat Sheet.pdf
 
swl--3 (1).docx
swl--3 (1).docxswl--3 (1).docx
swl--3 (1).docx
 
Vim and Python
Vim and PythonVim and Python
Vim and Python
 
Vi editor
Vi editorVi editor
Vi editor
 
Vi Editor
Vi EditorVi Editor
Vi Editor
 
015-Editing-Files-With-Vi.pdf
015-Editing-Files-With-Vi.pdf015-Editing-Files-With-Vi.pdf
015-Editing-Files-With-Vi.pdf
 
What is Vim?
What is Vim?What is Vim?
What is Vim?
 
Rubizza #1 | Special Lecture. Vim
Rubizza #1 | Special Lecture. Vim Rubizza #1 | Special Lecture. Vim
Rubizza #1 | Special Lecture. Vim
 
VIM for (PHP) Programmers
VIM for (PHP) ProgrammersVIM for (PHP) Programmers
VIM for (PHP) Programmers
 
Augusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim IntroductionAugusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim Introduction
 
tools
toolstools
tools
 
tools
toolstools
tools
 
Basics
BasicsBasics
Basics
 
Introduction to Vim, the text editor
Introduction to Vim, the text editorIntroduction to Vim, the text editor
Introduction to Vim, the text editor
 
Elementary vim tricks
Elementary vim tricksElementary vim tricks
Elementary vim tricks
 

More from bryanbibat

Static Sites in Ruby
Static Sites in RubyStatic Sites in Ruby
Static Sites in Rubybryanbibat
 
So You Want to Teach Ruby and Rails...
So You Want to Teach Ruby and Rails...So You Want to Teach Ruby and Rails...
So You Want to Teach Ruby and Rails...bryanbibat
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)bryanbibat
 
Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0
Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0
Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0bryanbibat
 
Version Control with Git for Beginners
Version Control with Git for BeginnersVersion Control with Git for Beginners
Version Control with Git for Beginnersbryanbibat
 
Rails is Easy*
Rails is Easy*Rails is Easy*
Rails is Easy*bryanbibat
 
Things Future IT Students Should Know (But Don't)
Things Future IT Students Should Know (But Don't)Things Future IT Students Should Know (But Don't)
Things Future IT Students Should Know (But Don't)bryanbibat
 
Things IT Undergrads Should Know (But Don't)
Things IT Undergrads Should Know (But Don't)Things IT Undergrads Should Know (But Don't)
Things IT Undergrads Should Know (But Don't)bryanbibat
 
From Novice to Expert: A Pragmatic Approach to Learning
From Novice to Expert: A Pragmatic Approach to LearningFrom Novice to Expert: A Pragmatic Approach to Learning
From Novice to Expert: A Pragmatic Approach to Learningbryanbibat
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8bryanbibat
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCupbryanbibat
 
Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)bryanbibat
 
Latest Trends in Web Technologies
Latest Trends in Web TechnologiesLatest Trends in Web Technologies
Latest Trends in Web Technologiesbryanbibat
 
Virtualization
VirtualizationVirtualization
Virtualizationbryanbibat
 
Some Myths in Software Development
Some Myths in Software DevelopmentSome Myths in Software Development
Some Myths in Software Developmentbryanbibat
 
Latest Trends in Open Source Web Technologies
Latest Trends in Open Source Web TechnologiesLatest Trends in Open Source Web Technologies
Latest Trends in Open Source Web Technologiesbryanbibat
 
What it takes to be a Web Developer
What it takes to be a Web DeveloperWhat it takes to be a Web Developer
What it takes to be a Web Developerbryanbibat
 
Ruby and Rails by example
Ruby and Rails by exampleRuby and Rails by example
Ruby and Rails by examplebryanbibat
 

More from bryanbibat (20)

Hd 10 japan
Hd 10 japanHd 10 japan
Hd 10 japan
 
Static Sites in Ruby
Static Sites in RubyStatic Sites in Ruby
Static Sites in Ruby
 
So You Want to Teach Ruby and Rails...
So You Want to Teach Ruby and Rails...So You Want to Teach Ruby and Rails...
So You Want to Teach Ruby and Rails...
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
 
Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0
Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0
Upgrading to Ruby 2.1, Rails 4.0, Bootstrap 3.0
 
Version Control with Git for Beginners
Version Control with Git for BeginnersVersion Control with Git for Beginners
Version Control with Git for Beginners
 
Rails is Easy*
Rails is Easy*Rails is Easy*
Rails is Easy*
 
Things Future IT Students Should Know (But Don't)
Things Future IT Students Should Know (But Don't)Things Future IT Students Should Know (But Don't)
Things Future IT Students Should Know (But Don't)
 
Things IT Undergrads Should Know (But Don't)
Things IT Undergrads Should Know (But Don't)Things IT Undergrads Should Know (But Don't)
Things IT Undergrads Should Know (But Don't)
 
From Novice to Expert: A Pragmatic Approach to Learning
From Novice to Expert: A Pragmatic Approach to LearningFrom Novice to Expert: A Pragmatic Approach to Learning
From Novice to Expert: A Pragmatic Approach to Learning
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCup
 
Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)
 
Latest Trends in Web Technologies
Latest Trends in Web TechnologiesLatest Trends in Web Technologies
Latest Trends in Web Technologies
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Some Myths in Software Development
Some Myths in Software DevelopmentSome Myths in Software Development
Some Myths in Software Development
 
Latest Trends in Open Source Web Technologies
Latest Trends in Open Source Web TechnologiesLatest Trends in Open Source Web Technologies
Latest Trends in Open Source Web Technologies
 
What it takes to be a Web Developer
What it takes to be a Web DeveloperWhat it takes to be a Web Developer
What it takes to be a Web Developer
 
Ruby and Rails by example
Ruby and Rails by exampleRuby and Rails by example
Ruby and Rails by example
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 

Productive text editing with Vim