Specific plug ins
Created: 2018-09-11 12:52:56 -0700 Modified: 2023-12-04 14:44:19 -0800
It only hides secrets that contain quotation marks:
This=is not hidden
This=“is hidden”
It may also only work on files ending in “.env” specifically.
Disable the Git annotations that show when the cursor is on a line
Section titled Disable the Git annotations that show when the cursor is on a lineSearch for Gitlens → Current Line: Enabled and disable that.
Show file history
Section titled Show file historyGitLens → Show File History Explorer, then just look at the sidebar:
Show output
Section titled Show outputIf the plug-in ever tells you to check the Output window, then you first need to make sure gitlens.outputLevel is not silent, then you have to make sure that you’ve chosen the right Output channel from the dropdown:
This uses JavaScript (unlike Python which I was used to in Sublime), so there are slightly different ways of doing things:
- Repeating strings: ‘hello ‘.repeat(10)
GitHub Pull Requests (reference)
Section titled GitHub Pull Requests (reference)Normal workflow
Section titled Normal workflow- First, due to a bug, make sure you’ve completely deleted the PR’s branch
- git checkout master
- git branch -D branch_from_PR
- Right-click a PR → Checkout Pull Request
- Probably want to either rebase to master or merge in master so that the code is up-to-date
- If you do this, make sure master is up-to-date.
- Run any build commands so that you have up-to-date dependencies, etc.
- Try out the code and see if it works, review the code, etc.
How to update a pull request
Section titled How to update a pull requestAt the time of writing, there’s no way to go directly from the file in the extension to having your local copy open, so you simply have to open the file (typically via ctrl+P) and make changes. Make sure that you’re checked out to the pull request first though!
Problem viewing code changes
Section titled Problem viewing code changesIf you open a file that changed and you see a single line in the file even if you know there are more, just refresh the pull request and reopen the diff.
Problem with updated PRs
Section titled Problem with updated PRsIf you checkout via the UI and it’s clearly old code, then do the following:
- Switch to any other branch
- $ git branch -D branch-name-of-pr
- $ git fetch name-of-remote
- Checkout via UI again
Settings sync (reference)
Section titled Settings sync (reference)Updating your token (reference)
Section titled Updating your token (reference)NOTE: I originally only wanted to update my token since I thought a new installation of VSCode would need the token, but for downloading, you just need the Gist.
Sync → Advanced options → Edit Extension Local Settings → type in the new token in the JSON blob
Colors
Section titled ColorsYou can change the colors of everything by adding “todo.colors.NAME_OF_COLOR” to your settings (reference). It requires a reload afterward though.
Coloring just the ✔ or ❌
Section titled Coloring just the ✔ or ❌I don’t think this is possible, but I want the functionality that Sublime had:
The closest you can get is this:
…with these options:
“todo.symbols.done”: ”✅”, // Done symbol
“todo.symbols.cancelled”: ”❌”, // Cancelled symbol
…but the checkmarks are ugly.
Performance issues
Section titled Performance issuesThere are a couple of issues on this (#53, #54). #53 mentions that if you turn off statistics, the performance should go back to normal:
“todo.statistics.project.enabled”: “false”
Auto-indentation
Section titled Auto-indentationYou’ll probably want to turn this off so that lines aren’t getting reindented in ways you wouldn’t expect:
“[todo]”: {
“editor.autoIndent”: false
},
Syntax highlighting is broken
Section titled Syntax highlighting is brokenThis is probably the fault of some other extension that has to run, e.g. I ran into this with SpellRight when it was very slowly crawling the entire TODO list for spelling mistakes.
indent-rainbow (reference)
Section titled indent-rainbow (reference)Ignoring errors for specific languages
Section titled Ignoring errors for specific languagesThere’s a setting for this, “indentRainbow.ignoreErrorLanguages”, which lets you disable the red highlight that shows up when you’re indented to an erroneous level. This is useful for TODO lists or plaintext files.
Troubleshooting
Section titled TroubleshootingI had to just uninstall this for two reasons:
- There was a problem where you would click a pane, press ctrl+F, then focus would be lost on that pane, so you’d have to press ctrl+F again, but this time it would be in a different pane. This happened in diffs where I wanted to click the left pane and search there, but it would end up searching the right pane. From my notes: “you click the left window in a diff, the sidebar hides, and then the cursor goes to the right window, so ctrl+F searches the right window”.
- There was a problem where clicking a file more than ~5600 lines long with this extension enabled and no sidebar/panel open that it would autoselect to a seemingly random spot at approximately line 5600.
Incremental Search (reference)
Section titled Incremental Search (reference)What I don’t like
Section titled What I don’t like- Searches with case sensitivity by default
- Doesn’t put your search term in ctrl+F so that you can hit F3 to search again.
I just wanted something to be able to autosave files on my Linux VM so that I could still edit through Windows. The major problem that I ran into for this was that files are automatically saved to your local machine in paths relative to the workspace that you set up. Similarly, when you open a local-only file and save it, it’ll get updated on the remote machine. In this way, it’s more like “rsync” than just FileZilla + autosave.
Here was the config that I used:
{
“protocol”: “sftp”,
“host”: “172.26.207.72”,
“port”: 22,
“uploadOnSave”: true,
“remotePath”: “/home/adam/code/bot-land”,
“username”: “adam”,
“password”: “password”
}
Apparently the “context” option would have helped so that it could save to a temporary folder instead of directly into my local workspace, but I tried it briefly and I couldn’t get files to upload to the remote any longer.