SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Vim Basic
@wingyplus
About me
Software Engineer
Osdev Sriracha
Manager
Google Developers Group Chonburi
Installation
●

Mac OS X
–

Bundle (not lastest version)

–

Brew
●

–
●

MacVim

Linux
–

Bundle
●

–
●

$ brew install vim

$ apt-get install vim

GVim

Windows
–

GVim
Mode
●

Command Mode (default)

●

Insert Mode

●

Visual Mode
Basic Movement

hjkl
Insert mode
i
Inserting before current cursor
I
Inserting @ first char of line
a
Appending after current cursor
A
Appending @ last char of line
Exit Insert mode

Esc
Move word

w
Word
e
Word
Delete character

x
Delete count character

[n]x
Delete line
dd
Delete line
cc
Delete line and change to Insert mode
Delete count line
<number>dd
Delete <number> line
<number>cc
Delete <number> line and change to Insert mode
Go to line

:<number>
Copy (Yank)

yy
<number>y
Paste

p,P
Visual mode

v,V,<C-v>
Highlight text
Write

:w [filename]
Quit

:q
Force quit

:q!
Edit

:e [filename]
Save and quit

:x [filename]
Replace

:%s/<regex>/<text>/[g][c][i][I]
Find

/pattern
?pattern
Window

:sp,:vs
Tab

:tabnew [filename]
Tab (continue)

:tabnext
Tab (continue)

:tabprevious
Tab (continue)

:tabprevious
Tab (continue)

:tabclose
Omni Completion
●

filetype plugin on

●

Use
–

i <C-x><C-o>
Vimrc
●

Path
–

Linux & OS X
●

–

$HOME/.vimrc

Windows
●

$HOME/_vimrc
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
Plugins
●

Pathogen

●

Nerd Tree

●

Nerd Commenter

●

Ctrlp.vim

●

Syntastic

Weitere ähnliche Inhalte

Was ist angesagt?

Presentacion vim
Presentacion vimPresentacion vim
Presentacion vim
Icalia Labs
 
Introduction to vi editor
Introduction to vi editorIntroduction to vi editor
Introduction to vi editor
U.P Police
 
VI Editors
VI EditorsVI Editors
VI Editors
Deivanai
 
How to become a practical Vim user
How to become a practical Vim userHow to become a practical Vim user
How to become a practical Vim user
Kana Natsuno
 
Text expansion in vim
Text expansion in vimText expansion in vim
Text expansion in vim
mattboehm
 

Was ist angesagt? (20)

Vim FTW!
Vim FTW!Vim FTW!
Vim FTW!
 
Presentacion vim
Presentacion vimPresentacion vim
Presentacion vim
 
Vim - for newbies, by Roy Osherove
Vim - for newbies, by Roy OsheroveVim - for newbies, by Roy Osherove
Vim - for newbies, by Roy Osherove
 
Introduction to vi editor
Introduction to vi editorIntroduction to vi editor
Introduction to vi editor
 
07 vi text_editor
07 vi text_editor07 vi text_editor
07 vi text_editor
 
Using the Command Line with Magento
Using the Command Line with MagentoUsing the Command Line with Magento
Using the Command Line with Magento
 
VI Editors
VI EditorsVI Editors
VI Editors
 
How to become a practical Vim user
How to become a practical Vim userHow to become a practical Vim user
How to become a practical Vim user
 
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
 
Vi editor
Vi   editorVi   editor
Vi editor
 
Vim #selen
Vim #selenVim #selen
Vim #selen
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
Anacronia on speed
Anacronia on speedAnacronia on speed
Anacronia on speed
 
Tour of Rust
Tour of RustTour of Rust
Tour of Rust
 
screen and tmux
screen and tmuxscreen and tmux
screen and tmux
 
Vodafone 360 - Live Porting
Vodafone 360 - Live PortingVodafone 360 - Live Porting
Vodafone 360 - Live Porting
 
Haxe: What Makes It Cool
Haxe: What Makes It CoolHaxe: What Makes It Cool
Haxe: What Makes It Cool
 
Ensamblador emu 8086
Ensamblador emu 8086Ensamblador emu 8086
Ensamblador emu 8086
 
iOS Talks 1 - CodeCamp Osijek - Swift u praksi
iOS Talks 1 - CodeCamp Osijek - Swift u praksiiOS Talks 1 - CodeCamp Osijek - Swift u praksi
iOS Talks 1 - CodeCamp Osijek - Swift u praksi
 
Text expansion in vim
Text expansion in vimText expansion in vim
Text expansion in vim
 

Andere mochten auch

日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall
日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall
日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall
博文 斉藤
 
Shell で制限付き並列処理をしよう
Shell で制限付き並列処理をしようShell で制限付き並列処理をしよう
Shell で制限付き並列処理をしよう
博文 斉藤
 

Andere mochten auch (20)

第31回WebSig会議【セッション2】 タブレットが与える影響について考える
第31回WebSig会議【セッション2】 タブレットが与える影響について考える第31回WebSig会議【セッション2】 タブレットが与える影響について考える
第31回WebSig会議【セッション2】 タブレットが与える影響について考える
 
日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall
日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall
日本 GNU AWK ユーザー会スライド 1 - OSC2012 Tokyo/Fall
 
「埋蔵金」はあなたの家に埋まってる~行政サービスの「コスト意識」を啓発し、ゲーミフィケーションによって継続的コミットメントへとつなげる~
「埋蔵金」はあなたの家に埋まってる~行政サービスの「コスト意識」を啓発し、ゲーミフィケーションによって継続的コミットメントへとつなげる~「埋蔵金」はあなたの家に埋まってる~行政サービスの「コスト意識」を啓発し、ゲーミフィケーションによって継続的コミットメントへとつなげる~
「埋蔵金」はあなたの家に埋まってる~行政サービスの「コスト意識」を啓発し、ゲーミフィケーションによって継続的コミットメントへとつなげる~
 
Markdown で行こう!
Markdown で行こう!Markdown で行こう!
Markdown で行こう!
 
気軽にvtグラフを体験できるアプリの提案
気軽にvtグラフを体験できるアプリの提案気軽にvtグラフを体験できるアプリの提案
気軽にvtグラフを体験できるアプリの提案
 
Railsの基礎
Railsの基礎Railsの基礎
Railsの基礎
 
自動車や電車の力は何N?
自動車や電車の力は何N?自動車や電車の力は何N?
自動車や電車の力は何N?
 
Zerobase プロボノ・インターンシップ・スキーム案
Zerobase プロボノ・インターンシップ・スキーム案Zerobase プロボノ・インターンシップ・スキーム案
Zerobase プロボノ・インターンシップ・スキーム案
 
特許とはどういうものか
特許とはどういうものか特許とはどういうものか
特許とはどういうものか
 
Shell で制限付き並列処理をしよう
Shell で制限付き並列処理をしようShell で制限付き並列処理をしよう
Shell で制限付き並列処理をしよう
 
オープンソースとプラットフォームとお金
オープンソースとプラットフォームとお金オープンソースとプラットフォームとお金
オープンソースとプラットフォームとお金
 
vtグラフの面積を直感的に理解するアプリの提案
vtグラフの面積を直感的に理解するアプリの提案vtグラフの面積を直感的に理解するアプリの提案
vtグラフの面積を直感的に理解するアプリの提案
 
なぜ社会には情報アーキテクトが必要なのか?
なぜ社会には情報アーキテクトが必要なのか?なぜ社会には情報アーキテクトが必要なのか?
なぜ社会には情報アーキテクトが必要なのか?
 
Markdownでプレゼンテーション!
Markdownでプレゼンテーション!Markdownでプレゼンテーション!
Markdownでプレゼンテーション!
 
awk v.s. bashどっちが強い?@OSC2011Tokyo
awk v.s. bashどっちが強い?@OSC2011Tokyoawk v.s. bashどっちが強い?@OSC2011Tokyo
awk v.s. bashどっちが強い?@OSC2011Tokyo
 
Kyakusaki.rb
Kyakusaki.rbKyakusaki.rb
Kyakusaki.rb
 
Makrdownを利用するテスト設計
Makrdownを利用するテスト設計Makrdownを利用するテスト設計
Makrdownを利用するテスト設計
 
Sorting techniques in Perl
Sorting techniques in PerlSorting techniques in Perl
Sorting techniques in Perl
 
CSS Nite LP38に行ってきた
CSS Nite LP38に行ってきたCSS Nite LP38に行ってきた
CSS Nite LP38に行ってきた
 
mdpress(MarkDown Press)を使ったプレゼンテーション作成
mdpress(MarkDown Press)を使ったプレゼンテーション作成mdpress(MarkDown Press)を使ったプレゼンテーション作成
mdpress(MarkDown Press)を使ったプレゼンテーション作成
 

Ähnlich wie Vim basic

Mission vim possible-full
Mission vim possible-fullMission vim possible-full
Mission vim possible-full
Sam Gottfried
 
Mission vim possible
Mission vim possibleMission vim possible
Mission vim possible
Sam Gottfried
 
[NCTU] [CCCA] vim rocks
[NCTU] [CCCA] vim rocks[NCTU] [CCCA] vim rocks
[NCTU] [CCCA] vim rocks
Xatierlike Lee
 

Ähnlich wie Vim basic (20)

Mission vim possible-full
Mission vim possible-fullMission vim possible-full
Mission vim possible-full
 
Basics
BasicsBasics
Basics
 
Linux notification
Linux notificationLinux notification
Linux notification
 
Mission vim possible
Mission vim possibleMission vim possible
Mission vim possible
 
Coding with Vim
Coding with VimCoding with Vim
Coding with Vim
 
Vi editor
Vi editorVi editor
Vi editor
 
Unix shell talk - RIT SSE
Unix shell talk - RIT SSEUnix shell talk - RIT SSE
Unix shell talk - RIT SSE
 
Vi editor
Vi editorVi editor
Vi editor
 
Vim cheat-sheet-en
Vim cheat-sheet-enVim cheat-sheet-en
Vim cheat-sheet-en
 
How to Vim - for beginners
How to Vim - for beginnersHow to Vim - for beginners
How to Vim - for beginners
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShell
 
[NCTU] [CCCA] vim rocks
[NCTU] [CCCA] vim rocks[NCTU] [CCCA] vim rocks
[NCTU] [CCCA] vim rocks
 
Linux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellLinux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shell
 
wp cli
wp cliwp cli
wp cli
 
Java notes 1 - operators control-flow
Java notes   1 - operators control-flowJava notes   1 - operators control-flow
Java notes 1 - operators control-flow
 
Java script
Java scriptJava script
Java script
 
Sa
SaSa
Sa
 
Vi Editor in 100 minutes
Vi Editor in 100 minutesVi Editor in 100 minutes
Vi Editor in 100 minutes
 
An introduction-to-windows-powershell-1193007253563204-3
An introduction-to-windows-powershell-1193007253563204-3An introduction-to-windows-powershell-1193007253563204-3
An introduction-to-windows-powershell-1193007253563204-3
 

Kürzlich hochgeladen

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Kürzlich hochgeladen (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

Vim basic

Hinweis der Redaktion

  1. I – ไม่ ignore case