From 5fe51efd1d2769a326212a93df7e18223faf89df Mon Sep 17 00:00:00 2001 From: NoWiS Date: Tue, 14 Jan 2014 15:36:30 +0100 Subject: [PATCH 01/22] Informations about how to add YouCompleteMe were wrong. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 0ceffc50f..00cba9e8f 100644 --- a/README.markdown +++ b/README.markdown @@ -297,7 +297,7 @@ NeoComplCache is an amazing autocomplete plugin with additional support for snip YouCompleteMe is another amazing completion engine. It is slightly more involved to set up as it contains a binary component that the user needs to compile before it will work. As a result of this however it is very fast. -To enable YouCompleteMe add `YouCompleteMe` to your list of groups by overriding it in your `.vimrc.bundles.local` like so: `let g:spf13_bundle_groups=['general', 'programming', 'misc', 'scala', 'YouCompleteMe']` This is just an example. Remember to choose the other groups you want here. +To enable YouCompleteMe add `youcompleteme` to your list of groups by overriding it in your `.vimrc.before.local` like so: `let g:spf13_bundle_groups=['general', 'programming', 'misc', 'scala', 'youcompleteme']` This is just an example. Remember to choose the other groups you want here. Once you have done this you will need to get Vundle to grab the latest code from git. You can do this by calling `:BundleInstall!`. You should see YouCompleteMe in the list. From a828428c7f72486c0d6f4864d92602bedd33d679 Mon Sep 17 00:00:00 2001 From: Richard Bateman Date: Mon, 20 Jan 2014 09:47:54 -0700 Subject: [PATCH 02/22] Change ctrl-e to use nerdtree-tabs instead of nerd tree native --- .vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vimrc b/.vimrc index fe6ba1069..98429ced1 100644 --- a/.vimrc +++ b/.vimrc @@ -455,7 +455,7 @@ " } " NerdTree { - map :NERDTreeToggle:NERDTreeMirror + map NERDTreeTabsToggle map e :NERDTreeFind nmap nt :NERDTreeFind From 5968f0a0dbd7c833651d5a571172b7d9d367a152 Mon Sep 17 00:00:00 2001 From: switchspan Date: Sat, 25 Jan 2014 18:39:57 -0500 Subject: [PATCH 03/22] added instructions for windows install with Chocolatey --- README.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.markdown b/README.markdown index 0ceffc50f..4478207ef 100644 --- a/README.markdown +++ b/README.markdown @@ -54,6 +54,13 @@ If you have a bash-compatible shell you can run the script directly: ## Installing on Windows On Windows and \*nix [Git] and [Curl] are required. Also, if you haven't already, you'll need to install [Vim]. +The quickest option for all three is to install the dependencies([Git] and [Curl]) and spf13-vim via [Chocolatey]. After running the [Chocolatey] install, execute the following commands on the commandline: + + cinst git + cinst curl + cinst spf13.vim + +_Note: This will install Vim as well_ ### Installing dependencies @@ -491,6 +498,7 @@ Here's some tips if you've never used VIM before: [Curl]:http://curl.haxx.se [Vim]:http://www.vim.org/download.php#pc [msysgit]:http://code.google.com/p/msysgit +[Chocolatey]: http://chocolatey.org/ [MacVim]:http://code.google.com/p/macvim/ [spf13-vim]:https://github.com/spf13/spf13-vim [contributors]:https://github.com/spf13/spf13-vim/contributors From caf59dc201da83434b1539492c54968346b054f2 Mon Sep 17 00:00:00 2001 From: switchspan Date: Sat, 25 Jan 2014 18:55:52 -0500 Subject: [PATCH 04/22] modified windows install instructions in readme --- README.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 4478207ef..025779f84 100644 --- a/README.markdown +++ b/README.markdown @@ -54,13 +54,15 @@ If you have a bash-compatible shell you can run the script directly: ## Installing on Windows On Windows and \*nix [Git] and [Curl] are required. Also, if you haven't already, you'll need to install [Vim]. -The quickest option for all three is to install the dependencies([Git] and [Curl]) and spf13-vim via [Chocolatey]. After running the [Chocolatey] install, execute the following commands on the commandline: +The quickest option to install all three dependencies ([Git], [Curl], [Vim] and [spf13-vim]) via [spf13.vim package]. After running the [Chocolatey] install, execute the following commands on the _command prompt_: cinst git cinst curl cinst spf13.vim -_Note: This will install Vim as well_ +_Note: The spf13.vim package will install Vim also! _ + +If you want to install [msysgit], [Curl] and [spf13-vim] individually, follow the directions below. ### Installing dependencies @@ -499,6 +501,7 @@ Here's some tips if you've never used VIM before: [Vim]:http://www.vim.org/download.php#pc [msysgit]:http://code.google.com/p/msysgit [Chocolatey]: http://chocolatey.org/ +[spf13.vim package]: http://chocolatey.org/packages/spf13.vim [MacVim]:http://code.google.com/p/macvim/ [spf13-vim]:https://github.com/spf13/spf13-vim [contributors]:https://github.com/spf13/spf13-vim/contributors From 3125f352123b71b4e7aebbffb4e8b3ad6bf3dd3d Mon Sep 17 00:00:00 2001 From: switchspan Date: Sat, 25 Jan 2014 19:01:02 -0500 Subject: [PATCH 05/22] Added Chocolatey install for ctags to readme for windows install --- README.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 025779f84..01cae2e9f 100644 --- a/README.markdown +++ b/README.markdown @@ -54,13 +54,14 @@ If you have a bash-compatible shell you can run the script directly: ## Installing on Windows On Windows and \*nix [Git] and [Curl] are required. Also, if you haven't already, you'll need to install [Vim]. -The quickest option to install all three dependencies ([Git], [Curl], [Vim] and [spf13-vim]) via [spf13.vim package]. After running the [Chocolatey] install, execute the following commands on the _command prompt_: +The quickest option to install all three dependencies ([Git], [Curl], [Vim] and [spf13-vim]) via [Chocolatey] NuGet and the [spf13.vim package]. After running the [Chocolatey] install, execute the following commands on the _command prompt_: cinst git cinst curl + cinst ctags cinst spf13.vim -_Note: The spf13.vim package will install Vim also! _ +_Note: The [spf13.vim package] will install Vim also! _ If you want to install [msysgit], [Curl] and [spf13-vim] individually, follow the directions below. From 1ccd3681901e4fa8021e821d42d4b97374ec3c74 Mon Sep 17 00:00:00 2001 From: switchspan Date: Sat, 25 Jan 2014 23:28:18 -0500 Subject: [PATCH 06/22] fixed formatting for readme windows install instructions --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 01cae2e9f..1032c551b 100644 --- a/README.markdown +++ b/README.markdown @@ -53,7 +53,7 @@ If you have a bash-compatible shell you can run the script directly: ## Installing on Windows -On Windows and \*nix [Git] and [Curl] are required. Also, if you haven't already, you'll need to install [Vim]. +On Windows and \*nix [Git] and [Curl] are required. Also, if you haven't already, you'll need to install [Vim]. The quickest option to install all three dependencies ([Git], [Curl], [Vim] and [spf13-vim]) via [Chocolatey] NuGet and the [spf13.vim package]. After running the [Chocolatey] install, execute the following commands on the _command prompt_: cinst git @@ -61,7 +61,7 @@ The quickest option to install all three dependencies ([Git], [Curl], [Vim] and cinst ctags cinst spf13.vim -_Note: The [spf13.vim package] will install Vim also! _ +_Note: The spf13.vim package will install Vim also! _ If you want to install [msysgit], [Curl] and [spf13-vim] individually, follow the directions below. From 4ec01f5ddab728962befde588a2b502444a8f656 Mon Sep 17 00:00:00 2001 From: perfectworks Date: Mon, 27 Jan 2014 18:17:56 +0800 Subject: [PATCH 07/22] add a switch to disable omni complete --- .vimrc | 50 ++++++++++++++++++++++++++++---------------------- .vimrc.before | 3 +++ 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/.vimrc b/.vimrc index fe6ba1069..260cb274b 100644 --- a/.vimrc +++ b/.vimrc @@ -408,28 +408,32 @@ " } " OmniComplete { - if has("autocmd") && exists("+omnifunc") - autocmd Filetype * - \if &omnifunc == "" | - \setlocal omnifunc=syntaxcomplete#Complete | - \endif - endif + " To disable omni complete, add the following to your .vimrc.before.local file: + " let g:spf13_no_omni_complete = 1 + if !exists('g:spf13_no_omni_complete') + if has("autocmd") && exists("+omnifunc") + autocmd Filetype * + \if &omnifunc == "" | + \setlocal omnifunc=syntaxcomplete#Complete | + \endif + endif - hi Pmenu guifg=#000000 guibg=#F8F8F8 ctermfg=black ctermbg=Lightgray - hi PmenuSbar guifg=#8A95A7 guibg=#F8F8F8 gui=NONE ctermfg=darkcyan ctermbg=lightgray cterm=NONE - hi PmenuThumb guifg=#F8F8F8 guibg=#8A95A7 gui=NONE ctermfg=lightgray ctermbg=darkcyan cterm=NONE - - " Some convenient mappings - inoremap pumvisible() ? "\" : "\" - inoremap pumvisible() ? "\" : "\" - inoremap pumvisible() ? "\" : "\" - inoremap pumvisible() ? "\" : "\" - inoremap pumvisible() ? "\\\" : "\" - inoremap pumvisible() ? "\\\" : "\" - - " Automatically open and close the popup menu / preview window - au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif - set completeopt=menu,preview,longest + hi Pmenu guifg=#000000 guibg=#F8F8F8 ctermfg=black ctermbg=Lightgray + hi PmenuSbar guifg=#8A95A7 guibg=#F8F8F8 gui=NONE ctermfg=darkcyan ctermbg=lightgray cterm=NONE + hi PmenuThumb guifg=#F8F8F8 guibg=#8A95A7 gui=NONE ctermfg=lightgray ctermbg=darkcyan cterm=NONE + + " Some convenient mappings + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\\\" : "\" + inoremap pumvisible() ? "\\\" : "\" + + " Automatically open and close the popup menu / preview window + au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif + set completeopt=menu,preview,longest + endif " } " Ctags { @@ -770,7 +774,9 @@ let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\h\w*\|\h\w*::' " } " Normal Vim omni-completion { - else + " To disable omni complete, add the following to your .vimrc.before.local file: + " let g:spf13_no_omni_complete = 1 + elseif !exists('g:spf13_no_omni_complete') " Enable omni-completion. autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags diff --git a/.vimrc.before b/.vimrc.before index 8253ab53f..1f2a399db 100644 --- a/.vimrc.before +++ b/.vimrc.before @@ -76,6 +76,9 @@ " To set your own font, do it from ~/.vimrc.local " let g:spf13_no_big_font = 1 + " Disable omni complete + " let g:spf13_no_omni_complete = 1 + " Don't create default mappings for multicursors " See :help multiple-cursors-mappings " let g:multi_cursor_use_default_mapping=0 From c8b9f72e99835027d967fe11361311da83673bf4 Mon Sep 17 00:00:00 2001 From: Jim Deville Date: Thu, 30 Jan 2014 17:00:19 -0500 Subject: [PATCH 08/22] Correct load order of config files in readme Corrected the load order of config files to match the code. Also added a link for AutoClose --- README.markdown | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index 0ceffc50f..bdd2af221 100644 --- a/README.markdown +++ b/README.markdown @@ -169,11 +169,12 @@ There is an additional tier of customization available to those who want to main fork of spf13-vim specialized for a particular group. These users can create `.vimrc.fork` and `.vimrc.bundles.fork` files in the root of their fork. The load order for the configuration is: -1. `.vimrc.before.local` - before user configuration +1. `.vimrc.before` - spf13-vim before configuration 2. `.vimrc.before.fork` - fork before configuration -3. `.vimrc.bundles.local` - local user bundle configuration -4. `.vimrc.bundles.fork` - fork bundle configuration -5. `.vimrc.bundles` - spf13-vim bundle configuration +3. `.vimrc.before.local` - before user configuration +4. `.vimrc.bundles` - spf13-vim bundle configuration +5. `.vimrc.bundles.fork` - fork bundle configuration +6. `.vimrc.bundles.local` - local user bundle configuration 6. `.vimrc` - spf13-vim vim configuration 7. `.vimrc.fork` - fork vim configuration 8. `.vimrc.local` - local user configuration @@ -515,6 +516,7 @@ Here's some tips if you've never used VIM before: [Airline]:https://github.com/bling/vim-airline [Powerline]:https://github.com/lokaltog/powerline [Powerline Fonts]:https://github.com/Lokaltog/powerline-fonts +[AutoClose]:https://github.com/spf13/vim-autoclose [spf13-vim-img]:https://i.imgur.com/UKToY.png [spf13-vimrc-img]:https://i.imgur.com/kZWj1.png From 0bdeca5082da59c35ede03824e7fa43ff329921e Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Fri, 31 Jan 2014 10:37:49 +0300 Subject: [PATCH 09/22] store the vundle uri in a variable. I sometimes need to use other git transports (as opposed to https) and having these uris readable from the environment helps. --- bootstrap.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 70837b145..3190273cc 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash ############################ SETUP PARAMETERS app_name='spf13-vim' -git_uri='https://github.com/spf13/spf13-vim.git' +[-z "$git_uri" ] && git_uri='https://github.com/spf13/spf13-vim.git' git_branch='3.0' debug_mode='0' fork_maintainer='0' +[ -z "$VUNDLE_URI" ] && VUNDLE_URI="https://github.com/gmarik/vundle.git" ############################ BASIC SETUP TOOLS msg() { @@ -93,7 +94,7 @@ clone_repo() { clone_vundle() { if [ ! -e "$HOME/.vim/bundle/vundle" ]; then - git clone https://github.com/gmarik/vundle.git "$HOME/.vim/bundle/vundle" + git clone $VUNDLE_URI "$HOME/.vim/bundle/vundle" else upgrade_repo "vundle" "Successfully updated vundle" fi From 81144413eb13fe35e58bb12fc88f7dc6c1c3fcd5 Mon Sep 17 00:00:00 2001 From: Martin Atukunda Date: Fri, 31 Jan 2014 10:41:47 +0300 Subject: [PATCH 10/22] bash requires the space in this case --- bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 3190273cc..6ffea411c 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash ############################ SETUP PARAMETERS app_name='spf13-vim' -[-z "$git_uri" ] && git_uri='https://github.com/spf13/spf13-vim.git' +[ -z "$git_uri" ] && git_uri='https://github.com/spf13/spf13-vim.git' git_branch='3.0' debug_mode='0' fork_maintainer='0' From 47d795201d04b5055ce37ac9ea42196ab3d9dae7 Mon Sep 17 00:00:00 2001 From: Julian Duque Date: Fri, 31 Jan 2014 20:26:17 -0500 Subject: [PATCH 11/22] Fix no_conceal on youcompleteme --- .vimrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index fe6ba1069..253aace37 100644 --- a/.vimrc +++ b/.vimrc @@ -600,8 +600,10 @@ endif " For snippet_complete marker. - if has('conceal') - set conceallevel=2 concealcursor=i + if !exists("g:spf13_no_conceal") + if has('conceal') + set conceallevel=2 concealcursor=i + endif endif " Disable the neosnippet preview candidate window From f68eb5a10e0c039c7b9fc7cd8759d909de9dd6c8 Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Sun, 2 Feb 2014 16:17:17 -0500 Subject: [PATCH 12/22] fix spelling of occurred in debug() --- bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 70837b145..0cb87ad4d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -24,7 +24,7 @@ error() { debug() { if [ "$debug_mode" -eq '1' ] && [ "$ret" -gt '1' ]; then - msg "An error occured in function \"${FUNCNAME[$i+1]}\" on line ${BASH_LINENO[$i+1]}, we're sorry for that." + msg "An error occurred in function \"${FUNCNAME[$i+1]}\" on line ${BASH_LINENO[$i+1]}, we're sorry for that." fi } From 33091b260944b48affa9106ca7ee7a00ea724dc0 Mon Sep 17 00:00:00 2001 From: lukedomanski Date: Wed, 5 Feb 2014 11:16:58 +1100 Subject: [PATCH 13/22] added spf13 option to enable/disable wrap relative movement mappings --- .vimrc | 60 +++++++++++++++++++++++++++++---------------------- .vimrc.before | 3 +++ 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/.vimrc b/.vimrc index 15d9b1e03..e53586862 100644 --- a/.vimrc +++ b/.vimrc @@ -263,33 +263,41 @@ noremap j gj noremap k gk - " Same for 0, home, end, etc - function! WrapRelativeMotion(key, ...) - let vis_sel="" - if a:0 - let vis_sel="gv" - endif - if &wrap - execute "normal!" vis_sel . "g" . a:key - else - execute "normal!" vis_sel . a:key - endif - endfunction + " End/Start of line motion keys act relative to row/wrap width in the + " presence of `:set wrap`, and relative to line for `:set nowrap`. + " Default vim behaviour is to act relative to text line in both cases + " If you prefer the default behaviour, add the following to your + " .vimrc.before.local file: + " let g:spf13_no_wrapRelMotion = 1 + if !exists('g:spf13_no_wrapRelMotion') + " Same for 0, home, end, etc + function! WrapRelativeMotion(key, ...) + let vis_sel="" + if a:0 + let vis_sel="gv" + endif + if &wrap + execute "normal!" vis_sel . "g" . a:key + else + execute "normal!" vis_sel . a:key + endif + endfunction - " Map g* keys in Normal, Operator-pending, and Visual+select (over written - " below) modes - noremap $ :call WrapRelativeMotion("$") - noremap :call WrapRelativeMotion("$") - noremap 0 :call WrapRelativeMotion("0") - noremap :call WrapRelativeMotion("0") - noremap ^ :call WrapRelativeMotion("^") - " Over write the Visual+Select mode mappings to ensure correct mode is - " passed to WrapRelativeMotion - vnoremap $ :call WrapRelativeMotion("$", 1) - vnoremap :call WrapRelativeMotion("$", 1) - vnoremap 0 :call WrapRelativeMotion("0", 1) - vnoremap :call WrapRelativeMotion("0", 1) - vnoremap ^ :call WrapRelativeMotion("^", 1) + " Map g* keys in Normal, Operator-pending, and Visual+select (over written + " below) modes + noremap $ :call WrapRelativeMotion("$") + noremap :call WrapRelativeMotion("$") + noremap 0 :call WrapRelativeMotion("0") + noremap :call WrapRelativeMotion("0") + noremap ^ :call WrapRelativeMotion("^") + " Over write the Visual+Select mode mappings to ensure correct mode is + " passed to WrapRelativeMotion + vnoremap $ :call WrapRelativeMotion("$", 1) + vnoremap :call WrapRelativeMotion("$", 1) + vnoremap 0 :call WrapRelativeMotion("0", 1) + vnoremap :call WrapRelativeMotion("0", 1) + vnoremap ^ :call WrapRelativeMotion("^", 1) + endif " The following two lines conflict with moving to top and " bottom of the screen diff --git a/.vimrc.before b/.vimrc.before index 1f2a399db..b12b08e9d 100644 --- a/.vimrc.before +++ b/.vimrc.before @@ -34,6 +34,9 @@ " Disable easier moving in tabs and windows " let g:spf13_no_easyWindows = 1 + " Disable wrap relative motion for start/end line motions + " let g:spf13_no_wrapRelMotion = 1 + " Disable fast tab navigation " let g:spf13_no_fastTabs = 1 From 7b21d20f2436ebd31b0fc057f9727b6e1ba529a4 Mon Sep 17 00:00:00 2001 From: lukedomanski Date: Wed, 5 Feb 2014 22:04:22 +1100 Subject: [PATCH 14/22] fixed wrap relative motion mappings to address problem reported in spf13/spf13-vim#464 , d$ now deletes last character of line --- .vimrc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.vimrc b/.vimrc index e53586862..ca953bb63 100644 --- a/.vimrc +++ b/.vimrc @@ -283,15 +283,17 @@ endif endfunction - " Map g* keys in Normal, Operator-pending, and Visual+select (over written - " below) modes - noremap $ :call WrapRelativeMotion("$") - noremap :call WrapRelativeMotion("$") - noremap 0 :call WrapRelativeMotion("0") - noremap :call WrapRelativeMotion("0") - noremap ^ :call WrapRelativeMotion("^") - " Over write the Visual+Select mode mappings to ensure correct mode is - " passed to WrapRelativeMotion + " Map g* keys in Normal, Operator-pending, and Visual+select + nnoremap $ :call WrapRelativeMotion("$") + nnoremap :call WrapRelativeMotion("$") + nnoremap 0 :call WrapRelativeMotion("0") + nnoremap :call WrapRelativeMotion("0") + nnoremap ^ :call WrapRelativeMotion("^") + onoremap $ v:call WrapRelativeMotion("$") + onoremap v:call WrapRelativeMotion("$") + onoremap 0 v:call WrapRelativeMotion("0") + onoremap v:call WrapRelativeMotion("0") + onoremap ^ v:call WrapRelativeMotion("^") vnoremap $ :call WrapRelativeMotion("$", 1) vnoremap :call WrapRelativeMotion("$", 1) vnoremap 0 :call WrapRelativeMotion("0", 1) From 4122da250229dc7988d4ce436875a89f5f5fb756 Mon Sep 17 00:00:00 2001 From: lukedomanski Date: Wed, 5 Feb 2014 22:51:12 +1100 Subject: [PATCH 15/22] rolled back some changes to ensure d0 and d^ match default behaviours, spf13/spf13-vim#464 --- .vimrc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.vimrc b/.vimrc index ca953bb63..eabee8197 100644 --- a/.vimrc +++ b/.vimrc @@ -284,16 +284,17 @@ endfunction " Map g* keys in Normal, Operator-pending, and Visual+select - nnoremap $ :call WrapRelativeMotion("$") - nnoremap :call WrapRelativeMotion("$") - nnoremap 0 :call WrapRelativeMotion("0") - nnoremap :call WrapRelativeMotion("0") - nnoremap ^ :call WrapRelativeMotion("^") + noremap $ :call WrapRelativeMotion("$") + noremap :call WrapRelativeMotion("$") + noremap 0 :call WrapRelativeMotion("0") + noremap :call WrapRelativeMotion("0") + noremap ^ :call WrapRelativeMotion("^") + " Overwrite the operator pending $/ mappings from above + " to force inclusive motion with :execute normal! onoremap $ v:call WrapRelativeMotion("$") onoremap v:call WrapRelativeMotion("$") - onoremap 0 v:call WrapRelativeMotion("0") - onoremap v:call WrapRelativeMotion("0") - onoremap ^ v:call WrapRelativeMotion("^") + " Overwrite the Visual+select mode mappings from above + " to ensure the correct vis_sel flag is passed to function vnoremap $ :call WrapRelativeMotion("$", 1) vnoremap :call WrapRelativeMotion("$", 1) vnoremap 0 :call WrapRelativeMotion("0", 1) From 784e58b5617f1a0ce1c639417da1e8b709e267f9 Mon Sep 17 00:00:00 2001 From: ljani Date: Thu, 6 Feb 2014 20:25:24 +0200 Subject: [PATCH 16/22] Add Shougo/neosnippet-snippets. Fixes #539. Shougo/neosnippet version 4.1 split the repository into two and the other half is now missing, see the PR for details. --- .vimrc.bundles | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vimrc.bundles b/.vimrc.bundles index d13b08af8..93252b0b6 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -162,10 +162,12 @@ Bundle 'SirVer/ultisnips' elseif count(g:spf13_bundle_groups, 'neocomplcache') Bundle 'Shougo/neocomplcache' + Bundle 'Shougo/neosnippet-snippets' Bundle 'Shougo/neosnippet' Bundle 'honza/vim-snippets' elseif count(g:spf13_bundle_groups, 'neocomplete') Bundle 'Shougo/neocomplete.vim.git' + Bundle 'Shougo/neosnippet-snippets' Bundle 'Shougo/neosnippet' Bundle 'honza/vim-snippets' endif From 9d293cbe57573e37744b1c0f3d03bf8614923339 Mon Sep 17 00:00:00 2001 From: ljani Date: Thu, 6 Feb 2014 20:42:40 +0200 Subject: [PATCH 17/22] Fix neosnippet and neosnippet-snippets order to follow the instructions at Shougo/neosnippet --- .vimrc.bundles | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vimrc.bundles b/.vimrc.bundles index 93252b0b6..bf5ef6e3f 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -162,13 +162,13 @@ Bundle 'SirVer/ultisnips' elseif count(g:spf13_bundle_groups, 'neocomplcache') Bundle 'Shougo/neocomplcache' - Bundle 'Shougo/neosnippet-snippets' Bundle 'Shougo/neosnippet' + Bundle 'Shougo/neosnippet-snippets' Bundle 'honza/vim-snippets' elseif count(g:spf13_bundle_groups, 'neocomplete') Bundle 'Shougo/neocomplete.vim.git' - Bundle 'Shougo/neosnippet-snippets' Bundle 'Shougo/neosnippet' + Bundle 'Shougo/neosnippet-snippets' Bundle 'honza/vim-snippets' endif " } From 507b6b01aca8d1a5baf431674bf1a8ce753b651d Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Mon, 10 Feb 2014 03:55:33 -0500 Subject: [PATCH 18/22] add $app_dir var to point to application root This is about the same as the %BASE_DIR% var in the windows scripts --- bootstrap.sh | 10 +++++----- uninstall.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index da93be010..fb7cc0990 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash ############################ SETUP PARAMETERS app_name='spf13-vim' +app_dir="$HOME/.spf13-vim-3" [ -z "$git_uri" ] && git_uri='https://github.com/spf13/spf13-vim.git' git_branch='3.0' debug_mode='0' @@ -64,7 +65,7 @@ upgrade_repo() { msg "trying to update $1" if [ "$1" = "$app_name" ]; then - cd "$HOME/.$app_name-3" && + cd "$app_dir" && git pull origin "$git_branch" fi @@ -80,10 +81,9 @@ upgrade_repo() { clone_repo() { program_exists "git" "Sorry, we cannot continue without GIT, please install it first." - endpath="$HOME/.$app_name-3" - if [ ! -e "$endpath/.git" ]; then - git clone --recursive -b "$git_branch" "$git_uri" "$endpath" + if [ ! -e "$app_dir" ]; then + git clone --recursive -b "$git_branch" "$git_uri" "$app_dir" ret="$?" success "$1" debug @@ -104,7 +104,7 @@ clone_vundle() { } create_symlinks() { - endpath="$HOME/.$app_name-3" + endpath="$app_dir" if [ ! -d "$endpath/.vim/bundle" ]; then mkdir -p "$endpath/.vim/bundle" diff --git a/uninstall.sh b/uninstall.sh index c410db030..5fd9a6d8a 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -endpath="$HOME/.spf13-vim-3" +app_dir="$HOME/.spf13-vim-3" warn() { echo "$1" >&2 @@ -15,4 +15,4 @@ rm $HOME/.vimrc rm $HOME/.vimrc.bundles rm $HOME/.vim -rm -rf $endpath +rm -rf $app_dir From 59f9d87becf8704d675124cc028a89d915292596 Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Mon, 10 Feb 2014 03:56:53 -0500 Subject: [PATCH 19/22] rename BASE_DIR to APP_DIR --- spf13-vim-windows-install.cmd | 32 ++++++++++++++++---------------- spf13-vim-windows-xp-install.cmd | 30 +++++++++++++++--------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/spf13-vim-windows-install.cmd b/spf13-vim-windows-install.cmd index c30d4e3fa..af8d86a69 100644 --- a/spf13-vim-windows-install.cmd +++ b/spf13-vim-windows-install.cmd @@ -1,33 +1,33 @@ @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% @if not exist "%HOME%" @set HOME=%USERPROFILE% -@set BASE_DIR=%HOME%\.spf13-vim-3 -IF NOT EXIST "%BASE_DIR%" ( - call git clone --recursive -b 3.0 https://github.com/spf13/spf13-vim.git "%BASE_DIR%" +@set APP_DIR=%HOME%\.spf13-vim-3 +IF NOT EXIST "%APP_DIR%" ( + call git clone --recursive -b 3.0 https://github.com/spf13/spf13-vim.git "%APP_DIR%" ) ELSE ( @set ORIGINAL_DIR=%CD% echo updating spf13-vim - chdir /d "%BASE_DIR%" + chdir /d "%APP_DIR%" call git pull chdir /d "%ORIGINAL_DIR%" - call cd "%BASE_DIR%" + call cd "%APP_DIR%" ) -call mklink "%HOME%\.vimrc" "%BASE_DIR%\.vimrc" -call mklink "%HOME%\_vimrc" "%BASE_DIR%\.vimrc" -call mklink "%HOME%\.vimrc.fork" "%BASE_DIR%\.vimrc.fork" -call mklink "%HOME%\.vimrc.bundles" "%BASE_DIR%\.vimrc.bundles" -call mklink "%HOME%\.vimrc.bundles.fork" "%BASE_DIR%\.vimrc.bundles.fork" -call mklink "%HOME%\.vimrc.before" "%BASE_DIR%\.vimrc.before" -call mklink "%HOME%\.vimrc.before.fork" "%BASE_DIR%\.vimrc.before.fork" -call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim" +call mklink "%HOME%\.vimrc" "%APP_DIR%\.vimrc" +call mklink "%HOME%\_vimrc" "%APP_DIR%\.vimrc" +call mklink "%HOME%\.vimrc.fork" "%APP_DIR%\.vimrc.fork" +call mklink "%HOME%\.vimrc.bundles" "%APP_DIR%\.vimrc.bundles" +call mklink "%HOME%\.vimrc.bundles.fork" "%APP_DIR%\.vimrc.bundles.fork" +call mklink "%HOME%\.vimrc.before" "%APP_DIR%\.vimrc.before" +call mklink "%HOME%\.vimrc.before.fork" "%APP_DIR%\.vimrc.before.fork" +call mklink /J "%HOME%\.vim" "%APP_DIR%\.vim" -IF NOT EXIST "%BASE_DIR%\.vim\bundle" ( - call mkdir "%BASE_DIR%\.vim\bundle" +IF NOT EXIST "%APP_DIR%\.vim\bundle" ( + call mkdir "%APP_DIR%\.vim\bundle" ) IF NOT EXIST "%HOME%/.vim/bundle/vundle" ( call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle" ) -call vim -u "%BASE_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall +call vim -u "%APP_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall diff --git a/spf13-vim-windows-xp-install.cmd b/spf13-vim-windows-xp-install.cmd index 800dc38b0..57aa62e98 100644 --- a/spf13-vim-windows-xp-install.cmd +++ b/spf13-vim-windows-xp-install.cmd @@ -1,9 +1,9 @@ @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% @if not exist "%HOME%" @set HOME=%USERPROFILE% -@set BASE_DIR=%HOME%\.spf13-vim-3 +@set APP_DIR=%HOME%\.spf13-vim-3 -@if not exist "%BASE_DIR%" ( +@if not exist "%APP_DIR%" ( echo backing up existing vim config @set today=%DATE% @if exist "%HOME%\.vim" call xcopy /s/e/h/y/r/q/i "%HOME%\.vim" "%HOME%\.vim.%today%" @@ -12,25 +12,25 @@ @if exist "%HOME%\.gvimrc" call copy "%HOME%\.gvimrc" "%HOME%\.gvimrc.%today%" ) -@if exist "%BASE_DIR%" ( +@if exist "%APP_DIR%" ( @set ORIGINAL_DIR=%CD% echo updating spf13-vim - chdir /d "%BASE_DIR%" && git pull + chdir /d "%APP_DIR%" && git pull chdir /d "%ORIGINAL_DIR%" ) else ( echo cloning spf13-vim - call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git "%BASE_DIR%" + call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git "%APP_DIR%" ) -@if not exist "%BASE_DIR%\.vim\bundle" call mkdir "%BASE_DIR%\.vim\bundle" -call xcopy /s/e/h/y/r/q/i "%BASE_DIR%\.vim" "%HOME%\.vim" -call copy "%BASE_DIR%\.vimrc" "%HOME%\.vimrc" -call copy "%BASE_DIR%\.vimrc" "%HOME%\_vimrc" -call copy "%BASE_DIR%\.vimrc.fork" "%HOME%\.vimrc.fork" -call copy "%BASE_DIR%\.vimrc.bundles" "%HOME%\.vimrc.bundles" -call copy "%BASE_DIR%\.vimrc.bundles.fork" "%HOME%\.vimrc.bundles.fork" -call copy "%BASE_DIR%\.vimrc.before" "%HOME%\.vimrc.before" -call copy "%BASE_DIR%\.vimrc.before.fork" "%HOME%\.vimrc.before.fork" +@if not exist "%APP_DIR%\.vim\bundle" call mkdir "%APP_DIR%\.vim\bundle" +call xcopy /s/e/h/y/r/q/i "%APP_DIR%\.vim" "%HOME%\.vim" +call copy "%APP_DIR%\.vimrc" "%HOME%\.vimrc" +call copy "%APP_DIR%\.vimrc" "%HOME%\_vimrc" +call copy "%APP_DIR%\.vimrc.fork" "%HOME%\.vimrc.fork" +call copy "%APP_DIR%\.vimrc.bundles" "%HOME%\.vimrc.bundles" +call copy "%APP_DIR%\.vimrc.bundles.fork" "%HOME%\.vimrc.bundles.fork" +call copy "%APP_DIR%\.vimrc.before" "%HOME%\.vimrc.before" +call copy "%APP_DIR%\.vimrc.before.fork" "%HOME%\.vimrc.before.fork" @if not exist "%HOME%/.vim/bundle/vundle" call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle" -call vim -u "%BASE_DIR%/.vimrc.bundles" - +BundleInstall! +BundleClean +qall +call vim -u "%APP_DIR%/.vimrc.bundles" - +BundleInstall! +BundleClean +qall From 1a9983371779979c9e9ac085738e950c5d37098e Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Mon, 10 Feb 2014 04:03:31 -0500 Subject: [PATCH 20/22] Delete .gitmodules It doesn't seem like we need this submodule anymore since the script clones vundle itself. is there a reason it's still here? --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 723c8be40..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule ".vim/vundle.git"] - path = .vim/vundle.git - url = https://github.com/gmarik/vundle.git From a6c6647dc2e8f092d04e7f290d5cfbc7b2c283b8 Mon Sep 17 00:00:00 2001 From: Robert Ekendahl Date: Tue, 11 Feb 2014 10:16:57 -0500 Subject: [PATCH 21/22] Screen program mapping is now opt-in This as it slows down exit from insert mode for many users --- .vimrc | 18 +++++++++++------- .vimrc.before | 7 +++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.vimrc b/.vimrc index 36fd3cf5c..47f4daf2c 100644 --- a/.vimrc +++ b/.vimrc @@ -360,12 +360,16 @@ " http://stackoverflow.com/a/8064607/127816 vnoremap . :normal . - " Fix home and end keybindings for screen, particularly on mac + " Fix home and end key bindings for screen, particularly on mac " - for some reason this fixes the arrow keys too. huh. - map  $ - imap  $ - map  g0 - imap  g0 + " - __Note__ that this has been shown to slow down switching from insert + " to normal mode (for users that don't use screen?) + if exists('g:spf13_screen_mapping') + map  $ + imap  $ + map  g0 + imap  g0 + end " For when you forget to sudo.. Really Write the file. cmap w!! w !sudo tee % >/dev/null @@ -570,7 +574,7 @@ nnoremap gi :Git add -p % nnoremap gg :SignifyToggle "} - + " YouCompleteMe { if count(g:spf13_bundle_groups, 'youcompleteme') let g:acp_enableAtStartup = 0 @@ -582,7 +586,7 @@ let g:UltiSnipsExpandTrigger = '' let g:UltiSnipsJumpForwardTrigger = '' let g:UltiSnipsJumpBackwardTrigger = '' - + " Enable omni completion. autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags diff --git a/.vimrc.before b/.vimrc.before index 8253ab53f..cbb13a573 100644 --- a/.vimrc.before +++ b/.vimrc.before @@ -85,6 +85,13 @@ " let g:multi_cursor_quit_key='' " Require a special keypress to enter multiple cursors mode " let g:multi_cursor_start_key='+' + + " Add mappings for Unix `screen` program. + " __Note!__ This has been shown to slow down exiting insert mode back to + " normal mode for some users (who don't use screen?) + " To enable screen mapping uncomment the following line + " let g:spf13_screen_mapping = 1 + " } " Use fork before if available { From 9b2363616e46ee59ac4c0c0b513c989864471bef Mon Sep 17 00:00:00 2001 From: Robert Ekendahl Date: Tue, 11 Feb 2014 16:14:30 -0500 Subject: [PATCH 22/22] Removed screen program mapping --- .vimrc | 11 ----------- .vimrc.before | 6 ------ 2 files changed, 17 deletions(-) diff --git a/.vimrc b/.vimrc index 47f4daf2c..2ede0c4f4 100644 --- a/.vimrc +++ b/.vimrc @@ -360,17 +360,6 @@ " http://stackoverflow.com/a/8064607/127816 vnoremap . :normal . - " Fix home and end key bindings for screen, particularly on mac - " - for some reason this fixes the arrow keys too. huh. - " - __Note__ that this has been shown to slow down switching from insert - " to normal mode (for users that don't use screen?) - if exists('g:spf13_screen_mapping') - map  $ - imap  $ - map  g0 - imap  g0 - end - " For when you forget to sudo.. Really Write the file. cmap w!! w !sudo tee % >/dev/null diff --git a/.vimrc.before b/.vimrc.before index cbb13a573..0d87fdae6 100644 --- a/.vimrc.before +++ b/.vimrc.before @@ -86,12 +86,6 @@ " Require a special keypress to enter multiple cursors mode " let g:multi_cursor_start_key='+' - " Add mappings for Unix `screen` program. - " __Note!__ This has been shown to slow down exiting insert mode back to - " normal mode for some users (who don't use screen?) - " To enable screen mapping uncomment the following line - " let g:spf13_screen_mapping = 1 - " } " Use fork before if available {