NerdTreeディレクトリパネルに現在のファイルを表示するショートカットはありますか? TextMateのようNerdTree - ツリー内にファイルを表示
'引き出しにファイルを明らかに' - Ctrlキー+コマンド+ R
NerdTreeディレクトリパネルに現在のファイルを表示するショートカットはありますか? TextMateのようNerdTree - ツリー内にファイルを表示
'引き出しにファイルを明らかに' - Ctrlキー+コマンド+ R
で:時間NERDTree:
:NERDTreeFind :NERDTreeFind
Find the current file in the tree. If no tree exists for the current tab,
or the file is not under the current root, then initialize a new tree where
the root is the directory of the current file.
私はそれがデフォルトで何にも束縛はないと思うので、あなたがする必要はあり自分でキーバインドを行います。あなたがバッファ変更するたび
nmap ,n :NERDTreeFind<CR>
が
nmap ,m :NERDTreeToggle<CR>
と一緒にこれをチェックしてください、私の.vimrcに表示される内容である、それは、同期操作を自動化し、nerdtreeは自動的に更新されます(私はhereからコピー小さな変更で)
" Check if NERDTree is open or active
function! IsNERDTreeOpen()
return exists("t:NERDTreeBufName") && (bufwinnr(t:NERDTreeBufName) != -1)
endfunction
" Call NERDTreeFind iff NERDTree is active, current window contains a modifiable
" file, and we're not in vimdiff
function! SyncTree()
if &modifiable && IsNERDTreeOpen() && strlen(expand('%')) > 0 && !&diff
NERDTreeFind
wincmd p
endif
endfunction
" Highlight currently open buffer in NERDTree
autocmd BufEnter * call SyncTree()
ありがとう、私はこのような長い時間のためにこれを探してきました! :) – Gnagno
キーマップは機能しますが、vimでNERDTreeFindを呼び出す方法はありますか? – toszter
@toszter just ':NERDTreeFind' – Thomas
NERDTreeがそのタブ内に作成されるたびにこれを行うように設定する方法はありますか? –