Skip to content

Instantly share code, notes, and snippets.

@birkin
Last active September 10, 2017 12:29
Show Gist options
  • Save birkin/5570959 to your computer and use it in GitHub Desktop.
Save birkin/5570959 to your computer and use it in GitHub Desktop.
Sublime_Text_2's project settings options.
{
"settings": {
"translate_tabs_to_spaces": false
},
"folders":
[
{
"path": "/path/to/dir/projectx"
},
{
"path": "/path/to/some/directory",
"name": "optional_short_dir_name",
"file_include_patterns":
[
"*"
],
"folder_exclude_patterns":
[
"*"
]
}
],
"build_systems": [
{
"name": "test",
"cmd": [ "ls", "$file" ]
},
{
"name": "activate_projectx_env",
"cmd": [ "/path/to/dir/projectx/env/bin/python", "$file" ]
}
]
}
@birkin
Copy link
Author

birkin commented Sep 10, 2017

I normally use spaces for indents (for python & js), but the project-level "translate_tabs_to_spaces": false may be useful for Go, which enforces tab-formatting. For this purpose, though, an even better solution would be to use Sublime's 'Syntax Specific' settings. Credit to this post for an example. One thing that wasn't clear to me from the post, though, is that you first have to open a file in the target-language (say, a main.go file) before you can see the Preferences --> Settings – More --> Syntax Specific – User setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment