2016年12月3日土曜日

NeoBundle?知らない子ですね。

# VimでMarkdown書いていきたいね。 どうも、AdventCalendar2016 3日目担当になったkentomです。 fhorusが2日目の記事を書くことになった時点で「次は僕だろうなー」って思っていたのに準備し忘れていたことが悔やまれる・・・。 というわけで今回はdeinというvimプラグインマネージャーを導入していきましょう。 dein?NeoBundleでよくね? って思う人もいると思うんですけど、NeoBundleと作者は同じで所謂後継機です。 作者はNeoBundleはオワコンだわって言ったり言ってなかったりします・・・。deinの方が処理速度も速いそうで、検索したら実際に時間測ってる人とかもいたので見てみるといいと思います。 一応[こちら](https://github.com/Shougo/dein.vim/)がdeinです。 ここ見れば解決しちゃうんですけど注意する点とかね。 環境はWindows10 + cygwinです。 ``` mkdir -p ~/.vim/dein curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh sh ./installer.sh ~/.vim/dein ``` これだけですね。 1行目でインストール先のフォルダを作る。 2行目でgithubからインストール用のスクリプトを持ってくる。 3行目で実行するだけです。 僕は実行した時にインストール先のフォルダを指定し忘れていたせいで20分くらい悩んだので気をつけてください。 ``` "dein Scripts----------------------------- if &compatible set nocompatible " Be iMproved endif " Required: set runtimepath^=/Users/[UserName]/.cache/dein/repos/github.com/Shougo/dein.vim " Required: call dein#begin(expand('/Users/[UserName]/.cache/dein')) " Let dein manage dein " Required: call dein#add('Shougo/dein.vim') " Add or remove your plugins here: call dein#add('Shougo/neosnippet.vim') call dein#add('Shougo/neosnippet-snippets') " You can specify revision/branch/tag. call dein#add('Shougo/vimshell', { 'rev': '3787e5' }) " Required: call dein#end() " Required: filetype plugin indent on " If you want to install not installed plugins on startup. "if dein#check_install() " call dein#install() "endif "End dein Scripts------------------------- Done Complete setup dein! ``` インストールに成功していればこういうのが出てくるはずなので、1行目から35行目までをコピーして.vimrcにペイッて貼り付けます。 30から32行目のコメントアウトを外しておくと``call dein#install()``を自分でうたなくてもvim初回起動時に実行してくれるので便利かもしれないです。 他のプラグインいれたい時は19行目とかから同じように``call dein#add([plugin名])``とうつとまた起動時に自動でインストールしてくれます。これは便利だね。 今回はこれくらいにしておきましょう。また次があればMarkdownをvimで書いてみたりしようかと思います。 明日のAdventCalendarは kinsan かな。 ではでは。

2 件のコメント:

  1. I want to always read your blogs. I love them Are you also searching for nursing dissertation writing help? we are the best solution for you. We are best known for delivering Nursing dissertation writing services to students without having to break the bank

    返信削除
  2. congratulations. This is quite a good blog. Keep sharing. I love them Are you also searching for nursing writing help? we are the best solution for you.

    返信削除