elscreen标签背景颜色
使用
emacs过程中,配合evil使用,按照tab的划分,将编辑、浏览、leetcode等任务划分到不同的tab便于切换及管理。美中不足的是,模拟标签的elscreen默认将其他标签的颜色设置成:background blue :foreground black的配色,每次切换任务时,都需要重复确认需要跳转到哪个标签,就比较麻烦了。查找了一下重置face-attribute的方法,备注下。
在初始文件的最后添加:
;; 选中标签设置为绿底黑字,其他标签为黄底黑字
(set-face-attribute 'elscreen-tab-other-screen-face nil
:background "yellow" :foreground "black")
(set-face-attribute 'elscreen-tab-current-screen-face nil
:background "green" :foreground "black")
Mac使用备注
最近开始使用Mac了。在使用过程中,发现了一些
Mac OS和Centos体验上不同的地方。在这里做一下备注。
部分Linux指令缺失
Mac OS并没有实现所有的Linux下的指令,如realpath这里就需要单独安装一些扩展包了:
brew install coreutils
find匹配文件名
目录内容:
text text.bak
希望从中找到text.bak。使用find实现。
sed使用备注
sed功能介绍
先看下官方的介绍
Sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline).
While in some ways similar to an editor which permits scripted edits (such as ed), sed works by making only one pass over the input(s), and
is consequently more efficient. But it is sed’s ability to filter text in a pipeline which particularly distinguishes it from other types of
editors.
大概的意思,是面向流的文本编辑工具。一般用来对文件中的文本进行替换等操作。
以下备注一些常用的操作方式了。
c++插件管理--pluma<实践>
最近研究了一下pluma的使用。发现官网上的简单示例对于刚入门的人来说还是麻烦了些(而且还有语法错误)。
下面重新整理了一个例子,作为备注。
python调试方法(其一)
<一> 这里记录一些python调试的方法:
# coding=UTF-8
''' python debug method 1
use print function to get output informatino
'''
DEBUG = True
def _debug_(*args, **kwds):
''' depends on DEBUG value, print some function '''
global DEBUG
if DEBUG:
print(args, kwds)
if __name__ == "__main__":
_debug_("this is a test")
最常见的调试方法了。print可以依据需求调整为其他的方式(logging输出日志或者直接输出到文件中均可)。