Skip to content
solheee

Vim Plugin

Vim1 min read

  • :PluginList - lists configured plugins
  • :PluginInstall - installs plugins; append ! to update or just :PluginUpdate
  • :PluginSearch foo - searches for foo; append ! to refresh local cache
  • :PluginClean - confirms removal of unused plugins; append ! to auto-approve removal
1set nocompatible " be iMproved, required
2filetype off " required
3set rtp+=~/.vim/bundle/Vundle.vim
4call vundle#begin()
5
6
7" 플러그인
8Plugin 'VundleVim/Vundle.vim'
9Plugin 'drewtempelmeyer/palenight.vim'
10Plugin 'pangloss/vim-javascript'
11Plugin 'mxw/vim-jsx'
12Plugin 'vim-airline/vim-airline'
13Plugin 'vim-airline/vim-airline-themes'
14
15call vundle#end() " required
16filetype plugin indent on " required
17
18" 기본 세팅
19syntax on " Syntax Highlighting
20set autoindent " 자동 인덴트
21set cindent
22set nu " 줄 넘버
23set shiftwidth=2 " 자동 들여쓰기 4칸
24set tabstop=2 " 탭 4칸
25set mouse=a " vim에서 마우스 사용
26set autowrite " 다른 파일로 넘어갈 때 자동 저장
27set autoread " 작업 중인 파일 외부에서 변경됬을 경우 자동으로 불러옴
28
29
30
31" 테마 세팅
32set background=dark
33colorscheme palenight
34
35" jsx 플러그인 세팅
36let g:jsx_ext_required = 0 " jsx 설정
37
38" airline 플러그인 세팅
39let g:airline_theme = "palenight"
40let g:airline#extensions#tabline#formatter = 'jsformatter'
41let g:airline_powerline_fonts = 1
42
43" True Colors
44if (has("nvim"))
45 "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
46 let $NVIM_TUI_ENABLE_TRUE_COLOR=1
47endif
48"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
49"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
50" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
51if (has("termguicolors"))
52 set termguicolors
53endif
54
55" 마지막으로 수정된 곳에 커서를 위치함
56au BufReadPost *
57\ if line("'\"") > 0 && line("'\"") <= line("$") |
58\ exe "norm g`\"" |
59\ endif