LoginSignup
4
2

More than 3 years have passed since last update.

Xcode11.5でVimを使いたい

Last updated at Posted at 2020-03-18

はじめに

「XCodeでVimを使いたいなぁぁぁ」と漠然と考えていましたが、あるんですね。
世の中素晴らしいもので、XVim2なるものがありました。
ありがたき幸せ。。。
備忘録として手順を残しておきます。

環境

  • macOS Catalina (バージョン10.15.4)
  • Xcode 11.5(11E608c)

手順

  1. KeychainAccessで自己証明書を作成したら以下を実行する(参考)。
    (Xcode.appのパスは適当に修正してください)

    $ sudo codesign -f -s XcodeSigner /Applications/Xcode.app
    
  2. XVim2README.mdに従ってcloneしてmakeする。

    $ git clone https://github.com/XVimProject/XVim2.git
     ....
    $ xcode-select -p
     /Applications/Xcode.app/Contents/Developer
    $ cd XVim2
    $ make
     ....
     ....
     Touch /Users/xxxx/XVim2/build/Release/XVim2.xcplugin (in target 'XVim2' from project 'XVim2')
     cd /Users/xxxx/XVim2
     /usr/bin/touch -c /Users/xxxx/XVim2/build/Release/XVim2.xcplugin
    
     ** BUILD SUCCEEDED **
    
  3. 使いやすくするために~/.xvimrcを作成する。

    .xvimrc
    # ...
    inoremap jk <Esc>
    inoremap jj <Esc>
    # ...
    
  4. XCodeを起動して確認する。

よいVimライフを!

参考

4
2
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
2