Skip to content

Instantly share code, notes, and snippets.

@yashihei
Last active October 31, 2022 10:53
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yashihei/4223b66af2ee09bf76b99e1ddfb2f86e to your computer and use it in GitHub Desktop.
Rider入れてからやったこと

.gitignore

Unityの場合、以下の設定を.gitignoreに追加。

/.idea/

ideavim

Settings内の「Vim Emulation」でキー入力をVimで取るか、IDEで取るか選択出来る。

注意点として、Vimを選択してもIDEに取られる場合がある。その場合、「Keymap」でバッティングしてるショートカットが無いか探す。例えばVisualStudioのキーマップを選択してるとかなりバッティングが起こるので、Defaultなどに戻してから、.ideavimrcからIDEのコマンドを呼びだすのが良い。

:action CommandNameで指定のIDEのコマンドを呼び出せる。

ホームディレクトリに.ideavimrcを作成。以下設定例。

" vim keymap
nnoremap j gj
nnoremap k gk

nnoremap x "_x
vnoremap x "_x

nnoremap Q <Nop>
nnoremap s <Nop>
vnoremap s <Nop>
nnoremap <Space> <Nop>
vnoremap <Space> <Nop>

nnoremap gh gT
nnoremap gl gt

" vim setting
set clipboard=unnamed,autoselect
set surround
set hlsearch
set incsearch
set ignorecase
set smartcase
set scrolloff=5

" idea action
nnoremap se :action SearchEverywhere<CR>
nnoremap sg :action FindInPath<CR>
nnoremap ss :action FileStructurePopup<CR>

nnoremap <Space>a :action GotoAction<CR>
vnoremap <Space>a :action GotoAction<CR>

nnoremap gd :action GotoDeclaration<CR>
nnoremap gs :action GotoSuperMethod<CR>
nnoremap gi :action GotoImplementation<CR>
nnoremap gb :action JumpToLastChange<CR>

nnoremap U :action FindUsages<CR>
nnoremap R :action RenameElement<CR>

nnoremap == :action ReformatCode<CR>
vnoremap == :action ReformatCode<CR>

nnoremap cc :action CommentByLineComment<CR>
vnoremap cc :action CommentByLineComment<CR>

nnoremap <C-CR> :action ShowIntentionActions<CR>

https://ikenox.info/2017-12-25-ideavim-introduction/

コンソールの文字化けを治す

vmoptionsでencodingを修正する

C:\Program Files\JetBrains\JetBrains Rider 2018.2.1\binにあるrider64.exe.vmoptionsに以下の内容を追記。

-Dfile.encoding=UTF-8

https://stackoverflow.com/questions/29695918/intellij-idea-console-issue

で治るらしいけど、なぜか手元の環境では治らず…(Rider2018.2)、調査中。

ロケール設定してなかっただけでした…。以下を.bashrcに追記

export LANG=ja_JP.UTF-8

自動保存無効化

好みはあるかもしれないけど、自動保存に慣れなかったので無効化。 「Appearance & Behavior」 -> 「System Settings」の「Save files on frame deactivation」をOFFに。

http://xblood.hatenablog.com/entry/2017/06/06/230000

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