shareof / private-docs

0 stars 1 forks source link

My .vimrc #40

Open shareof opened 3 years ago

shareof commented 3 years ago
    set number
    set title
    set ambiwidth=double
    set tabstop=2
    set expandtab
    set smartindent
    set list
    set listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:%
    set nrformats-=octal
    set hidden
    set history=50
    set virtualedit=block
    set whichwrap=b,s,[,],<,>
    set wildmenu
    syntax enable
    set t_Co=256
    set showmatch
    set matchtime=1
    set shiftwidth=2
    set runtimepath+=$HOME/.vim/colors
    autocmd ColorScheme * highlight SpecialKey ctermbg=none
    autocmd ColorScheme * highlight NonText ctermbg=none

" gocode で入力補完を行うための設定
exe "set rtp+=".globpath($GOPATH, "src/github.com/nsf/gocode/vim")
set completeopt=menu,preview

let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_types = 1
"vim-plugのインストール設定を記述
call plug#begin()
Plug 'tpope/vim-sensible'
"Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } }
Plug 'tyru/open-browser.vim'
Plug 'markvincze/panda-vim'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'plasticboy/vim-markdown'
Plug 'previm/previm'
Plug 'tyru/open-browser.vim'
Plug 'thinca/vim-quickrun'
" markdown plugin
Plug 'iamcco/markdown-preview.nvim', { 'for': ['markdown'], 'do': 'cd app & yarn install'  }

let g:openbrowser_browser_commands = ''
call plug#end()

colorscheme panda

" ファイルタイプ別のVimプラグイン/インデントを有効にする
filetype plugin indent on

" 未インストールのVimプラグインがある場合、インストールするかどうかを尋ねてくれるようにする設定・・・・・・③
"括弧の補完
inoremap { {}<Left>
inoremap {<Enter> {}<Left><CR><ESC><S-o>
inoremap ( ()<ESC>i
inoremap (<Enter> ()<Left><CR><ESC><S-o>
inoremap ' ''<LEFT>
inoremap " ""<LEFT>
shareof commented 1 year ago
" Vim color file
" Converted from Textmate theme Sublime Panda Syntax using Coloration v0.4.0 (http://github.com/sickill/coloration)

set background=dark
highlight clear

if exists("syntax_on")
  syntax reset
endif

let g:colors_name = "Sublime Panda Syntax"

hi Cursor ctermfg=235 ctermbg=231 cterm=NONE guifg=#292a2b guibg=#f8f8f0 gui=NONE
hi Visual ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#333539 gui=NONE
hi CursorLine ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d3e gui=NONE
hi CursorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d3e gui=NONE
hi ColorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d3e gui=NONE

hi MatchParen ctermfg=211 ctermbg=NONE cterm=underline guifg=#ff75b5 guibg=NONE gui=underline
hi StatusLine ctermfg=254 ctermbg=241 cterm=bold guifg=#e6e6e6 guibg=#606161 gui=bold
hi StatusLineNC ctermfg=254 ctermbg=241 cterm=NONE guifg=#e6e6e6 guibg=#606161 gui=NONE
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi PmenuSel ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#333539 gui=NONE
hi IncSearch ctermfg=235 ctermbg=50 cterm=NONE guifg=#292a2b guibg=#19f9d8 gui=NONE
hi Search ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline
hi Directory ctermfg=75 ctermbg=NONE cterm=NONE guifg=#6db1ff guibg=NONE gui=NONE
hi Folded ctermfg=60 ctermbg=235 cterm=NONE guifg=#676b79 guibg=#292a2b gui=NONE

hi Normal ctermfg=254 ctermbg=235 cterm=NONE guifg=#e6e6e6 guibg=#292a2b gui=NONE
hi Boolean ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi Character ctermfg=75 ctermbg=NONE cterm=NONE guifg=#6db1ff guibg=NONE gui=NONE
hi Comment ctermfg=82 ctermbg=NONE cterm=NONE guifg=#676b79 guibg=NONE gui=italic
hi Conditional ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi Define ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi DiffAdd ctermfg=254 ctermbg=64 cterm=bold guifg=#e6e6e6 guibg=#47840d gui=bold
hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE guifg=#8b0809 guibg=NONE gui=NONE
hi DiffChange ctermfg=254 ctermbg=23 cterm=NONE guifg=#e6e6e6 guibg=#253a59 gui=NONE
hi DiffText ctermfg=254 ctermbg=24 cterm=bold guifg=#e6e6e6 guibg=#204a87 gui=bold
hi ErrorMsg ctermfg=188 ctermbg=NONE cterm=NONE guifg=#ebebeb guibg=NONE gui=NONE
hi WarningMsg ctermfg=188 ctermbg=NONE cterm=NONE guifg=#ebebeb guibg=NONE gui=NONE
hi Float ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi Function ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi Identifier ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi Keyword ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi Label ctermfg=50 ctermbg=NONE cterm=NONE guifg=#19f9d8 guibg=NONE gui=NONE
hi NonText ctermfg=59 ctermbg=236 cterm=NONE guifg=#292a2b guibg=#292a2b gui=NONE
hi Number ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi Operator ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi PreProc ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi Special ctermfg=254 ctermbg=NONE cterm=NONE guifg=#e6e6e6 guibg=NONE gui=NONE
"hi SpecialKey ctermfg=59 ctermbg=237 cterm=NONE guifg=#34383d guibg=#3c3d3e gui=NONE
hi SpecialKey ctermfg=59 ctermbg=232 cterm=NONE guifg=#34383d guibg=#3c3d3e gui=NONE
hi Statement ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi StorageClass ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi String ctermfg=50 ctermbg=NONE cterm=NONE guifg=#19f9d8 guibg=NONE gui=NONE
hi Tag ctermfg=197 ctermbg=NONE cterm=NONE guifg=#ff2c6d guibg=NONE gui=NONE
hi Title ctermfg=254 ctermbg=NONE cterm=bold guifg=#e6e6e6 guibg=NONE gui=bold
hi Todo ctermfg=60 ctermbg=NONE cterm=inverse,bold guifg=#676b79 guibg=NONE gui=inverse,bold,italic
hi Type ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline
hi rubyClass ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi rubyFunction ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi rubyInterpolationDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi rubySymbol ctermfg=75 ctermbg=NONE cterm=NONE guifg=#6db1ff guibg=NONE gui=NONE
hi rubyConstant ctermfg=222 ctermbg=NONE cterm=NONE guifg=#ffc990 guibg=NONE gui=NONE
hi rubyStringDelimiter ctermfg=50 ctermbg=NONE cterm=NONE guifg=#19f9d8 guibg=NONE gui=NONE
hi rubyBlockParameter ctermfg=251 ctermbg=NONE cterm=NONE guifg=#c7c7c7 guibg=NONE gui=italic
hi rubyInstanceVariable ctermfg=218 ctermbg=NONE cterm=NONE guifg=#ffaad9 guibg=NONE gui=NONE
hi rubyInclude ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi rubyGlobalVariable ctermfg=218 ctermbg=NONE cterm=NONE guifg=#ffaad9 guibg=NONE gui=NONE
hi rubyRegexp ctermfg=50 ctermbg=NONE cterm=NONE guifg=#19f9d8 guibg=NONE gui=NONE
hi rubyRegexpDelimiter ctermfg=50 ctermbg=NONE cterm=NONE guifg=#19f9d8 guibg=NONE gui=NONE
hi rubyEscape ctermfg=75 ctermbg=NONE cterm=NONE guifg=#6db1ff guibg=NONE gui=NONE
hi rubyControl ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi rubyClassVariable ctermfg=218 ctermbg=NONE cterm=NONE guifg=#ffaad9 guibg=NONE gui=NONE
hi rubyOperator ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi rubyException ctermfg=211 ctermbg=NONE cterm=NONE guifg=#ff75b5 guibg=NONE gui=NONE
hi rubyPseudoVariable ctermfg=218 ctermbg=NONE cterm=NONE guifg=#ffaad9 guibg=NONE gui=NONE
hi rubyRailsUserClass ctermfg=222 ctermbg=NONE cterm=NONE guifg=#ffc990 guibg=NONE gui=NONE
hi rubyRailsARAssociationMethod ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi rubyRailsARMethod ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi rubyRailsRenderMethod ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi rubyRailsMethod ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi erubyDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi erubyComment ctermfg=60 ctermbg=NONE cterm=NONE guifg=#676b79 guibg=NONE gui=italic
hi erubyRailsMethod ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi htmlTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi htmlEndTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi htmlTagName ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi htmlArg ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi htmlSpecialChar ctermfg=75 ctermbg=NONE cterm=NONE guifg=#6db1ff guibg=NONE gui=NONE
hi javaScriptFunction ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi javaScriptRailsFunction ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi javaScriptBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
hi yamlKey ctermfg=197 ctermbg=NONE cterm=NONE guifg=#ff2c6d guibg=NONE gui=NONE
hi yamlAnchor ctermfg=218 ctermbg=NONE cterm=NONE guifg=#ffaad9 guibg=NONE gui=NONE
hi yamlAlias ctermfg=218 ctermbg=NONE cterm=NONE guifg=#ffaad9 guibg=NONE gui=NONE
hi yamlDocumentHeader ctermfg=50 ctermbg=NONE cterm=NONE guifg=#19f9d8 guibg=NONE gui=NONE
hi cssURL ctermfg=251 ctermbg=NONE cterm=NONE guifg=#c7c7c7 guibg=NONE gui=italic
hi cssFunctionName ctermfg=75 ctermbg=NONE cterm=NONE guifg=#65bdff guibg=NONE gui=NONE
hi cssColor ctermfg=75 ctermbg=NONE cterm=NONE guifg=#6db1ff guibg=NONE gui=NONE
hi cssPseudoClassId ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi cssClassName ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi cssValueLength ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi cssCommonAttr ctermfg=215 ctermbg=NONE cterm=NONE guifg=#ffb86c guibg=NONE gui=NONE
hi cssBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
shareof commented 1 year ago
# 基本設定
## 256色端末を使用する
set -g default-terminal "screen-256color"
set -g terminal-overrides 'xterm:colors=256'
## Escキーの遅延を解消
set -s escape-time 0
## status line を更新する間隔を1秒にする
set-option -g status-interval 1
## ウィンドウのインデックスを1から始める
set -g base-index 1
## ペインのインデックスを1から始める
setw -g pane-base-index 1
## アクティブなペインのみ白っぽく変更(真っ黒は232)
set -g window-style 'bg=colour239'
set -g window-active-style 'bg=colour234'

# キーの割り当て変更
## prefixキーの割り当て(Ctr+a)
set -g prefix C-a
## prefix + -で水平分割
bind - split-window -v
## prefix + \で垂直分割
bind | split-window -h
## ペインの移動をprefixなしで行う(Shift + 矢印キー)
bind -n S-left select-pane -L
bind -n S-down select-pane -D
bind -n S-up select-pane -U
bind -n S-right select-pane -R
## ペインの順次移動をCtr + o に設定
bind -n C-o select-pane -t :.+
## 並列実行のトグル化
bind e setw synchronize-panes \; display "synchronize-panes #{?pane_synchronized,on,off}"

# status lineの設定
## window-status を中央揃えで配置する
set-option -g status-justify "centre"
## status line の背景色を指定する。
set-option -g status-bg "colour238"
## status line の文字色を指定する。
set-option -g status-fg "colour255"
## status-left の最大の長さを指定する。
set-option -g status-left-length 20
## status-left のフォーマットを指定する。
set-option -g status-left "#[fg=colour255,bg=colour241]Session: #S #[default]"
## window-status のフォーマットを指定する。
set-window-option -g window-status-format " #I: #W "
## カレントウィンドウの window-status のフォーマットを指定する
set-window-option -g window-status-current-format "#[fg=colour255,bg=colour27,bold] #I: #W #[default]"
## status-right の最大の長さを指定する。
set-option -g status-right-length 60
## status-right のフォーマットを指定する。
set-option -g status-right "#[fg=colour255,bg=colour241] #h | LA: #(cut -d' ' -f-3 /proc/loadavg) | %m/%d %H:%M:%S#[default]"

# 操作系
## マウス操作を有効化
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
## コマンドモードでの選択方法をvim風に変更
set-window-option -g mode-keys vi
setw -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
## クリップボートとの連携
### ☆MacOS
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
### ☆Windows(WLS)
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "win32yank.exe -i"
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "win32yank.exe -i"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "win32yank.exe -i"
unbind-key -T prefix v
bind-key v run "win32yank.exe -o | tmux load-buffer - && tmux paste-buffer""""""""")"""""""'''''}'""""}""'')""""""""""""""}")''''''""
shareof commented 1 year ago
 Plug 'iamcco/markdown-preview.nvim', { 'for': ['markdown'], 'do': 'cd app & yarn install'  }↲