スポンサーリンク
gvimにプラグインを入れようと思ったのですが、初心者向けのやり方が見つけられなかったのでいろいろ調べて試行錯誤したところをメモしておきます。
私は会社PCでwindows10を使っていますが、エディタはvim(gvim)を使っています。
それとは別に外出用にmac book proも使っているのですが、そちらでも同じようにvim(mac vim)を入れています。
そんなある日、会社の打ち合わせでマークダウンで書いたらプレビューが表示されるエディタを使っている人がいました。
「エディタなんかvimでいいんや。プラグインもいらん。シンプルイズベストや。」みたいに考えていた私ですが、正直これは使いたいと思ってしまいました。
ググってみるとvimにもそういったプラグインが用意されているらしく、入れてみようかと考えるに至りまして、今回初めてgvimにプラグインを入れることになりました。
git for windows公式からインストーラをダウンロードできます。
ダウンロードできたらダブルクリックで起動します。
インストーラが立ち上がり、いろいろ聞かれるのですが、私は全てそのまま(変更せず)でやりました。
さっそくインストールした git bash を起動します。
するとターミナル的な画面が起動するので、以下のコマンドを実行し、neobundleを取得します。
コマンド
git clone https://github.com/Shougo/neobundle.vim
結果
Cloning into 'neobundle.vim'...
remote: Enumerating objects: 9242, done.
remote: Total 9242 (delta 0), reused 0 (delta 0), pack-reused 9242
Receiving objects: 100% (9242/9242), 2.28 MiB | 206.00 KiB/s, done.
Resolving deltas: 100% (4479/4479), done.
これでOKです。
いよいよ本題のprevimをインストールします。
こちらはインストールコマンド等を実行するのではなく、.vimrcに記載するだけで自動的にインストールしてくれます。
なお、 記載するファイルは ユーザのフォルダ配下に .vimrc
という名前で書く必要があります。
それ以外ではうまくいきませんのでご注意を。
" plugin管理ツール(neobundle)に関する設定
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=C:\Users\"自分のユーザ名に置換"\neobundle.vim
" Required:
call neobundle#begin(expand('C:\Users\"自分のユーザ名に置換"\neobundle.vim'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" Add or remove your Bundles here:
NeoBundle 'tyru/open-browser.vim'
NeoBundle 'kannokanno/previm'
" Required:
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"End NeoBundle Scripts-------------------------
" Previm
" autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} set filetype=markdown
autocmd BufRead,BufNewFile *.md set filetype=markdown
"let g:previm_open_cmd = 'C:\Program\ Files\ (x86)\\Google\\Chrome\\Application\\chrome.exe'
let g:previm_open_cmd = ''
" Ctrl + p でプレビューを起動
nnoremap <silent> <C-p> :PrevimOpen<CR>
この設定を記載すると、初回起動時に「プラグインをインストールしますか?」的なのを聞かれます。
これで準備完了です。実際に使ってみましょう。
まず、gvimで以下のようなファイルを作成します。
## hello
こんにちわ
* ハロー
* こんにちわ
* グーテンターク
* ボンジュール
こんにちわ は `日本語` です
※このとき、ファイル名は必ず .md
という形式で保存してください。
※それ以外だとプレビュー画面が起動しません。
次にこのファイルを保存し、 Ctrl + p
を押すと、以下のようにchromeが起動しプレビュー画面が表示されます。
以上で完了です。
その通りなのですが、このエラーが解消できずに小2~3時間苦戦しました。
原因は previmの設定を .vimrc 以外のファイルに書いていたこと です。
こんな使い方をしているのは私だけかもしれませんが、、私は c:\program files (x86)
配下の、gvimをインストールしているディレクトリに.gvimrcを置いています。
理由は簡単で、このパソコンは自分しか使わないから。なのでアプリと同じ場所に置いたほうが何かと便利と考えていました。
ところが、neobundleの設定とprevimの設定は ~/.vimrc (ホームディレクトリ配下の .vimrc というファイル名)しか読み込んでくれないらしく、ずっとこのエラーが出て苦労しました。
スポンサーリンク
2022/05/20 20:11:59
dissertation outline example
dissertation writing uk
help with dissertation writing uk
2022/05/20 20:59:44
brand provigil modafinil sale
2022/05/20 21:22:47
2022/04/07 20:31:01
centurion laboratories tadalafil review tadalafil how long to take effect
2022/04/07 22:34:07
cheap tadalafil 60 mg centurion laboratories tadalafil
2022/04/08 04:15:08
tadalafil citrate cialis professional
2022/04/08 18:07:03
sildenafil 50 mg reviews sildenafil spray
2022/04/09 01:43:13
After I serve daddy’s left one, I was about to move to the right foot. While He stopped me, stood up, and walked towards the couch, he said “Crawling right after me.” I followed daddy. My nose was where daddy’s ass was. I was staring at that crotch while I was crawling, and I didn’t realize daddy stopped one of a sudden in front of the bathroom. My nose is slightly right into that dreaming ass crack.
2022/04/09 19:39:39
generic viagra viagra dose viagra women female viagra pills
2022/04/09 22:53:33
generic viagra cheap viagra generic
2022/04/10 11:07:10
Hmm is anyone else experiencing problems with the pictures on this blog loading? phillipsservices.net
2022/04/11 17:16:02
cheapest soft viagra soft on line 100 viagra pill
2022/04/12 01:09:31
walgreens pharmacy refill online most trusted canadian pharmacy
2022/04/12 14:39:39
rite aid 24 hour pharmacy store locator order prescriptions online without doctor
2022/04/13 08:54:12
online pharmacy paypal online course for pharmacy technician
2022/04/13 10:49:49
testosterone canadian pharmacy smiths pharmacy
2022/04/13 16:45:53
brand levitra cialis viagra add to cart how long can you keep cialis
2022/04/14 06:14:03
pharmacy school best rated canadian online pharmacy
2022/04/15 09:54:40
sildenafil tabletas sildenafil online purchase
2022/04/15 06:30:49
levitra trial coupon levitra drugstore
2022/04/16 18:15:21
ivermectin for heartworms in dogs ivermectin asthma
2022/04/16 10:25:28
cialis 20mg vs viagra 100mg drug categories viagra cialis
2022/04/16 12:15:23
buy viagra cheap female viagra capsule
2022/04/17 08:58:22
soolantra ivermectin cream ivermectin covid trial
2022/04/18 10:54:12
tadalafil 5 mg best price generic tadalafil
2022/04/18 08:08:26
canadian world pharmacy online pharmacy in canada
2022/04/19 18:49:06
buy generic viagra uk buy viagra tablet online india
2022/04/19 20:39:10
cvs pharmacy careers apply online republic rx specialty pharmacy
2022/04/20 02:51:19
buy brand levitra online how long before levitra takes effect
2022/04/20 16:54:51
cialis generic cost cialis delivery to australia
2022/04/21 14:19:55
generic name for levitra levitra generic for sale
2022/04/21 17:59:10
buy brand cialis online cheap t jet 60 cialis online
2022/04/22 23:10:45
specialty rx pharmacy citizens rx pharmacy
2022/04/23 01:02:40
pharmacy website pharmacy prescription
2022/04/23 07:19:01
canadian pharmacy kingcanadian viagra pharmacy discount card rx relief
2022/04/23 21:10:33
online pharmacies in usa Sustiva
2022/04/24 19:06:30
buying prescription drugs canada otc drugs in canada
2022/04/24 22:28:42
prescription anti inflammatory drugs canadian pharmacy canadian tx
2022/04/29 11:02:40
online pet pharmacy usa online pharmacy without a prescription https://dtupharmyjn.com/
2022/04/29 12:51:17
ivermectin for snakes ivermectin sheep drench dosage https://stromectolujlo.com/
2022/04/29 19:03:19
canada drug pharmacy richmond bc hot canadian pharmacy review https://jzpharmacyukj.com/
2022/04/30 08:33:42
viagra paypal canada average price of sildenafil in usa 100mg https://sgiviagraikn.com/
2022/05/01 05:52:37
viagra ou levitra generic levitra 20mg https://glevitrargu.com/
2022/05/01 09:07:14
what are sildenafil tablets used for sildenafil and nitrates https://sildenafilkiol.com/
2022/05/03 13:39:31
cialis online from canada cialis on line paypal payment https://dccialisxvf.com/
2022/05/03 15:24:41
sildenafil 20 mg pill canadian generic viagra 100mg https://aviagrasbt.com/
2022/05/03 21:16:31
levitra food levitra 10mg online https://xclevitradb.com/
2022/05/04 10:31:29
canadian drugs pharmacies online custom rx pharmacy
2022/05/05 22:18:39
order modafinil 100mg generic order provigil sale
2022/05/06 04:31:12
hydroxide chloroquine how to make hydroxychloroquine at home
2022/05/07 00:13:40
hydrochlorazine https://keys-chloroquinehydro.com/
2022/05/09 07:49:35
cialis uk no prescription brand cialis no prescription https://dccialisxvf.com/
2022/05/09 09:35:38
mexico pharmacy viagra generic viagra in the usa https://aviagrasbt.com/
2022/05/09 15:20:36
is levitra safe generic levitra canada https://xclevitradb.com/
2022/05/10 04:13:36
best canadian pharmacies reviews canadian mail order pharmacy reviews
2022/05/11 00:54:38
levitra vs cialis vs viagra reviews levitra picture https://glevitrargu.com/
2022/05/11 04:03:32
generic viagra sildenafil citrate generic sildenafil citrate 100mg https://sildenafilkiol.com/
2022/05/11 18:46:29
2022/05/14 17:55:35
levitra from india how long does levitra work https://xclevitradb.com/
2022/05/14 21:42:31
buy provigil 100mg online cheap modafinil order
2022/05/15 01:08:54
defending your dissertation
sample dissertation
dissertation help sites
2022/05/15 07:12:29
gold pharmacy online Uroxatral
2022/05/16 00:07:27
dissertation editor cost
online dissertation help united kingdom
phd dissertation editing help
2022/05/16 04:17:25
when should i take levitra levitra company https://glevitrargu.com/
2022/05/16 07:28:36
what is sildenafil for can i take sildenafil daily https://sildenafilkiol.com/
2022/05/18 10:12:52
erythromycin 500 mg price https://erythromycin1m.com/#
2022/05/18 10:45:43
purchase provigil sale provigil 200mg without prescription
2022/05/18 13:15:26
cialis 10mg vs 20mg generic cialis online overnight delivery https://dccialisxvf.com/
2022/05/18 15:05:56
buy viagra over the counter vigara https://aviagrasbt.com/
2022/05/18 19:01:37
erythromycin uses azithromycin vs erythromycin
2022/05/18 20:55:10
provigil us order provigil pill provigil 100mg canada
2022/05/18 21:06:54
levitra duration levitra vardenafil tablets https://xclevitradb.com/
2022/05/19 10:18:29
apply for cvs pharmacy online xanax from canadian pharmacy
2022/05/19 12:44:50
thesis versus dissertation
dissertation dedication
dissertation uk help
2022/05/19 12:44:55
order provigil 100mg without prescription
2022/05/19 20:37:44
buy provigil modafinil 100mg brand
2022/05/20 07:20:10
is there a generic levitra online pharmacy levitra https://glevitrargu.com/
2022/05/20 09:18:47
2022/05/20 10:32:12
why does sildenafil cause headaches sildenafil for ed https://sildenafilkiol.com/