-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
executable file
·119 lines (106 loc) · 3.52 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
colorscheme molokai
syntax on
language en_US
set mouse=a
set clipboard+=unnamed
set number
set tabstop=2
set noswapfile
set autoread
set hidden
set nobackup
set showcmd
set backspace=indent,eol,start
set whichwrap=b,s,h,l,<,>,[,]
set termguicolors
let g:previm_open_cmd = 'open -a Safari'
nnoremap j gj
nnoremap k gk
nnoremap gj j
nnoremap gk k
nnoremap s <Nop>
nnoremap sj <C-w>j
nnoremap sk <C-w>k
nnoremap sl <C-w>l
nnoremap sh <C-w>h
nnoremap sJ <C-w>J
nnoremap sK <C-w>K
nnoremap sL <C-w>L
nnoremap sH <C-w>H
augroup PrevimSettings
autocmd!
autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} set filetype=markdown
augroup END
let mapleader = ","
"unite configs----------------------------
let g:unite_enable_start_insert=1
let g:unite_source_history_yank_enable =1
nmap <Space> [unite]
nnoremap <silent> [unite]a :<C-u>UniteWithBufferDir -buffer-name=files file<CR>
nnoremap <silent> [unite]f :<C-u>Unite<Space>buffer file_mru<CR>
nnoremap <silent> [unite]d :<C-u>Unite<Space>directory_mru<CR>
nnoremap <silent> [unite]b :<C-u>Unite<Space>buffer<CR>
nnoremap <silent> [unite]r :<C-u>Unite<Space>register<CR>
nnoremap <silent> [unite]t :<C-u>Unite<Space>tab<CR>
nnoremap <silent> [unite]h :<C-u>Unite<Space>history/yank<CR>
nnoremap <silent> [unite]o :<C-u>Unite<Space>outline<CR>
nnoremap <silent> [unite]<CR> :<C-u>Unite<Space>file_rec:!<CR>
nnoremap <silent> [unite]c :<C-u>Unite bookmark<CR>
autocmd FileType unite call s:unite_my_settings()
function! s:unite_my_settings()"{{{
imap <buffer> jj <Plug>(unite_insert_leave)
imap <buffer> <C-w> <Plug>(unite_delete_backward_path)
nmap <buffer> <ESC> <Plug>(unite_exit)
nnoremap <silent><buffer><expr> f unite#smart_map('f', unite#do_action('vimfiler'))
inoremap <silent><buffer><expr> f unite#smart_map('f', unite#do_action('vimfiler'))
call unite#custom_default_action('file', 'tabopen')
endfunction"}}}
"vimfiler configs
let g:vimfiler_as_default_explorer = 1
let g:vimfiler_safe_mode_by_default = 0
nnoremap <silent> <Leader>fi :<C-u>VimFilerBufferDir -split -simple -winwidth=35 -no-quit<CR>
nnoremap <silent> <Leader>fe :<C-u>VimFilerBufferDir -quit<CR>
"around python
let g:neocomplete#sources#omni#input_patterns = {
\ "python" : '\h\w*\|[^. \t]\.\w*',
\}
autocmd FileType python setlocal omnifunc=jedi#completions
"quick run
let g:quickrun_config={'*': {'split': 'vertical'}}
nnoremap <silent> <Leader>rr :QuickRun<CR>
au FileType qf nnoremap <silent><buffer>q :quit<CR>
set splitbelow
set splitright
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
let s:dein_path = expand('~/.cache/dein')
let s:dein_repo_path = s:dein_path . '/repos/github.com/Shougo/dein.vim'
if &runtimepath !~# '/dein.vim'
if !isdirectory(s:dein_repo_path)
execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_path
endif
execute 'set runtimepath^=' . fnamemodify(s:dein_repo_path, ':p')
endif
if dein#load_state(s:dein_path)
call dein#begin(s:dein_path)
let g:config_dir = expand('~/.cache/userconfig')
let s:toml = g:config_dir . '/plugin.toml'
let s:lazy_toml = g:config_dir . '/plugin_lazy.toml'
" TOML 読み込み
call dein#load_toml(s:toml, {'lazy': 0})
call dein#load_toml(s:lazy_toml, {'lazy': 1})
call dein#end()
call dein#save_state()
endif
" Required:
filetype plugin indent on
syntax enable
" If you want to install not installed plugins on startup.
if dein#check_install()
call dein#install()
endif
"End dein Scripts-------------------------
" deoplete
let g:deoplete#enable_at_startup = 1