6 sublime text
Emanuel Rodriguez edited this page 2023-04-14 01:36:24 +00:00

Contains sublime text config stuff

Settings

Current settings are:

{
	"theme": "Adaptive.sublime-theme",
	"font_face": "Berkeley Mono",
	"font_size": 14,
	"ignored_packages":
	[
		"Vintage",
	],
	"highlight_line": true,
	"font_options":
	[
		"no_italic", 
		"no_bold"
	],
	"translate_tabs_to_spaces": true,
	"color_scheme": "Packages/User/base16-ateliersavanna.dark.tmTheme",
	"dark_theme": "Default Dark.sublime-theme",
	"light_theme": "Default.sublime-theme",
	"hot_exit": "disabled",
	"drag_text": false,
	"themed_title_bar": true,
	"index_exclude_gitignore": false,
	"animation_enabled": true,
	"scroll_speed": 5.0,
	"indent_guide_options": [
		// "draw_normal",
		"draw_active",
		// "draw_active_single", 
		// "solid" 
	],
	"highlight_modified_tabs": true,
	// Valid values are "smooth", "phase", "blink" and "solid". Previous
	// versions of Sublime Text used "smooth" by default.
	"caret_style": "solid",

	// These settings control the size of the caret
	"caret_extra_top": 4,
	"caret_extra_bottom": 4,
	"caret_extra_width": 1,

	// When enabled, the caret will be drawn as a rectangle, using the width
	// of the current character
	"block_caret": false,
}


Keybindings

[
   {"keys": ["ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false}},
   {"keys": ["ctrl+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true}},
   {"keys": ["shift+ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true}},
   {"keys": ["shift+ctrl+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true}},
   {"keys": ["alt+up"], "command": "swap_line_up" },
   {"keys": ["alt+down"], "command": "swap_line_down" },
   {"keys": ["alt+`"], "command": "toggle_terminus_panel"},
   { "keys": ["alt+]"], "command": "goto_definition" },
   { "keys": ["alt+left"], "command": "jump_back" },
   { "keys": ["alt+right"], "command": "jump_forward" },
   { "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
   { "keys": ["alt+shift+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"], "side_by_side": true} },
   { "keys": ["ctrl+,"], "command": "focus_neighboring_group", "args": {"forward": false} },
   { "keys": ["ctrl+."], "command": "focus_neighboring_group" },
   { "keys": ["ctrl+shift+,"], "command": "move_to_neighboring_group", "args": {"forward": false} },
   { "keys": ["ctrl+shift+."], "command": "move_to_neighboring_group" },
   { "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace"}
]



Color Scheme and Theme

The current theme is called Atelier Savana, here is the txmate definition

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>author</key>
	<string>Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna)</string>
	<key>name</key>
	<string>Base16 Atelier Savanna Dark</string>
	<key>semanticClass</key>
	<string>base16.ateliersavanna.dark</string>
	<key>colorSpaceName</key>
	<string>sRGB</string>
	<key>gutterSettings</key>
	<dict>
		<key>background</key>
		<string>#232a25</string>
		<key>divider</key>
		<string>#232a25</string>
		<key>foreground</key>
		<string>#5f6d64</string>
		<key>selectionBackground</key>
		<string>#526057</string>
		<key>selectionForeground</key>
		<string>#78877d</string>
	</dict>
	<key>settings</key>
	<array>
		<dict>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#171c19</string>
				<key>caret</key>
				<string>#87928a</string>
				<key>foreground</key>
				<string>#87928a</string>
				<key>invisibles</key>
				<string>#5f6d64</string>
				<key>lineHighlight</key>
				<string>#5f6d6455</string>
				<key>selection</key>
				<string>#526057</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Text</string>
			<key>scope</key>
			<string>variable.parameter.function</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#87928a</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Comments</string>
			<key>scope</key>
			<string>comment, punctuation.definition.comment</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#5f6d64</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Punctuation</string>
			<key>scope</key>
			<string>punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#87928a</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Delimiters</string>
			<key>scope</key>
			<string>none</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#87928a</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Operators</string>
			<key>scope</key>
			<string>keyword.operator</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#87928a</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Keywords</string>
			<key>scope</key>
			<string>keyword</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#55859b</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Variables</string>
			<key>scope</key>
			<string>variable</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#b16139</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Functions</string>
			<key>scope</key>
			<string>entity.name.function, meta.require, support.function.any-method</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#478c90</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Classes</string>
			<key>scope</key>
			<string>support.class, entity.name.class, entity.name.type.class</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#a07e3b</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Classes</string>
			<key>scope</key>
			<string>meta.class</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#ecf4ee</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Methods</string>
			<key>scope</key>
			<string>keyword.other.special-method</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#478c90</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Storage</string>
			<key>scope</key>
			<string>storage</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#55859b</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Support</string>
			<key>scope</key>
			<string>support.function</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#1c9aa0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Strings, Inherited Class</string>
			<key>scope</key>
			<string>string, constant.other.symbol, entity.other.inherited-class</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#489963</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Integers</string>
			<key>scope</key>
			<string>constant.numeric</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Floats</string>
			<key>scope</key>
			<string>none</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Boolean</string>
			<key>scope</key>
			<string>none</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Constants</string>
			<key>scope</key>
			<string>constant</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Tags</string>
			<key>scope</key>
			<string>entity.name.tag</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#b16139</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Attributes</string>
			<key>scope</key>
			<string>entity.other.attribute-name</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Attribute IDs</string>
			<key>scope</key>
			<string>entity.other.attribute-name.id, punctuation.definition.entity</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#478c90</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Selector</string>
			<key>scope</key>
			<string>meta.selector</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#55859b</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Values</string>
			<key>scope</key>
			<string>none</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Headings</string>
			<key>scope</key>
			<string>markup.heading punctuation.definition.heading, entity.name.section</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#478c90</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Units</string>
			<key>scope</key>
			<string>keyword.other.unit</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Bold</string>
			<key>scope</key>
			<string>markup.bold, punctuation.definition.bold</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>bold</string>
				<key>foreground</key>
				<string>#a07e3b</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Italic</string>
			<key>scope</key>
			<string>markup.italic, punctuation.definition.italic</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#55859b</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Code</string>
			<key>scope</key>
			<string>markup.raw.inline</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#489963</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Link Text</string>
			<key>scope</key>
      <string>string.other.link, punctuation.definition.string.end.markdown</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#b16139</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Link Url</string>
			<key>scope</key>
			<string>meta.link</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Lists</string>
			<key>scope</key>
			<string>markup.list</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#b16139</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Quotes</string>
			<key>scope</key>
			<string>markup.quote</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#9f713c</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Separator</string>
			<key>scope</key>
			<string>meta.separator</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#526057</string>
				<key>foreground</key>
				<string>#87928a</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Inserted</string>
			<key>scope</key>
			<string>markup.inserted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#489963</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Deleted</string>
			<key>scope</key>
			<string>markup.deleted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#b16139</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Changed</string>
			<key>scope</key>
			<string>markup.changed</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#55859b</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Colors</string>
			<key>scope</key>
			<string>constant.other.color</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#1c9aa0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Regular Expressions</string>
			<key>scope</key>
			<string>string.regexp</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#1c9aa0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Escape Characters</string>
			<key>scope</key>
			<string>constant.character.escape</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#1c9aa0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Embedded</string>
			<key>scope</key>
			<string>punctuation.section.embedded, variable.interpolation</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#867469</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Illegal</string>
			<key>scope</key>
			<string>invalid.illegal</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#b16139</string>
				<key>foreground</key>
				<string>#ecf4ee</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Broken</string>
			<key>scope</key>
			<string>invalid.broken</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#9f713c</string>
				<key>foreground</key>
				<string>#171c19</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Deprecated</string>
			<key>scope</key>
			<string>invalid.deprecated</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#867469</string>
				<key>foreground</key>
				<string>#ecf4ee</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Unimplemented</string>
			<key>scope</key>
			<string>invalid.unimplemented</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#5f6d64</string>
				<key>foreground</key>
				<string>#ecf4ee</string>
			</dict>
		</dict>
	</array>
	<key>uuid</key>
	<string>65fa7d07-fc73-454f-9026-1a19967badd9</string>
</dict>
</plist>

Color scheme mods

and I have some modifications, using the packagedev package:

{
    // http://www.sublimetext.com/docs/3/color_schemes.html
    "variables": {
        // "green": "#FF0000",
    },
    "globals": {
        // "foreground": "var(green)",
               "line_highlight": "black",
        "selection": "rgba(220, 220, 90, 1)", 
        "selection_foreground": "black", 
        "caret": "orange", 
        "find_highlight": "rgba(220, 220, 90, 1)"
    },
    "rules": [
        {
            // "scope": "string",
            // "foreground": "#00FF00",
        },
    ],
}

Build Systems and Projects

C/C++ Project

Project definition should be something like:

{
	"folders":
	[
		{
			"path": "."
		}
	], 

	 "build_systems": [
        {
            "name": "cl_cpp",
            "selector": "source.c++",
            "cmd": ["build.bat"],
            "shell": true,
            "working_dir": "${project_path:${folder}}", 
            "file_regex": "^(.+?)\\((\\d+)\\)\\s*:\\s*(?:fatal error|error|warning) C\\d+\\s*:\\s*(.+)$", 
            "variants":
    [
        {
            "name": "run",
            "cmd": ["build/app.exe"]
        }
    ]
        }
        
    ]
}

where the build.bat file is like:

@echo off 

cl /nologo /Zi /Fe:build\app.exe /Fo:build\ /Fd:build\ code/test.cpp