Vim configuration file management WM and taglist

Source: Internet
Author: User

1. Enter Vim to automatically open winmanager

This function is optional and can be set in vimrc:

"Winmanager is automatically enabled when you enter vim.

Let G: autoopenwinmanager = 1
You can enable winmanager automatically.
In winmanager. Vim, modify:

"Set auto open winmanager

If G: autoopenwinmanager

Autocmd vimenter * nested call S: startwindowsmanager () | 1 wincmd W
Endif

Ii. Automatically exit Vim when exiting the Buffer Zone

This function is modified in taglist. Vim by referring to the automatic exit function of taglist.

Function: function! S: Change winbunr (2) in tlist_window_exit_only_window () to winbunr (3), that is, close when only two windows are left. Considering that two windows must be stored simultaneously

So it is feasible:

Function! S: tlist_window_exit_only_window ()

"Before quitting vim, delete the taglist buffer so that

"The '0 mark is correctly set to the previous buffer.

If V: Version: <700

If winbufnr (3) =-1

Bdelete

Quit

Endif

Else

If winbufnr (3) =-1

If tabpagenr ('$') = 1

"Only one tag page is present

Bdelete

Quit

Else

"More than one tab page is present. Close only the current

"Tab page

Close

Endif

Endif

Endif

Endfunction
In vimrc, you must also set the following parameters:

Let tlist_exit_onlywindow = 1

The plug-in fileexplorer provided by winmanager is really poor. The most important thing is that fileexplorer cannot be updated automatically.

And fileexplorer is not displayed. The nerd_tree function is relatively powerful. Add the nerd_tree to winmanager.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.