Skip to content

Commit 3ed660a

Browse files
committed
Merge pull request spf13#449 from sbennett18/3.0
New spf13-vim option, formatting, solarized if statement fix
2 parents 05af474 + 36936db commit 3ed660a

File tree

2 files changed

+70
-62
lines changed

2 files changed

+70
-62
lines changed

.vimrc

Lines changed: 66 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,12 @@
143143

144144
if filereadable(expand("~/.vim/bundle/vim-colors-solarized/colors/solarized.vim"))
145145
let g:solarized_termcolors=256
146-
color solarized " Load a colorscheme
147-
endif
148146
let g:solarized_termtrans=1
149147
let g:solarized_contrast="high"
150148
let g:solarized_visibility="high"
149+
color solarized " Load a colorscheme
150+
endif
151+
151152
set tabpagemax=15 " Only show 15 tabs
152153
set showmode " Display the current mode
153154

@@ -158,7 +159,7 @@
158159

159160
highlight clear LineNr " Current line number row will have same background color in relative mode.
160161
" Things like vim-gitgutter will match LineNr highlight
161-
"highlight clear CursorLineNr " Remove highlight color from current line number
162+
"highlight clear CursorLineNr " Remove highlight color from current line number
162163

163164
if has('cmdline_info')
164165
set ruler " Show the ruler
@@ -243,9 +244,9 @@
243244

244245
" Easier moving in tabs and windows
245246
" The lines conflict with the default digraph mapping of <C-K>
246-
" If you prefer that functionality, add let g:spf13_no_easyWindows = 1
247-
" in your .vimrc.before.local file
248-
247+
" If you prefer that functionality, add the following to your
248+
" .vimrc.before.local file:
249+
" let g:spf13_no_easyWindows = 1
249250
if !exists('g:spf13_no_easyWindows')
250251
map <C-J> <C-W>j<C-W>_
251252
map <C-K> <C-W>k<C-W>_
@@ -299,8 +300,16 @@
299300
nmap <leader>f8 :set foldlevel=8<CR>
300301
nmap <leader>f9 :set foldlevel=9<CR>
301302
302-
" Toggle search highlighting
303-
nmap <silent> <leader>/ :set invhlsearch<CR>
303+
" Most prefer to toggle search highlighting rather than clear the current
304+
" search results. To clear search highlighting rather than toggle it on
305+
" and off, add the following to your .vimrc.before.local file:
306+
" let g:spf13_clear_search_highlight = 1
307+
if exists('g:spf13_clear_search_highlight')
308+
nmap <silent> <leader>/ :nohlsearch<CR>
309+
else
310+
nmap <silent> <leader>/ :set invhlsearch<CR>
311+
endif
312+
304313

305314
" Find merge conflict markers
306315
map <leader>fc /\v^[<\|=>]{7}( .*\|$)<CR>
@@ -502,7 +511,7 @@
502511
"}
503512

504513
" PythonMode {
505-
" Disable if python support not present
514+
" Disable if python support not present
506515
if !has('python')
507516
let g:pymode = 1
508517
endif
@@ -549,34 +558,33 @@
549558
endif
550559
let g:neocomplete#keyword_patterns['default'] = '\h\w*'
551560

552-
" Plugin key-mappings.
553-
554-
" These two lines conflict with the default digraph mapping of <C-K>
555-
" If you prefer that functionality, add
556-
" let g:spf13_no_neosnippet_expand = 1
557-
" in your .vimrc.before.local file
558-
559-
if !exists('g:spf13_no_neosnippet_expand')
560-
imap <C-k> <Plug>(neosnippet_expand_or_jump)
561-
smap <C-k> <Plug>(neosnippet_expand_or_jump)
562-
endif
561+
" Plugin key-mappings {
562+
" These two lines conflict with the default digraph mapping of <C-K>
563+
" If you prefer that functionality, add the following to your
564+
" .vimrc.before.local file:
565+
" let g:spf13_no_neosnippet_expand = 1
566+
if !exists('g:spf13_no_neosnippet_expand')
567+
imap <C-k> <Plug>(neosnippet_expand_or_jump)
568+
smap <C-k> <Plug>(neosnippet_expand_or_jump)
569+
endif
563570

564-
inoremap <expr><C-g> neocomplete#undo_completion()
565-
inoremap <expr><C-l> neocomplete#complete_common_string()
566-
inoremap <expr><CR> neocomplete#complete_common_string()
571+
inoremap <expr><C-g> neocomplete#undo_completion()
572+
inoremap <expr><C-l> neocomplete#complete_common_string()
573+
inoremap <expr><CR> neocomplete#complete_common_string()
567574
568-
" <TAB>: completion.
569-
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
570-
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
575+
" <TAB>: completion.
576+
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
577+
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
571578
572-
" <CR>: close popup
573-
" <s-CR>: close popup and save indent.
574-
inoremap <expr><s-CR> pumvisible() ? neocomplete#close_popup()"\<CR>" : "\<CR>"
575-
inoremap <expr><CR> pumvisible() ? neocomplete#close_popup() : "\<CR>"
579+
" <CR>: close popup
580+
" <s-CR>: close popup and save indent.
581+
inoremap <expr><s-CR> pumvisible() ? neocomplete#close_popup()"\<CR>" : "\<CR>"
582+
inoremap <expr><CR> pumvisible() ? neocomplete#close_popup() : "\<CR>"
576583
577-
" <C-h>, <BS>: close popup and delete backword char.
578-
inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>"
579-
inoremap <expr><C-y> neocomplete#close_popup()
584+
" <C-h>, <BS>: close popup and delete backword char.
585+
inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>"
586+
inoremap <expr><C-y> neocomplete#close_popup()
587+
" }
580588

581589
" Enable omni completion.
582590
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
@@ -652,34 +660,33 @@
652660
endif
653661
let g:neocomplcache_keyword_patterns._ = '\h\w*'
654662

655-
" Plugin key-mappings.
656-
657-
" These two lines conflict with the default digraph mapping of <C-K>
658-
" If you prefer that functionality, add
659-
" let g:spf13_no_neosnippet_expand = 1
660-
" in your .vimrc.before.local file
661-
662-
if !exists('g:spf13_no_neosnippet_expand')
663-
imap <C-k> <Plug>(neosnippet_expand_or_jump)
664-
smap <C-k> <Plug>(neosnippet_expand_or_jump)
665-
endif
663+
" Plugin key-mappings {
664+
" These two lines conflict with the default digraph mapping of <C-K>
665+
" If you prefer that functionality, add the following to your
666+
" .vimrc.before.local file:
667+
" let g:spf13_no_neosnippet_expand = 1
668+
if !exists('g:spf13_no_neosnippet_expand')
669+
imap <C-k> <Plug>(neosnippet_expand_or_jump)
670+
smap <C-k> <Plug>(neosnippet_expand_or_jump)
671+
endif
666672

667-
inoremap <expr><C-g> neocomplcache#undo_completion()
668-
inoremap <expr><C-l> neocomplcache#complete_common_string()
669-
inoremap <expr><CR> neocomplcache#complete_common_string()
673+
inoremap <expr><C-g> neocomplcache#undo_completion()
674+
inoremap <expr><C-l> neocomplcache#complete_common_string()
675+
inoremap <expr><CR> neocomplcache#complete_common_string()
670676
671-
" <TAB>: completion.
672-
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
673-
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
677+
" <TAB>: completion.
678+
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
679+
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
674680
675-
" <CR>: close popup
676-
" <s-CR>: close popup and save indent.
677-
inoremap <expr><s-CR> pumvisible() ? neocomplcache#close_popup()"\<CR>" : "\<CR>"
678-
inoremap <expr><CR> pumvisible() ? neocomplcache#close_popup() : "\<CR>"
681+
" <CR>: close popup
682+
" <s-CR>: close popup and save indent.
683+
inoremap <expr><s-CR> pumvisible() ? neocomplcache#close_popup()"\<CR>" : "\<CR>"
684+
inoremap <expr><CR> pumvisible() ? neocomplcache#close_popup() : "\<CR>"
679685
680-
" <C-h>, <BS>: close popup and delete backword char.
681-
inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
682-
inoremap <expr><C-y> neocomplcache#close_popup()
686+
" <C-h>, <BS>: close popup and delete backword char.
687+
inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
688+
inoremap <expr><C-y> neocomplcache#close_popup()
689+
" }
683690

684691
" Enable omni completion.
685692
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
@@ -747,8 +754,8 @@
747754
" airline {
748755
let g:airline_theme='powerlineish' " airline users use the powerline theme
749756
if !exists('g:airline_powerline_fonts')
750-
let g:airline_left_sep='' " Slightly fancier separator, instead of '>'
751-
let g:airline_right_sep='' " Slightly fancier separator, instead of '<'
757+
let g:airline_left_sep='' " Slightly fancier separator, instead of '>'
758+
let g:airline_right_sep='' " Slightly fancier separator, instead of '<'
752759
endif
753760
" }
754761

.vimrc.bundles

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
" Bundles {
5959

60-
" Deps
60+
" Deps {
6161
Bundle 'gmarik/vundle'
6262
Bundle 'MarcWeber/vim-addon-mw-utils'
6363
Bundle 'tomtom/tlib_vim'
@@ -70,14 +70,15 @@
7070
Bundle 'mileszs/ack.vim'
7171
let g:ackprg = 'ag --nogroup --nocolor --column --smart-case'
7272
endif
73+
" }
7374

74-
" Use local bundles if available {
75+
" Use local bundles config if available {
7576
if filereadable(expand("~/.vimrc.bundles.local"))
7677
source ~/.vimrc.bundles.local
7778
endif
7879
" }
7980

80-
" Use fork bundles if available {
81+
" Use fork bundles config if available {
8182
if filereadable(expand("~/.vimrc.bundles.fork"))
8283
source ~/.vimrc.bundles.fork
8384
endif

0 commit comments

Comments
 (0)