[TIL] หัดใช้ Vim ลองติดตั้ง Plugin

Chai Phonbopit

Software Engineer & Blogger

16 August 2019

In

วันนี้ลองหัดใช้ Vim อีกครั้ง เลยลองติดตั้งพวก Plugin Manager ใช้ตัว vim-plug

ไฟล์ .vimrc ที่ติดตั้ง plugin และ setup theme

" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'
Plug 'tpope/vim-surround'
Plug 'scrooloose/syntastic'
Plug 'mattn/emmet-vim'
Plug 'dense-analysis/ale'
Plug 'valloric/youcompleteme'
Plug 'vim-airline/vim-airline'
Plug 'kien/ctrlp.vim'
Plug 'tpope/vim-rails'
Plug 'pangloss/vim-javascript'
Plug 'easymotion/vim-easymotion'
Plug 'christoomey/vim-tmux-navigator'
Plug 'elzr/vim-json'
Plug 'mhartington/oceanic-next'
Plug 'posva/vim-vue'
Plug 'vim-ruby/vim-ruby'
Plug 'mxw/vim-jsx'
Plug 'elixir-lang/vim-elixir'
Plug 'jiangmiao/auto-pairs'
" Initialize plugin system
call plug#end()
" Theme
syntax enable
" for vim 7
set t_Co=256
" for vim 8
if (has("termguicolors"))
set termguicolors
endif
colorscheme OceanicNext
let g:airline_theme='oceanicnext'
  • #Vi
  • #Vim
  • #TIL
  • #Today I learned