Vernon Wee Hong KOH gist felülvizsgálása 3 months ago. Revízióhoz ugrás
1 file changed, 0 insertions, 0 deletions
.ideavimrc fájl átnevezve erre: ideavimrc
Fájl átnevezve változtatások nélkül
Vernon Wee Hong KOH gist felülvizsgálása 3 months ago. Revízióhoz ugrás
1 file changed, 82 insertions
.ideavimrc(fájl létrehozva)
| @@ -0,0 +1,82 @@ | |||
| 1 | + | " .ideavimrc is a configuration file for IdeaVim plugin. It uses | |
| 2 | + | " the same commands as the original .vimrc configuration. | |
| 3 | + | " You can find a list of commands here: https://jb.gg/h38q75 | |
| 4 | + | " Find more examples here: https://jb.gg/share-ideavimrc | |
| 5 | + | ||
| 6 | + | " Source your .vimrc | |
| 7 | + | source ~/.vimrc | |
| 8 | + | ||
| 9 | + | "" -- Suggested options -- | |
| 10 | + | " Show a few lines of context around the cursor. Note that this makes the | |
| 11 | + | " text scroll if you mouse-click near the start or end of the window. | |
| 12 | + | set scrolloff=5 | |
| 13 | + | ||
| 14 | + | " Do incremental searching. | |
| 15 | + | set incsearch | |
| 16 | + | ||
| 17 | + | " Don't use Ex mode, use Q for formatting. | |
| 18 | + | map Q gq | |
| 19 | + | ||
| 20 | + | " --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins | |
| 21 | + | ||
| 22 | + | " Highlight copied text | |
| 23 | + | Plug 'machakann/vim-highlightedyank' | |
| 24 | + | " Commentary plugin | |
| 25 | + | Plug 'tpope/vim-commentary' | |
| 26 | + | " Surround text objects and changes | |
| 27 | + | Plug 'tpope/vim-surround' | |
| 28 | + | " Better text objects around quotes, brackets, arguments, and separators | |
| 29 | + | Plug 'wellle/targets.vim' | |
| 30 | + | " Fast cursor jumps. Requires the IdeaVim-EasyMotion and AceJump IDE plugins. | |
| 31 | + | Plug 'easymotion/vim-easymotion' | |
| 32 | + | " Multi-cursor editing | |
| 33 | + | Plug 'terryma/vim-multiple-cursors' | |
| 34 | + | ||
| 35 | + | " --- Better IdeaVim / IDE integration --- | |
| 36 | + | set ideajoin | |
| 37 | + | set ideaput | |
| 38 | + | set ideamarks | |
| 39 | + | ||
| 40 | + | " --- Optional built-in IdeaVim extensions --- | |
| 41 | + | set mini-ai | |
| 42 | + | set youcompleteme | |
| 43 | + | ||
| 44 | + | " --- IDE navigation --- | |
| 45 | + | nmap gd <Action>(GotoDeclaration) | |
| 46 | + | nmap gi <Action>(GotoImplementation) | |
| 47 | + | nmap gr <Action>(FindUsages) | |
| 48 | + | nmap gb <Action>(Back) | |
| 49 | + | nmap gB <Action>(Forward) | |
| 50 | + | ||
| 51 | + | " --- Search / files / project --- | |
| 52 | + | nmap <leader>ff <Action>(GotoFile) | |
| 53 | + | nmap <leader>fs <Action>(FindInPath) | |
| 54 | + | nmap <leader>fa <Action>(GotoAction) | |
| 55 | + | nmap <leader>fr <Action>(RecentFiles) | |
| 56 | + | nmap <leader>e <Action>(SelectInProjectView) | |
| 57 | + | ||
| 58 | + | " --- Code actions --- | |
| 59 | + | nmap <leader>ca <Action>(ShowIntentionActions) | |
| 60 | + | nmap <leader>cf <Action>(ReformatCode) | |
| 61 | + | nmap <leader>co <Action>(OptimizeImports) | |
| 62 | + | nmap <leader>R <Action>(RenameElement) | |
| 63 | + | ||
| 64 | + | " --- Run / debug --- | |
| 65 | + | nmap <leader>rr <Action>(Run) | |
| 66 | + | nmap <leader>dd <Action>(Debug) | |
| 67 | + | nmap <leader>db <Action>(ToggleLineBreakpoint) | |
| 68 | + | ||
| 69 | + | " --- Tool windows --- | |
| 70 | + | nmap <leader>tt <Action>(ActivateTerminalToolWindow) | |
| 71 | + | nmap <leader>hh <Action>(HideAllWindows) | |
| 72 | + | ||
| 73 | + | ||
| 74 | + | "" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t | |
| 75 | + | "" Map \r to the Reformat Code action | |
| 76 | + | "map \r <Action>(ReformatCode) | |
| 77 | + | ||
| 78 | + | "" Map <leader>d to start debug | |
| 79 | + | "map <leader>d <Action>(Debug) | |
| 80 | + | ||
| 81 | + | "" Map \b to toggle the breakpoint on the current line | |
| 82 | + | "map \b <Action>(ToggleLineBreakpoint) | |
Vernon Wee Hong KOH gist felülvizsgálása 3 months ago. Revízióhoz ugrás
1 file changed, 17 insertions, 9 deletions
install.sh
| @@ -120,7 +120,10 @@ fi | |||
| 120 | 120 | ||
| 121 | 121 | # 4. Extract extensions from JSON using jq (if not using hardcoded array) | |
| 122 | 122 | if [[ "$USE_HARDCODED" == false ]]; then | |
| 123 | - | mapfile -t EXTENSIONS < <(jq -r '.recommendations[]?' "$JSON_FILE") | |
| 123 | + | EXTENSIONS=() | |
| 124 | + | while IFS= read -r ext; do | |
| 125 | + | EXTENSIONS+=("$ext") | |
| 126 | + | done < <(jq -r '.recommendations[]?' "$JSON_FILE") | |
| 124 | 127 | ||
| 125 | 128 | if [[ ${#EXTENSIONS[@]} -eq 0 ]]; then | |
| 126 | 129 | echo "Error: No extensions found under the 'recommendations' key." >&2 | |
| @@ -128,14 +131,19 @@ if [[ "$USE_HARDCODED" == false ]]; then | |||
| 128 | 131 | fi | |
| 129 | 132 | fi | |
| 130 | 133 | ||
| 131 | - | declare -a CODE_ARGS=() | |
| 132 | - | if [[ -n "$PROFILE" ]]; then | |
| 133 | - | CODE_ARGS+=("--profile" "$PROFILE") | |
| 134 | - | fi | |
| 135 | - | ||
| 136 | 134 | # Trap to clean up logs and temporary downloaded JSON files | |
| 137 | 135 | LOG_FILE="$(mktemp -t vscode-install.XXXXXX)" | |
| 138 | - | trap 'rm -f "$LOG_FILE" $TEMP_JSON_FILE' EXIT | |
| 136 | + | trap 'rm -f "$LOG_FILE" "${TEMP_JSON_FILE:-}"' EXIT | |
| 137 | + | ||
| 138 | + | install_extension() { | |
| 139 | + | local ext="$1" | |
| 140 | + | ||
| 141 | + | if [[ -n "$PROFILE" ]]; then | |
| 142 | + | code --profile "$PROFILE" --install-extension "$ext" --force | |
| 143 | + | else | |
| 144 | + | code --install-extension "$ext" --force | |
| 145 | + | fi | |
| 146 | + | } | |
| 139 | 147 | ||
| 140 | 148 | header="Installing ${#EXTENSIONS[@]} extension(s)" | |
| 141 | 149 | [[ -n "$PROFILE" ]] && header+=" into profile '$PROFILE'" | |
| @@ -150,7 +158,7 @@ for ext in "${EXTENSIONS[@]}"; do | |||
| 150 | 158 | [[ -z "$ext" ]] && continue | |
| 151 | 159 | ||
| 152 | 160 | printf ' -> %-55s ' "$ext" | |
| 153 | - | if code "${CODE_ARGS[@]}" --install-extension "$ext" --force >"$LOG_FILE" 2>&1; then | |
| 161 | + | if install_extension "$ext" >"$LOG_FILE" 2>&1; then | |
| 154 | 162 | echo "ok" | |
| 155 | 163 | installed=$((installed + 1)) | |
| 156 | 164 | else | |
| @@ -170,4 +178,4 @@ if (( failed > 0 )); then | |||
| 170 | 178 | echo " - $f" >&2 | |
| 171 | 179 | done | |
| 172 | 180 | exit 1 | |
| 173 | - | fi | |
| 181 | + | fi | |
Vernon Wee Hong KOH gist felülvizsgálása 3 months ago. Revízióhoz ugrás
1 file changed, 1 insertion, 2 deletions
typescript_react_recommendation.json
| @@ -14,7 +14,6 @@ | |||
| 14 | 14 | "formulahendry.auto-rename-tag", | |
| 15 | 15 | "GitHub.vscode-github-actions", | |
| 16 | 16 | "ms-azuretools.vscode-containers", | |
| 17 | - | "GitHub.copilot", | |
| 18 | - | "Codeium.codeium" | |
| 17 | + | "GitHub.copilot" | |
| 19 | 18 | ] | |
| 20 | 19 | } | |
Vernon Wee Hong KOH gist felülvizsgálása 3 months ago. Revízióhoz ugrás
1 file changed, 3 insertions, 3 deletions
README.md
| @@ -22,13 +22,13 @@ Replace `<GIST>` with the raw base of this Gist (everything up to and including | |||
| 22 | 22 | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) | |
| 23 | 23 | ||
| 24 | 24 | # 2. Install remote recommendation JSON to the default profile | |
| 25 | - | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 25 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -f "https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 26 | 26 | ||
| 27 | 27 | # 3. Install TypeScript and React remote recommendation JSON to a specific named profile | |
| 28 | - | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "TypeScript" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 28 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "TypeScript" -f "https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 29 | 29 | ||
| 30 | 30 | # 4. Install Python remote recommendation JSON to a specific named profile | |
| 31 | - | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Python" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/python_recommendation.json" | |
| 31 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Python" -f "https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/python_recommendation.json" | |
| 32 | 32 | ``` | |
| 33 | 33 | ||
| 34 | 34 | ```powershell | |
weehong gist felülvizsgálása 3 months ago. Revízióhoz ugrás
1 file changed, 7 insertions, 7 deletions
README.md
| @@ -19,21 +19,21 @@ Replace `<GIST>` with the raw base of this Gist (everything up to and including | |||
| 19 | 19 | ||
| 20 | 20 | ```bash | |
| 21 | 21 | # 1. macOS / Ubuntu (Install to default profile from a LOCAL .vscode/extensions.json) | |
| 22 | - | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) | |
| 22 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) | |
| 23 | 23 | ||
| 24 | 24 | # 2. Install remote recommendation JSON to the default profile | |
| 25 | - | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 25 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 26 | 26 | ||
| 27 | 27 | # 3. Install TypeScript and React remote recommendation JSON to a specific named profile | |
| 28 | - | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "TypeScript" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 28 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "TypeScript" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 29 | 29 | ||
| 30 | 30 | # 4. Install Python remote recommendation JSON to a specific named profile | |
| 31 | - | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Python" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/python_recommendation.json" | |
| 31 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Python" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/python_recommendation.json" | |
| 32 | 32 | ``` | |
| 33 | 33 | ||
| 34 | 34 | ```powershell | |
| 35 | 35 | # Windows | |
| 36 | - | iwr -useb https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.ps1 | iex | |
| 36 | + | iwr -useb https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.ps1 | iex | |
| 37 | 37 | ||
| 38 | 38 | # named profile | |
| 39 | 39 | .\install.ps1 -ProfileName "WorkSetup" | |
| @@ -43,12 +43,12 @@ iwr -useb https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/ | |||
| 43 | 43 | ||
| 44 | 44 | ```bash | |
| 45 | 45 | # macOS / Ubuntu / WSL2 — interactive picker for IDEs and plugins | |
| 46 | - | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install-jetbrains.sh) | |
| 46 | + | bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install-jetbrains.sh) | |
| 47 | 47 | ``` | |
| 48 | 48 | ||
| 49 | 49 | ```powershell | |
| 50 | 50 | # Windows — interactive picker | |
| 51 | - | iwr -useb https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install-jetbrains.ps1 | iex | |
| 51 | + | iwr -useb https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install-jetbrains.ps1 | iex | |
| 52 | 52 | ``` | |
| 53 | 53 | ||
| 54 | 54 | --- | |
weehong gist felülvizsgálása 4 months ago. Revízióhoz ugrás
2 files changed, 18 insertions, 2 deletions
README.md
| @@ -24,8 +24,11 @@ bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d8596 | |||
| 24 | 24 | # 2. Install remote recommendation JSON to the default profile | |
| 25 | 25 | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 26 | 26 | ||
| 27 | - | # 3. Install remote recommendation JSON to a specific named profile | |
| 28 | - | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Frontend-Stack" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 27 | + | # 3. Install TypeScript and React remote recommendation JSON to a specific named profile | |
| 28 | + | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "TypeScript" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" | |
| 29 | + | ||
| 30 | + | # 4. Install Python remote recommendation JSON to a specific named profile | |
| 31 | + | bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Python" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/python_recommendation.json" | |
| 29 | 32 | ``` | |
| 30 | 33 | ||
| 31 | 34 | ```powershell | |
python_recommendation.json(fájl létrehozva)
| @@ -0,0 +1,13 @@ | |||
| 1 | + | { | |
| 2 | + | "recommendations": [ | |
| 3 | + | "ms-python.python", | |
| 4 | + | "ms-python.vscode-pylance", | |
| 5 | + | "charliermarsh.ruff", | |
| 6 | + | "usernamehw.errorlens", | |
| 7 | + | "mikestead.dotenv", | |
| 8 | + | "donjayamanne.python-environment-manager", | |
| 9 | + | "rangav.vscode-thunder-client", | |
| 10 | + | "njpwerner.autodocstring", | |
| 11 | + | "eamodio.gitlens" | |
| 12 | + | ] | |
| 13 | + | } | |
weehong gist felülvizsgálása 4 months ago. Revízióhoz ugrás
1 file changed, 1 insertion, 1 deletion
install.sh
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | set -euo pipefail | |
| 12 | 12 | IFS=$'\n\t' | |
| 13 | 13 | ||
| 14 | - | readonly EXTENSIONS=( | |
| 14 | + | EXTENSIONS=( | |
| 15 | 15 | "docker.docker" | |
| 16 | 16 | "github.github-vscode-theme" | |
| 17 | 17 | "GitHub.vscode-github-actions" | |
weehong gist felülvizsgálása 4 months ago. Revízióhoz ugrás
1 file changed, 11 insertions, 9 deletions
install.sh
| @@ -92,14 +92,14 @@ fi | |||
| 92 | 92 | # 3. Resolve JSON Source (Local File vs URL) | |
| 93 | 93 | JSON_FILE="" | |
| 94 | 94 | TEMP_JSON_FILE="" | |
| 95 | + | USE_HARDCODED=false | |
| 95 | 96 | ||
| 96 | 97 | if [[ -z "$SOURCE" ]]; then | |
| 97 | 98 | if [[ -f ".vscode/extensions.json" ]]; then | |
| 98 | 99 | JSON_FILE=".vscode/extensions.json" | |
| 99 | 100 | else | |
| 100 | - | echo "Error: No JSON file specified and .vscode/extensions.json not found." >&2 | |
| 101 | - | usage >&2 | |
| 102 | - | exit 2 | |
| 101 | + | echo "Info: No JSON file specified and .vscode/extensions.json not found. Using hardcoded extensions." >&2 | |
| 102 | + | USE_HARDCODED=true | |
| 103 | 103 | fi | |
| 104 | 104 | elif [[ "$SOURCE" =~ ^https?:// ]]; then | |
| 105 | 105 | if ! command -v curl >/dev/null 2>&1; then | |
| @@ -118,12 +118,14 @@ else | |||
| 118 | 118 | fi | |
| 119 | 119 | fi | |
| 120 | 120 | ||
| 121 | - | # 4. Extract extensions from JSON using jq | |
| 122 | - | mapfile -t EXTENSIONS < <(jq -r '.recommendations[]?' "$JSON_FILE") | |
| 123 | - | ||
| 124 | - | if [[ ${#EXTENSIONS[@]} -eq 0 ]]; then | |
| 125 | - | echo "Error: No extensions found under the 'recommendations' key." >&2 | |
| 126 | - | exit 1 | |
| 121 | + | # 4. Extract extensions from JSON using jq (if not using hardcoded array) | |
| 122 | + | if [[ "$USE_HARDCODED" == false ]]; then | |
| 123 | + | mapfile -t EXTENSIONS < <(jq -r '.recommendations[]?' "$JSON_FILE") | |
| 124 | + | ||
| 125 | + | if [[ ${#EXTENSIONS[@]} -eq 0 ]]; then | |
| 126 | + | echo "Error: No extensions found under the 'recommendations' key." >&2 | |
| 127 | + | exit 1 | |
| 128 | + | fi | |
| 127 | 129 | fi | |
| 128 | 130 | ||
| 129 | 131 | declare -a CODE_ARGS=() | |
weehong gist felülvizsgálása 4 months ago. Revízióhoz ugrás
1 file changed, 8 insertions
install.sh
| @@ -11,6 +11,14 @@ | |||
| 11 | 11 | set -euo pipefail | |
| 12 | 12 | IFS=$'\n\t' | |
| 13 | 13 | ||
| 14 | + | readonly EXTENSIONS=( | |
| 15 | + | "docker.docker" | |
| 16 | + | "github.github-vscode-theme" | |
| 17 | + | "GitHub.vscode-github-actions" | |
| 18 | + | "ms-azuretools.vscode-containers" | |
| 19 | + | "ms-vscode-remote.vscode-remote-extensionpack" | |
| 20 | + | "pkief.material-icon-theme" | |
| 21 | + | ) | |
| 14 | 22 | PROFILE="" | |
| 15 | 23 | SOURCE="" | |
| 16 | 24 | ||