mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 08:07:36 +00:00
Move some of the more complicated plugin settings to their own rcs
This commit is contained in:
parent
6941a4626a
commit
ba490aa7b7
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,8 @@
|
||||
*.log
|
||||
tags
|
||||
vim/.netrwhist
|
||||
vim/autoload/plug.vim
|
||||
vim/autoload/plug.vim.old
|
||||
vim/backup/*~
|
||||
vim/plugged/*
|
||||
vim/rc/*.local.rc.vim
|
||||
|
@ -9,7 +9,7 @@ cmap cwd lcd %:p:h
|
||||
cmap cd. lcd %:p:h
|
||||
|
||||
" Bind Make to F5 like other IDEs
|
||||
nnoremap <F5> :Make!<CR>
|
||||
nnoremap <F5> :make<CR>
|
||||
|
||||
" Remap Ctrl+Space for auto Complete
|
||||
inoremap <C-Space> <C-n>
|
||||
@ -64,8 +64,8 @@ nmap gb :bn<CR>
|
||||
nmap gB :bp<CR>
|
||||
|
||||
" Command to display TODO tags in project
|
||||
command Todo Ag! TODO
|
||||
command Todo grep TODO
|
||||
|
||||
" Easy update tags
|
||||
command TagsUpdate Dispatch ctags -R .
|
||||
command TagsUpdate !ctags -R .
|
||||
|
||||
|
@ -29,7 +29,7 @@ Plug 'sandeepcr529/Buffet.vim', { 'on': 'Bufferlist' }
|
||||
|
||||
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
call s:source_rc('plugins/ctrlp.rc.vim')
|
||||
call s:smart_source_rc('plugins/ctrlp')
|
||||
|
||||
" ag / ack {{
|
||||
if executable('ag')
|
||||
@ -38,13 +38,15 @@ if executable('ag')
|
||||
nmap <leader>a :Ag<Space>
|
||||
nmap <leader>i* :Ag<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
||||
nmap <leader>* :Ag<Space>'\b<c-r><c-W>\b'<CR>
|
||||
command! Todo Ag! TODO
|
||||
" }}
|
||||
else
|
||||
elseif executable('ack')
|
||||
Plug 'mileszs/ack.vim'
|
||||
" {{
|
||||
nmap <leader>a :Ack<Space>
|
||||
nmap <leader>i* :Ack<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
||||
nmap <leader>* :Ack<Space>'\<<c-r><c-W>\>'<CR>
|
||||
command! Todo Ack! TODO
|
||||
" }}
|
||||
endif
|
||||
" }}
|
||||
@ -52,40 +54,11 @@ endif
|
||||
" Autocomplete {{
|
||||
if has('lua')
|
||||
Plug 'Shougo/neocomplete.vim'
|
||||
" {{
|
||||
let g:acp_enableAtStartup = 0
|
||||
let g:neocomplete#enable_at_startup = 1
|
||||
"let g:neocomplete#enable_smart_case = 1
|
||||
let g:neocomlete#max_list=10
|
||||
" }}
|
||||
call s:smart_source_rc('plugins/neocomps')
|
||||
else
|
||||
Plug 'Shougo/neocomplcache.vim'
|
||||
" {{
|
||||
let g:neocomplcache_enable_at_startup = 1
|
||||
"let g:neocomplcache_enable_smart_case = 1
|
||||
let g:neocomplcache_max_list = 10
|
||||
"let g:neocomplcache_enable_camel_case_completion = 1
|
||||
let g:neocomplcache_enable_fuzzy_completion = 1
|
||||
if !exists('g:neocomplcache_force_omni_patterns')
|
||||
let g:neocomplcache_force_omni_patterns = {}
|
||||
endif
|
||||
let g:neocomplcache_force_omni_patterns.python =
|
||||
\ '\%([^. \t]\.\|^\s*@\|^\s*from\s.\+import \|^\s*from \|^\s*import \)\w*'
|
||||
" alternative pattern: '\h\w*\|[^. \t]\.\w*'
|
||||
" }}
|
||||
call s:smart_source_rc('plugins/neocomps')
|
||||
end
|
||||
" {{
|
||||
" Enable omni completion.
|
||||
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
|
||||
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
||||
" Skip python because we have jedi-vim
|
||||
"autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
|
||||
autocmd FileType python setlocal omnifunc=jedi#completions
|
||||
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
|
||||
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
|
||||
|
||||
" }}
|
||||
|
||||
" Programming {{
|
||||
Plug 'majutsushi/tagbar'
|
||||
@ -97,30 +70,18 @@ Plug 'majutsushi/tagbar'
|
||||
" syntastic {{
|
||||
if !has('nvim')
|
||||
" Only use if not neovim, on neovim we have Neomake
|
||||
Plug 'scrooloose/syntastic' " {{
|
||||
let g:syntastic_html_tidy_ignore_errors = [
|
||||
\ 'proprietary attribute "ng-show"',
|
||||
\ 'proprietary attribute "ng-controller"',
|
||||
\ 'proprietary attribute "ng-repeat"',
|
||||
\ 'proprietary attribute "ng-app"',
|
||||
\ 'proprietary attribute "ng-click"'
|
||||
\ ]
|
||||
let g:syntastic_python_checkers = ['flake8']
|
||||
let g:syntastic_python_flake8_args='--max-line-length=80'
|
||||
" let g:syntastic_python_checkers = ['pep8']
|
||||
" " let g:syntastic_python_pep8_args='--ignore=E501'
|
||||
" " let g:syntastic_python_checkers = ['jshint']
|
||||
" " let g:syntastic_javascript_jshint_args='--ignore=E501'
|
||||
"
|
||||
" }}
|
||||
Plug 'scrooloose/syntastic'
|
||||
call s:smart_source_rc('plugins/syntastic')
|
||||
endif
|
||||
" }}
|
||||
Plug 'tomtom/tcomment_vim', { 'on': ['TComment', 'TCommentBlock'] }
|
||||
Plug 'tomtom/tcomment_vim'
|
||||
" , { 'on': ['TComment', 'TCommentBlock'] }
|
||||
" {{
|
||||
nnoremap // :TComment<CR>
|
||||
vnoremap // :TCommentBlock<CR>
|
||||
" }}
|
||||
" }}
|
||||
Plug 'tpope/vim-surround'
|
||||
|
||||
" GUI {{
|
||||
Plug 'bling/vim-airline'
|
||||
@ -209,10 +170,14 @@ if has('nvim')
|
||||
Plug 'benekastah/neomake'
|
||||
" {{
|
||||
nmap <leader>nm :Neomake<CR>
|
||||
nnoremap <F5> :Neomake<CR>
|
||||
let g:neomake_python_makers = ['flake8']
|
||||
|
||||
" }}
|
||||
else
|
||||
Plug 'tpope/vim-dispatch'
|
||||
nnoremap <F5> :Make<CR>
|
||||
command! TagsUpdate Dispatch ctags -R .
|
||||
endif
|
||||
" }}
|
||||
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
|
||||
|
@ -10,7 +10,6 @@ let g:ctrlp_dont_split = 'netrw'
|
||||
let g:ctrlp_extensions = ['tag', 'buffertag']
|
||||
" Support Apex language
|
||||
let g:ctrlp_buftag_types = {
|
||||
\ 'apex' : '--language-force=c#',
|
||||
\ 'go' : {
|
||||
\ 'bin' : 'gotags',
|
||||
\ 'args' : '-sort -silent',
|
||||
|
29
vim/rc/plugins/neocomps.rc.vim
Normal file
29
vim/rc/plugins/neocomps.rc.vim
Normal file
@ -0,0 +1,29 @@
|
||||
" Shared plugin configuration for Shougo/neocomplete and Shougo/neocomplcache
|
||||
if exists('loaded_neocomplete')
|
||||
let g:acp_enableAtStartup = 0
|
||||
let g:neocomplete#enable_at_startup = 1
|
||||
"let g:neocomplete#enable_smart_case = 1
|
||||
let g:neocomlete#max_list=10
|
||||
elseif exists('loaded_neocomplcache')
|
||||
let g:neocomplcache_enable_at_startup = 1
|
||||
"let g:neocomplcache_enable_smart_case = 1
|
||||
let g:neocomplcache_max_list = 10
|
||||
"let g:neocomplcache_enable_camel_case_completion = 1
|
||||
let g:neocomplcache_enable_fuzzy_completion = 1
|
||||
if !exists('g:neocomplcache_force_omni_patterns')
|
||||
let g:neocomplcache_force_omni_patterns = {}
|
||||
endif
|
||||
let g:neocomplcache_force_omni_patterns.python =
|
||||
\ '\%([^. \t]\.\|^\s*@\|^\s*from\s.\+import \|^\s*from \|^\s*import \)\w*'
|
||||
" alternative pattern: '\h\w*\|[^. \t]\.\w*'
|
||||
endif
|
||||
|
||||
" Enable omni completion.
|
||||
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
|
||||
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
||||
" Skip python because we have jedi-vim
|
||||
"autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
|
||||
autocmd FileType python setlocal omnifunc=jedi#completions
|
||||
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
|
||||
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
|
15
vim/rc/plugins/syntastic.rc.vim
Normal file
15
vim/rc/plugins/syntastic.rc.vim
Normal file
@ -0,0 +1,15 @@
|
||||
if exists('loaded_syntastic')
|
||||
let g:syntastic_html_tidy_ignore_errors = [
|
||||
\ 'proprietary attribute "ng-show"',
|
||||
\ 'proprietary attribute "ng-controller"',
|
||||
\ 'proprietary attribute "ng-repeat"',
|
||||
\ 'proprietary attribute "ng-app"',
|
||||
\ 'proprietary attribute "ng-click"'
|
||||
\ ]
|
||||
let g:syntastic_python_checkers = ['flake8']
|
||||
let g:syntastic_python_flake8_args='--max-line-length=80'
|
||||
" let g:syntastic_python_checkers = ['pep8']
|
||||
" " let g:syntastic_python_pep8_args='--ignore=E501'
|
||||
" " let g:syntastic_python_checkers = ['jshint']
|
||||
" " let g:syntastic_javascript_jshint_args='--ignore=E501'
|
||||
endif
|
4
vimrc
4
vimrc
@ -44,11 +44,9 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
endif
|
||||
|
||||
call s:source_rc('init.rc.vim')
|
||||
|
||||
call s:smart_source_rc('keymap')
|
||||
call plug#begin()
|
||||
call s:smart_source_rc('plugins')
|
||||
call plug#end()
|
||||
|
||||
call s:smart_source_rc('edit')
|
||||
call s:smart_source_rc('keymap')
|
||||
call s:smart_source_rc('ui')
|
||||
|
Loading…
Reference in New Issue
Block a user