From f55c07b4582f24aa89d46a5b64444adc23aa2ee1 Mon Sep 17 00:00:00 2001 From: Jisu Kim Date: Sun, 24 Jan 2021 11:16:43 +0900 Subject: [PATCH] Add vim configure --- .vimrc | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++ gitconfig | 2 + mapping.ts | 19 ++++---- zshrc | 3 +- 4 files changed, 138 insertions(+), 10 deletions(-) create mode 100644 .vimrc diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..4697a5c --- /dev/null +++ b/.vimrc @@ -0,0 +1,124 @@ +call plug#begin('~/.vim/plugged') + +" Prettier +Plug 'prettier/vim-prettier', { + \ 'do': 'yarn install', + \ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] } + +" 아이콘 폰트 사용 +Plug 'ryanoasis/vim-devicons' +" NERDTree +" NERDTree git +Plug 'preservim/nerdtree' +" NERDTree icon color +Plug 'tiagofumo/vim-nerdtree-syntax-highlight' + +" Restore Session +Plug 'tpope/vim-obsession' + +" fuzzy finder +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' + +" Airline +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' + +" 컬러 테마 +Plug 'tomasiser/vim-code-dark' +Plug 'NLKNguyen/papercolor-theme' +Plug 'scheakur/vim-scheakur' +Plug 'junegunn/seoul256.vim' + +" Language Pack +Plug 'sheerun/vim-polyglot' + +Plug 'neoclide/coc.nvim', {'branch': 'release'} + +" indent 표시 +Plug 'Yggdroot/indentLine' + +" 코딩시간 측정 +Plug 'wakatime/vim-wakatime' + +" git status +Plug 'airblade/vim-gitgutter' + +Plug 'vim-scripts/SyntaxComplete' + +call plug#end() + +set smartindent +set backspace=2 +set cindent +set tabstop=2 +set shiftwidth=2 +set expandtab +set nu +set ruler +set title +set hlsearch +set cursorline +syntax on + +set clipboard+=unnamedplus + +set laststatus=2 +set shell=/bin/bash +set fillchars+=vert:┃ + +set mouse=a +set encoding=UTF-8 + + +" 단축키 설정 +nmap :FZF +nmap :NERDTreeToggle + +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" + + +" theme config +let g:PaperColor_Theme_Options = { + \ 'theme': { + \ 'default': { + \ 'transparent_background': 1 + \ } + \ } + \ } + +set background=light +colorscheme seoul256-light + +hi Normal guibg=NONE ctermbg=NONE +hi EndOfBuffer guibg=NONE ctermbg=NONE + +" devicons +let g:WebDevIconsUnicodeDecorateFolderNodes = 1 +let g:DevIconsEnableFoldersOpenClose = 1 + +" airline +let g:airline_theme = 'base16' +let g:airline_powerline_fonts=0 +let g:airline#extensions#tabline#enabled = 1 +let g:airline#extensions#tabline#tab_nr_type = 1 " tab number +let g:airline#extensions#tabline#show_tab_nr = 1 +let g:airline#extensions#tabline#formatter = 'default' +let g:airline#extensions#tabline#buffer_nr_show = 1 +let g:airline#extensions#tabline#fnametruncate = 16 +let g:airline#extensions#tabline#fnamecollapse = 2 + +" cpp syntax highlight +let g:cpp_class_scope_highlight = 1 +let g:cpp_member_variable_highlight = 1 +let g:cpp_class_decl_highlight = 1 +let g:cpp_concepts_highlight = 1 +let g:cpp_experimental_template_highlight = 1 + +" prettier +let g:prettier#autoformat = 1 +let g:prettier#autoformat_require_pragma = 0 + +" nerdtree +let NERDTreeShowHidden=1 diff --git a/gitconfig b/gitconfig index fbe6ef5..a9cd3bf 100644 --- a/gitconfig +++ b/gitconfig @@ -4,3 +4,5 @@ name = Jisu Kim [commit] gpgsign = true +[core] + editor = vim diff --git a/mapping.ts b/mapping.ts index 586d93b..4fe901c 100644 --- a/mapping.ts +++ b/mapping.ts @@ -9,8 +9,9 @@ const common: DotOption = { ".tmux.conf": "tmux.conf", ".tmux/themes": "tmux/themes", ".zshrc": "zshrc", - ".local/bin/ufetch": "linux/bin/ufetch" - } + ".local/bin/ufetch": "linux/bin/ufetch", + ".vimrc": "vimrc", + }, }; const darwin: DotOption = { @@ -18,8 +19,8 @@ const darwin: DotOption = { link: { ...common.link, ".config/alacritty": "darwin/alacritty", - ".local/bin/ufetch": "darwin/bin/ufetch" - } + ".local/bin/ufetch": "darwin/bin/ufetch", + }, }; const linux: DotOption = { @@ -38,7 +39,7 @@ const linux: DotOption = { kcm-fcitx5 numix-gtk-theme-git numix-circle-icon-theme-git telegram-desktop nautilus eog smplayer smplayer-skins transgui-qt qt5-styleplugins xdg-user-dirs slim network-manager-applet bc - glava conky jq xdo ttf-roboto xorg-xsetroot xorg-xinput noto-fonts-cjk` + glava conky jq xdo ttf-roboto xorg-xsetroot xorg-xinput noto-fonts-cjk`, ], link: { ...common.link, @@ -60,8 +61,8 @@ const linux: DotOption = { ".bash_profile": "linux/bash_profile", ".pam_environment": "linux/pam_environment", ".Xmodmap": "linux/Xmodmap", - ".Xresources": "linux/Xresources" - } + ".Xresources": "linux/Xresources", + }, }; const linuxHiDPI: DotOption = { @@ -75,8 +76,8 @@ const linuxHiDPI: DotOption = { ".pam_environment": "linux-hidpi/pam_environment", ".Xresources": "linux-hidpi/Xresources", ".config/glava": "linux-hidpi/glava", - ".conkyrc": "linux-hidpi/conkyrc" - } + ".conkyrc": "linux-hidpi/conkyrc", + }, }; try { diff --git a/zshrc b/zshrc index df490e9..c008fef 100644 --- a/zshrc +++ b/zshrc @@ -3,6 +3,7 @@ export PATH=$HOME/.local/bin:/usr/local/bin:$PATH export DENO_INSTALL="/home/vbalien/.deno" export PATH="$DENO_INSTALL/bin:$PATH" +export PATH="$PATH:$HOME/go/bin" export PATH="$HOME/.yarn/bin:$PATH" # Path to your oh-my-zsh installation. @@ -103,9 +104,9 @@ source $ZSH/oh-my-zsh.sh # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" +alias vi=vim export GPG_TTY=$(tty) -alias vim=nvim if [[ `uname` != "Darwin" ]]; then alias open=xdg-open fi