-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
62 lines (53 loc) · 1.35 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
syntax on
colorscheme badwolf
set encoding=UTF-8
set background=dark
set number
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set smartindent
set noignorecase
set ttyfast
set lazyredraw
set hlsearch
set incsearch
set ambiwidth=double
set backspace=indent,eol,start
set completeopt=menuone,noinsert
let mapleader = "\<Space>"
" 検索ハイライトを消す
nnoremap <ESC><ESC> :nohl<CR>
nnoremap <C-j><C-j> :nohl<CR>
imap <C-j> <esc>
" 文頭文末移動
inoremap <C-e> <Esc>$a
inoremap <C-a> <Esc>^i
noremap <C-e> <Esc>$a
noremap <C-a> <Esc>^i
"自動補完===
set completeopt=menuone
for k in split("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_",'\zs')
exec "imap " . k . " " . k . "<C-X><C-P><C-N>"
endfor
imap <expr> <TAB> pumvisible() ? "\<Down>" : "\<Tab>" "===========
function! ZenkakuSpace()
highlight ZenkakuSpace cterm=underline ctermfg=lightblue guibg=darkgray
endfunction
if has('syntax')
augroup ZenkakuSpace
autocmd!
autocmd ColorScheme * call ZenkakuSpace()
autocmd VimEnter,WinEnter,BufRead * let w:m1=matchadd('ZenkakuSpace', ' ')
augroup END
call ZenkakuSpace()
endif
"=========
set t_Co=256
" 最後にカーソルがいたところを記憶
augroup vimrcEx
au BufRead * if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" | endif
augroup END