Vim practice manual (9) vimide-build your own IDE (B)

Source: Internet
Author: User

Reprinted this article please indicate from "LIU Da's csdn blog": http://blog.csdn.net/poechant

After the vim practice manual (8) vimide-build your own IDE (a), we all know that if tags is used to improve productivity. This article introduces winmanager to make Vim look more like vimide :)

1. Download The winmanager plug-in

You don't need to know what winmanager is for the moment. I believe that after reading the previous blog post, you should configure Vim as follows:

But now only tags can be used. It would be nice to have a file explorer, package manager, or something like Visual Studio or eclipse. The winmanager is introduced. First download the plug-in: winmanager.zip. Download the downloaded winmanager.txt file and put it in VIM/vim73 (the name may be slightly different because of the different version numbers and systems. Here we use Vim
In the Mac version of 7.3), put winmanager. Vim in Plugin in VIM/vim73.


2. Modify vimrc

Add the following two sentences:

1 Let G: winmanagerwindowlayout = 'fileexplorer | taglist'

2 nmap wm: wmtoggle <CR>

The 1st lines of code are used to set the window layout to fileexplorer and taglist.

The 2nd line of code maps the WM shortcut key to: wmtoggle <CR> and: wmtoggle <CR>, which is equivalent to the key to enabling winmanager. After simple ing, you can switch on and off more quickly.

Enter Vim again and enter the following command:

1 Wm

I believe you must have seen a similar layout:

For more detailed usage, you can use this command to view:

1: Help winmanager

3. What is file explorer in the upper left corner?

You must find that the lower-left corner is still taglist, and the upper-left corner seems a little familiar. Yes, it is what you see when you use Vim to open a directory. For example, if there is a directory named test_dir, input it in shell:

1 Vim test_dir

You must see a similar scenario:

This is actually the built-in netrw. Vim plug-in function of VIM, mainly used to edit directories. We use winmanager to manage the layout, and the file Explorer-like stuff is netrw. In netrw, you can do the following (and attach the shortcut key ):

(1) move the cursor: it is the same as the shortcut key for moving the cursor when editing a file. For details, refer to the vim Manual (3) Common cursor movement operations.

(2) Expand the Directory: Enter the Enter key, that is, <CR>.

(3) collapse Directory: it is also the Enter key.

(4) create a directory: Press D, enter the directory name, and press Enter.

(5) delete Directory: press d to delete the directory where the cursor is located.

(6) switch the display mode: press the I key. There are four modes: Tile, tree, list, and detail.

(7) Rename the Directory: press the r key.

(8) change the sorting mode: press the s key.

(9) to a directory at a higher level: Press.

You can use this command to view more details:

1: Help netrw

To be continued, follow these blog posts :)
Reprinted this article please indicate from "LIU Da's csdn blog": http://blog.csdn.net/poechant-
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.