Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Next generation completion framework after neocomplcache

NotificationsYou must be signed in to change notification settings

Shougo/neocomplete.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This plugin is not compatible with above Vim 8.2.1066!https://github.com/vim/vim/commit/bd84617d1a6766efd59c94aabebb044bef805b99

Note: The development of this plugin is finished. Accepts minor patches andissues but no new features.ddc.vim is the next generation autocompletion plugin. Consider migrating to it.

neocomplete is the abbreviation of "neo-completion with cache". It provideskeyword completion system by maintaining a cache of keywords in the currentbuffer. neocomplete can be customized easily and has many more features thanVim's built-in completion.

Note: If you use neovim or Vim8+, you should use deoplete instead.https://github.com/Shougo/deoplete.nvim

Installation

Note: neocomplete requires Vim 7.3.885+ with Lua enabled.Seerequirements if you aren't sure whether you have this.

  1. Extract the files and put them in your Vim directory(usually~/.vim/ orProgram Files/Vim/vimfiles on Windows).
  2. Execute the:NeoCompleteEnable command or setlet g:neocomplete#enable_at_startup = 1 in your.vimrc (not in.gvimrcor_gvimrc!)

Requirements

neocomplete requires Vim 7.3.885+ compiled withif_lua. If:echo has("lua") returns1, then you're done; otherwise, see below.

Vim builds for Windows

github release

Note: the Vim build may not include the Lua DLL. In that case,download Lua and put thelua52.dllfile in the same directory asgvim.exe.

Vim for Mac OS X:

MacVim withif\_lua

Or, you can install MacVim with homebrew: (Make sure you have Xcode fullyinstalled)

brew cask install macvim --with-cscope --with-lua

To install Vim (as opposed to MacVim) with homebrew:

brew install vim --with-luajit

Vim for Linux:

Debian (or Ubuntu)

Make sure you have any of these packages:

  • vim-nox
  • vim-gtk3

Which package depends on your graphical environment (except vim-nox which isfor vim with no GUI).

Fedora

The latest version of vim includes lua.As of 2014-04-16 you need todownload therpm.

Misc

Be aware, your distribution's package manager may have a fairly outdatedVim build (for example, Ubuntu 12.04 ships Vim 7.3.429).However,building Vim on Linux is notdifficult. Remember to specify--with-lua (or--with-features=huge).

Vim for Cygwin:

In a cygwin environment, the Lua interface is supported by default.

If you want to make manually, you also need gcc and make.

When everything is prepared, execute these commands.

cd /usr/srctar jxf vim-7.4.tar.bz2tar xvfz lua-5.1.5.tar.gzcd vim74/./configure --enable-luainterp --enable-gui=no \--without-x --enable-multibyte --prefix=/usrmake && make install

To check if everything was successfull enter the followingvim --version. Youshould see +lua in the list of features.

Snippets

The Snippets feature of neocomplete was split into aseparate plugin.

A migration guide for existing users of neocomplcache is available:Migration guide

Screenshots

Original filename completion

Original filename completion.Include filename completion.

Omni completion

Omni completion.

Completion withvimshell

Completion with vimshell(http://github.com/Shougo/vimshell).

Vim completion (provided byneco-vim)

Vim completion.Vim completion with animation.

Configuration Examples

"Note: This option must be set in .vimrc(_vimrc).  NOT IN .gvimrc(_gvimrc)!" Disable AutoComplPop.letg:acp_enableAtStartup=0" Use neocomplete.letg:neocomplete#enable_at_startup=1" Use smartcase.letg:neocomplete#enable_smart_case=1" Set minimum syntax keyword length.letg:neocomplete#sources#syntax#min_keyword_length=3" Define dictionary.letg:neocomplete#sources#dictionary#dictionaries= {\'default' :'',\'vimshell' :$HOME.'/.vimshell_hist',\'scheme' :$HOME.'/.gosh_completions'\}" Define keyword.if!exists('g:neocomplete#keyword_patterns')letg:neocomplete#keyword_patterns= {}endifletg:neocomplete#keyword_patterns['default']='\h\w*'" Plugin key-mappings.inoremap<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>function!s:my_cr_function()return (pumvisible() ?"\<C-y>" :"" ) ."\<CR>"" For no inserting <CR> key."return pumvisible() ? "\<C-y>" : "\<CR>"endfunction" <TAB>: completion.inoremap<expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"" <C-h>, <BS>: close popup and delete backword char.inoremap<expr><C-h> neocomplete#smart_close_popup()."\<C-h>"inoremap<expr><BS> neocomplete#smart_close_popup()."\<C-h>"" Close popup by <Space>."inoremap <expr><Space> pumvisible() ? "\<C-y>" : "\<Space>"" AutoComplPop like behavior."let g:neocomplete#enable_auto_select = 1" Shell like behavior(not recommended)."set completeopt+=longest"let g:neocomplete#enable_auto_select = 1"let g:neocomplete#disable_auto_complete = 1"inoremap <expr><TAB>  pumvisible() ? "\<Down>" : "\<C-x>\<C-u>"" Enable omni completion.autocmdFileTypecsssetlocalomnifunc=csscomplete#CompleteCSSautocmdFileTypehtml,markdownsetlocalomnifunc=htmlcomplete#CompleteTagsautocmdFileTypejavascriptsetlocalomnifunc=javascriptcomplete#CompleteJSautocmdFileTypepythonsetlocalomnifunc=pythoncomplete#CompleteautocmdFileTypexmlsetlocalomnifunc=xmlcomplete#CompleteTags" Enable heavy omni completion.if!exists('g:neocomplete#sources#omni#input_patterns')letg:neocomplete#sources#omni#input_patterns= {}endif"let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\h\w*\|\h\w*::'"let g:neocomplete#sources#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)'"let g:neocomplete#sources#omni#input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'" For perlomni.vim setting." https://github.com/c9s/perlomni.vimletg:neocomplete#sources#omni#input_patterns.perl='\h\w*->\h\w*\|\h\w*::'

About

Next generation completion framework after neocomplcache

Resources

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors47


[8]ページ先頭

©2009-2025 Movatter.jp