From 463cb0680eac58d3e66d9131d16e481ab7397f51 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 22 Mar 2016 12:04:00 -0400 Subject: [PATCH] Update neocomplcache to neocomplete, add FastFold to help with folds and improve the add/delete-submodule scripts --- .gitmodules | 9 ++++-- README.md | 5 ++-- add-submodule | 5 ++-- delete-submodule | 26 +++++++++++++--- vim/bundle/FastFold | 1 + vim/bundle/neocomplcache.vim | 1 - vim/bundle/neocomplete.vim | 1 + vim/config/keyboard.vim | 28 ++++++++--------- vim/config/plugins.vim | 58 ++++++++++++++++-------------------- 9 files changed, 75 insertions(+), 59 deletions(-) create mode 160000 vim/bundle/FastFold delete mode 160000 vim/bundle/neocomplcache.vim create mode 160000 vim/bundle/neocomplete.vim diff --git a/.gitmodules b/.gitmodules index 41b4f2c..41e0442 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,9 +16,6 @@ [submodule "vim/bundle/tagbar"] path = vim/bundle/tagbar url = git://github.com/majutsushi/tagbar -[submodule "vim/bundle/neocomplcache.vim"] - path = vim/bundle/neocomplcache.vim - url = https://github.com/Shougo/neocomplcache.vim.git [submodule "vim/bundle/emmet-vim"] path = vim/bundle/emmet-vim url = https://github.com/mattn/emmet-vim.git @@ -112,3 +109,9 @@ [submodule "vim/bundle/ReplaceWithRegister"] path = vim/bundle/ReplaceWithRegister url = https://github.com/prurigro/ReplaceWithRegister.git +[submodule "vim/bundle/neocomplete.vim"] + path = vim/bundle/neocomplete.vim + url = https://github.com/Shougo/neocomplete.vim +[submodule "vim/bundle/FastFold"] + path = vim/bundle/FastFold + url = https://github.com/Konfekt/FastFold.git diff --git a/README.md b/README.md index d79c075..697b079 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A theme, config and collection of plugins for Vim. ## Optional Requirements ## * **Compilers and Runtimes**: The syntastic plugin can use the compiler or runtime for most languages to provide real-time syntax checking. -* **CTags**: Required by the _tagbar_ and _neocomplcache_ plugins as well as the _gentags_ script ([ctags website](http://ctags.sourceforge.net)). +* **CTags**: Required by the _tagbar_ and _neocomplete_ plugins as well as the _gentags_ script ([ctags website](http://ctags.sourceforge.net)). * **Powerline Fonts**: Required to enable the fancier looking status line ([powerline-fonts repo](https://github.com/Lokaltog/powerline-fonts)). ## Distribution Features ## @@ -157,12 +157,13 @@ For a complete list of mappings specific to **darkcloud-vimconfig**, check the l * [autoswap.vim](https://github.com/vim-scripts/autoswap.vim): Switch to open editor window instead of asking what to do with swapfile. * [emmet-vim](https://github.com/mattn/emmet-vim): Support for expanding abbreviations. * [webapi-vim](https://github.com/mattn/webapi-vim): A web library used by emmet to provide support for custom snippets. +* [FastFold](https://github.com/Konfekt/FastFold): Speed up Vim by updating folds only when called-for. * [goyo.vim](https://github.com/junegunn/goyo.vim): Distraction-free writing in Vim. * [gundo.vim](https://github.com/sjl/gundo.vim): Sidebar to visualize your undo tree and browse the differences of each change. * [incsearch.vim](https://github.com/haya14busa/incsearch.vim): Improved incremental searching for Vim. * [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim. * [MatchTagAlways](https://github.com/Valloric/MatchTagAlways): A Vim plugin that always highlights the enclosing html/xml tags. -* [neocomplcache.vim](https://github.com/Shougo/neocomplcache.vim): The '*ultimate*' auto-completion system for Vim. +* [neocomplete.vim](https://github.com/Shougo/neocomplete.vim): Next generation completion framework after neocomplcache. * [patchreview-vim](https://github.com/junkblocker/patchreview-vim): A Vim plugin for doing single, multi-patch or diff code reviews. * [rename.vim](https://github.com/danro/rename.vim): Rename the current file in the vim buffer + retain relative path. * [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister): Replace text with the contents of a register (for paste+replace without writing over the buffer). diff --git a/add-submodule b/add-submodule index bed3199..edcf769 100755 --- a/add-submodule +++ b/add-submodule @@ -1,7 +1,6 @@ #!/usr/bin/env bash -[[ -z $1 ]] && exit 1 -[[ -z $2 ]] && exit 1 +[[ -z "$1" || -z "$2" ]] && exit 1 -git submodule add $1 vim/bundle/${2} +git submodule add "$1" "vim/bundle/$2" git submodule update --init --recursive diff --git a/delete-submodule b/delete-submodule index 58fa475..235ffb5 100755 --- a/delete-submodule +++ b/delete-submodule @@ -1,7 +1,25 @@ #!/usr/bin/env bash -[[ -z $1 ]] && exit 1 +[[ -z "$1" ]] && exit 1 + +if [[ -d "vim/bundle/$1" ]]; then + git submodule deinit -f "vim/bundle/$1" +else + printf '%s\n' "Couldn't run 'git submodule deinit vim/bundle/$1', does not exist" >&2 + exit 1 +fi + +if [[ -d "vim/bundle/$1" ]]; then + git rm "vim/bundle/$1" +else + printf '%s\n' "Couldn't run 'git rm vim/bundle/$1', does not exist" >&2 + exit 1 +fi + +if [[ -d ".git/modules/vim/bundle/$1" ]]; then + rm -rf ".git/modules/vim/bundle/$1" +else + printf '%s\n' "Couldn't run 'rm -rf .git/modules/vim/bundle/$1', does not exist" >&2 + exit 1 +fi -[[ -d "vim/bundle/${1}" ]] && git submodule deinit -f "vim/bundle/${1}" || echo "Couldn't run 'git submodule deinit vim/bundle/${1}', $1 does not exist" -[[ -d "vim/bundle/${1}" ]] && git rm "vim/bundle/${1}" || echo "Couldn't run 'git rm vim/bundle/${1}', vim/bundle/${1} does not exist" -[[ -d "${PWD}/.git/modules/vim/bundle/${1}" ]] && rm -rf "${PWD}/.git/modules/vim/bundle/${1}" || echo "Couldn't run 'rm -rf ${PWD}/.git/modules/vim/bundle/${1}', ${PWD}/.git/modules/vim/bundle/${1} does not exist" diff --git a/vim/bundle/FastFold b/vim/bundle/FastFold new file mode 160000 index 0000000..d080780 --- /dev/null +++ b/vim/bundle/FastFold @@ -0,0 +1 @@ +Subproject commit d080780a000fa025832e01fb2b79768d4ad0bc2b diff --git a/vim/bundle/neocomplcache.vim b/vim/bundle/neocomplcache.vim deleted file mode 160000 index 7781817..0000000 --- a/vim/bundle/neocomplcache.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 778181767467b8f8016828898779a646074d883a diff --git a/vim/bundle/neocomplete.vim b/vim/bundle/neocomplete.vim new file mode 160000 index 0000000..bd5cc9e --- /dev/null +++ b/vim/bundle/neocomplete.vim @@ -0,0 +1 @@ +Subproject commit bd5cc9e73dedb07f1ab0a99cc7943ef16732e3e9 diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 924f50a..6a45103 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -190,10 +190,10 @@ " | (I) -> paste what's been cut during input " " (autocompletion) -" | (I) -> (neocomp) close the popup and -" | (I) -> (neocomp) select/cycle popup completion -" | (I) -> (neocomp) close the popup and -" | (I) -> (neocomp) undo the most recent completion +" | (I) -> (neocomplete) close the popup and +" | (I) -> (neocomplete) select/cycle popup completion +" | (I) -> (neocomplete) close the popup and +" | (I) -> (neocomplete) undo the most recent completion " " (formatting) " | (V) -> deletes currently selected text @@ -698,20 +698,20 @@ "} "AUTOCOMPLETION:{ - "neocomplcache close popup and save indent - inoremap =neocompl_cr() - function! s:neocompl_cr() - return pumvisible() ? neocomplcache#close_popup() : "\" + "neocomplete close popup and save indent + inoremap =neocache_cr() + function! s:neocache_cr() + return pumvisible() ? "\" : "\" endfunction - "neocomplcache tab completion - inoremap pumvisible() ? "\" : "\" + "neocomplete tab completion + inoremap pumvisible() ? "\" : "\" - "neocomplcache : undo completion - inoremap neocomplcache#smart_close_popup()."\" + "neocomplete close popup + inoremap neocomplete#smart_close_popup()."\" - "neocomplcache undo completion - inoremap neocomplcache#undo_completion() + "neocomplete undo completion + inoremap neocomplete#undo_completion() "} "FORMATTING:{ diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index 0363fd9..dc96434 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -110,41 +110,35 @@ scriptencoding utf-8 let g:mta_filetypes = {'aspnet':1, 'html':1, 'xhtml':1, 'php':1, 'xml':1, 'jinja':1} "}}} -"NEOCOMPLCACHE AUTOCOMPLETION PLUGIN: {{{ - let g:neocomplcache_enable_at_startup=1 - let g:neocomplcache_enable_smart_case=1 - let g:neocomplcache_min_syntax_length=3 - let g:neocomplcache_enable_insert_char_pre=0 - let g:neocomplcache_enable_underbar_completion=1 - let g:neocomplcache_wildcard_characters={'_': '-'} +"NEOCOMPLETE AUTOCOMPLETION PLUGIN: {{{ + let g:neocomplete#enable_at_startup=1 + let g:neocomplete#enable_smart_case=1 + let g:neocomplete#sources#syntax#min_keyword_length=3 - if !exists('g:neocomplcache_omni_patterns') - let g:neocomplcache_omni_patterns = {} - endif - if !exists('g:neocomplcache_force_omni_patterns') - let g:neocomplcache_force_omni_patterns = {} + if !exists('g:neocomplete#sources#omni#input_patterns') + let g:neocomplete#sources#omni#input_patterns = {} endif - let g:neocomplcache_omni_patterns.c='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?' - let g:neocomplcache_omni_patterns.cpp='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?' - let g:neocomplcache_omni_patterns.xml='<[^>]*' - let g:neocomplcache_omni_patterns.html='<[^>]*' - let g:neocomplcache_omni_patterns.xhtml='<[^>]*' - let g:neocomplcache_omni_patterns.markdown='<[^>]*' - let g:neocomplcache_omni_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' - let g:neocomplcache_omni_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' - let g:neocomplcache_omni_patterns.javascript='[^. \t]\.\%(\h\w*\)\?' - let g:neocomplcache_omni_patterns.json='[^. \t]\.\%(\h\w*\)\?' - let g:neocomplcache_omni_patterns.python='[^. *\t]\.\h\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.ruby='[^. *\t]\.\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.php='[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?' - let g:neocomplcache_omni_patterns.actionscript='[^. \t][.:]\h\w*' - let g:neocomplcache_omni_patterns.python3='[^. *\t]\.\h\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.go='\h\w*\%.' - let g:neocomplcache_omni_patterns.perl='\h\w*->\h\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.java='\%(\h\w*\|)\)\.' - let g:neocomplcache_omni_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\h\w*' - let g:neocomplcache_omni_patterns.objj='[\[ \.]\w\+$\|:\w*$' + let g:neocomplete#sources#omni#input_patterns.c='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?' + let g:neocomplete#sources#omni#input_patterns.cpp='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?' + let g:neocomplete#sources#omni#input_patterns.xml='<[^>]*' + let g:neocomplete#sources#omni#input_patterns.html='<[^>]*' + let g:neocomplete#sources#omni#input_patterns.xhtml='<[^>]*' + let g:neocomplete#sources#omni#input_patterns.markdown='<[^>]*' + let g:neocomplete#sources#omni#input_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' + let g:neocomplete#sources#omni#input_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' + let g:neocomplete#sources#omni#input_patterns.javascript='[^. \t]\.\%(\h\w*\)\?' + let g:neocomplete#sources#omni#input_patterns.json='[^. \t]\.\%(\h\w*\)\?' + let g:neocomplete#sources#omni#input_patterns.python='[^. *\t]\.\h\w*\|\h\w*::' + let g:neocomplete#sources#omni#input_patterns.ruby='[^. *\t]\.\w*\|\h\w*::' + let g:neocomplete#sources#omni#input_patterns.php='[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?' + let g:neocomplete#sources#omni#input_patterns.actionscript='[^. \t][.:]\h\w*' + let g:neocomplete#sources#omni#input_patterns.python3='[^. *\t]\.\h\w*\|\h\w*::' + let g:neocomplete#sources#omni#input_patterns.go='\h\w*\%.' + let g:neocomplete#sources#omni#input_patterns.perl='\h\w*->\h\w*\|\h\w*::' + let g:neocomplete#sources#omni#input_patterns.java='\%(\h\w*\|)\)\.' + let g:neocomplete#sources#omni#input_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\h\w*' + let g:neocomplete#sources#omni#input_patterns.objj='[\[ \.]\w\+$\|:\w*$' "}}} "SIGNIFY: {{{