首页 > 其他分享 >浅谈gedit配置

浅谈gedit配置

时间:2022-10-10 17:45:00浏览次数:99  
标签:target ++ text 配置 gedit vis QUE id 浅谈

\(\text{gedit}\) 是 \(\text{GNOME}\) 桌面的小型和轻量文本编辑器

因为之前看学长博客感觉燕大的电脑似乎比较[数据删除],于是去问了 \(\text{CDsidi}\) 大佬 \(\text{vim}\) 和 \(\text{gedit}\) 咋用,然后我就从 \(\text{vscode}\) 转 \(\text{gedit}\) 了。刚开始想用 \(\text{vim}\),然后发现切换模式很麻烦还有离谱快捷键我直接放弃 \(\text{vim}\)。。。

所以就用了 \(\text{gedit}\)

刚开始用 \(\text{gedit}\) 不好用,因为他的 Home 键和 \(\text{vscode}\) 不大一样,是真的第一次按就调到最前面,而且没有自动补全,但是时间长了就习惯了,打字速度也就回升了,而且真的挺好用的。

\(基础配置\)

image

\(首选项配置\)

看右上角那三个横杠,点开它,找到首选项

image

点开

image

一个一个地说

\(『查看』栏\)

  • 右边距线

显示右边距线这个我不知道有啥用,视觉效果上感觉就是右边加了个线和阴影,选不选都行,我觉得有点别扭所以没选

  • 网格图案

如果你喜欢浅色主题的话可以把显示网格图案给整上,有种网格本的感觉挺好看的

image

深色主题下。。。反正我这一版选上的话就长这样:

image

比较接地府(

  • 自动折行

我不喜欢gedit的自动折行,因为他折行的时候会加上一个 - (就跟英语单词没写完换行写的时候一样),虽然不是真的加上了,但是比较容易看错(

  • 高亮

高亮就不用说了

\(『编辑器』栏\)

image

  • 制表符宽度

正常的那种就是宽度为 \(4\),他默认是 \(8\) 改过来就行了

$\text{Code}$——“正常的那种”
inline char BFS(){
	memset(vis, 0, sizeof(vis));
	L = 0, R = -1; q[++ R] = (QUE){stx, sty}; vis[id(stx, sty)] = true;
	
	int x, y;
	while (L <= R){
		x = q[L].x, y = q[L].y; L ++;
		if (x == edx and y == edy)
			return true;
		if (x > 1 and s[x-1][y] == '.' and vis[id(x-1, y)] == false)
			q[++ R] = (QUE){x-1, y}, vis[id(x-1, y)] = true;
		if (x < n and s[x+1][y] == '.' and vis[id(x+1, y)] == false)
			q[++ R] = (QUE){x+1, y}, vis[id(x+1, y)] = true;
		if (y > 1 and s[x][y-1] == '.' and vis[id(x, y-1)] == false)
			q[++ R] = (QUE){x, y-1}, vis[id(x, y-1)] = true;
		if (y < m and s[x][y+1] == '.' and vis[id(x, y+1)] == false)
			q[++ R] = (QUE){x, y+1}, vis[id(x, y+1)] = true;
		if (target[id(x, y)].x != 0 and target[id(x, y)].y != 0 and vis[id(target[id(x, y)].x, target[id(x, y)].y)] == false and s[target[id(x, y)].x][target[id(x, y)].y] == '.')// 传送门
			q[++ R] = (QUE){target[id(x, y)].x, target[id(x, y)].y}, vis[id(target[id(x, y)].x, target[id(x, y)].y)] = true;
	}
	
	return false;
}

如果你喜欢那种很挤的风格那你可以设宽度为 \(2\)

$\text{Code}$——“那种很挤的风格”
inline char BFS(){
  memset(vis, 0, sizeof(vis));
  L = 0, R = -1; q[++ R] = (QUE){stx, sty}; vis[id(stx, sty)] = true;
  
  int x, y;
  while (L <= R){
    x = q[L].x, y = q[L].y; L ++;
    if (x == edx and y == edy)
      return true;
    if (x > 1 and s[x-1][y] == '.' and vis[id(x-1, y)] == false)
      q[++ R] = (QUE){x-1, y}, vis[id(x-1, y)] = true;
    if (x < n and s[x+1][y] == '.' and vis[id(x+1, y)] == false)
      q[++ R] = (QUE){x+1, y}, vis[id(x+1, y)] = true;
    if (y > 1 and s[x][y-1] == '.' and vis[id(x, y-1)] == false)
      q[++ R] = (QUE){x, y-1}, vis[id(x, y-1)] = true;
    if (y < m and s[x][y+1] == '.' and vis[id(x, y+1)] == false)
      q[++ R] = (QUE){x, y+1}, vis[id(x, y+1)] = true;
    if (target[id(x, y)].x != 0 and target[id(x, y)].y != 0 and vis[id(target[id(x, y)].x, target[id(x, y)].y)] == false and s[target[id(x, y)].x][target[id(x, y)].y] == '.')// 传送门
      q[++ R] = (QUE){target[id(x, y)].x, target[id(x, y)].y}, vis[id(target[id(x, y)].x, target[id(x, y)].y)] = true;
  }
  
  return false;
}

嗯就是差不多这意思了

  • 自动缩进

具体而言就是说你行末回车建立一个新行的时候,如果你不开的话那真的就是一个新行啥都没有,开了的话就是他已经给你塞好了一些 Tab 了,我的评价是开着比较舒服

  • 在保存前创建备份文件

不知道这是啥

  • 自动保存

其实吧,养成经常 Ctrl+S 的习惯就好了,因为他这个的自动保存比较生草,真的就是停止你现在的操作然后给你保存一下,就比如我用搜狗输入法打字的时候,如果他正好保存了,那我搜狗输入法界面(就那个打字的小框框)的字就给清空了((

当然如果你能忍得住这玩意过一会打断你一下的话那你可以开

\(『字体和颜色』栏\)

image

  • 字体

我比较喜欢机房电脑默认设置的这个字体,机房默认字体是 Monospace Regular,我比较喜欢给他加粗一下换成 Monospace Bold,在哪里换的话就点image右边这个玩意,然后就能看到一群字体了,那个 Monospace Bold 就在 Monospace Regular 的下面:

image

  • 配色方案

你愿意选哪个选哪个(

我用的是深色系的,自己创建了一个 .xml 文件然后新添了一个配色方案,当然你研究研究你自己配一个也行

.xml 文件是从学长那里贺的,然后在这里找到了相同的配色方案,可能学长那个也是贺的?

但是有一个问题,就是这个主题他的注释颜色太深了,都快跟背景混在一块了,然后我把注释那一块改了一下,现在看着清楚多了,我把我改了之后的 .xml 给扔到这里 \(↓\)

Code
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (C) 2011 Craig Russell
    Author: Craig Russell <[email protected]>
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.
    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
-->
<style-scheme id="ubistive" _name="Ubistive" version="1.0">
    <author>tmz</author>
    <_description>qtmz</_description>

    <!-- Solarized Palette -->
    <color name="base03"  value="#000000"/>
    <color name="base02"  value="#041323"/>
    <color name="base01"  value="#233445"/>
    <color name="base00"  value="#456676"/>
    <color name="base0"   value="#839496"/>
    <color name="base1"   value="#A1A164"/>
    <color name="base2"   value="#EEE8D5"/>
    <color name="base3"   value="#FDF6E3"/>
    <color name="yellow"  value="#B58900"/>
    <color name="orange"  value="#CB4B16"/>
    <color name="red"     value="#DC322F"/>
    <color name="magenta" value="#D38662"/>
    <color name="violet"  value="#AC71C4"/>
    <color name="blue"    value="#268BD2"/>
    <color name="cyan"    value="#2AA198"/>
    <color name="green"   value="#A5AF00"/>

    <!-- Global Settings -->
    <style name="text"                        foreground="base1" background="base03"/>
    <style name="selection"                   foreground="base03" background="base00"/>
    <style name="cursor"                      foreground="base1"/>
    <style name="current-line"                background="base02"/>
    <style name="line-numbers"                foreground="base01" background="base02"/>

  
    <!-- Bracket Matching -->
    <style name="bracket-match"               foreground="base03" background="base01"/>
    <style name="bracket-mismatch"            foreground="red" background="base01"/>

    <!-- Search Matching -->
    <style name="search-match"                foreground="base03" background="yellow"/>  

    <!-- Comments -->
    <style name="def:comment"                 foreground="base0"/>
    <style name="def:shebang"                 foreground="base01" bold="true"/>
    <style name="def:doc-comment-element"     italic="true"/>

    <!-- Constants -->
    <style name="def:constant"                foreground="cyan"/>
    <style name="def:special-char"            foreground="green"/>

    <!-- Identifiers -->
    <style name="def:identifier"              foreground="blue"/>

    <!-- Statements -->
    <style name="def:statement"               foreground="orange"/>

    <!-- Types -->
    <style name="def:type"                    foreground="yellow"/>

    <!-- Operators -->
    <style name="def:operator"                foreground="green"/>
    <style name="def:bracket"                foreground="red"/>
    
    <!-- Others -->
    <style name="def:preprocessor"            foreground="violet"/>
    <style name="def:error"                   foreground="red" bold="true"/>
    <style name="def:note"                    foreground="magenta" bold="true"/>
    <style name="def:underlined"              italic="true" underline="true"/>

</style-scheme>

然后说一下怎么引入 .xml 文件作为配色方案:

首先你得先把这个 .xml 文件给建出来,复制上边的代码然后改一下后缀名随便给扔到哪个地方(记住扔到哪了),文件名随便取,后缀是 .xml 就行

然后点这个界面的左下角那个 +

image

再根据你刚才把那个 .xml文件给扔到哪了,选中它然后点右上角 添加方案

image

最后在配色方案那个界面选上添加的主题就行了 \(↓\)

image

\(『插件』栏\)

image

我这里是除了 python控制台 之外都选上了(因为我是学 C++ 的((

好了首选项说完了

\(管理片段配置\)

image

就那个 『管理片段』,这玩意主要是添加一些快捷键或者辅助你写代码的

image

首先左下角 + 号新建好吧

然后我首先发现 Ctrl + / 不能注释了,而是全选,哭哭

然后就自己写一个

分析他自带的那些得出了写法

具体而言,我这个写法只能是加注释,不能删注释,不知道有更高级的不((

Code
// $0

别的你研究研究他的语法自己加也行

然后还有一个功能就是他的 Tab 触发器,先看我改写的他这个 for循环

image

具体而言就是我写代码的时候写了一个 for,然后按一下 Tab 键就会蹦出来 for (re i = 1 ; i <= n; ++ i),然后那个 ${1:n} 是干啥用滴捏,就是说这玩意蹦出来之后我默认是选中那个 n 的,我可以直接改变循环终止位置,然后那个 $0 就是我改完之后光标直接调到那个地方。

Code
for (re i = 1 ; i <= ${1:n}; ++ i)$0

侧边栏

众所周知 \(\text{vscode}\) 有个侧边栏供你快速打开文件,\(\text{gedit}\) 也有,按 F9 开启

image

他默认选的是文档也就是你当前都打开了啥,然后把文档改成文件浏览器就行了 \(↓\)

image

image

别骂了别骂了那个Creaters文件夹不是拼写错误,我就是想取那个名(


然后如果你要学 \(\text{gedit}\) 的快捷键的话就在这里 \(↓\),都较为阳间

image


\[ \Huge \text{THE END} \]

有啥要补充的欢迎留言qwq

标签:target,++,text,配置,gedit,vis,QUE,id,浅谈
From: https://www.cnblogs.com/charphi/p/16776088.html

相关文章

  • 华为交换机GVRP基础配置
    GVRP基础配置intG0/0/1portlink-typetrunk配置接口类型为trunkporttrunkallow-passvlanall允许所有VLAN通过inte0/0/1portlink-typeaccess配置接口类型......
  • 华为设备配置telnet远程登陆命令
    user-interfacevty04进入0~4前五个的VTY用户界面进行整体配置authentication-modepassword设置验证方式为密码userprivilegelevel3设置用户登陆级别aaa进入a......
  • 华为设备配置Stelnet命令
    配置SSHserver:rsalocal-key-paircreate生成本地RSA主机密钥对displayrsalocal-key-pairpublic查看本地密钥对中的公钥信息user-interfacevty04进入VTY用户视......
  • SpringBoot配置文件的优先级
    配置文件优先级(1)命令行参数;(2)java:comp/env的JNDI属性(当前J2EE应用的环境);(3)JAVA系统的环境属性;(4)操作系统的环境变量;(5)JAR包外部的application-xxx.properties或applica......
  • 【CUDA7.5】MATLAB中配置Win7+Matlab R2015b+CUDA7.5+vs2013配置方法
    1.我的版本组合:Win7+MatlabR2015b+CUDA7.5+vs2013CUDA7.5下载地址为:​​http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_wind......
  • containerd推送+kaniko build配置简述
    前置条件设置清华yum源https://mirrors.tuna.tsinghua.edu.cn/help/centos/安装一些工具yum-yinstallwgetjqpsmiscvimnet-toolsnfs-utilstelnetyum-utilsdevice......
  • 一、读取配置文件low代码-16
    1、安装第三方扩展包MicrosoftWindows[版本10.0.19044.2006](c)MicrosoftCorporation。保留所有权利。C:\Users\jieqiong>pipinstallConfigparserCollecting......
  • 【Gradle】Gradle配置全局阿里云镜像仓库
    一、参考资料Gradle配置阿里云仓库_梁海江的博客​​Gradle的配置操作以及配置阿里云镜像和整合本地Maven仓库-简书​​​​MavenPublishPlugin​​ ......
  • linux ssh 修改配置
    文件配置位置/etc/ssh/sshd_config 1.修改端口号改为不常用端口号如8822等#Port22 2.修改连接时长一般需要改为600-900之间数值#ClientAliveInterval 0......
  • 记录一次修改网卡配置,导致的docker内服务无法访问
    机器上的docker内部署的服务无法访问,起初以为是防火墙,一查并没有开,然后也顾不上找问题了,先处理吧,就试着把docker服务重启下,然后就没有然后了,一切正常了,找找原因吧。从资料......