-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.general
78 lines (67 loc) · 1.86 KB
/
.vimrc.general
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
filetype plugin on
filetype indent on
set encoding=utf8
set fileencodings=utf-8,euc-jp,sjis,cp932,iso-2022-jp
set number
set expandtab
set ts=2
set shiftwidth=2
set autoindent
set smartindent
set ruler
set showcmd
set nowrap
set title
set backspace=indent,eol,start
set synmaxcol=300
" jsonを勝手に良い感じにしてくれるのを防ぐ
let g:vim_json_syntax_conceal = 0
" コメントアウトの処理を修正
set formatoptions+=mM
augroup LineBreak
autocmd! LineBreak
autocmd FileType * setlocal formatoptions-=ro
augroup END
" 音を消す
set visualbell t_vb=
" カーソルがどの行のどの列にいるのかを分かりやすく
" やっぱり重くなるし止めた...
" set cursorline
" set cursorcolumn
" highlight CursorLine ctermbg=red
" highlight CursorColumn ctermbg=red
nmap <silent> <Esc><Esc> <C-[> :nohlsearch<CR>
let mapleader = " "
" インサートモードの時の処理
inoremap <C-e> <END>
inoremap <C-a> <HOME>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-h> <Left>
inoremap <C-l> <Right>
inoremap jj <Esc>
" {とか打ったら、その対になる文字を出力して、カーソルを左へずらす
inoremap { {}<LEFT>
inoremap [ []<LEFT>
inoremap ( ()<LEFT>
inoremap " ""<LEFT>
inoremap ' ''<LEFT>
" 検索
set hlsearch
set incsearch
set ignorecase
set smartcase
nnoremap <Esc><Esc> <C-[> :nohlsearch<CR>
" 全角スペース等を強調表示
if has("syntax")
function! ActivateInvisibleIndicator()
syntax match InvisibleJISX0208Space " " display containedin=ALL
highlight InvisibleJISX0208Space term=underline ctermbg=darkgrey guibg=Blue
syntax match InvisibleTrailedSpace "[ \t]\+$" display containedin=ALL
highlight InvisibleTrailedSpace term=underline ctermbg=Red guibg=Red
endf
augroup invisible
autocmd! invisible
autocmd BufNew,BufRead * call ActivateInvisibleIndicator()
augroup END
endif