mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 13:37: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/.netrwhist
|
||||||
vim/autoload/plug.vim
|
vim/autoload/plug.vim
|
||||||
|
vim/autoload/plug.vim.old
|
||||||
vim/backup/*~
|
vim/backup/*~
|
||||||
vim/plugged/*
|
vim/plugged/*
|
||||||
vim/rc/*.local.rc.vim
|
vim/rc/*.local.rc.vim
|
||||||
|
@ -9,7 +9,7 @@ cmap cwd lcd %:p:h
|
|||||||
cmap cd. lcd %:p:h
|
cmap cd. lcd %:p:h
|
||||||
|
|
||||||
" Bind Make to F5 like other IDEs
|
" Bind Make to F5 like other IDEs
|
||||||
nnoremap <F5> :Make!<CR>
|
nnoremap <F5> :make<CR>
|
||||||
|
|
||||||
" Remap Ctrl+Space for auto Complete
|
" Remap Ctrl+Space for auto Complete
|
||||||
inoremap <C-Space> <C-n>
|
inoremap <C-Space> <C-n>
|
||||||
@ -64,8 +64,8 @@ nmap gb :bn<CR>
|
|||||||
nmap gB :bp<CR>
|
nmap gB :bp<CR>
|
||||||
|
|
||||||
" Command to display TODO tags in project
|
" Command to display TODO tags in project
|
||||||
command Todo Ag! TODO
|
command Todo grep TODO
|
||||||
|
|
||||||
" Easy update tags
|
" 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'
|
Plug 'ctrlpvim/ctrlp.vim'
|
||||||
call s:source_rc('plugins/ctrlp.rc.vim')
|
call s:smart_source_rc('plugins/ctrlp')
|
||||||
|
|
||||||
" ag / ack {{
|
" ag / ack {{
|
||||||
if executable('ag')
|
if executable('ag')
|
||||||
@ -38,13 +38,15 @@ if executable('ag')
|
|||||||
nmap <leader>a :Ag<Space>
|
nmap <leader>a :Ag<Space>
|
||||||
nmap <leader>i* :Ag<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
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>
|
nmap <leader>* :Ag<Space>'\b<c-r><c-W>\b'<CR>
|
||||||
|
command! Todo Ag! TODO
|
||||||
" }}
|
" }}
|
||||||
else
|
elseif executable('ack')
|
||||||
Plug 'mileszs/ack.vim'
|
Plug 'mileszs/ack.vim'
|
||||||
" {{
|
" {{
|
||||||
nmap <leader>a :Ack<Space>
|
nmap <leader>a :Ack<Space>
|
||||||
nmap <leader>i* :Ack<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
nmap <leader>i* :Ack<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
||||||
nmap <leader>* :Ack<Space>'\<<c-r><c-W>\>'<CR>
|
nmap <leader>* :Ack<Space>'\<<c-r><c-W>\>'<CR>
|
||||||
|
command! Todo Ack! TODO
|
||||||
" }}
|
" }}
|
||||||
endif
|
endif
|
||||||
" }}
|
" }}
|
||||||
@ -52,40 +54,11 @@ endif
|
|||||||
" Autocomplete {{
|
" Autocomplete {{
|
||||||
if has('lua')
|
if has('lua')
|
||||||
Plug 'Shougo/neocomplete.vim'
|
Plug 'Shougo/neocomplete.vim'
|
||||||
" {{
|
call s:smart_source_rc('plugins/neocomps')
|
||||||
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
|
|
||||||
" }}
|
|
||||||
else
|
else
|
||||||
Plug 'Shougo/neocomplcache.vim'
|
Plug 'Shougo/neocomplcache.vim'
|
||||||
" {{
|
call s:smart_source_rc('plugins/neocomps')
|
||||||
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*'
|
|
||||||
" }}
|
|
||||||
end
|
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 {{
|
" Programming {{
|
||||||
Plug 'majutsushi/tagbar'
|
Plug 'majutsushi/tagbar'
|
||||||
@ -97,30 +70,18 @@ Plug 'majutsushi/tagbar'
|
|||||||
" syntastic {{
|
" syntastic {{
|
||||||
if !has('nvim')
|
if !has('nvim')
|
||||||
" Only use if not neovim, on neovim we have Neomake
|
" Only use if not neovim, on neovim we have Neomake
|
||||||
Plug 'scrooloose/syntastic' " {{
|
Plug 'scrooloose/syntastic'
|
||||||
let g:syntastic_html_tidy_ignore_errors = [
|
call s:smart_source_rc('plugins/syntastic')
|
||||||
\ '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
|
endif
|
||||||
" }}
|
" }}
|
||||||
Plug 'tomtom/tcomment_vim', { 'on': ['TComment', 'TCommentBlock'] }
|
Plug 'tomtom/tcomment_vim'
|
||||||
|
" , { 'on': ['TComment', 'TCommentBlock'] }
|
||||||
" {{
|
" {{
|
||||||
nnoremap // :TComment<CR>
|
nnoremap // :TComment<CR>
|
||||||
vnoremap // :TCommentBlock<CR>
|
vnoremap // :TCommentBlock<CR>
|
||||||
" }}
|
" }}
|
||||||
" }}
|
" }}
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
|
||||||
" GUI {{
|
" GUI {{
|
||||||
Plug 'bling/vim-airline'
|
Plug 'bling/vim-airline'
|
||||||
@ -209,10 +170,14 @@ if has('nvim')
|
|||||||
Plug 'benekastah/neomake'
|
Plug 'benekastah/neomake'
|
||||||
" {{
|
" {{
|
||||||
nmap <leader>nm :Neomake<CR>
|
nmap <leader>nm :Neomake<CR>
|
||||||
|
nnoremap <F5> :Neomake<CR>
|
||||||
let g:neomake_python_makers = ['flake8']
|
let g:neomake_python_makers = ['flake8']
|
||||||
|
|
||||||
" }}
|
" }}
|
||||||
else
|
else
|
||||||
Plug 'tpope/vim-dispatch'
|
Plug 'tpope/vim-dispatch'
|
||||||
|
nnoremap <F5> :Make<CR>
|
||||||
|
command! TagsUpdate Dispatch ctags -R .
|
||||||
endif
|
endif
|
||||||
" }}
|
" }}
|
||||||
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
|
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
|
||||||
|
@ -10,7 +10,6 @@ let g:ctrlp_dont_split = 'netrw'
|
|||||||
let g:ctrlp_extensions = ['tag', 'buffertag']
|
let g:ctrlp_extensions = ['tag', 'buffertag']
|
||||||
" Support Apex language
|
" Support Apex language
|
||||||
let g:ctrlp_buftag_types = {
|
let g:ctrlp_buftag_types = {
|
||||||
\ 'apex' : '--language-force=c#',
|
|
||||||
\ 'go' : {
|
\ 'go' : {
|
||||||
\ 'bin' : 'gotags',
|
\ 'bin' : 'gotags',
|
||||||
\ 'args' : '-sort -silent',
|
\ '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
|
endif
|
||||||
|
|
||||||
call s:source_rc('init.rc.vim')
|
call s:source_rc('init.rc.vim')
|
||||||
|
call s:smart_source_rc('keymap')
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
call s:smart_source_rc('plugins')
|
call s:smart_source_rc('plugins')
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
call s:smart_source_rc('edit')
|
call s:smart_source_rc('edit')
|
||||||
call s:smart_source_rc('keymap')
|
|
||||||
call s:smart_source_rc('ui')
|
call s:smart_source_rc('ui')
|
||||||
|
Loading…
Reference in New Issue
Block a user