-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvimrc_laptop
148 lines (131 loc) · 3.72 KB
/
vimrc_laptop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
""""""""""""""""""""""""""""""""""""""""""""
" .vimrc "
" Junhyeok Ahn ( [email protected] ) "
""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""
" General Setting "
"""""""""""""""""""
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
set nocompatible
syntax on
set ruler
set bs=indent,eol,start
set autoindent
set smartindent
set pastetoggle=<F8>
set nowrap
set textwidth=0
set cursorline
set colorcolumn=80
set tabstop=4
set shiftwidth=4
set softtabstop=4
set showtabline=1
set scrolloff=3
set ignorecase
set smartcase
set incsearch
set hlsearch
set expandtab
set wildmenu
set wildmode=list:longest,full
set wildignore=*.swp,*.swo,*.class
set mouse=a
set ttymouse=xterm2
set noswapfile
set nobackup
set list
set listchars=tab:»\ ,trail:·,extends:>,precedes:<
set clipboard=unnamed
let mapleader=','
let maplocalleader=','
nnoremap <Leader>s :%s/\<<C-r><C-w>\>/
nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
"""""""""""
" Plugins "
"""""""""""
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/limelight.vim'
Plug 'junegunn/vim-slash'
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'vim-scripts/a.vim'
Plug 'scrooloose/nerdcommenter'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'Townk/vim-autoclose'
Plug 'tpope/vim-fugitive'
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'qpkorr/vim-bufkill'
Plug 'yegappan/grep'
Plug 'terryma/vim-multiple-cursors'
Plug 'rhysd/clever-f.vim'
Plug 'majutsushi/tagbar'
Plug 'hdima/python-syntax'
Plug 'lervag/vimtex'
Plug 'junegunn/vim-journal'
Plug 'junegunn/goyo.vim'
Plug 'dhruvasagar/vim-table-mode'
Plug 'tpope/vim-surround'
Plug 'maralla/completor.vim'
Plug 'ludovicchabant/vim-gutentags'
Plug 'davidhalter/jedi-vim'
call plug#end()
""""""""""""""""""
" Plugin Setting "
""""""""""""""""""
" 0. General
let Grep_Default_Options='-rn'
nnoremap <silent> <F3> :Rgrep<CR>
nnoremap <silent> <c-p> :FZF<CR>
nnoremap <silent> <F9> :TagbarToggle<CR>
let g:Tlist_Ctags_Cmd='/usr/local/Cellar/ctags/5.8_1/bin/ctags'
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
let g:easy_align_delimiters = {}
let g:easy_align_delimiters['d'] = {
\ 'pattern': ' \ze\S\+\s*[;=]',
\ 'left_margin': 0, 'right_margin': 0
\ }
let g:table_mode_header_fillchar='='
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
" 1. Coloer Scheme
let g:seoul256_background=237
colo seoul256
let g:airline_theme='zenburn'
let g:rainbow#pairs = [['(', ')'], ['[', ']'], ['{', '}']]
set laststatus=2
highlight CursorLine cterm=none
" 2. C,C++
let g:UltiSnipsUsePythonVersion=2
let g:UltiSnipsExpandTrigger="<Tab>"
let g:UltiSnipsJumpForwardTrigger="<c-n>"
let g:UltiSnipsJumpBackwardTrigger="<c-p>"
let g:clang_library_path='/Library/Developer/CommandLineTools/usr/lib/libclang.dylib'
"let g:completor_clang_binary = '/Library/Developer/CommandLineTools/usr/lib/libclang.dylib'
let g:cpp_class_scope_highlight=1
let g:cpp_member_variable_highlight=1
let g:cpp_experimental_template_highlight=1
let g:cpp_concepts_highlight=1
map <A-]> :vsp <CR> <C-w>l:exec("tag ".expand("<cword>"))<CR>
" 3. Python
let g:completor_python_binary='python'
let python_highlight_all=1
"let g:jedi#use_splits_not_buffers="right"
let g:jedi#popup_on_dot=0
let g:jedi#completions_enabled=0
let g:jedi#show_call_signatures=0
" 4. Latex
let g:vimtex_compiler_latexmk={'callback':0, 'continuous':0}
let g:vimtex_quickfix_open_on_warning=0
let g:vimtex_view_method='skim'
" 5. Text
au BufNewFile,BufRead *.txt set filetype=journal
au BufNewFile,BufRead CMakeLists.txt set filetype=cmake