LoginSignup
4
4

More than 5 years have passed since last update.

dein.vim 触ってみた

Posted at

NeoBundle からdein.vimへ移行してみた

Neobundleは今後はバグフィックスのみになるとのこと

Note: Active developement on NeoBundle has stopped. The only future changes will be bug fixes.

Please see Dein.vim -- A faster, well-tested plugin manager for Vim and Neovim. It can do everything NeoBundle does, including asynchronous installs.

なので私も合わせて移行してみた、

READMEに記述されているが、

下記手順

vimファイルを格納先を作成する。

mkdir ~/.cache/dein

git hubからdein.vimを取得してくる。

install.shを取得

curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh

install.sh をパスを指定して実行

sh ./installer.sh ~/.cache/dein/

これで、.vimrcに記述する、vimshellが吐き出される、
パスはinstall.shを設定したものが出力される。

便利!

vi .vimrc
syntax on
colorscheme molokai
set tabstop=4
set shiftwidth=4
set encoding=utf-8
set incsearch
set ignorecase
set smartcase
set hlsearch
set backspace=indent,eol,start
" コピペさん
set clipboard=unnamed,autoselect

if &term =~ "xterm"
    let &t_SI .= "\e[?2004h"
    let &t_EI .= "\e[?2004l"
    let &pastetoggle = "\e[201~"

    function XTermPasteBegin(ret)
        set paste
        return a:ret
    endfunction
    inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("")
endif


"dein Scripts-----------------------------
if &compatible
  set nocompatible               " Be iMproved
endif

" Required:
set runtimepath+=/home/ami/.cache/dein//repos/github.com/Shougo/dein.vim

" Required:
if dein#load_state('/home/ami/.cache/dein/')
  call dein#begin('/home/ami/.cache/dein/')

  " Let dein manage dein
  " Required:
  call dein#add('/home/ami/.cache/dein//repos/github.com/Shougo/dein.vim')

  " Add or remove your plugins here:
  call dein#add('Shougo/neosnippet.vim')
  call dein#add('Shougo/neosnippet-snippets')
  call dein#add('tpope/vim-endwise')
  call dein#add('tomtom/tcomment_vim')

  " Required:
  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-------------------------

これでとりあえず、

Ruby でコーディングする時に、def とか入力すると自動で、 endが入力されたり、
自動でインデントがあったりと、便利である。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4