remove pathogen. add plug vim.
This commit is contained in:
parent
4cc7d67133
commit
1f4270151c
|
@ -7,3 +7,4 @@ function homestead() {
|
||||||
alias hup="homestead up && homestead ssh"
|
alias hup="homestead up && homestead ssh"
|
||||||
|
|
||||||
PATH=$PATH:$HOME/.config/composer/vendor/bin
|
PATH=$PATH:$HOME/.config/composer/vendor/bin
|
||||||
|
set -o vi
|
||||||
|
|
|
@ -1,4 +1,57 @@
|
||||||
execute pathogen#infect()
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||||
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||||
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Specify a directory for plugins
|
||||||
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
Plug 'jpalardy/vim-slime', {'branch': 'main'}
|
||||||
|
"Plug 'vim-syntastic/syntastic'
|
||||||
|
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||||
|
|
||||||
|
" Plug 'christoomey/vim-tmux-navigator'
|
||||||
|
|
||||||
|
" Initialize plugin system
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
" Begin coc.vim
|
||||||
|
"
|
||||||
|
" Use tab for trigger completion with characters ahead and navigate.
|
||||||
|
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||||
|
" other plugin before putting this into your config.
|
||||||
|
inoremap <silent><expr> <TAB>
|
||||||
|
\ pumvisible() ? "\<C-n>" :
|
||||||
|
\ <SID>check_back_space() ? "\<TAB>" :
|
||||||
|
\ coc#refresh()
|
||||||
|
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||||
|
|
||||||
|
function! s:check_back_space() abort
|
||||||
|
let col = col('.') - 1
|
||||||
|
return !col || getline('.')[col - 1] =~# '\s'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Use K to show documentation in preview window.
|
||||||
|
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||||
|
|
||||||
|
function! s:show_documentation()
|
||||||
|
if (index(['vim','help'], &filetype) >= 0)
|
||||||
|
execute 'h '.expand('<cword>')
|
||||||
|
else
|
||||||
|
call CocActionAsync('doHover')
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
"
|
||||||
|
" End coc.vim
|
||||||
|
"
|
||||||
|
|
||||||
|
nnoremap <silent> <C-f> :Files<CR>
|
||||||
|
nnoremap <silent> <Leader>f :Ag <C-R><C-W><CR>
|
||||||
|
nnoremap <silent> <Leader>b :Buffers<CR>
|
||||||
|
|
||||||
set nocompatible " Disable vi-compatibility
|
set nocompatible " Disable vi-compatibility
|
||||||
|
|
||||||
|
@ -9,11 +62,11 @@ set go-=L " Removes left hand scroll bar
|
||||||
set linespace=15
|
set linespace=15
|
||||||
|
|
||||||
set showmode " always show what mode we're currently editing in
|
set showmode " always show what mode we're currently editing in
|
||||||
set nowrap " don't wrap lines
|
"set nowrap " don't wrap lines
|
||||||
set tabstop=4 " a tab is four spaces
|
set tabstop=4 " a tab is four spaces
|
||||||
set smarttab
|
set smarttab
|
||||||
set tags=tags
|
set tags=tags
|
||||||
set softtabstop=4 " when hitting <BS>, pretend like a tab is removed, even if spaces
|
set softtabstop=2 " when hitting <BS>, pretend like a tab is removed, even if spaces
|
||||||
set expandtab " expand tabs by default (overloadable per file type later)
|
set expandtab " expand tabs by default (overloadable per file type later)
|
||||||
set shiftwidth=4 " number of spaces to use for autoindenting
|
set shiftwidth=4 " number of spaces to use for autoindenting
|
||||||
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
|
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
|
||||||
|
@ -26,26 +79,14 @@ set visualbell " don't beep
|
||||||
set noerrorbells " don't beep
|
set noerrorbells " don't beep
|
||||||
set autowrite "Save on buffer switch
|
set autowrite "Save on buffer switch
|
||||||
|
|
||||||
" Down is really the next line
|
" autocmd TextChanged,TextChangedI <buffer> silent write
|
||||||
nnoremap j gj
|
|
||||||
nnoremap k gk
|
|
||||||
|
|
||||||
"Easy escaping to normal model
|
|
||||||
imap jj <esc>
|
|
||||||
|
|
||||||
"Load the current buffer in Chrome
|
"Load the current buffer in Chrome
|
||||||
nmap ,c :!open -a Firefox<cr>
|
" nmap ,c :!open -a Firefox<cr>
|
||||||
|
|
||||||
" Familiar commands for file/symbol browsing
|
|
||||||
map <D-p> :CtrlP<cr>
|
|
||||||
map <C-r> :CtrlPBufTag<cr>
|
|
||||||
|
|
||||||
" I don't want to pull up these folders/files when calling CtrlP
|
|
||||||
set wildignore+=*/node_modules/**
|
|
||||||
|
|
||||||
" Copy and Paste register between tmux panes.
|
" Copy and Paste register between tmux panes.
|
||||||
let g:slime_target = "tmux"
|
" let g:slime_target = "tmux"
|
||||||
let g:slime_default_config = {"socket_name": "default", "target_pane": "1"}
|
" let g:slime_default_config = {"socket_name": "default", "target_pane": "1"}
|
||||||
|
|
||||||
" Auto complete current file path to edit, tabe or split
|
" Auto complete current file path to edit, tabe or split
|
||||||
map ,e :e <C-R>=expand("%:p:h") . "/" <CR>
|
map ,e :e <C-R>=expand("%:p:h") . "/" <CR>
|
||||||
|
|
12
init.sh
12
init.sh
|
@ -1,16 +1,4 @@
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
rm $HOME/.vim/ -rf
|
|
||||||
rm $HOME/.vim/autoload/ -rf
|
|
||||||
rm $HOME/.vim/bundle/ -rf
|
|
||||||
|
|
||||||
mkdir $HOME/.vim
|
|
||||||
mkdir $HOME/.vim/autoload
|
|
||||||
mkdir $HOME/.vim/bundle
|
|
||||||
|
|
||||||
curl -LSso $HOME/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
|
|
||||||
|
|
||||||
git clone https://github.com/ctrlpvim/ctrlp.vim.git $HOME/.vim/bundle/ctrlp.vim
|
|
||||||
git clone https://github.com/jpalardy/vim-slime.git $HOME/.vim/bundle/vim-slime
|
|
||||||
|
|
||||||
cp -rf $DIR/dotfiles/.vimrc $HOME/.vimrc
|
cp -rf $DIR/dotfiles/.vimrc $HOME/.vimrc
|
||||||
echo ".vimrc copied"
|
echo ".vimrc copied"
|
||||||
|
|
Loading…
Reference in New Issue