0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

コードエディタCursorをコマンドに割り当てる

Last updated at Posted at 2024-01-23

最近コードを書くのにCursorを使用している。
以前はVscodeを使っていたが便利すぎて戻れない。

ただ自分が使用している環境がKubuntu22.04であり、Cursor自体はAppImageで落ちてくるのでそのままではダブルクリックして実行しなければいけないというなんだか悲しいことになる。Vscodeみたいにコンソールからcode .というような具合にしたい。

頻繁に再セットアップをするので忘れないように手順を書く。

bashシェルでのエイリアスの作成方法

  1. ホームディレクトリにてviで.bashrcを開く。

    vi ~/.bashrc
    

  2. ファイルの最後に以下の行を追加します。
    ここで、your_commandは任意のコマンド名に、
    /path/to/YourApp.AppImageは AppImageファイルへのパスに置き換えてください。

    alias your_command='/path/to/YourApp.AppImage'
    

    今回はCursorなので自分の場合はcursorにしました。

  3. 変更を保存してファイルを閉じます。

  4. 最後に、以下のコマンドを実行して.bashrcの変更を反映します。

    source ~/.bashrc
    

これで、任意のコマンド名をターミナルで入力すると、AppImageアプリケーションが起動します。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?