Upgrade to Pro — share decks privately, control downloads, hide ads and more …

vim operation and my hotkey

vim operation and my hotkey

Toyama.rb #17 エディタについて語ろう会 LT 資料

Avatar for Kunihiko Ito

Kunihiko Ito

May 13, 2017
Tweet

More Decks by Kunihiko Ito

Other Decks in Programming

Transcript

  1. vimの操作と俺とホットキー Powered by Rabbit 2.2.0 俺とホットキー 大変共感しました ✓ 自分の使ってる Vim

    はこうだ よって言いたい 比較みたいにまとめてみました ✓ Vimではホットキーというかは微妙ですが ✓ ✓
  2. vimの操作と俺とホットキー Powered by Rabbit 2.2.0 キーの表記 Control key と v

    を同時に入力 Vim Ctrl-v ✓ Emacs Ctrl + v "俺とホットキー"の表記 ✓
  3. vimの操作と俺とホットキー Powered by Rabbit 2.2.0 入力補完 Vim(insert mode) Ctrl-x Ctrl-l

    ✓ <Tab> (ervandew/supertab plugin を利用) ✓ Emacs (Ctrl + SPC)
  4. vimの操作と俺とホットキー Powered by Rabbit 2.2.0 ファイル履歴から開く Vim :b <Tab>(補完) ✓

    <Space>b Shougo/unite.vim plugin を入れて nnoremap <Space>b :Unite buffer<CR> ✓ Emacs (Ctrl + ;) 動作同じじゃないかも
  5. vimの操作と俺とホットキー Powered by Rabbit 2.2.0 バックタグジャンプ Vim Ctrl-t tmux の

    prefix-key に使ってるので使ってない ✓ Emacs (Ctrl + j > Ctrl + b)
  6. vimの操作と俺とホットキー Powered by Rabbit 2.2.0 引用符を含む文字列の操作 (text-objects) text-objects a' ('を含む'で囲われた文字列)

    ✓ i' ('を含まない'で囲われた文字列) ✓ 例 ya' ✓ yi" ✓ tpope/vim-surround でさらに便利に
  7. vimの操作と俺とホットキー Powered by Rabbit 2.2.0 設定(~/.vimrc) if &compatible set nocompatible

    endif set runtimepath+=~/.vim/repos/github.com/Shougo/dein.vim if dein#load_state('~/.vim/dein') call dein#begin('~/.vim/dein') call dein#add('Shougo/unite.vim') call dein#add('ervandew/supertab') call dein#add('tpope/vim-surround') call dein#add('vim-scripts/twilight256.vim') call dein#end() call dein#save_state() endif filetype plugin indent on syntax enable colorscheme twilight256 set clipboard=unnamedplus set expandtab tabstop=2 shiftwidth=2 set nobackup noremap ; : noremap : ; nnoremap <Space>b :Unite buffer<CR>