How to use nerdtree and mvim behave like netbeans or eclipse?
I want to use mvim as my general purpose text editor for code development. I want the default view to directory list view on the left vertical split pane and the file I double click on will be in the right vertical split pane. This is much the same in netbeans or eclipse. Is there anyway to set this to be the default mvim view, or hotkeys to put it in this mode?
on my macbook pro, I can open mvim by typing:
mvim .
This opens a directory tree view of the current directory (not split pane). If I double click on any files, the whole screen is replaced with that file and my directory listing goes away. I want to keep it.
If I highlight a file from within the directory listing开发者_StackOverflow中文版 and click "t" hotkey, a new tab is opened showing the contents of that file (again, not split pane, but whole file in it's own tab). However, if I highlight a folder and click "t" hotkey, a new tab is opened BUT it has a new vertical split with directory listing on the left. Furthermore if I double click on the files in that directory listing, they go in the right pane, which is what I want.
Is there any command line arguments that set that up which I can alias?
You seem to be describing NERDTree plugin almost to the "T". You might need to tweak some variables in your $VIMRUNTIME
for it work exactly as you describe (e.g., 'let NERDTreeQuitOnOpen=0
'), but with a little bit of time with the docs you should be able to get what you want.
I insert the following code in my ~/.vimrc
nmap <silent> <c-n> :NERDTreeToggle<CR>
Then, I use ctrl+n to switch to dual mode.
精彩评论