SlideShare a Scribd company logo
1 of 12
USING VIM   The best text
            editor ever
WHY USE VIM?


• Color syntax highlighting
• Very customizable
• Highly portable
• Highly active community
• Plug-ins

• Suuuuuuper fast
BEFORE WE BEGIN REMEMBER…




VIM’s effectiveness comes from not using the
          arrow keys or the mouse
THE BASICS

 Vim has many modes, but the most used ones are:

• Normal mode (aka Command Mode): you can enter all the
  normal editor commands. If you star t the editor you are in
  this mode.

• Inser t mode: the text you type is inser ted into the buf fer.

• Visual mode: This is like Normal mode, but the movement
  commands extend a highlighted area. When a non-
  movement command is used, it is executed for the
  highlighted area.
NORMAL MODE

Main mode to make all the movement of the cursor

•   h j k l: moves the cursor left down up right respectively
•   w: jump to the start of the next word
•   e: jump to the end of the word
•   b: jump backward by words
•   0: start of the line
•   $: end of the line
•   ^: first non-blank character of the line
•   gg: top of the buf fer
•   G: bottom of the buf fer
•   #G: go to line #

N o te : P r e f i x a c u r s o r m o v e m e n t c o m m a n d w i t h a n u m b e r to r e p e a t i t . Fo r ex a m p l e , 4 j
moves down 4 lines.
MORE NORMAL MODE COMMANDS

   x: delete character under the cursor
   r: replace the character under the cursor
   R: replace everything you type until you press <ESC>
   cw: change word
   c$: change to the end of the line
   cc: change entire line
   f: find character
   p: paste from buf fer
   y: copy selected text
   . : repeat last command
   u: undo

And many more…
INSERT MODE

   i: Enter insert mode at cursor
   I: Enter insert mode at the start of the line
   a: Enter insert mode after the cursor
   A: Enter insert mode at the end of the line
   o: open a new line below the cursor
   O: open a new line above the cursor
   <ESC>: exit insert mode
VISUAL MODE

   v: start visual mode
   V: linewise visual mode
   <Ctrl> + v: block visual mode
   i: select the inner stuf f of things (i.e. vit, vi{, vi(, etc)
   <Esc>: exit visual mode
OTHER STUFF

 Command-line mode is used to enter Ex commands
  (":"), search patterns ("/" and " ?”)
  i.e. saving(:w), quitting (:q), running terminal commands (: !),
  finding and replacing: (:s)

 Searching:
     /pattern – searches for the pattern in the document
     ?pattern – searches for the pattern backwards
     n – looks for the next ocurrence of the search
     N – looks for the previous ocurrence of the search
     :%s/old/new/g - replaces all old with new throughout file
SOME PLUGINS

 pathogen - https://github.com/tpope/vim-pathogen
 rails.vim - https://github.com/tpope/vim-rails
 NERD-tree - https://github.com/scrooloose/nerdtree
 NERD-commenter -
  https://github.com/scrooloose/nerdcommenter
 Ctrl-P - https://github.com/kien/ctrlp.vim
 Snipmate - https://github.com/msanders/snipmate.vim
 Surround - https://github.com/tpope/vim-surround
 Zen-coding - https://github.com/mattn/zencoding-vim

And many more…
RESOURCES

   Derek Wyatt’s tutorials - http://www.derekwyatt.org/vim/
   Vimcasts – http://vimcasts.org
   Use vim like a Pro - https://leanpub.com/VimLikeAPro
   VIM’s Documentation -
    http://vimdoc.sourceforge.net/htmldoc/ usr_toc.html
   Coderwall’s VIM network - https://coderwall.co m/n/vim
   Cheatsheet -
    http://cloud.github.com/downloads/ahrencode/Miscellaneous
    /vim-cheatsheet.pdf
   VIM tutorial -
    http://blog.interlinked.org/tutorials/ vim_tutorial.html
   Vimtweets - http://www.vimtweets.com / || @vimtips
   My VIM config - https://github.com/rkrdo/vimfiles
THANK YOU!

More Related Content

What's hot

Vi editor Linux Editors
Vi editor Linux EditorsVi editor Linux Editors
Vi editor Linux EditorsTONO KURIAKOSE
 
Introduction to Vim, the text editor
Introduction to Vim, the text editorIntroduction to Vim, the text editor
Introduction to Vim, the text editorVysakh Sreenivasan
 
07 vi text_editor
07 vi text_editor07 vi text_editor
07 vi text_editorShay Cohen
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editortechbed
 
Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009scweng
 
Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compiladosDiego Erazo
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Marco Muñoz
 
Unit 5 vim an advanced text editor
Unit 5 vim an advanced text editorUnit 5 vim an advanced text editor
Unit 5 vim an advanced text editorroot_fibo
 
C++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarreC++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarrePete Goodliffe
 
C Sharp Jn (3)
C Sharp Jn (3)C Sharp Jn (3)
C Sharp Jn (3)jahanullah
 
Tech talk 01.06.2017
Tech talk 01.06.2017Tech talk 01.06.2017
Tech talk 01.06.2017AboutYouGmbH
 
Programming ppt files (final)
Programming ppt files (final)Programming ppt files (final)
Programming ppt files (final)yap_raiza
 
为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?勇浩 赖
 
JSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael GreifenederJSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael GreifenederChristoph Pickl
 

What's hot (20)

Vi editor Linux Editors
Vi editor Linux EditorsVi editor Linux Editors
Vi editor Linux Editors
 
Introduction to Vim, the text editor
Introduction to Vim, the text editorIntroduction to Vim, the text editor
Introduction to Vim, the text editor
 
07 vi text_editor
07 vi text_editor07 vi text_editor
07 vi text_editor
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editor
 
Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009
 
Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compilados
 
Vim basic
Vim basicVim basic
Vim basic
 
Ensamblador emu 8086
Ensamblador emu 8086Ensamblador emu 8086
Ensamblador emu 8086
 
Ms access modules
Ms access modulesMs access modules
Ms access modules
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086
 
Foss manual (1)
Foss manual (1)Foss manual (1)
Foss manual (1)
 
Unit 5 vim an advanced text editor
Unit 5 vim an advanced text editorUnit 5 vim an advanced text editor
Unit 5 vim an advanced text editor
 
C++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarreC++: The Cathedral and the Bizarre
C++: The Cathedral and the Bizarre
 
Vim Vi Improved
Vim Vi ImprovedVim Vi Improved
Vim Vi Improved
 
C Sharp Jn (3)
C Sharp Jn (3)C Sharp Jn (3)
C Sharp Jn (3)
 
Loops
LoopsLoops
Loops
 
Tech talk 01.06.2017
Tech talk 01.06.2017Tech talk 01.06.2017
Tech talk 01.06.2017
 
Programming ppt files (final)
Programming ppt files (final)Programming ppt files (final)
Programming ppt files (final)
 
为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?
 
JSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael GreifenederJSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael Greifeneder
 

Similar to Presentacion vim (20)

Vi Editor
Vi EditorVi Editor
Vi Editor
 
lectuer 21-22.pptx
lectuer 21-22.pptxlectuer 21-22.pptx
lectuer 21-22.pptx
 
Productive text editing with Vim
Productive text editing with VimProductive text editing with Vim
Productive text editing with Vim
 
Linux text editors Vim nano
Linux text editors Vim nano Linux text editors Vim nano
Linux text editors Vim nano
 
Linux text editors
Linux text editorsLinux text editors
Linux text editors
 
Using vi
Using viUsing vi
Using vi
 
Vim
VimVim
Vim
 
Vim Basics
Vim BasicsVim Basics
Vim Basics
 
What is Vim?
What is Vim?What is Vim?
What is Vim?
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
Vim - for newbies, by Roy Osherove
Vim - for newbies, by Roy OsheroveVim - for newbies, by Roy Osherove
Vim - for newbies, by Roy Osherove
 
Vi editor
Vi editorVi editor
Vi editor
 
Vim commands
Vim commandsVim commands
Vim commands
 
Vi editor in linux
Vi editor in linuxVi editor in linux
Vi editor in linux
 
Python
PythonPython
Python
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to Vim
 
Linux programming - Getting self started
Linux programming - Getting self started Linux programming - Getting self started
Linux programming - Getting self started
 
1_Editors_in_Unix
1_Editors_in_Unix1_Editors_in_Unix
1_Editors_in_Unix
 
VIM for Programmers
VIM for ProgrammersVIM for Programmers
VIM for Programmers
 

More from Icalia Labs

Building an Api the Right Way
Building an Api the Right WayBuilding an Api the Right Way
Building an Api the Right WayIcalia Labs
 
Agile practices for management
Agile practices for managementAgile practices for management
Agile practices for managementIcalia Labs
 
Building something out of Nothing
Building something out of NothingBuilding something out of Nothing
Building something out of NothingIcalia Labs
 
Furatto tertulia
Furatto tertuliaFuratto tertulia
Furatto tertuliaIcalia Labs
 
Simple but Useful Design Principles.
Simple but Useful Design Principles.Simple but Useful Design Principles.
Simple but Useful Design Principles.Icalia Labs
 
Your time saving front end workflow
Your time saving front end workflowYour time saving front end workflow
Your time saving front end workflowIcalia Labs
 
Customer Experience Basics
Customer Experience BasicsCustomer Experience Basics
Customer Experience BasicsIcalia Labs
 
Introduction to Swift programming language.
Introduction to Swift programming language.Introduction to Swift programming language.
Introduction to Swift programming language.Icalia Labs
 
Time Hacks for Work
Time Hacks for WorkTime Hacks for Work
Time Hacks for WorkIcalia Labs
 
Culture in a team
Culture in a teamCulture in a team
Culture in a teamIcalia Labs
 
Using github development process in your company
Using github development process in your companyUsing github development process in your company
Using github development process in your companyIcalia Labs
 
The Art of Pitching
The Art of PitchingThe Art of Pitching
The Art of PitchingIcalia Labs
 
Rails Best Practices
Rails Best PracticesRails Best Practices
Rails Best PracticesIcalia Labs
 
Introduccion meteor.js
Introduccion meteor.jsIntroduccion meteor.js
Introduccion meteor.jsIcalia Labs
 

More from Icalia Labs (16)

Building an Api the Right Way
Building an Api the Right WayBuilding an Api the Right Way
Building an Api the Right Way
 
Agile practices for management
Agile practices for managementAgile practices for management
Agile practices for management
 
Building something out of Nothing
Building something out of NothingBuilding something out of Nothing
Building something out of Nothing
 
Furatto tertulia
Furatto tertuliaFuratto tertulia
Furatto tertulia
 
Simple but Useful Design Principles.
Simple but Useful Design Principles.Simple but Useful Design Principles.
Simple but Useful Design Principles.
 
Your time saving front end workflow
Your time saving front end workflowYour time saving front end workflow
Your time saving front end workflow
 
Customer Experience Basics
Customer Experience BasicsCustomer Experience Basics
Customer Experience Basics
 
Introduction to Swift programming language.
Introduction to Swift programming language.Introduction to Swift programming language.
Introduction to Swift programming language.
 
Time Hacks for Work
Time Hacks for WorkTime Hacks for Work
Time Hacks for Work
 
Culture in a team
Culture in a teamCulture in a team
Culture in a team
 
Curso rails
Curso railsCurso rails
Curso rails
 
Using github development process in your company
Using github development process in your companyUsing github development process in your company
Using github development process in your company
 
The Art of Pitching
The Art of PitchingThe Art of Pitching
The Art of Pitching
 
Rails Best Practices
Rails Best PracticesRails Best Practices
Rails Best Practices
 
Introduccion meteor.js
Introduccion meteor.jsIntroduccion meteor.js
Introduccion meteor.js
 
Rspec and Rails
Rspec and RailsRspec and Rails
Rspec and Rails
 

Presentacion vim

  • 1. USING VIM The best text editor ever
  • 2. WHY USE VIM? • Color syntax highlighting • Very customizable • Highly portable • Highly active community • Plug-ins • Suuuuuuper fast
  • 3. BEFORE WE BEGIN REMEMBER… VIM’s effectiveness comes from not using the arrow keys or the mouse
  • 4. THE BASICS  Vim has many modes, but the most used ones are: • Normal mode (aka Command Mode): you can enter all the normal editor commands. If you star t the editor you are in this mode. • Inser t mode: the text you type is inser ted into the buf fer. • Visual mode: This is like Normal mode, but the movement commands extend a highlighted area. When a non- movement command is used, it is executed for the highlighted area.
  • 5. NORMAL MODE Main mode to make all the movement of the cursor • h j k l: moves the cursor left down up right respectively • w: jump to the start of the next word • e: jump to the end of the word • b: jump backward by words • 0: start of the line • $: end of the line • ^: first non-blank character of the line • gg: top of the buf fer • G: bottom of the buf fer • #G: go to line # N o te : P r e f i x a c u r s o r m o v e m e n t c o m m a n d w i t h a n u m b e r to r e p e a t i t . Fo r ex a m p l e , 4 j moves down 4 lines.
  • 6. MORE NORMAL MODE COMMANDS  x: delete character under the cursor  r: replace the character under the cursor  R: replace everything you type until you press <ESC>  cw: change word  c$: change to the end of the line  cc: change entire line  f: find character  p: paste from buf fer  y: copy selected text  . : repeat last command  u: undo And many more…
  • 7. INSERT MODE  i: Enter insert mode at cursor  I: Enter insert mode at the start of the line  a: Enter insert mode after the cursor  A: Enter insert mode at the end of the line  o: open a new line below the cursor  O: open a new line above the cursor  <ESC>: exit insert mode
  • 8. VISUAL MODE  v: start visual mode  V: linewise visual mode  <Ctrl> + v: block visual mode  i: select the inner stuf f of things (i.e. vit, vi{, vi(, etc)  <Esc>: exit visual mode
  • 9. OTHER STUFF  Command-line mode is used to enter Ex commands (":"), search patterns ("/" and " ?”) i.e. saving(:w), quitting (:q), running terminal commands (: !), finding and replacing: (:s)  Searching:  /pattern – searches for the pattern in the document  ?pattern – searches for the pattern backwards  n – looks for the next ocurrence of the search  N – looks for the previous ocurrence of the search  :%s/old/new/g - replaces all old with new throughout file
  • 10. SOME PLUGINS  pathogen - https://github.com/tpope/vim-pathogen  rails.vim - https://github.com/tpope/vim-rails  NERD-tree - https://github.com/scrooloose/nerdtree  NERD-commenter - https://github.com/scrooloose/nerdcommenter  Ctrl-P - https://github.com/kien/ctrlp.vim  Snipmate - https://github.com/msanders/snipmate.vim  Surround - https://github.com/tpope/vim-surround  Zen-coding - https://github.com/mattn/zencoding-vim And many more…
  • 11. RESOURCES  Derek Wyatt’s tutorials - http://www.derekwyatt.org/vim/  Vimcasts – http://vimcasts.org  Use vim like a Pro - https://leanpub.com/VimLikeAPro  VIM’s Documentation - http://vimdoc.sourceforge.net/htmldoc/ usr_toc.html  Coderwall’s VIM network - https://coderwall.co m/n/vim  Cheatsheet - http://cloud.github.com/downloads/ahrencode/Miscellaneous /vim-cheatsheet.pdf  VIM tutorial - http://blog.interlinked.org/tutorials/ vim_tutorial.html  Vimtweets - http://www.vimtweets.com / || @vimtips  My VIM config - https://github.com/rkrdo/vimfiles

Editor's Notes

  1. vim –u NONE -N