sublime个人设置

如何拥有jiangly蒋老师同款编译器(sublime c++配置 竞赛向)_哔哩哔哩_bilibili

Sublime Text 4的安装教程(新手竞赛向) - 知乎 (zhihu.com)

创建文件自动保存为c++

  • 打开 Sublime Text 软件。
  • 转到 "Tools"(工具)> "Developer"(开发者)> "New Plugin"(新建插件)。
  • 在打开的新文件中,粘贴以下代码:
python 复制代码
import sublime
import sublime_plugin

class SetDefaultSyntaxCommand(sublime_plugin.EventListener):
    def on_new(self, view):
        view.set_syntax_file('Packages/C++/C++.sublime-syntax')
  • 保存文件,文件名可以是任何您喜欢的,但是后缀必须是 .py,比如 SetDefaultSyntax.py
  • 将文件保存到 Sublime Text 的 Packages/User 目录下,这样 Sublime Text 就能够识别这个插件了。

首选项:设置

python 复制代码
{
	
	"theme": "Adaptive.sublime-theme",
	"color_scheme": "Packages/Monokai++/themes/Monokai++.tmTheme",
	"font_size": 19,
	"ignored_packages":
	[
	],
	"index_files": true,
	"save_on_focus_lost": true,
}

首选项:快捷键设置

python 复制代码
[
    { "keys": ["keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
    // { "keys": ["keypad_enter"], "command": "commit_completion", "context":
    //     [
    //         { "key": "auto_complete_visible", "operator": "equal", "operand": true }
    //     ]
    // },
    // { "keys": ["keypad_enter"], "command": "commit_completion", "context":
    //     [
    //         { "key": "auto_complete_visible", "operator": "equal", "operand": false }
    //     ]
    // },
    // { "keys": ["keypad_enter"], "command": "insert", "args": {"characters": "\n"}, "context":
    //     [
    //         { "key": "auto_complete_visible", "operator": "equal", "operand": false },
    //         { "key": "setting.auto_indent", "operator": "equal", "operand": true },
    //         { "key": "preceding_text", "operator": "regex_contains", "operand": "\n$", "match_all": true }
    //     ]
    // },
    // { "keys": ["keypad_enter"], "command": "commit_completion" },
    { "keys": ["keypad_enter"], "command": "select", "context":
        [
            { "key": "overlay_has_focus", "operator": "equal", "operand": true }
        ]
    },
    { "keys": ["alt+down"], "command": "move_to", "args": {"to": "eof", "extend": false} },
    { "keys": ["alt+left"], "command": "move_to", "args": {"to": "bol", "extend": false} },
    { "keys": ["alt+right"], "command": "move_to", "args": {"to": "eol", "extend": false} },
    { "keys": ["shift+alt+up"], "command": "move_to", "args": {"to": "bof", "extend": true} },
    { "keys": ["shift+alt+down"], "command": "move_to", "args": {"to": "eof", "extend": true} },
    { "keys": ["shift+alt+right"], "command": "move_to", "args": {"to": "eol", "extend": true} },
    { "keys": ["shift+alt+left"], "command": "move_to", "args": {"to": "bol", "extend": true} },
    { "keys": ["alt+up"], "command": "move_to", "args": {"to": "bof", "extend": false} },
]

Package Control 问题

【解决】Sublime Text找不到Package Control选项,且输入install也不显示Install Package(其中一种情况)_sublime没有package control-CSDN博客

相关推荐
艾斯比的日常8 小时前
VSCode 实用快捷键
ide·vscode·编辑器
Galaxy_12298 小时前
vscode远程报错:Remote host key has changed,...
ide·vscode·编辑器
瞌睡不来20 小时前
(学习总结25)Linux工具:vim 编辑器 和 gcc/g++ 编译器
linux·学习·编辑器·vim·编译器·gcc/g++
Aphelios3801 天前
Linux 下 VIM 编辑器学习记录:从基础到进阶(上)
java·linux·编辑器·vim
workflower2 天前
实例研究:设计一个文档编辑器(24)- 完
java·开发语言·设计模式·编辑器·软件工程·需求分析·软件需求
咩咩大主教2 天前
VSCode运行Go程序报错:Unable to process `evaluate`: debuggee is running
开发语言·ide·vscode·golang·编辑器
温酒往事·2 天前
无缝对接[系列2]:在VSCode中继续接入本地DeepSeek的完整指南
ide·vscode·编辑器
徐小夕@趣谈前端2 天前
tmagic-editor,腾讯开源的基于 Vue3 的页面可视化编辑器
编辑器
徐小夕@趣谈前端2 天前
支持列表拖拽嵌套,AI流式输出的多模态文档编辑器flowmix/docx: 全面升级
人工智能·编辑器