Skip to content

Instantly share code, notes, and snippets.

@sakahukamaki
Last active March 30, 2018 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sakahukamaki/c4f27a49b1da8cf689389abeaf0105dd to your computer and use it in GitHub Desktop.
Save sakahukamaki/c4f27a49b1da8cf689389abeaf0105dd to your computer and use it in GitHub Desktop.
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=/home/vagrant/.vim/bundles/./repos/github.com/Shougo/dein.vim
" Required:
if dein#load_state('/home/vagrant/.vim/bundles/.')
call dein#begin('/home/vagrant/.vim/bundles/.')
" Let dein manage dein
" Required:
call dein#add('/home/vagrant/.vim/bundles/./repos/github.com/Shougo/dein.vim')
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/deoplete.nvim')
call dein#add('tpope/vim-endwise')
call dein#add('szw/vim-tags')
call dein#end()
call dein#save_state()
endif
" --------------------------------
" 基本設定
" --------------------------------
" vim内部で使われる文字エンコーディングをutf-8に設定する
set encoding=utf-8
" 想定される改行コードの指定する
set fileformats=unix,dos,mac
" ハイライトを有効化する
syntax enable
" 挿入モードでTABを挿入するとき、代わりに適切な数の空白を使う
set expandtab
" 新しい行を開始したとき、新しい行のインデントを現在行と同じにする
set autoindent
" ファイル形式の検出の有効化する
" ファイル形式別プラグインのロードを有効化する
" ファイル形式別インデントのロードを有効化する
filetype plugin indent on
set backspace=indent,eol,start
set number
set nobackup
set noswapfile
set shiftwidth=2
#! bin/sh
mkdir ~/.vim/bundles
cd ~/.vim/bundles
curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
mkdir ~/.cache/dein
sh ./installer.sh ~/.cache/dein
Vim環境構築の参考
[Rubyプログラミングが快適になるVim環境を0から構築する](https://qiita.com/mogulla3/items/42a7f6c73fa4a90b1df3)
※jdk入れるのはパスした
※marcus/rsenseは死んでたので消した
ファイル選択のpecoをいれた
[pecoでファイルパスを選択してよしなに挿入してくれるzshrc設定書いた](http://blog.hotolab.net/entry/peco_select_path)
バックスペースが効かなくて気が狂いそうだったので追加した
[vimで文字が削除出来ないと思ったらバックスペースが効かなくなった](https://qiita.com/omega999/items/23aec6a7f6d6735d033f)
保存に時間がかかるのが気になったので直した
[WindowsのVim/GVimでネットワーク上のファイル編集や読み込みが遅い場合](https://sites.google.com/site/fudist/Home/vim-nihongo-ban/windows-network-edit)
```
set nobackup
set noswapfile
```
※sambaで共有していた なにせsublimeで見たいもので
そうなると起動が遅いので直したい
`vim xxxx --startuptime hoge` でhogeにログがでる
`--noplugin` で実行したら速攻読み込まれたのでpluginが遅いことがわかる
-> `169.498 000.003: --- VIM STARTED ---`
違いとしては `BufEnter autocommands` だった
しばらく使わないプラグインを消して :NeoBundleUpdate
→ `746.320 000.004: --- VIM STARTED ---`
マ?
個別にNeoBundleしてるやつ消しても変わらないから全てはNeoBundleが遅いのではというおきもちに
vimrcからneobundle関連消すとあら不思議颯爽と立ち上がるように
deinというやつに乗り換え
[dein\.vimを使ってみる](https://qiita.com/yoza/items/2f8bd33a18225754f346)
あ~~~これ絶対早い~~~~~ほかの記事だとTOML?とかいうyamlっぽい独自言語で諸々書いてるけど敷居高すぎるからこの記事のレベルでいい
そんなにplugin入れる予定もない
`vim-endwise/ vim-tags/はいる`
早くなったのでよし
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment