粗体字 - gvim
Bold text - gvim
如何在gvim上创建Monaco大小10的字体?
: set guifont = Courier \ 14.
如何让这个字体加粗?
摘自VimWikia,可以传参设置权重。在这种情况下,权重将为 50,这是默认值。
set guifont=Courier\ New/11/-1/5/50/0/0/0/1/0
参数顺序如下:
font family (in this example, "Courier New")
point size (default = 10)
pixel size (-1 = default)
style hint (what to do if requested family can't be found; 5 = AnyStyle = default)
weight (50 = normal, 25 = light, 63 = semibold, 75 = bold, 87 = black)
italic (0 = no)
underline (0 = no)
strikeout (0 = no)
fixedPitch (1 = yes)
raw (0 = no)
在 gVim 上(不是终端 Vim)你可以做 :set guifont=*
.
它带来了一个字体选择对话框,您可以在其中选择所需的字体系列、样式和大小。之后 :set guifont?
给你一个字符串,你可以在任何 vimscript 文件中使用它,比如 .gvimrc
(用反斜杠转义空格 \
)。
在我的 Ubuntu 框中,如果我选择 Monaco Bold :set guifont?
输出 guifont=Monaco Bold
所以输入 :set guifont=Monaco\ Bold
给我粗体。
如何在gvim上创建Monaco大小10的字体?
: set guifont = Courier \ 14.
如何让这个字体加粗?
摘自VimWikia,可以传参设置权重。在这种情况下,权重将为 50,这是默认值。
set guifont=Courier\ New/11/-1/5/50/0/0/0/1/0
参数顺序如下:
font family (in this example, "Courier New")
point size (default = 10)
pixel size (-1 = default)
style hint (what to do if requested family can't be found; 5 = AnyStyle = default)
weight (50 = normal, 25 = light, 63 = semibold, 75 = bold, 87 = black)
italic (0 = no)
underline (0 = no)
strikeout (0 = no)
fixedPitch (1 = yes)
raw (0 = no)
在 gVim 上(不是终端 Vim)你可以做 :set guifont=*
.
它带来了一个字体选择对话框,您可以在其中选择所需的字体系列、样式和大小。之后 :set guifont?
给你一个字符串,你可以在任何 vimscript 文件中使用它,比如 .gvimrc
(用反斜杠转义空格 \
)。
在我的 Ubuntu 框中,如果我选择 Monaco Bold :set guifont?
输出 guifont=Monaco Bold
所以输入 :set guifont=Monaco\ Bold
给我粗体。