Skip to content

Instantly share code, notes, and snippets.

@IonsInTheEther
IonsInTheEther / plugin.groovy
Last active April 18, 2024 08:35
A JetBrains LivePlugin to collapse `class` attributes. Invaluable for Tailwind projects.
import com.intellij.codeInsight.folding.impl.EditorFoldingInfo
import com.intellij.codeInsight.folding.impl.FoldingUtil
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.editor.Document
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.FoldRegion
import com.intellij.openapi.editor.ex.FoldingModelEx
import java.util.regex.Pattern
import static liveplugin.PluginUtil.*
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active May 7, 2024 08:06
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

Look and Feel

  • quick theme change ctrl+back quote, enter presentation mode, change keymap quickly(might be useful for pair programming)

Navigation

  • alt home navigation bar(quicker than tree navigation isn't it?), alt+insert to create file on the spot or folder or rails generator
  • ctrl+shift+e recent files
  • run action (ctrl+shift+A)
  • find current file in project tree(Alt+f1)
  • !!! ctrl+click(ctrl+b go to declaration) global navigation by classes and methods, including 3rd party sources and yard docs/comments!!! (edited)
  • close block by clicking tiny minus, even if you're in the bottom of the block. Useful when you're dealing with big methods/json/xml