-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathide-vimrc
100 lines (79 loc) · 2.21 KB
/
ide-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
" use space as Leader
let g:mapleder = "\<Space>"
let mapleader = ' '
" colorscheme
"set background=dark
"colorscheme iceberg
"colorscheme ayu
"colorscheme molokai
"colorscheme gruvbox
"colorscheme nord
"colorscheme monokai
"colorscheme jellybeans
"colorscheme default
"Save file with space + w
nnoremap <Leader>w :w<CR>
"increment and decrement"
nnoremap + <C-a>
nnoremap - <C-x>
" commandline mord keymap
cnoremap <C-A> <Home>
cnoremap <C-F> <Right>
cnoremap <C-B> <Left>
cnoremap <Esc>b <S-Left>
cnoremap <Esc>f <S-Right>
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
" move to specified line with Enter. replace with G
"noremap <CR> G
" move top of file with gg
"noremap <BS> gg
"show line number
set number
" show relative line number
set relativenumber
set smartindent
set autoindent
"tab with 2 half-width spaces"
set expandtab
"display width of tab character at the begining of a line"
set tabstop=2
"display width of tab character outside the begining of a line"
set shiftwidth=2
set cursorline
"user clipboard"
set clipboard+=unnamed
"途中から検索開始する
set incsearch
"Search regardless of case if the search character is lowercase"
set ignorecase
"case sensitive if search characters are uppercase"
set smartcase
" hilight search words"
set hlsearch
"hilight off in two ESC times"
" nmap <silent> <Esc><Esc> ;nohlsearch<CR>
"codesnipetts"
abbr _sh #!/bin/bash
" automatically go to next line
set whichwrap=b,s,h,l,<,>,[,],~
" set syntax highlighting
syntax enable
"highlight CursorLine cterm=NONE ctermfg=white ctermbg=DarkGray
" カーソル行のハイライトを有効にする
set cursorline
" カーソル行のハイライトスタイルを設定
highlight CursorLine cterm=underline ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE gui=underline
" カーソル列のハイライトを有効にする
"set cursorcolumn
"highlight Cursor ctermbg=252 ctermfg=234 guibg=#c6c8d1 guifg=#161821
highlight Cursor ctermbg=234 ctermfg=252 guibg=#161821 guifg=#c6c8d1
" vp doesn't replace paste buffer
function! RestoreRegister()
let @" = s:restore_reg
return ''
endfunction
function! s:Repl()
let s:restore_reg = @"
return "p@=RestoreRegister()\<cr>"
endfunction
vmap <silent> <expr> p <sid>Repl()