Vim Neocomplete Installation

Source: Internet
Author: User
Tags autoload lua

function

Neocomplete provides VIM with smart hints to transform vim into a powerful IDE with the effect of.

installation

Installing the Neocomplete plugin requires LUA support, and the VIM version is larger than the Vim 7.3.885.

1. Environmental testing

Open Vim, enter: version, view versions and LUA modules, if the version does not conform, first upgrade version, if the Vim does not support LUA, you need to

To recompile vim, refer to recompile vim with Lua.

  Note: +lua indicates support for LUA,-lua indicates no support and requires recompilation.

2. Download Neocomplete

Github:https://github.com/shougo/neocomplete.vim

csdn:http://download.csdn.net/detail/spch2008/8828389

Place the AutoLoad folder in ~/.vim/autoload

Place the plugin folder in ~/.vim/plugin

3. Enable Neocomplete

In ~/.VIMRC, write:let g:neocomplete#enable_at_startup = 1

At this point, the Neocomplete configuration is complete. At the same time, the author provides a copy of the Neocomplete configuration,

If there is no special need, you can use it directly.

1 "Use neocomplete.2Let G:neocomplete#enable_at_startup =13 "Use smartcase.4Let G:neocomplete#enable_smart_case =15 "Set Minimum syntax keyword length.6Let G:neocomplete#sources#syntax#min_keyword_length =37Let G:neocomplete#lock_buffer_name_pattern ='\*ku\*'8 9 "Define dictionary.TenLet g:neocomplete#sources#dictionary#dictionaries = { One\'default':"', A\'Vimshell': $HOME.'/.vimshell_hist', -\'Scheme': $HOME.'/.gosh_completions' -         \ } the  - "Define keyword. - if!exists ('G:neocomplete#keyword_patterns') -Let G:neocomplete#keyword_patterns = {} + endif -Let g:neocomplete#keyword_patterns['default'] ='\h\w*' +  A "Plugin key-mappings. atInoremap <Expr><C-g>neocomplete#undo_completion () -Inoremap <Expr><C-l>neocomplete#complete_common_string () -  - "Recommended key-mappings. - "<cr>: Close Popup and save indent. -Inoremap <silent> <CR> <c-r>=<sid>my_cr_function () <CR> in function!s:my_cr_function () -Return Neocomplete#close_popup ()."\<cr>" to   "For no inserting <CR> key. +   "return pumvisible ()? Neocomplete#close_popup ():"\<cr>" - endfunction the "<tab>: completion. *Inoremap <Expr><TAB> pumvisible ()?"\<c-n>":"\<tab>" $ "<c-h>, <bs>: Close Popup and delete Backword char.Panax NotoginsengInoremap <Expr><C-h> Neocomplete#smart_close_popup ()."\<c-h>" -Inoremap <Expr><BS> Neocomplete#smart_close_popup ()."\<c-h>" theInoremap <Expr><C-y>Neocomplete#close_popup () +Inoremap <Expr><C-e>Neocomplete#cancel_popup () A "Close popup by <space>. the "inoremap <expr><Space> pumvisible () neocomplete#close_popup ():"\<space>" +  - "For cursor moving inch insert mode (not recommended) $ "inoremap <expr><Left> neocomplete#close_popup ()."\<left>" $ "inoremap <expr><Right> neocomplete#close_popup ()."\<right>" - "inoremap <expr><Up> neocomplete#close_popup ()."\<up>" - "inoremap <expr><Down> neocomplete#close_popup ()."\<down>" the "Or set this. - "Let g:neocomplete#enable_cursor_hold_i = 1Wuyi "Or set this. the "Let g:neocomplete#enable_insert_char_pre = 1 -  Wu "autocomplpop like behavior. - "Let g:neocomplete#enable_auto_select = 1 About  $ "Shell like behavior (not recommended). - "Set Completeopt+=longest - "Let g:neocomplete#enable_auto_select = 1 - "Let g:neocomplete#disable_auto_complete = 1 A "inoremap <expr><TAB> pumvisible ()?"\<down>" : "\<c-x>\<c-u>" +  the "Enable Omni Completion. -Autocmd FileType CSS setlocal omnifunc=Csscomplete#completecss $Autocmd FileType Html,markdown setlocal omnifunc=Htmlcomplete#completetags theAutocmd FileType JavaScript setlocal omnifunc=Javascriptcomplete#completejs theAutocmd FileType python setlocal omnifunc=Pythoncomplete#complete theAutocmd FileType XML setlocal omnifunc=Xmlcomplete#completetags the  - "Enable Heavy omni completion. in if!exists ('G:neocomplete#sources#omni#input_patterns') theLet G:neocomplete#sources#omni#input_patterns = {} the endif About "Let g:neocomplete#sources#omni#input_patterns.php = ' [^. \t]->\h\w*\|\h\w*:: ' the "Let g:neocomplete#sources#omni#input_patterns.c = ' [^.[:d igit:] *\t]\% (\.\|->\) ' the "Let g:neocomplete#sources#omni#input_patterns.cpp = ' [^.[:d igit:] *\t]\% (\.\|->\) \|\h\w*:: ' the  + "For perlomni.vim setting. - "Https://github.com/c9s/perlomni.vim theLet G:neocomplete#sources#omni#input_patterns.Perl='\h\w*->\h\w*\|\h\w*::'

Vim Neocomplete Installation

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.