-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
137 lines (111 loc) · 2.66 KB
/
.vimrc
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
" Fix encode
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,iso-2022-jp,euc-jp,sjis
set fileformats=unix,dos,mac
scriptencoding utf-8
set ambiwidth=double
" For Vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'xuyuanp/nerdtree-git-plugin'
Plugin 'Yggdroot/indentLine'
Plugin 'chriskempson/base16-vim'
call vundle#end()
filetype plugin indent on
" True colour
set termguicolors
set background=dark
let base16colorspace=256
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
colorscheme base16-monokai
" ; to : (for US Keyboard)
noremap ; :
" Set terminal title
set title
" Show line number
set number
" Tab
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set smartindent
" Visible spaces
set list
set listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:%
" Remove number format
set nrformats-=octal
" Don't notify when yet save buffer
set hidden
" Jump line
set whichwrap=b,s,h,l,[,],<,>,~
nnoremap j gj
nnoremap k gk
nnoremap <down> gj
nnoremap <up> gk
" Brackets jump
set showmatch
source $VIMRUNTIME/macros/matchit.vim
" Enable backspace
set backspace=indent,eol,start
" Complete mode
set wildmenu wildmode=list:full
set history=5000
" Syntax highlight
syntax on
" No line wrap
set nowrap
" Visible cursor line
set cursorline
" Search
set incsearch
set ignorecase
set smartcase
set hlsearch
" Press ESC 2 times to switch highlight
nnoremap <silent><Esc><Esc> :<C-u>set nohlsearch!<CR>
" NerdTree
let g:NERDTreeShowBookmarks=0
let g:NERDTreeDirArrows = 1
let g:NERDTreeDirArrowExpandable = '▶'
let g:NERDTreeDirArrowCollapsible = '▼'
let g:nerdtree_tabs_open_on_console_startup = 0
let g:nerdtree_tabs_open_on_new_tab = 1
map <C-\> :NERDTreeTabsToggle<CR><Esc>
" Fix paste from terminal
if &term =~ "xterm"
let &t_SI .= "\e[?2004h"
let &t_EI .= "\e[?2004l"
let &pastetoggle = "\e[201~"
function XTermPasteBegin(ret)
set paste
return a:ret
endfunction
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("")
endif
" Tab
nnoremap [Tag] <Nop>
nmap t [Tag]
" tc 新しいタブを一番右に作る
map <silent> [Tag]c :tablast <bar> tabnew<CR>
" tx タブを閉じる
map <silent> [Tag]x :tabclose<CR>
" tn 次のタブ
map <silent> [Tag]n :tabnext<CR>
" tp 前のタブ
map <silent> [Tag]p :tabprevious<CR>
" Fir Airline
set laststatus=2
let g:airline_powerline_fonts = 1
let g:airline_theme = 'base16_monokai'