Skip to content

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 line

Search for Gitlens → Current Line: Enabled and disable that.

GitLens → Show File History Explorer, then just look at the sidebar:

If 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)
  1. First, due to a bug, make sure you’ve completely deleted the PR’s branch
    1. git checkout master
    2. git branch -D branch_from_PR
  2. Right-click a PR → Checkout Pull Request
  3. Probably want to either rebase to master or merge in master so that the code is up-to-date
    1. If you do this, make sure master is up-to-date.
  4. Run any build commands so that you have up-to-date dependencies, etc.
  5. Try out the code and see if it works, review the code, etc.

At 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!

If 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.

If you checkout via the UI and it’s clearly old code, then do the following:

  1. Switch to any other branch
  2. $ git branch -D branch-name-of-pr
  3. $ git fetch name-of-remote
  4. Checkout via UI again

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

You can change the colors of everything by adding “todo.colors.NAME_OF_COLOR” to your settings (reference). It requires a reload afterward though.

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.

There 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”

You’ll probably want to turn this off so that lines aren’t getting reindented in ways you wouldn’t expect:

“[todo]”: {

“editor.autoIndent”: false

},

This 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.

Ignoring errors for specific languages

Section titled Ignoring errors for specific languages

There’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.

I had to just uninstall this for two reasons:

  1. 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”.
  2. 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.
  1. Searches with case sensitivity by default
  2. 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.