Skip to content

Instantly share code, notes, and snippets.

@thinca
Created November 21, 2015 06:49
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 thinca/bd975f7198f802161655 to your computer and use it in GitHub Desktop.
Save thinca/bd975f7198f802161655 to your computer and use it in GitHub Desktop.

Introduction to OmniSharp.vim

2015/11/21 VimConf 2015 thinca

About me

  • thinca
    • Twitter: @thinca
    • GitHub: thinca
    • イカID: thinca
  • マンボウの人

Agenda

  • About OmniSharp
  • Rough History
  • How To Use
  • Demo

About OmniSharp

What is OmniSharp?

  • .NET の開発支援ツール
    • C#
  • 好きなエディタと連携できる
    • Vim
    • Emacs
    • Atom
    • Sublime
    • Visual Studio Code

Structures

  • デーモンとして起動
  • プロセス間通信
    • HTTP
    • Standard I/O

Two Daemons

  • omnisharp-server
    • HTTP Only
    • Obsolete
  • omnisharp-roslyn
    • HTTP and Standard I/O
    • Recommended

OmniSharp Features

  • コード補完
  • コード整形
  • 定義元への移動
  • 参照の検索
  • リファクタリング
  • 文法チェック
  • etc...

Rough History

Rough History

  • 2011/03
    • リポジトリが作成される
    • author: Jason Imison (nosami)
  • 2013/01
    • OmniSharp.vim 最初のコミット
    • 履歴はここで途切れている
    • この頃はまだサーバしかない

Rough History

  • 2013/05
    • サーバ部分のリポジトリが分離される
  • 2013/05
    • ロゴが追加される
  • 2013/05
    • 日本人が contribute を始める

Rough History

  • 2014/11
    • .NET のオープンソース化が発表される
  • 2014/12
    • omnisharp-roslyn 開発開始

Rough History

  • 2015年3月
    • thinca が OmniSharp.vim のメンテナになる

OmniSharp.vim

OmniSharp.vim Features

  • コード補完
  • コード整形
  • 定義元への移動
  • 参照の検索
  • いくつかの機能がバグってて動かない

How To Use

Install

  • git clone git@github.com:OmniSharp/omnisharp-vim
  • cd omnisharp-vim/omnisharp-roslyn
  • Build
    • build.cmd
    • bash build.sh
  • Start Daemon
    • scripts/Omnisharp -s {path}
    • scripts/Omnisharp.cmd -s {path}

Demo

Future

  • omnisharp-roslyn へ移行
  • コード整理
  • ファイル内のメンバーをツリー表示
    • unite-outline
  • プロジェクト内のファイルを一覧表示
  • more and more

Conclusion

  • Vim でも C# は書ける

  • 今後もっと便利になる(予定)

  • C# 書こう

Question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment