Typora 更改编辑器、源代码模式的宽度、块代码的颜色

1、设置 编辑器的源代码模式 的宽度

Typora 安装目录,默认为 C:\Program Files\Typora\resources\app\style\ 下,找到 base-control.css 文件 ,打开后搜索 .CodeMirror-lines ,找到 max-width ,将其值改为 1200 ,如图所示:

注意: #typora-source 下的 .CodeMirror-lines 中的 max-width , 就这一处。

在这里插入图片描述

效果

重启 Typora 后,进入 源代码模式
在这里插入图片描述

测试一下,看到 灰底部分 的宽度确实是改成 1200px ,比之前宽了好多 。

2、自定义样式

编辑器 的配置文件 并不在 Typora 的安装目录, 根据下面图所示( 文件 --> 编好设置 --> 外观 --> 打开主题文件夹):

在这里插入图片描述

即是在 C:\Users\Administrator\AppData\Roaming\Typora\themes 目录下,
在这里插入图片描述

如上图所示,主题文件有 github.css、newsprint.css、night.css、pixyll.css、whitey.css 共 5 种 。

选择当前你所使用主题的 css文件。我使用的是 github 主题。

2.1、设置 编辑器(也是主题) 的宽度

则打开 github.css ,搜索 #write ,修改其属性 max-width 的值改为你想要设置的宽度( 比如我设置的是 1060px )。所图所示:

在这里插入图片描述

效果如下:
在这里插入图片描述

2.2、修改块代码的颜色,不是代码块的

打开 github.css,在 230行 的code标签中,添加 color: red; ,所下图所示:

在这里插入图片描述

修改后的效果:

重启编辑器, 查看效果,如下图所示:
在这里插入图片描述

2.3、引用样式 blockquote

blockquote {
    border-left: 4px solid #ccac8d;
    padding: 0 15px;
    color: #777777;
    background-color: #fafafa;
    padding-bottom: 10px;
    padding-top: 10px;
}

在这里插入图片描述

效果如下:
在这里插入图片描述

2.4 标题左侧,显示第几级标题

在这里插入图片描述

github.css 中,注释 掉如下代码:

在这里插入图片描述

github.css 最后下面,添加如下代码:


#write>h1.md-focus:before,#write>h2.md-focus:before,#write>h3.md-focus:before,#write>h4.md-focus:before,#write>h5.md-focus:before,#write>h6.md-focus:before {
    left: -1.5625rem;
    /* top:50%;*/
	top: 0.8825rem;
}

#write>h1::before, h2::before, h3::before, h4::before, h5::before, h6::before
, h1.md-focus::before, h2.md-focus::before, h3.md-focus::before, h4.md-focus::before, h5.md-focus::before, h6.md-focus::before {
    position: absolute;
    left: -1.5625rem;
    /* top: 50%; */
	top: 0.8825rem;
    transform: translateY(-50%);
    color: #D0D0D0;
    font-size: 0.8rem;
    font-weight: bold;
    font-variant: 'small-caps';
    line-height: 2;
    padding: 0;
    border: 0;
}

#write h1:before {
    content: 'H1';
}

#write h2:before {
    content: 'H2';
}

#write h3:before {
    content: 'H3';
}

#write h4:before {
    content: 'H4';
}

#write h5:before {
    content: 'H5';
}

#write h6:before {
    content: 'H6';
}

3、关闭拼写检查

方法1,在偏好设置中关闭

在这里插入图片描述

方法2,快捷关闭

打开 Typora 初始状态:
在这里插入图片描述

当鼠标放到状态栏上时,出现的 A ,提示 拼写检查
在这里插入图片描述

点击 拼写检查 ,选择 不使用拼写检查 ,即关闭了 拼写检查
在这里插入图片描述

  • 32
    点赞
  • 73
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值