How do I modify jshint sublimelinter settings? - sublimetext3

I am sorrry if this is a duplicate question.
I want to turn off warnings for semi-colon, and change appearance of warning cursors in jshint sublimelinter.
What file or menu do I need to access to change these settings?

See this duplicate answer, among the many questions.
Create a .jshintrc file in the directory you want to lint (a simple JSON file like this, and drop your options in there. You'll be looking for the asi option for semicolons. To set it globally you can place it in a top-level folder. You can also specify a path in Preferences: SublimeLinter Settings from the Command Palette:
"args": [
"--config",
"path/to/my/file/.jshintrc"
],
This seems to override a nearby .jshintrc file in my case, which may not be what you want.
Apparently in Sublime Text 2 it was possible to change these in the SublimeLinter settings using a "jshint_options" setting, but this is apparently no longer possible (see issue #3).

Related

How can i change indentation settings for flake8 in sublime text?

I am using Sublime Text 3 with the Packet Manager, and installed SublimeLinter and then SublimeLinter-flake8.
I want to use tabs for indentation, but I can't find out how. I can't actually find any indentation that works, because if I put one space it says: flake8: E111 - indentation is not a multiple of four, but when I put four spaces it says: flake8: E101 - indentation contains mixed spaces and tabs.
I am on Windows and using Python 3. Does anyone know how to change the settings?
This is answered in the flake8 documentation:
Flake8 supports storing its configuration in the following places:
Your top-level user directory
In your project in one of setup.cfg, tox.ini, or .flake8.
Values set at the command line have highest priority, then those in the project configuration file, then those in your user directory, and finally there are the defaults. However, there are additional command line options which can alter this.
Since this is editor-agnostic, this should be the favoured approach. Also, you keep flexibility when working with configurations at project-level.
However, you can also specify your flake8 arguments in the SublimeLinter configuration, exactly as described in the documentation for SublimeLinter-flake8. Keep in mind that this is a very unflexible solution since it requires editing if you're using different configuration settings across your projects.

Sublime GDB for Sublime 3 doesn't work: You have not configured the plugin correctly

I've googled this issue and haven't seen any useful advice. My understanding is that the default settings should work; I can't see any information about mandatory modifications to the default settings.
You have not configured the plugin correctly, the default configuration file and your user configuration file will open in a new window
when I try to open the debugger, then it opens the user settings (an empty file) and the sublimeGDB settings file, which seems like it's the default. The setup tutorial on https://github.com/quarnster/SublimeGDB doesn't mention needing to modify any files, only that doing so is possible if you want to change your preferences.
Also, I do not understand the following instruction:
Open up the default settings via the command palette and begin typing GDB and select the default.
When I open the command palette, there is no "default" option when I type in GDB, only a list of SublimeGDB features (all of which lead to the titular error)
I installed SublimeGDB with package control.
If you look at your SublimeGDB.sublime-settings and you read some properties you can see that their values are set to "notset"
As the very minimum you have to set those:
"workingdir": "${folder:${file}}",
"commandline": "gdb --interpreter=mi --args ./${file_base_name}",
"env": {"DISPLAY": ":100"},
The working dir is the directory of the current open file.
This will launch the executable file that is named like the file you have currently open (without extension)
There are many others settings and options.
You need to read and learn how to configure them in order that they fit your needs.

master config file to set tab=4 spaces for every editor at once

I've had to edit configuration files for all of my various editors (emacs, vim, nano, etc.) to have a tab spacing equal to 4 spaces instead of the seemingly default 8. Is there a more elegant way? Some master file I can point them all to in order to use the same tabs/spaces settings for all of them?
Try to use http://editorconfig.org (you need to place .editorconfig in each project)

SublimeText3 setting (configuration) manner

I am new to SublimeText, use SublimeText3.
Along with the daily usage, I'm developing some plug-in, so I'd like to understand the manner deeply.
What I found strange is opening Preferences > Settings - Default,
a file Preferences.sublime-settings located at Library/Application Support/Sublime Text 3/Packages/Default.
However, there is actually no such a directory, so I assume this is a binary hardcoded Virtual directory/File.
Also, I noticed, there is a (non virtual) User directory and Preferences.sublime-settings where we can edit.
I think this is a very smart method to let the user preserve the default setting and override the configuration.
So far I just guessed like this, and I'd like to confirm my understandings here.
When a plugin is developed, the default setting is placed in the plugin folder, and a user-setting file is automatically created in the User folder. Am I correct?
Packages are run directly from the *.sublime-package files, located in the executable path I believe. These are simply renamed zips. You can override files by creating the proper folder and file name in the packages folder. Settings are loaded in the following order. First the Default package, then any plugins installed (in alphabetical order), finally the User directory. So anything specified in the Userdirectory will override/merge with anything preceding it.
With that out of the way, yes you should map the default settings to your plugins directory and the user ones to the user directory. The user setting file is not automatically created. For example, the following is an entry from Main.sublime-menu
{
"command": "open_file", "args":
{
"file": "${packages}/User/Preferences.sublime-settings",
"contents": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by file type specific settings.\n{\n\t$0\n}\n"
},
"caption": "Settings – User"
}
So when you first select the menu, it will try to create the file. If it doesn't exist, it should fill it with specified content.

Toggle sets of Vim plugins

Is there a trick or script that allows me to switch between sets of vim-plugins and -settings easily?
I use vim for very different development and writing. It can be really annoying to have certain webdevelopment-specific plugins turn up, when writing a report in LaTeX, for example.
What I'd like to see is something like RVM.
Have a set of "global" plugins and settings; plugins and settings that are always enabled or used.
Per project plugins and settings; pluginss, configurations and settings that will be loaded after activating that "environment".
You may find localvimrc to be useful for point number two. It allows you to have a .lvimrc in your project folder with settings for that specific project. In that file you could load your project-specific plugins by manipulating the runtimepath or by using pathogen/vundle/whatever.
Using this method you would configure your "global" settings and plugins as you would normally.
Nice question IMHO. By the way, using a plugin manager could simplify this kind of stuff too. For example, with pathogen you can do something like:
" To disable a plugin, add it's bundle name to the following list
let g:pathogen_disabled = []
if your_condition
call add(g:pathogen_disabled, 'myplugin')
call add(g:pathogen_disabled, 'myplugin2')
end
See this answer for a good example about conditional loading. It would be very nice to see this feature implemented in pathogen.
I'd just make aliases
alias mvim='vim -u myvimrc'
alias ovim='gvim -U someothervimrc'
Ans yes you could use runtimepath inside the vimrc-s to setup very different configurations

Resources