→ やはり、やや入力が手間 グローバルコマンド 調べたら組み合わせによりもっといろいろできる。 ヤンクする場合 → qレジスタにヤンクした結果が格納される :g//yだけだと最後にヒットした行しか"0に格納されない 末尾Qをつけると大文字レジスタなので"qに追記されていく qqqであらかじめ"qレジスタの内容を消去している(空のマクロを書き込んでいる) ファイル末尾に移動する場合
Tip 227 Printable Monobook Previous Next created 2002 · complexity intermediate · author Arun Easi · version 6.0 The global command :g is very useful. Here are some examples showing the power of :g. Brief explanation of :g[] :[range]g/pattern/cmd This acts on the specified [range] (default whole file), by executing the Ex command cmd for each line matching pattern (an Ex command is one starting wi
:a!これで貼り付ければ、簡単に貼り付けができる。 インデントも自動で張られないし、登録している拡張機能も動かない。 今までは :set paste! として貼り付けをしていたけど、これだと貼り付け後に各種の設定がクリアされてしまって面倒だったんだけど、これで解決。
Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
Vimをお使いの皆様の多くは、pathogenとgit-submoduleを駆使してプラグインを管理しているのではないかと思います。 pathogenとgit-submoduleの問題私もこの方法を使っていたのですが、git-submoduleをVimプラグインの管理に使うのはオーバースペックだと感じていました。 私はプラグイン開発者ではないので、プラグインのバージョンを固定したいという欲求があるわけでもないですし、できるだけ新しい物を使いたいわけです。 そうすると、たとえば毎朝「git submodule update」とかやっちゃうともう大変です。 毎日「plugin version bump」みたいなコミットをしなきゃいけないわけですよ。 私は常に最新のプラグインを使いたいだけなのに、コミットログがどんどん汚れていきます。 また、外の環境でプラグインを管理しなきゃいけないというのが、
「Vim完全バイブル」のメモの続きです。 今回はウィンドウを分割して複数ファイルを同時に表示したり、バッファを切り替えたりするためのコマンドをまとめます。 「第5章 複数ウィンドウの扱い」の内容は以下の通りです。 ウィンドウの分割 分割ウィンドウのサイズの変更 バッファ バッファ一覧の表示 編集バッファの切り替え ウィンドウの分割 以下のコマンドを使うと、Vimのウィンドウを分割して複数のファイルを同時に表示することができる。 ウィンドウ分割関連のコマンド :new [{file}]ウィンドウを横方向(上下)に分割し、新しくできたウィンドウで新ファイルの編集を開始する(new) :vne [{file}]ウィンドウを縦方向(左右)に分割し、新しくできたウィンドウで新ファイルの編集を開始する(vnew) :sp [+{command}] [{file}]ウィンドウを横方向(上下)に分割し、新
vim の text-object をより便利に使えるプラグイン - surround.vim ここにいい感じで紹介されてるんだけど、これはもうホント便利。 vim7.0から実装されたっていうtext-object関連の機能と併せて、なかなかコマンドを覚えられないんで自分なりにまとめてみた。 vim text-object 関連操作(含むsorround.vim 基本は引数(って言っていいのかな?)3つで操作 行いたい操作、範囲、対象の記号 d(delete),y(yank),c(change),v(view mode?範囲を選択できる) などのあとに .i(inside), ,a(all)押して .範囲' とか " , ( など (ここで t を押すと、xmlタグの操作が可能 ex. di" "の中を削除 (Delete Inside " ci" "の中を削除してinsetr modeに
開発効率を上げるためのプラグインや機能のご紹介。 ■neocomplcache http://github.com/Shougo/neocomplcache 自動で補完候補をポップアップしてくれるプラグインで、Vimで効率的な開発をしようと思うのであれば必須のプラグインです。vimrcに以下の1行を加えればプラグインが有効になります。 let g:neocomplcache_enable_at_startup = 1有効にした上で適当にファイルを編集すれば自動で補完候補が出てきます。候補を選ぶ時はCtrl+Nで次の候補、Ctrl+Pで前の候補が選択できます。 設定項目もたくさんあります。:help neocomplcache@ja とすれば日本語ヘルプが見れるので、参照しながら設定してください。 もしこのプラグインを使ったことがないのであれば、人生の半分は損をしています。 ■テキストオブジ
設定ファイルを編集したり、コーディングすることだけが、Vimエディタの使い道ではありません。 Vimエディタに備わっている高い編集能力は、他の雑多な作業においても十分に役に立つものがあります。 このページでは、それら小作業において多用されることの多い、 一時ファイル、作業用ファイル、メモ用ファイルをより活用する術をご紹介します。 コーディングの共に、議事録のメモに、計算処理の結果算出にと、役立つ場面の多い技術です。 (Windows, Mac) 概要 設定ファイルを編集したり、コーディングすることだけが、Vimエディタの使い道ではありません。 Vimエディタに備わっている高い編集能力は、他の雑多な作業においても十分に役に立つものがあります。 このページでは、それら小作業において多用されることの多い、 一時ファイル、作業用ファイル、メモ用ファイルをより活用する術をご紹介します。 コーディング
へっぽこvimmer丸出しですが、vim歴1年未満ということでご勘弁ください。 コマンドモードにコピーした文字を貼り付け :を叩いてコマンドモードにしたら、 CTRL+rを押して、「"」(ダブルクォーテーション)を押すと、ペーストできます。 不便だなぁと思いつつも、今まで手打ちしてました。 カーソル下の文字を手軽に検索 検索したい単語(多分wとかbでジャンプ出来るワード単位)の上にカーソルを持っていって、前方検索なら「#」、後方検索なら「*」を叩くと、即座に次に見つかった単語にジャンプされます。 今までは、.vimrcに以下のような設定をしておいて、ビジュアルモードで選択してから検索していました。 PLAIN TEXT TEXT: vnoremap <silent> // y/<C-R>=escape(@", '\\/.*$^~[]')<CR><CR> まぁこれはこれで便利なんですけど
基本的なキーバインドを覚えただけでほぼデフォルトな状態で使ってるVimなのですが、そろそろ少しずつでもVimを勉強していこうかなーと思うのでVimユーザー必見!?のサイトの1つhttp://vim-users.jp/の初心者に役立ちそうなとことか個人的に覚えたいとこをメモ的にまとめてみました。 あとで順番に読みながら勉強したいと思います。 参考サイト vim-users.jp: http://vim-users.jp/ 上記サイトのVim Hacksの目次ページ的なもの: http://vim-users.jp/vim-hacks-project/ 基本と基本的なカスタマイズとか http://vim-users.jp/2009/04/hack1/ http://vim-users.jp/2009/04/hack2/ http://vim-users.jp/2009/04/hack3/ h
« git でバイナリを気軽に扱える、git-largefile の dropbox 版を作った。 | Main | gcc は副作用のある関数呼び出しを含む式評価順序を最適化する。 » vimに起動プロファイラが実装された。 Patch 7.2.269 Patch 7.2.269 Problem: Many people struggle to find out why Vim startup is slow. Solution: Add the --startuptime command line flag. Files: runtime/doc/starting.txt, src/globals.h, src/feature.h, src/main.c, src/macros.h http://groups.google.co.jp/group/vim_dev/b
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く