Vim basic
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Vim basic

on

  • 284 views

Vim basic

Vim basic

Statistics

Views

Total Views
284
Views on SlideShare
284
Embed Views
0

Actions

Likes
6
Downloads
13
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • I – ไม่ ignore case <br />

Vim basic Presentation Transcript

  • 1. Vim Basic @wingyplus
  • 2. About me Software Engineer Osdev Sriracha Manager Google Developers Group Chonburi
  • 3. Installation ● Mac OS X – Bundle (not lastest version) – Brew ● – ● MacVim Linux – Bundle ● – ● $ brew install vim $ apt-get install vim GVim Windows – GVim
  • 4. Mode ● Command Mode (default) ● Insert Mode ● Visual Mode
  • 5. Basic Movement hjkl
  • 6. Insert mode i Inserting before current cursor I Inserting @ first char of line a Appending after current cursor A Appending @ last char of line
  • 7. Exit Insert mode Esc
  • 8. Move word w Word e Word
  • 9. Delete character x
  • 10. Delete count character [n]x
  • 11. Delete line dd Delete line cc Delete line and change to Insert mode
  • 12. Delete count line <number>dd Delete <number> line <number>cc Delete <number> line and change to Insert mode
  • 13. Go to line :<number>
  • 14. Copy (Yank) yy <number>y
  • 15. Paste p,P
  • 16. Visual mode v,V,<C-v> Highlight text
  • 17. Write :w [filename]
  • 18. Quit :q
  • 19. Force quit :q!
  • 20. Edit :e [filename]
  • 21. Save and quit :x [filename]
  • 22. Replace :%s/<regex>/<text>/[g][c][i][I]
  • 23. Find /pattern ?pattern
  • 24. Window :sp,:vs
  • 25. Tab :tabnew [filename]
  • 26. Tab (continue) :tabnext
  • 27. Tab (continue) :tabprevious
  • 28. Tab (continue) :tabprevious
  • 29. Tab (continue) :tabclose
  • 30. Omni Completion ● filetype plugin on ● Use – i <C-x><C-o>
  • 31. Vimrc ● Path – Linux & OS X ● – $HOME/.vimrc Windows ● $HOME/_vimrc
  • 32. Simple conf ● Enable syntax highlight – ● Set indent – ● set tabstop=<number> Convert tab to space – ● syntax on set expandtab Detect filetype – filetype on – filetype plugin on – filetype indent on
  • 33. Plugins ● Pathogen ● Nerd Tree ● Nerd Commenter ● Ctrlp.vim ● Syntastic