Vim Use Notes

Source: Internet
Author: User

    • Vundle
    • Youcompleteme
    • Vimwiki
Vundle

1.setup Vundle

$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/vundle.vim


2. Configure the plugin, edit the. vimrc file in the home directory, increase the file header

Set nocompatible ' be improved, requiredfiletype off ' required ' set the runtime Path to Inc Lude Vundle and Initializeset rtp+=~/.vim/bundle/vundle.vimcall vundle#begin () "Alternatively, pass a path where Vundle sh Ould Install plugins "Call Vundle#begin (' ~/some/path/here ')" Let Vundle manage Vundle, Requiredplugin ' Gmarik/vundle.vim ' The following is examples of different formats supported. ' Keep Plugin commands between vundle#begin/end. "Plugin on GitHub repo" Plugin ' tpope/vim-fugitive ' "Plugin from Http://vim -scripts.org/vim/scripts.html "Plugin ' L9 '" Git Plugin not hosted on GitHub "Plugin ' Git://git.wincent.com/command-t.git ' Git repos on your local machine (i.e. when working on your own plugin) "Plugin ' File:///home/gmarik/path/to/plugin '" Th E sparkup vim script is in a subdirectory of this repo called Vim. " Pass the path to set the Runtimepath properly. Plugin ' Rstacruz/sparkup ', {' RTP ': ' vim/'} ' Avoid a name conflict with L9 ' Plugin ' user/l9 ', {' Name ': ' NewL9 '} "all of your Plugins must be added before the following Linecall Vundle#end ()" Requiredfilety PE plugin indent on ' required ' to ignore plugin indent changes, instead use: ' FileType plugin on

After the modification has been configured to Vundle, enter vim the command can be executed, note to be opened with sudo vim , or the execution of the command may be insufficient error. Some common commands:

    • :PluginList
    • :PluginInstall: Plugin in the installation configuration file
    • :PluginSearch foo: Search for Foo
    • :PluginClean: You need to run the purge command after removing the plugin in the configuration file
    • :vim +PluginInstall +qall: Executes commands directly on the command line, and several other commands can also be executed at the command line


When installing the plugin, if it is a GitHub source plug-in, as YouCompleteMe can be added in the. vimrc file Plugin ‘Valloric/YouCompleteMe‘ , that is作者/插件名

Youcompleteme

To install using Vundle:Plugin ‘Valloric/YouCompleteMe‘
Because YCM is required to perform the compilation, now just update the source code, so need to CMake:

sudo apt-get install build-essential cmake

Make sure Python headers is installed:

sudo apt-get install Python-dev

Compile ycm:

CD ~/.vim/bundle/youcompleteme./install.sh--clang-completer

Some of the recommended configurations

Let G:ycm_collect_identifiers_from_tags_files = 1 "Let ycm read tags from Ctags filelet g:ycm_use_ultisnips_completer = 1 "Default 1, just ensurelet g:ycm_seed_identifiers_with_syntax = 1" Completion for programming language ' s Keywordlet g:y Cm_complete_in_comments = 1 "completion in Commentslet g:ycm_complete_in_strings = 1" completion in string
Vimwiki

Vundle Installation: Plugin ‘vimwiki/vimwiki‘ configuration:

Set Nocompatiblefiletype plugin onsyntax onlet g:vimwiki_valid_html_tags= ' br ' Nmap <F5>:vimwiki2html<cr>

Vim Use Notes

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.