Install the vim plug-in online in Ubuntu

Source: Internet
Author: User
Tags switch case

Today, we have been working on the vim plug-in for a long time, and finally found that online installation is the most time-consuming ~~


1. Install taglist-browse source code

The source code browser plug-in taglist can list functions, struct, and variables in the code in the taglist list. The file contains those elements, which are clear at a glance.

# vim-addons install taglist  

 

Configuration description for adding taglist to vimrc

. Vimrc for taglist let Tlist_Show_One_File = 1 "show only the current file's taglet Tlist_Use_Left_Window = 1" show taglistlet Tlist_Exit_OnlyWindow = 1 "When taglist is the last window, exit vimlet Tlist_Enable_Fold_Column = 1 "show fold tree let Tlist_WinWidth = 40" set the taglist width let Tlist_WinHeight = 50 "set the taglist height

After the installation is complete, the vim interface is displayed as follows:

If you want to enable the taglist automatically when vim is enabled, add: let Tlist_Auto_Open = 1 in vimrc.

2. Install winmanager-file browsing and window management

# vim-addons install winmanager  

 

After the installation is complete, enter vim and enter WMToggle. The file list is displayed on the left.

Modify the vimrc file and map the command: WMToggle to the wm command in normal mode. In this way, you can directly enter wm for the next use.

 

.vimrc for winmanagernmap wm :WMToggle<cr> 

 

 

The file browsing and taglist are integrated in the leftmost display. The file is viewed on, and the taglist is displayed on.

.vimrclet g:winManagerWindowLayout = “FileExplorer|TagList”      let g:winManagerWidth = 40          let g:winManagerHeight = 80    

After the installation is complete, enter VMToggle in the command line as follows:



My configuration file is as follows:

1 "All system-wide defaults are set in $ VIMRUNTIME/debian. vim (usually just 2 "/usr/share/vim/vimcurrent/debian. vim) and sourced by the call to: runtime 3 "you can find below. if you wish to change any of those settings, you shoshould 4 "do it in this file (/etc/vim/vimrc), since debian. vim will be overwritten 5 "everytime an upgrade of the vim packages is saved med. it is recommended to 6 "make chang Es after sourcing debian. vim since it alters the value of the 7 "'compute' option. 8 9 "This line shoshould not be removed as it ensures that varous options are 10" properly set to work with the Vim-related packages available in Debian. 11 runtime! Debian. vim 12 13 "Uncomment the next line to make Vim more Vi-compatible 14" NOTE: debian. vim sets 'nocompuable '. setting 'compute' changes numerous 15 "options, so any other options shocould be set AFTER setting 'compute '. 16 "set compatible 17 18" Vim5 and later versions support syntax highlighting. uncommenting the next 19 "line enables syntax highlighting by default. 20if has ("syntax") 21 Syntax on 22 endif 23 24 "If using a dark background within the editing area and syntax highlighting 25" turn on this option as well 26 "set background = dark 27 28" Uncomment the following have Vim jump to the last position when 29 "reopening a file 30" if has ("autocmd ") 31 "au BufReadPost * if line (" '\ "")> 1 & line ("' \" ") <= line (" $ ") | exe" normal! G' \ "" | endif 32 "endif 33 34" Uncomment the following to have Vim load indentation rules and plugins 35 "according to the detected filetype. 36 "if has (" autocmd ") 37 "filetype plugin indent on 38" endif 39 40 "The following are commented out as they cause vim to behave a lot 41" differently from regular Vi. they are highly recommended though. 42 "set showcmd" Show (partial) command in status line. 43 "set showmatch" Show matching brackets. 44 "set ignorecase" Do case insensitive matching 45 "set smartcase" Do smart case matching 46 "set incsearch" Incremental search 47 "set autowrite" Automatically save before commands like: next and: make 48 "set hidden" Hide buffers when they are abandoned 49 "set mouse = a" Enable mouse usage (all modes) 50 51 "Source a global configuration file if available 52if filereadable ("/etc/vim/vimrc. local ") 53 source/etc/vim/vimrc. local 54 endif 55 set tags = tags 56 set autochdir 57 58 "display line number 59 set number 60 61" automatic indent and C language style indent 62 set autoindent 63 set cindent 64 65 "indent width 66 set tabstop = 4 67 set softtabstop = 4 68 set shiftwidth = 4 69 "we recommend that you enable the expandtab option, the tab is automatically expanded with spaces, and the code indent is more beautiful. 70 set expandtab 71 "set noexpandtab 72 73" switch case alignment style 74 set cino = g0 ,: 0 75 76 77 "78" taglist 79 "80let Tlist_Show_One_File = 1" only display tags 81let Tlist_WinWidth = 40 "set taglist width 82let Tlist_Exit_OnlyWindow = 1" tagList window is the last window, exit Vim 83let Tlist_Use_Right_Window = 1 ". The taglist window 84let Tlist_Auto_Open = 1 85let g: winManagerWindowLayout =" FileExplorer | TagList "86let g: winManagerWidth = 40 87let g: winManagerHeight = 80



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.