Ignore flake8 warning in SublimeLinter - sublimetext3

I have installed SublimeLinter-flake8. I would like to exclude the W191 warning when I am using SublimeLinter with flake8. I have checked the SublimeLinter docs and tried adding "--ignore W191" to my user settings file and reloaded plugins but I still get warned about the usage of tabs.
The following is my Packages/User/SublimeLinter.sublime-settings file.
// SublimeLinter Settings - User
{
"linters": {
"linter_name" : {
"args" : "--ignore W191"
}
}
}
I checked this answer on StackOverflow but I would like it to be applied from the settings file.

The linter_name has to be the specific plugin you're looking to configure (in this case flake8) -- try this:
{
"linters": {
"flake8" : {
"args" : "--ignore W191"
}
}
}
though realistically, it is probably better to configure your flake8 settings in flake8's configuration such that contributors to your project can work on your project without your specific sublimetext settings. I believe sublimetext's invocation of flake8 should be compatible with those configurations if I'm reading their code correctly
disclaimer: though I'm not sure it's super relevant here, I currently maintain flake8

Related

Could not find org.nodejs:node

I am trying to build my gui application (angular implementation) and I am getting the following error:
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find
org.nodejs:node:10.14.1.
Searched in the following locations:
- https://nodejs.org/dist/v10.14.1/ivy.xml
build.gradle contains (relevant to nodejs):
node {
version = '10.14.1'
npmVersion = '6.4.1'
download = false
}
dependencies {
classpath("com.moowork.gradle:gradle-node-plugin:1.2.0")
}
}
apply plugin: 'java'
apply plugin: 'com.moowork.node'
gradle.properties contains:
systemProp.https.proxyUser=''
systemProp.https.proxyPassword=''
systemProp.http.proxyUser=''
systemProp.http.proxyPassword=''
systemProp.https.proxyHost=internet.proxy.company.com
systemProp.https.proxyPort=port
systemProp.http.proxyHost=internet.proxy.company.com
systemProp.http.proxyPort=port
npm config contains:
https-proxy=http://internet.proxy.company.com:port/
proxy=http://internet.proxy.company.com:port/
registry=http://registry.npmjs.org/
sslVerify=false
strict-ssl=false
Even if I remove the node js dependency (for giggles), it still throws this error. Any help is greatly appreciated. At first, I thought it was a proxy issue but I do not think that is the case. Any ideas?
com.moowork.node is not actively maintained and has this issue. Switch to the fork of this plugin which is actively maintained and has fixed this issue.
https://github.com/node-gradle/gradle-node-plugin/
For more details as to why it is failing, see this comment.

Autoformatting failed, buffer not changed : Sublime text

While setting up Python Development Environment in Sublime text 3, I wanted Auto formatting on and hence I made the following settings in Preferences > Package settings > Anaconda > Settings User
{
"auto_formatting": true,
"autoformat_ignore":
[
],
"pep8_ignore":
[
"E501"
],
"anaconda_linter_underlines": false,
"anaconda_linter_mark_style": "none",
"display_signatures": false,
"disable_anaconda_completion": true,
"python_interpreter": "/usr/local/bin/python3"
}
The auto_formatting value is set to true in user settings and it is set to false in default settings .
The auto formatting does not work out and gives me Autoformatting failed, buffer not changed error . Also tried changing auto_formatting_timeout = 5 //seconds , but that didn't work out . It would be of great help if someone could help me out .
I had the exact same issue. The problem is the last line is pointing to the wrong path for your python interpreter
Preferences > Package Settings > Anaconda > Settings - User
Delete the last line
"python_interpreter": "/usr/local/bin/python3"
Replace it with
"python_interpreter": "C:\\Users\\YOUR_NAME\\AppData\\Local\\Programs\\Python\\Python38-32\\python.EXE"
IMPORTANT: Your python interpreter path might be different to mine so find out where it is. Remember you need to use TWO backslashes in the path not ONE
Sublime is looking for python in environmental variable when you build it, and it is not able to find it there. You can test it in cmd by typing python and if it opens Microsoft store then here is the fix you can do, it worked for me. Open setting -> search for manage app execution aliases -> turn off "python.exe" and "python3.exe". Now check if you can get python in cmd by typing python, if you do then sublime problem should be fixed. If you want to know why this works follow this stack overflow

Indenting multilines/block with vscode and vim plugin

This is already on the site, but it doesn't work for me. I'm not 100% sure the answer is responsive to my situation (the question asks about vim "mode"). If it is, the context for the accepted answer isn't obvious for me.
I assume were supposed to splice the json fragment
{
"key": "shift+tab",
"command": "outdent",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus"
}
into our settings but it's not clear how or where. The app has a settings.json, a keybindings.json and the plugin has package.json.
I got this to work in vim itself a year or so ago IIRC, but it took a plugin and a couple of settings.
Edit to add: ctrl+[ and ctrl+] aren't functional for me. Presumably they would be w/o the vim plugin, but the plugin overrides the ctrl commands.
Just as in normal vim, typing >> and << in normal mode or > and < in visual mode will indent and un-indent lines, respectively.
Source: https://vim.fandom.com/wiki/Shifting_blocks_visually
Also: https://stackoverflow.com/a/235841/7007605
If you are using the main Vim (VSCodeVim), the standard m>, m<, :m,n>, :m,n< are not supported (see https://github.com/VSCodeVim/Vim/issues/3733).
However, this feature is supported by the Neo Vim VS Extension (asvetliakov.vscode-neovim). Note that if you go this route, you do need to install neovim (>v0.5.0) separately, which you can obtain at https://github.com/neovim/neovim/releases/nightly. Then set the path to the neovim executable/binary in the Neo Vim VS extension settings.
I remaped < and > in normal mode to ident lines while using the VSCode commands:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<"],
"commands" : ["tab"]
},
{
"before": [">"],
"commands" : ["outdent"]
}
]

Sublime Text: can not download with sync-setting package due to randomly changed "ignored_packages" list

I am trying to download/install some 50+ packages with "Sync Settings" package. So, I do Preferences > Packages Settings > Sync Settings > Settings - and my User file's contents are like below.
{
/**
* This token allow to plugin do:
* - Create a Gist
* - Download a Gist
* - Upload a Gist
* - Delete a Gist
*/
"access_token": "54564545454545646465456+4651465",
/**
* Gist identifier for upload your configuration
*/
"gist_id": "hd4554dsg45g5d4gjjmd54",
/**
* Download automagically the new version on ST startup
*/
"auto_upgrade": false
}
But it fails, giving me the below error pop-up
It appears a package is trying to ignore itself, causing a loop.
Please resolve by removing the offending ignored_packages setting.
And then when I navigate to Preference > Settings I see the below
{
"ignored_packages":
[
"Vintage"
]
}
I have looked through this issue, but it did not resolve my problem.
My system settings
Ubuntu - 18.04
Sublime Text - version 3.2 Build 3200
This just happened to me, but it seemed to resolve itself upon retrying. I just dismissed the warnings as they popped up and then let it finish downloading all of my packages. Then, I restarted Sublime (not sure if this was necessary) and downloaded the settings once more (not sure if this was necessary either). The second time, there were no errors.

Add a single file to gradle resources

I'm using the config var plugin for heroku (see https://devcenter.heroku.com/articles/config-vars).
It allows me to use a .env file which I do not push to source control to define the heroku environment.
So when I'm on heroku, I can access sensible information via System.properties.
In dev, I would like to read from this file so it would be best if it were on my classpath.
The .env file is at the root of my project so I cannot use something like this :
sourceSets {
main {
resources {
srcDirs = ['src/main/resources', '/']
}
}
}
What is the simplest way to include a single file into gradle resources ?
The earlier answers seemed more complicated than I was hoping for, so I asked on the gradle forums and got a reply from a Sterling Green who's one of the gradle core devs.
He suggested configuring processResources directly
processResources {
from(".env")
}
He also mentioned that it might be a bad idea to include the project root as an input directly.
After merging the previous answer here with another tips from other sites, I came up with the following solution:
sourceSets {
specRes {
resources {
srcDir 'extra-dir'
include 'extrafiles/or-just-one-file.*'
}
}
main.resources {
srcDir 'src/standard/resources'
srcDir specRes.resources
}
}
processResources {
rename 'some.file', 'META-INF/possible-way-to-rename.txt'
}
I still wonder whether there is some better way.
What I ended up doing was to add project root directory as a resource folder including only the file I was interested in :
sourceSets.main.resources { srcDir file('.') include '.env' }
Seems to do the trick. I wonder if it's the best solution thought

Resources