-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
51 lines (45 loc) · 1.44 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
syntax enable
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-boms,utf-8,euc-jp,cp932
set fileformats=unix,dos,mac
set ambiwidth=double
set number
set expandtab
set tabstop=2
set autoindent
set shiftwidth=2
set incsearch
set hlsearch
set ignorecase
set smartcase
set clipboard+=unnamed
set laststatus=2
set ruler
set virtualedit=onemore
set scrolloff=8
set whichwrap=b,s,h,l,<,>,[,]
set linebreak
let g:mapleader = "\<Space>"
nnoremap <Leader>w :w<CR>
nnoremap <Esc> :noh<CR>
if empty(glob('$HOME/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
Plug 'preservim/nerdtree'
Plug 'tpope/vim-commentary'
Plug 'jiangmiao/auto-pairs'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'nordtheme/vim'
call plug#end()
colorscheme nord
" NERDTree ファイル指定なしでVimを起動した場合だけ表示したい場合は下記行を追加。
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
let g:NERDTreeShowHidden=1
" The NERD Treeのウィンドウだけが残るような場合にVimを終了したい場合は下記行を追加。
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
nnoremap <silent><C-e> :NERDTreeToggle<CR>