English 中文(简体)
开放式的内尔树档案存放在不相邻的分裂中
原标题:Open Nerdtree file in non-adjacent split
  • 时间:2012-01-13 18:50:40
  •  标签:
  • vim
  • nerdtree

通常,我通过击中Ctrl+ H两度将 cur子转移到屏幕左边。 然而,这意味着,在我打开档案时,这些档案总是存放在“NERDTre”窗口附近。 我怎么能够打开与“NERDTre”窗口不相邻的分裂档案?

最佳回答

NERDtree will open a file in the previous window if you press o or enter. You can open it in a split of the previous window by pressing i, or in a vertical split by pressing s.

It sounds like you have Ctrl-H mapped to Ctrl-W h. The trick to not having NERDtree open the file into a window that is adjacent to the NERDTree window is to not have the adjacent window be the previous window.

为此,将“NERDTree”窗口关闭。 (:NERDTree Toggle, 或贵方的基调为NERDTree)。 然后转到适当的窗口,你想打开档案。 接着,NERDTree再次开放。 现在,你可以在以前的窗口上打开你使用 o或进入......或使用一或三分之一的档案。

To save having to toggle the NERDTree window open/close, you may want to set the option NERDTreeQuitOnOpen. Then you just need to open NERDTree when you re in a window that you intend to open a file into.

问题回答

我通常使用<代码>:NERDTreeFind,以便在左边从右边窗户移至NERDberry。

该指挥部显示,目前“NERDtree”窗口有公开档案。 在此基础上,前面的窗口是右边的窗口。 当然,如果你想要开立的档案在目录树上接近已经开立的档案,这只是方便的。

To quickly access :NERDTreeFind, I mapped it to Ctrl + m in my ~/.vimrc:

nnoremap <C-m> :NERDTreeFind<CR>




相关问题
Autoupdate VIM Plugins?

Is it possible to update vim plugins automatically?

how to unindent in vim without leaving edit mode?

I m writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block....

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

Vim - Deleting XML Comments

How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread ...

Limiting a match in vim to certain filetypes?

I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the ...

Profiling Vim startup time

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...

热门标签