Skip to content

Commit

Permalink
vimのpluginをdein.vimにしてcolorschemaを変更した
Browse files Browse the repository at this point in the history
  • Loading branch information
futabooo committed Nov 18, 2023
1 parent 038d368 commit e1e168e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if eq .chezmoi.os "darwin" -}}
#!/usr/bin/env bash

set -euo pipefai
set -euo pipefail

# Brewfileのhash値をコメントに含めることでBrewfileに変更があった時にこのスクリプトを実行する
# Brewfile: {{ include (joinPath .chezmoi.sourceDir "packages/Brewfile") | sha256sum }}
Expand Down
2 changes: 2 additions & 0 deletions home/dot_vim/dein.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[[plugins]] # カラースキーマ
repo = 'nordtheme/vim'
64 changes: 46 additions & 18 deletions home/dot_vimrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@
" vi互換をオフにする
set nocompatible

if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
" dein.vim settings {{{
" install dir {{{
let s:dein_dir = expand('~/.cache/dein')
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'
" }}}

" dein installation check {{{
if &runtimepath !~# '/dein.vim'
if !isdirectory(s:dein_repo_dir)
execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir
endif
execute 'set runtimepath^=' . s:dein_repo_dir
endif
" }}}

call neobundle#rc(expand('~/.vim/bundle/'))
" begin settings {{{
if dein#load_state(s:dein_dir)
call dein#begin(s:dein_dir)

" Let NeoBundle manage NeoBundle
NeoBundleFetch 'Shougo/neobundle.vim'
" .toml file
let s:rc_dir = expand('~/.vim')
if !isdirectory(s:rc_dir)
call mkdir(s:rc_dir, 'p')
endif
let s:toml = s:rc_dir . '/dein.toml'

" add plugins
NeoBundle 'w0ng/vim-hybrid'
NeoBundle 'sudo.vim'
" ステータスラインの表示内容強化
NeoBundle 'itchyny/lightline.vim'
" read toml and cache
call dein#load_toml(s:toml, {'lazy': 0})

" end settings
call dein#end()
call dein#save_state()
endif
" }}}

filetype plugin on
" plugin installation check {{{
if dein#check_install()
call dein#install()
endif
" }}}

NeoBundleCheck
" plugin remove check {{{
let s:removed_plugins = dein#check_clean()
if len(s:removed_plugins) > 0
call map(s:removed_plugins, "delete(v:val, 'rf')")
call dein#recache_runtimepath()
endif
" }}}

" vi互換をオフにする
set nocompatible

" □や◯文字が崩れなくする
set ambiwidth=double
Expand All @@ -36,7 +65,7 @@ set title
" 括弧入力時の対応する括弧を表示
set showmatch
" コードの色分け
colorscheme hybrid
colorscheme nord
syntax on
" インデントをスペース4つ分に設定
set tabstop=4
Expand All @@ -52,8 +81,7 @@ set wrapscan

" カーソルの左右移動で行末から次の行の行頭への移動が可能になる
set whichwrap=b,s,h,l,<,>,[,],~
" カーソル行ハイライト
set cursorline

" バックスペースでインデントや改行を削除できるようにする
set backspace=indent,eol,start

Expand Down

0 comments on commit e1e168e

Please sign in to comment.