vim: 7.3.35
project.vim: 1.4.1 http://www.vim.org/scripts/script.php?script_id=69
rails.vim: 4.4 http://www.vim.org/scripts/script.php?script_id=1567
NERD_tree: 4.2.0 https://github.com/scrooloose/nerdtree
久しぶりに :Rproject とか打ってみたら
E492: エディタのコマンドではありません: Rprojectとか言われる。なぜだ。
調べてみると、だいぶ前から Rproject を廃止して Rtree に変わったらしい。
幸い project.vim のツリーがディレクトリ追加をしてくれないことに苛立って一時期 NERD_tree を利用していたのでそのまま利用することにする。
ちなみにVundleでのインストール方法は
Bundle 'The-NERD-tree'を追記。
インストール後、いつも通りrailsのファイルを開いて
:Rtreeを実行で無事ツリー表示できます。
 - GVIM.png.jpg)
NERD_treeの使いかたのまとめ
:NERDTree #=> ノードツリーを開く 引数にパスを渡すとそれ以下を開く j #=> 下に移動 k #=> 上に移動 o #=> ディレクトリの開閉、ファイルを開く s #=> ファイルを縦に分割して開く i #=> ファイルを横に分割して開く t #=> タブで開く r #=> 選択以下のディレクトリ、ファイルを更新 C #=> 選択ディレクトリ以下で表示 B #=> ブックマーク表示、非表示 m #=> メニューファイル、ディレクトリーでメニューを開くと
NERDTree Menu. Use j/k/enter and the shortcuts indicated ========================================================== > (a)dd a childnode (m)ove the current node (d)elete the current node (c)copy the current nodeとなるので
ディレクトリ追加の場合は a 押下
Add a childnode ========================================================== Enter the dir/file name to be created. Dirs end with a '/' /home/nanigashi/test/hoge/ # 最後に / を付けるとディレクトリ
Add a childnode ========================================================== Enter the dir/file name to be created. Dirs end with a '/' /home/nanigashi/test/foo # 最後に / を付けないとファイルファイル、ディレクトリの移動は m 押下
Rename the current node ========================================================== Enter the new path for the node: /home/chiba/test/hoge/foo # 新しいパスを入れるファイル、ディレクトリの削除は d 押下
Delete the current node ========================================================== Are you sure you wish to delete the node: /home/chiba/test/hoge/bar (yN): # 削除 y 削除しない nファイル、ディレクトリのコピーは c 押下
Copy the current node ========================================================== Enter the new path to copy the node to: /home/chiba/test/hoge/bar # コピー先を入れる
ブックマークで project.vim っぽく管理する
ディレクトリ上で
:Bookmark [ブックマーク名]とすると

となって簡単にツリーを開けるようになります。
ブックマークの削除は
:ClearBookmarks [ブックマーク名]です。
他にもいろいろあるっぽいです。
こちらにまとまってます。
http://vimwiki.net/?scripts%2F18
以上です。
RailsによるアジャイルWebアプリケーション開発 第4版
posted with amazlet at 12.02.03
Sam Ruby Dave Thomas David Heinemeier Hansson
オーム社
売り上げランキング: 25470
オーム社
売り上げランキング: 25470