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
76
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
250
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Producing Creativity
orderedlist
PRO
343
39k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Writing Fast Ruby
sferik
628
61k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Designing for Performance
lara
604
68k
Docker and Python
trallard
43
3.2k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
Documentation Writing (for coders)
carmenintech
67
4.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
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