mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-04 09:07:35 +00:00
Neovim updates
This commit is contained in:
parent
9d6f308332
commit
8ff7681f09
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,4 +2,5 @@ vim/autoload/plug.vim
|
|||||||
vim/plugged/*
|
vim/plugged/*
|
||||||
vim/rc/*.local.rc.vim
|
vim/rc/*.local.rc.vim
|
||||||
vim/tmp/*.swp
|
vim/tmp/*.swp
|
||||||
|
vim/tmp/*.swo
|
||||||
vim/.netrwhist
|
vim/.netrwhist
|
||||||
|
8
Makefile
8
Makefile
@ -3,7 +3,13 @@
|
|||||||
default: install
|
default: install
|
||||||
|
|
||||||
install:
|
install:
|
||||||
./vim-sync-append.sh
|
sh ./vim-sync-append.sh
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm ~/.vimrc
|
||||||
|
rm ~/.nvimrc
|
||||||
|
rm -fr ~/.vim
|
||||||
|
rm -fr ~/.nvim
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr ./vim/plugged
|
rm -fr ./vim/plugged
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
############################
|
############################
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
if [ -d ~/.vim ] || [ -f ~/.vimrc ]; then
|
if [ -d ~/.vim ] || [ -f ~/.vimrc ] || [ -d ~/.nvim ] || [ -f ~/.nvimrc ]; then
|
||||||
echo "Vim files already exist. Please backup or remove .vim and .vimrc"
|
echo "Vim files already exist. Please backup or remove .(n)vim and .(n)vimrc"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try to load .bashrc to load rvm functions
|
# Try to load .bashrc to load rvm functions
|
||||||
if [ -f ~/.bashrc ]; then
|
# if [ -f ~/.bashrc ]; then
|
||||||
. ~/.bashrc
|
# . ~/.bashrc
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Get current directory for future use in links
|
# Get current directory for future use in links
|
||||||
VIM_SYNC_DIR=$(dirname $0)
|
VIM_SYNC_DIR=$(dirname $0)
|
||||||
@ -20,15 +20,21 @@ cd $VIM_SYNC_DIR
|
|||||||
VIM_SYNC_DIR=$(pwd)
|
VIM_SYNC_DIR=$(pwd)
|
||||||
|
|
||||||
|
|
||||||
|
# Vim
|
||||||
ln -s $VIM_SYNC_DIR/vimrc ~/.vimrc
|
ln -s $VIM_SYNC_DIR/vimrc ~/.vimrc
|
||||||
ln -s $VIM_SYNC_DIR/vim ~/.vim
|
ln -s $VIM_SYNC_DIR/vim ~/.vim
|
||||||
|
|
||||||
|
# Neovim
|
||||||
|
ln -s $VIM_SYNC_DIR/vimrc ~/.nvimrc
|
||||||
|
ln -s $VIM_SYNC_DIR/vim ~/.nvim
|
||||||
|
|
||||||
# # Download and install vim-plug
|
# # Download and install vim-plug
|
||||||
# curl -fLo ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
# curl -fLo ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
# Install all bundles
|
# Install all bundles
|
||||||
echo "Install all bundles"
|
echo "Install all bundles"
|
||||||
vim +PlugInstall +qall
|
vim +PlugInstall +qall
|
||||||
|
nvim +PlugInstall +qall
|
||||||
|
|
||||||
vim --version | grep -q '\+ruby' || { echo "Warning: Default vim does not include ruby."; }
|
vim --version | grep -q '\+ruby' || { echo "Warning: Default vim does not include ruby."; }
|
||||||
vim --version | grep -q '\+python' || { echo "Warning: Default vim does not include python"; }
|
vim --version | grep -q '\+python' || { echo "Warning: Default vim does not include python"; }
|
||||||
|
@ -1,55 +1,25 @@
|
|||||||
" Navigation {{
|
" Navigation {{
|
||||||
Plug 'file-line'
|
Plug 'file-line'
|
||||||
Plug 'tpope/vim-vinegar'
|
Plug 'tpope/vim-vinegar'
|
||||||
Plug 'tpope/vim-fugitive', { 'on': ['Gblame', 'Gdiff', 'Gcommit', 'Gstatus', 'Gwrite'] } " {{
|
Plug 'tpope/vim-fugitive', { 'on': ['Gblame', 'Gdiff', 'Gcommit', 'Gstatus', 'Gwrite'] }
|
||||||
|
" {{
|
||||||
nnoremap <leader>gb :Gblame<CR>
|
nnoremap <leader>gb :Gblame<CR>
|
||||||
nnoremap <leader>gc :Gcommit<CR>
|
nnoremap <leader>gc :Gcommit<CR>
|
||||||
nnoremap <leader>gd :Gdiff<CR>
|
nnoremap <leader>gd :Gdiff<CR>
|
||||||
nnoremap <leader>gs :Gstatus<CR>
|
nnoremap <leader>gs :Gstatus<CR>
|
||||||
nnoremap <leader>gw :Gwrite<CR>
|
nnoremap <leader>gw :Gwrite<CR>
|
||||||
" }}
|
" }}
|
||||||
Plug 'sandeepcr529/Buffet.vim', { 'on': 'Bufferlist' }
|
Plug 'sandeepcr529/Buffet.vim', { 'on': 'Bufferlist' }
|
||||||
" {{
|
" {{
|
||||||
nnoremap <silent> <F2> :Bufferlist<CR>
|
nnoremap <silent> <F2> :Bufferlist<CR>
|
||||||
" }}
|
" }}
|
||||||
Plug 'ctrlpvim/ctrlp.vim'
|
|
||||||
" {{
|
|
||||||
" Ensure max height isn't too large. (for performance)
|
|
||||||
let g:ctrlp_max_height = 10
|
|
||||||
" Conditional Mappings
|
|
||||||
let g:ctrlp_map = '<C-t>'
|
|
||||||
" Allow ctrl p to open over the initial nerdtree window
|
|
||||||
let g:ctrlp_dont_split = 'netrw'
|
|
||||||
" Support tag jumping
|
|
||||||
let g:ctrlp_extensions = ['tag', 'buffertag']
|
|
||||||
" Support Apex language
|
|
||||||
let g:ctrlp_buftag_types = {
|
|
||||||
\ 'apex' : '--language-force=c#',
|
|
||||||
\ 'go' : {
|
|
||||||
\ 'bin' : 'gotags',
|
|
||||||
\ 'args' : '-sort -silent',
|
|
||||||
\}
|
|
||||||
\}
|
|
||||||
" Leader Commands
|
|
||||||
nnoremap <leader>b :CtrlPBuffer<CR>
|
|
||||||
nnoremap <leader>t :CtrlPBufTag<CR>
|
|
||||||
nnoremap <leader>r :CtrlPTag<CR>
|
|
||||||
nnoremap <leader>u :CtrlPCurFile<CR>
|
|
||||||
nnoremap <leader>m :CtrlPMRUFiles<CR>
|
|
||||||
|
|
||||||
" Special stuff for The Silver Searcher
|
|
||||||
if executable('ag')
|
|
||||||
" use ag
|
|
||||||
set grepprg=ag\ --nogroup\ --nocolor
|
|
||||||
" use ag for CtrlP
|
|
||||||
let g:ctrlp_user_command = 'ag %s -l --nocolor --nogroup -g ""'
|
|
||||||
" ag is fast enough we don't need cache
|
|
||||||
let g:ctrlp_use_caching = 0
|
|
||||||
endif
|
|
||||||
" }}
|
|
||||||
" }}
|
" }}
|
||||||
|
|
||||||
" Search {{
|
|
||||||
|
Plug 'ctrlpvim/ctrlp.vim'
|
||||||
|
call g:source_rc('plugins/ctrlp.rc.vim')
|
||||||
|
|
||||||
|
" ag / ack {{
|
||||||
if executable('ag')
|
if executable('ag')
|
||||||
Plug 'rking/ag.vim'
|
Plug 'rking/ag.vim'
|
||||||
" {{
|
" {{
|
||||||
@ -106,36 +76,43 @@ end
|
|||||||
" }}
|
" }}
|
||||||
|
|
||||||
" Programming {{
|
" Programming {{
|
||||||
Plug 'majutsushi/tagbar' " {{
|
Plug 'majutsushi/tagbar'
|
||||||
|
" {{
|
||||||
nnoremap <silent> <F8> :TagbarToggle<CR>
|
nnoremap <silent> <F8> :TagbarToggle<CR>
|
||||||
" Autofocus tagbar
|
" Autofocus tagbar
|
||||||
let g:tagbar_autofocus = 1
|
let g:tagbar_autofocus = 1
|
||||||
" }}
|
|
||||||
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 'tomtom/tcomment_vim', { 'on': ['TComment', 'TCommentBlock'] } " {{
|
" 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'
|
||||||
|
"
|
||||||
|
" }}
|
||||||
|
endif
|
||||||
|
" }}
|
||||||
|
Plug 'tomtom/tcomment_vim', { 'on': ['TComment', 'TCommentBlock'] }
|
||||||
|
" {{
|
||||||
nnoremap // :TComment<CR>
|
nnoremap // :TComment<CR>
|
||||||
vnoremap // :TCommentBlock<CR>
|
vnoremap // :TCommentBlock<CR>
|
||||||
" }}
|
" }}
|
||||||
Plug 'benekastah/neomake'
|
|
||||||
" }}
|
" }}
|
||||||
|
|
||||||
" GUI {{
|
" GUI {{
|
||||||
Plug 'bling/vim-airline' " {{
|
Plug 'bling/vim-airline'
|
||||||
|
" {{
|
||||||
" Use short-form mode text
|
" Use short-form mode text
|
||||||
let g:airline_mode_map = {
|
let g:airline_mode_map = {
|
||||||
\ '__' : '-',
|
\ '__' : '-',
|
||||||
@ -159,15 +136,16 @@ Plug 'bling/vim-airline' " {{
|
|||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
let g:airline#extensions#tabline#left_sep = ' '
|
let g:airline#extensions#tabline#left_sep = ' '
|
||||||
let g:airline#extensions#tabline#left_alt_sep = '|'
|
let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||||
" }}
|
" }}
|
||||||
Plug 'gregsexton/MatchTag'
|
Plug 'gregsexton/MatchTag'
|
||||||
Plug 'rizzatti/dash.vim', { 'on': 'Dash'}
|
Plug 'rizzatti/dash.vim', { 'on': 'Dash'}
|
||||||
" }}
|
" }}
|
||||||
|
|
||||||
" Filetypes {{
|
" Filetypes {{
|
||||||
Plug 'PreserveNoEOL' " {{
|
Plug 'PreserveNoEOL'
|
||||||
|
" {{
|
||||||
let g:PreserveNoEOL = 1
|
let g:PreserveNoEOL = 1
|
||||||
" }}
|
" }}
|
||||||
Plug 'ViViDboarder/vim-forcedotcom'
|
Plug 'ViViDboarder/vim-forcedotcom'
|
||||||
Plug 'avakhov/vim-yaml'
|
Plug 'avakhov/vim-yaml'
|
||||||
Plug 'dart-lang/dart-vim-plugin'
|
Plug 'dart-lang/dart-vim-plugin'
|
||||||
@ -177,25 +155,26 @@ Plug 'hsanson/vim-android'
|
|||||||
Plug 'pangloss/vim-javascript'
|
Plug 'pangloss/vim-javascript'
|
||||||
Plug 'pdurbin/vim-tsv'
|
Plug 'pdurbin/vim-tsv'
|
||||||
Plug 'tfnico/vim-gradle'
|
Plug 'tfnico/vim-gradle'
|
||||||
|
" }}
|
||||||
|
|
||||||
" Python {{
|
" Python {{
|
||||||
Plug 'alfredodeza/coveragepy.vim'
|
Plug 'alfredodeza/coveragepy.vim'
|
||||||
Plug 'alfredodeza/pytest.vim'
|
Plug 'alfredodeza/pytest.vim'
|
||||||
Plug 'davidhalter/jedi-vim'
|
Plug 'davidhalter/jedi-vim'
|
||||||
" {{
|
" {{
|
||||||
let g:jedi#completions_enabled = 0
|
let g:jedi#completions_enabled = 0
|
||||||
let g:jedi#auto_vim_configuration = 0
|
let g:jedi#auto_vim_configuration = 0
|
||||||
" }}
|
" }}
|
||||||
Plug 'klen/python-mode'
|
Plug 'klen/python-mode'
|
||||||
" {{
|
" {{
|
||||||
let g:pymode_lint = 1
|
let g:pymode_lint = 1
|
||||||
let g:pymode_lint_on_write = 0
|
let g:pymode_lint_on_write = 0
|
||||||
let g:pymode_lint_checkers = ['flake8']
|
let g:pymode_lint_checkers = ['flake8']
|
||||||
let g:pymode_rope = 0
|
let g:pymode_rope = 0
|
||||||
let g:pymode_rope_completion = 0
|
let g:pymode_rope_completion = 0
|
||||||
let g:pymode_rope_complete_on_dot = 0
|
let g:pymode_rope_complete_on_dot = 0
|
||||||
let g:pymode_breakpoint = 0
|
let g:pymode_breakpoint = 0
|
||||||
"}}
|
"}}
|
||||||
" }}
|
|
||||||
" }}
|
" }}
|
||||||
|
|
||||||
" Themes {{
|
" Themes {{
|
||||||
@ -212,8 +191,31 @@ Plug 'wombat256.vim'
|
|||||||
" }}
|
" }}
|
||||||
|
|
||||||
" System {{
|
" System {{
|
||||||
|
" neomake / vim-dispatch {{
|
||||||
|
if has('nvim')
|
||||||
|
Plug 'benekastah/neomake'
|
||||||
|
" {{
|
||||||
|
let g:neomake_apex_force_maker = {
|
||||||
|
\ 'exe': 'force',
|
||||||
|
\ 'args': ['push'],
|
||||||
|
\ 'errorformat': &errorformat,
|
||||||
|
\ }
|
||||||
|
|
||||||
|
let g:neomake_apex_atf_maker = {
|
||||||
|
\ 'exe': 'atf deploy file',
|
||||||
|
\ 'args': [],
|
||||||
|
\ 'errorformat': &errorformat,
|
||||||
|
\ }
|
||||||
|
|
||||||
|
let g:neomake_apex_enabled_makers = ['force']
|
||||||
|
" let g:neomake_apex_enabled_makers = ['atf']
|
||||||
|
let g:neomake_python_makers = ['flake8']
|
||||||
|
" }}
|
||||||
|
else
|
||||||
|
Plug 'tpope/vim-dispatch'
|
||||||
|
endif
|
||||||
|
" }}
|
||||||
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
|
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
|
||||||
Plug 'tpope/vim-dispatch'
|
|
||||||
Plug 'tpope/vim-repeat'
|
Plug 'tpope/vim-repeat'
|
||||||
" emacs bindinds in insert
|
" emacs bindinds in insert
|
||||||
Plug 'tpope/vim-rsi'
|
Plug 'tpope/vim-rsi'
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
" Configurationf or ctrlp.vim
|
||||||
|
|
||||||
|
" Ensure max height isn't too large. (for performance)
|
||||||
|
let g:ctrlp_max_height = 10
|
||||||
|
" Conditional Mappings
|
||||||
|
let g:ctrlp_map = '<C-t>'
|
||||||
|
" Allow ctrl p to open over the initial nerdtree window
|
||||||
|
let g:ctrlp_dont_split = 'netrw'
|
||||||
|
" Support tag jumping
|
||||||
|
let g:ctrlp_extensions = ['tag', 'buffertag']
|
||||||
|
" Support Apex language
|
||||||
|
let g:ctrlp_buftag_types = {
|
||||||
|
\ 'apex' : '--language-force=c#',
|
||||||
|
\ 'go' : {
|
||||||
|
\ 'bin' : 'gotags',
|
||||||
|
\ 'args' : '-sort -silent',
|
||||||
|
\}
|
||||||
|
\}
|
||||||
|
" Leader Commands
|
||||||
|
nnoremap <leader>b :CtrlPBuffer<CR>
|
||||||
|
nnoremap <leader>t :CtrlPBufTag<CR>
|
||||||
|
nnoremap <leader>r :CtrlPTag<CR>
|
||||||
|
nnoremap <leader>u :CtrlPCurFile<CR>
|
||||||
|
nnoremap <leader>m :CtrlPMRUFiles<CR>
|
||||||
|
|
||||||
|
" Special stuff for The Silver Searcher
|
||||||
|
if executable('ag')
|
||||||
|
" use ag
|
||||||
|
set grepprg=ag\ --nogroup\ --nocolor
|
||||||
|
" use ag for CtrlP
|
||||||
|
let g:ctrlp_user_command = 'ag %s -l --nocolor --nogroup -g ""'
|
||||||
|
" ag is fast enough we don't need cache
|
||||||
|
let g:ctrlp_use_caching = 0
|
||||||
|
endif
|
@ -42,9 +42,9 @@ endif
|
|||||||
if has("gui_running")
|
if has("gui_running")
|
||||||
if has("gui_win32")
|
if has("gui_win32")
|
||||||
set guifont=Consolas:h10:b
|
set guifont=Consolas:h10:b
|
||||||
elseif has("gui_macvim")
|
elseif IsMac() && (has("gui_macvim") || has('nvim'))
|
||||||
try
|
try
|
||||||
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11
|
" set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11
|
||||||
catch
|
catch
|
||||||
" Failed to set font
|
" Failed to set font
|
||||||
endtry
|
endtry
|
||||||
@ -53,7 +53,6 @@ endif
|
|||||||
" }}
|
" }}
|
||||||
|
|
||||||
" Set xterm and screen/tmux's title {{
|
" Set xterm and screen/tmux's title {{
|
||||||
set notitle
|
|
||||||
set titlestring=vim\ %{expand(\"%t\")}
|
set titlestring=vim\ %{expand(\"%t\")}
|
||||||
if &term =~ "^screen"
|
if &term =~ "^screen"
|
||||||
" pretend this is xterm. it probably is anyway, but if term is left as
|
" pretend this is xterm. it probably is anyway, but if term is left as
|
||||||
@ -69,5 +68,6 @@ if &term =~ "^screen"
|
|||||||
set t_fs=\
|
set t_fs=\
|
||||||
set t_ut=
|
set t_ut=
|
||||||
endif
|
endif
|
||||||
set title
|
set notitle
|
||||||
|
" set title
|
||||||
" }}
|
" }}
|
||||||
|
18
vimrc
18
vimrc
@ -7,12 +7,12 @@ if &compatible
|
|||||||
set nocompatible
|
set nocompatible
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! s:smart_source_rc(name)
|
function! g:smart_source_rc(name)
|
||||||
call s:source_rc(a:name . '.rc.vim')
|
call g:source_rc(a:name . '.rc.vim')
|
||||||
call s:source_rc(a:name . '.local.rc.vim')
|
call g:source_rc(a:name . '.local.rc.vim')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:source_rc(path)
|
function! g:source_rc(path)
|
||||||
let l:f_path = fnameescape(expand('~/.vim/rc/' . a:path))
|
let l:f_path = fnameescape(expand('~/.vim/rc/' . a:path))
|
||||||
if filereadable(l:f_path)
|
if filereadable(l:f_path)
|
||||||
execute 'source' . l:f_path
|
execute 'source' . l:f_path
|
||||||
@ -43,12 +43,12 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
|||||||
autocmd VimEnter * PlugInstall
|
autocmd VimEnter * PlugInstall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call s:source_rc('init.rc.vim')
|
call g:source_rc('init.rc.vim')
|
||||||
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
call s:smart_source_rc('plugins')
|
call g:smart_source_rc('plugins')
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
call s:smart_source_rc('edit')
|
call g:smart_source_rc('edit')
|
||||||
call s:smart_source_rc('keymap')
|
call g:smart_source_rc('keymap')
|
||||||
call s:smart_source_rc('ui')
|
call g:smart_source_rc('ui')
|
||||||
|
Loading…
Reference in New Issue
Block a user