タグ

ブックマーク / whileimautomaton.net (2)

  • Customize your own key mappings for Vim plugins - while (“im automaton”);

    On Sun, 21 Nov 2010 04:58:17 +0900, **** **** <****@************> wrote: > I am trying to figure out how to customize the textobj-entire plugin. > The default mappings are for `ie` and `ae` to select the entire > document. I would like to use `ia` and `aa` instead. Short answer Put the following lines in your vimrc: xmap aa <Plug>(textobj-entire-a) omap aa <Plug>(textobj-entire-a) xmap ia <Plug>(t

    punitan
    punitan 2010/11/22
  • Vim: Key mappingを極める - while (“im automaton”);

    Vimを使いこなす上で避けて通れないのがkey mappingです。Vimのデフォルトのキーバインドはそれ自体でもそれなりに優秀なのですが、キーの割り当て方が今一だったり、そもそもキーが割り当てられていない機能も多くあります。それをカスタマイズするための機能がkey mappingです。 Key mapping (あるいは単にmappingやmapとも呼ぶ)については:help map.txtを読めば一通りのことは分かるのですが、どういう風に使うべきかという観点からは詳しく説明されていませんし、掲載されているサンプルも実践という観点からは今一です。そこで、基的なところから始めて、よくあるパターンや使い分けの仕方、そしてハマりがちな落とし穴について述べていきたいと思います。 基 Key mappingを定義するコマンドは多数ありますが、基的な書式は以下の通りです: map [...]

    punitan
    punitan 2010/09/09
  • 1