Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
vim useful tips for newcomer
Search
Daichi Arai
July 10, 2012
0
78
vim useful tips for newcomer
Daichi Arai
July 10, 2012
Tweet
Share
More Decks by Daichi Arai
See All by Daichi Arai
let's-begin-tiling-window-manager
darai2k
0
260
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
39
1.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Designing for humans not robots
tammielis
253
25k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Practical Orchestrator
shlominoach
188
11k
Stop Working from a Prison Cell
hatefulcrawdad
270
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Transcript
Vimの便利な操作 初級編 Powered by Rabbit 1.0.8
アジェンダ Vimの便利な移動 豊富な組み合わせ textobject 1/20
Vimのモード モードごとにキー設定ができる 好きなように設定できる ex) abcde 2/20
1. Vimの便利な移動 基本 行頭行末移動 単語移動 文字移動 行移動 段落移動 括弧移動 挿入モード
3/20
基本移動 h,j,k,l カーソルキー相当 4/20
行頭行末移動 0,^,$ Home,End相当 5/20
単語移動 w,W,b,B 単語の先頭へ単語単位(小文字) スペース区切り単位(大文字)で移動 e,E,ge,gE 単語の末尾へ単語単位(小文字) スペース区切り単位(大文字)で移動 6/20
文字移動 t,T 行内の指定された文字の直前まで移動 f,F 行内の指定された文字まで移動 7/20
行移動 gg,G 指定された行へ移動 H,M,L 画面内の特定行へ移動 8/20
段落移動 {,} 段落ごとの移動 9/20
括弧移動 % 対応する括弧にジャンプ 標準添付のmatchit.vimプラグインを利用すると rubyの do〜end にも対応してくれる 10/20
挿入モードへの移行(1) a 文字の後ろへカーソルを移動して挿入モード i 文字の前へカーソルを移動して挿入モード 11/20
挿入モードへの移行(2) A 行の末尾へカーソルを移動して挿入モード I 行の先頭へカーソルを移動して挿入モード 12/20
挿入モードへの移行(3) o 空行を下に追加して挿入モード O 空行を上に追加して挿入モード 13/20
挿入モードへの移行(4) s カーソルの文字を削除して挿入モード S カーソルの行を削除して挿入モード C カーソル位置から末尾までを削除して挿入モード 14/20
2. 豊富な操作の組み合わせ 移動キー、オペレータは数字と組み合わせるこ とができます ex) 10j, 5w, 5G, 3fa 15/20
オペレータとは y,d,<,>,= など ヤンクやインデントなど文字列を操作するもの ex) 3yyp, V3j3> 16/20
3. text-objects オブジェクト指向とは関係ありません テキストをひとかたまりの”モノ(オブジェクト )”として扱う機能 詳しくは:help text-objects 17/20
例えば 単語 クオーテーションで囲まれた文字 括弧で囲まれた文字 タグで囲まれた文字列など 18/20
何ができるか オペレータの対象として扱えます ex) di’ でシングルクオートの中を削除など 19/20
surround.vimを使おう text-objectsの機能拡張プラグイン ex) [example]を(example)にする 20/20 Powered by Rabbit 1.0.8