Create vim-like source Insight--contiki source Reading tool

Source: Internet
Author: User

One, Ubuntu14.04 configuration 1, configuration VIMRC file

Input: Version lesson view VIMRC file and location:

System VIMRC File: "$VIM/VIMRC"

User VIMRC file: "$HOME/.VIMRC"(suggested drop location)

2nd user VIMRC file: "~/.VIM/VIMRC"

User EXRC file: "$HOME/.EXRC"

System GVIMRC File: "$VIM/GVIMRC"

User GVIMRC file: "$HOME/.GVIMRC"

2nd user GVIMRC file: "~/.VIM/GVIMRC"

System Menu File: "$VIMRUNTIME/menu.vim"

Change the settings in $HOME/.VIMRC, which is said to be the strongest profile in history:http://amix.dk/vim/vimrc.html, to copy the strongest configuration files to the above VIMRC files.

2, Ctags installation and configuration 1) installation
sudo apt-get Install Ctags
2) ~/.VIMRC Configuration
" F5 Creating tags in the current directory  <F5>:!ctags-r .<cr>" tell Vim to find the set in the upper directory when the tags file is not found in the current directory  tags=tags;/

Note: To execute before the current project directory

3, Cscope installation and configuration 1) installation
sudo apt-get Install Cscope
2) ~/.VIMRC Configuration
"Cscope"before opening vim, CD to project directory"and execute the command CSCOPE-RBQ"Use the Quickfix window to display cscope results": CW open quickfix windowSetcscopequickfix=s-,c-,d-,i-,t-,e-ifHas ("Cscope") "Priority View Cscope database Setcsto=0 "View Ctags and Cscope databases at the same time SetCST"Display the prompt information SetCsverbifFilereadable ("Cscope.out") CS Add cscope. outElseIf $CSCOPE _db!=""CS Add $CSCOPE _db endifSetCsverbendif"Command Map"find functions that call the current functionNmap<F3>: CS Find3<c-r>=expand ("<cword>") <CR><CR>"Find DefinitionNmap<F4>: CS Find0<c-r>=expand ("<cword>") <CR><CR>
Note: "Before you open vim, CD to the project directory   " and execute the command CSCOPE-RBQ
4. taglist plug-in installation and configuration 1) Find Plugin

Find taglist plugin in official website http://www.vim.org

http://www.vim.org/scripts/script.php?script_id=273

2) Installation:

Official description (Add black part for my placement):

  1. Download the Taglist.zip file and unzip the files to the$HOME/.vimor the
    $HOME/vimfiles or the $VIM/vimfiles directory. After the step, you should
    The following, the directory structure should be preserved, have the following files:

    Plugin/taglist.vim-main taglist Plugin File
    Doc/taglist.txt-documentation (Help) file

    Refer to the |add-plugin|, |add-global-plugin| and |runtimepath| Vim
    Help pages for more details about installing Vim plugins.
    2. Change to the$HOME/.vim/docor $HOME/vimfiles/doc or $VIM/vimfiles/doc
    Directory, start Vim and run the ": helptags." Command to process the
    TagList help file. Without this step, your cannot jump to the TagList Help
    Topics.
    3. If The exuberant Ctags utility is not present in your PATH and then set the
    Tlist_ctags_cmd variable to the location of the exuberant Ctags
    Utility (not to the directory) in the. vimrc file.
    4. If you is running a terminal/console version of Vim and the terminal
    doesn ' t support changing the window width then set the
    ' tlist_inc_winwidth ' variable to 0 in the. vimrc file.
    5. Restart Vim.
    6. You can now use the ': Tlisttoggle ' command to open/close the TagList
    Window. can use the ': Help taglist ' command to get more information
    about using the TagList plugin.
3) ~/.VIMRCConfiguration
" F8 Open or close taglist  <silent> <F8>:tlisttoggle<cr> F8 let Tlist_exit_onlywindow=1"  Close the file automatically when TagListlettlist_file_fold_auto_close=1"taglist Collapse non-current file in window let tlist_process_file_always=1"taglist always parse file

Note: Shortcut keys can be changed

F8 Open or close taglist

after you have installed the winmanager , you can open Winmanager with the wm shortcut key

Winmanager contains taglist and nerdtree two plugins

5. Nerdtree plug-in installation and configuration1) Find Plugin

Find the nerdtree plugin in the official website http://www.vim.org

http://www.vim.org/scripts/script.php?script_id=1658

2) Installation:

Unzip the archive into your ~/.vim directory.
That's should put Nerd_tree.vim in ~/.vim/plugin and Nerd_tree.txt in ~/.vim/doc.

The rest is also copied to the ~/.vim directory, or it will go wrong

Run:helptags $HOME/.vim/doc
Run Vim And:help nerd_tree.txt for the help page.

3) ~/.VIMRCConfiguration

In order for Winmanager to open the nerdtree window successfully, add the following code in the. VIMRC

Let g:nerdtree_title='[NERD Tree]'function! Nerdtree_start ()   ' Nerdtree ' endfunctionfunction! nerdtree_isvalid ()   return 1 endfunction
6. Winmanager plug-in installation and configuration 1) Find Plugin

Http://www.vim.org Find plugins in the official website

Http://www.vim.org/scripts/script.php?script_id=95

2) Installation

Official website Description (add black section for my location):

1. Copy the file to your$HOME/.vimor $HOME \vimfiles directory
2. Unzip it (its a zip file) at the location. This should create the files
-plugin/
Winmanager.vim
Winfileexplorer.vim
Wintagexplorer.vim
-doc/
Winmanager.txt
IMPORTANT Note:
I. This version of Winmanager only works if you have the latest version
Bufexplorer.vim. (Vimscript #42).
The idea was that Winmanager would no longer contain a duplicate copy
of Bufexplorer.vim. This reduces script bloat, makes updates easier
And in Genral makes the world a better place.
3. Vim-c "Helptags~/.vim/doc"-C" Q "(Unix)
Or
Vim-c "Helptags ~/vimfiles/doc"-C "Q" (Windows)
(This step should the install Winmanager.txt as a local Help file on your
System. If this doesnt work, see ": He Add-local-help
IT).
You'll also need to the change of the mappings you might has used with
winmanager-1.x to
Map <c-w><c-f>:firstexplorerwindow<cr>
Map <c-w><c-b>:bottomexplorerwindow<cr>
Map <c-w><c-t>:wmtoggle<cr>
and the variable name g:bufexplorerwidth have been changed to
G:winmanagerwidth just to is more consistent.

3) configuration
" show Nerdtree and taglist windows, default on left Let g:winmanagerwindowlayout='nerdtree| TagList'"WM Open Close Winmanagernmap wm:wmtoggle<cr>"  Jump to the top window (nerdtree)map Wf:firstexplorerwindow<cr>" jump to the bottom window (taglist) map Wb:bottomexplorerwindow<cr>

Because Winmanager always open a useless window, do not know why, need to finally add Q to close it. If you open Winmanager with Wmtoggle, you need to add Q to the Winmanager.vim Togglewindowsmanager function to close the empty window.

function! <SID>Togglewindowsmanager ()    if  iswinmanagervisible () call      s: Closewindowsmanager ()    Elsecall      S:startwindowsmanager ()      "  Close empty window    'q'    end  endfunction  
questions :
    1. Not yet implemented Ctags after Vim opens a file, the current directory changes to the directory of this file, and then generates tags
    2. Not yet implemented Nerd_tree after Vim opens a file, the current directory changes to the directory of this file, but still $HOME.
    3. Exit to: Q several times
Second, Windows10Under configuration 1, configure the VIMRC file

Input: Version lesson view VIMRC file and location:

Change the settings in $HOME/_VIMRC, which is said to be the strongest profile in history: http://amix.dk/vim/vimrc.html, to copy the strongest configuration files to the above VIMRC files.

2, Ctags installation and configuration 1) installation

http://ctags.sourceforge.net/ Download ctags58

Extract the compressed package to $VIM/vimfiles/plugin

add $VIM/vimfiles/plugin in the system variable Path

2) ~/.VIMRC Configuration

Inserting the same code in $HOME/_VIMRC

3. Cscope Installation and Configuration

Not installed

4. taglist plug-in installation and configuration

Similar to Ubuntu settings, just plug-ins are placed under the plugin and Doc files in the $VIM/vimfiles Directory

Configuration code, inserting in $HOME/_VIMRC

5. Nerdtree plug-in installation and configuration

Similar to Ubuntu settings, just plug-ins are placed under the plugin and Doc files in the $VIM/vimfiles Directory

Configuration code, inserting in $HOME/_VIMRC

6. Winmanager plug-in installation and configuration

Similar to Ubuntu settings, just plug-ins are placed under the plugin and Doc files in the $VIM/vimfiles Directory

Configuration code, inserting in $HOME/_VIMRC

Third, the final interface

Iv. references

Http://amix.dk/vim/vimrc.html

Https://github.com/amix/vimrc

Http://www.cnblogs.com/coderkian/p/3823366.html

Create vim-like source Insight--contiki source Reading tool

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.