mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 05:01:17 +08:00 
			
		
		
		
	feat(vscode): add support for Cursor (#13382)
This commit is contained in:
		
							parent
							
								
									1dc87da9e6
								
							
						
					
					
						commit
						43e880ba45
					
				@ -1,7 +1,6 @@
 | 
				
			|||||||
# VS Code
 | 
					# VS Code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This plugin provides useful aliases to simplify the interaction between the command line and VS Code or
 | 
					This plugin provides useful aliases to simplify the interaction between the command line and VS Code, VSCodium, or Cursor editor.
 | 
				
			||||||
VSCodium editor.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
To start using it, add the `vscode` plugin to your `plugins` array in `~/.zshrc`:
 | 
					To start using it, add the `vscode` plugin to your `plugins` array in `~/.zshrc`:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -18,6 +17,7 @@ You can install either:
 | 
				
			|||||||
- VS Code (code)
 | 
					- VS Code (code)
 | 
				
			||||||
- VS Code Insiders (code-insiders)
 | 
					- VS Code Insiders (code-insiders)
 | 
				
			||||||
- VSCodium (codium)
 | 
					- VSCodium (codium)
 | 
				
			||||||
 | 
					- Cursor (cursor)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### MacOS
 | 
					### MacOS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -33,6 +33,10 @@ open the Command Palette via (F1 or ⇧⌘P) and type shell command to find the
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
> Shell Command: Install 'codium' command in PATH
 | 
					> Shell Command: Install 'codium' command in PATH
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For Cursor, open the Command Palette via (F1 or ⌘⇧P) and type shell command to find the Shell Command:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					> Shell Command: Install 'cursor' command in PATH
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Using multiple flavours
 | 
					## Using multiple flavours
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If for any reason, you ever require to use multiple flavours of VS Code i.e. VS Code (stable) and VS Code
 | 
					If for any reason, you ever require to use multiple flavours of VS Code i.e. VS Code (stable) and VS Code
 | 
				
			||||||
@ -43,7 +47,7 @@ executable.
 | 
				
			|||||||
```zsh
 | 
					```zsh
 | 
				
			||||||
ZSH_THEME=...
 | 
					ZSH_THEME=...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Choose between one [code, code-insiders or codium]
 | 
					# Choose between one [code, code-insiders, codium, or cursor]
 | 
				
			||||||
# The following line will make the plugin to open VS Code Insiders
 | 
					# The following line will make the plugin to open VS Code Insiders
 | 
				
			||||||
# Invalid entries will be ignored, no aliases will be added
 | 
					# Invalid entries will be ignored, no aliases will be added
 | 
				
			||||||
VSCODE=code-insiders
 | 
					VSCODE=code-insiders
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
# VS Code (stable / insiders) / VSCodium zsh plugin
 | 
					# VS Code (stable / insiders) / VSCodium / Cursor zsh plugin
 | 
				
			||||||
# Authors:
 | 
					# Authors:
 | 
				
			||||||
#   https://github.com/MarsiBarsi (original author)
 | 
					#   https://github.com/MarsiBarsi (original author)
 | 
				
			||||||
#   https://github.com/babakks
 | 
					#   https://github.com/babakks
 | 
				
			||||||
@ -19,6 +19,8 @@ if [[ -z "$VSCODE" ]]; then
 | 
				
			|||||||
    VSCODE=code-insiders
 | 
					    VSCODE=code-insiders
 | 
				
			||||||
  elif which codium &>/dev/null; then
 | 
					  elif which codium &>/dev/null; then
 | 
				
			||||||
    VSCODE=codium
 | 
					    VSCODE=codium
 | 
				
			||||||
 | 
					  elif which cursor &>/dev/null; then
 | 
				
			||||||
 | 
					    VSCODE=cursor
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    return
 | 
					    return
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user