Initial commit
This commit is contained in:
commit
f1ab88602d
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.backup
|
||||||
|
.vim/plugged
|
||||||
|
*.swp
|
||||||
2524
.vim/autoload/plug.vim
Normal file
2524
.vim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load Diff
19
.vim/plugins.vim
Normal file
19
.vim/plugins.vim
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
|
Plug 'qpkorr/vim-bufkill'
|
||||||
|
Plug 'mhinz/vim-signify'
|
||||||
|
"#Plug 'airblade/vim-gitgutter'
|
||||||
|
"#Plug 'editorconfig/editorconfig-vim'
|
||||||
|
Plug 'itchyny/lightline.vim'
|
||||||
|
Plug 'junegunn/fzf'
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
"#Plug 'mattn/emmet-vim'
|
||||||
|
Plug 'scrooloose/nerdtree'
|
||||||
|
"#Plug 'terryma/vim-multiple-cursors'
|
||||||
|
"#Plug 'tpope/vim-eunuch'
|
||||||
|
"#Plug 'tpope/vim-surround'
|
||||||
|
"#Plug 'w0rp/ale'
|
||||||
|
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
|
||||||
20
.vimrc
Normal file
20
.vimrc
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
color desert
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
so ~/.vim/plugins.vim
|
||||||
|
|
||||||
|
autocmd vimenter * NERDTree
|
||||||
|
|
||||||
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||||
|
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
|
||||||
|
|
||||||
|
map <C-c> :BD<cr>
|
||||||
|
|
||||||
|
nmap <c-s> :w<cr>
|
||||||
|
imap <c-s> <Esc>:w<cr>a
|
||||||
|
|
||||||
|
set whichwrap+=<,>,[,]
|
||||||
|
|
||||||
27
install
Executable file
27
install
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
repo_dir=$(pwd)
|
||||||
|
|
||||||
|
function backup() {
|
||||||
|
backup_dir="$repo_dir/.backup"
|
||||||
|
backup="$backup_dir/backup-$(date +%Y-%m-%d-%H-%M-%S)"
|
||||||
|
|
||||||
|
mkdir -p $backup_dir
|
||||||
|
mkdir -p $backup
|
||||||
|
|
||||||
|
existing_vim_config=$(find ~ -maxdepth 1 -name ".vim*")
|
||||||
|
rsync -rvvhu $existing_vim_config $backup
|
||||||
|
rm -rf $existing_vim_config
|
||||||
|
}
|
||||||
|
|
||||||
|
function symlink() {
|
||||||
|
vim_config=$(find $(pwd) -maxdepth 1 -name ".vim*")
|
||||||
|
for filepath in $vim_config; do
|
||||||
|
basename=$(basename $filepath)
|
||||||
|
ln -s $filepath ~/$basename
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
backup
|
||||||
|
symlink
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user