c++ - 用于 C/C++ 编程的好的 gvim guifont 是什么

标签 c++ c vim

<分区>

我正在尝试为 gvim 寻找最佳字体以在 C/C++ 中编程。

我目前在 ~/.gvimrc 中有以下内容,但我不喜欢它:

if has("gui_gtk2")
    set guifont=MiscFixed\ 11
else
    set guifont=-misc-fixed-medium-r-normal--10-100-75-75-c-60-iso8859-1
endif
set columns=80 lines=50
set guioptions-=T "hide toolbar

"Try to load happy hacking teal colour scheme
"I copy this to ~/.vim/colors/hhteal.vim
silent! colorscheme hhteal
if exists("colors_name") == 0
    "Otherwise modify the defaults appropriately

    "background set to dark in .vimrc
    "So pick appropriate defaults.
    hi Normal     guifg=gray guibg=black
    hi Visual     gui=none guifg=black guibg=yellow

    "The following removes bold from all highlighting
    "as this is usually rendered badly for me. Note this
    "is not done in .vimrc because bold usually makes
    "the colour brighter on terminals and most terminals
    "allow one to keep the new colour while turning off
    "the actual bolding.

    " Steve Hall wrote this function for me on vim@vim.org
    " See :help attr-list for possible attrs to pass
    function! Highlight_remove_attr(attr)
        " save selection registers
        new
        silent! put

        " get current highlight configuration
        redir @x
        silent! highlight
        redir END

最佳答案

您可以使用 :set guifont=* 调出字体选择器对话框。选择字体后,使用 :echo &guifont 查看要放入 .gvimrc 的内容。 (记得 \-转义空格)

就我个人而言,我喜欢 Inconsolata。来 self 的 .gvimrc:

set guifont=Inconsolata\ 13

关于c++ - 用于 C/C++ 编程的好的 gvim guifont 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1539861/

相关文章:

c++ - scoped_lock 如何避免发出 "unused variable"警告?

c++ - 假栈比真栈快吗

c++ - 为什么 is_swappable 和 is_nothrow_swappable 不包含在 C++11 中?

C程序在友好数算法中返回-1073741819

vim - 如何让 Vim 在使用 gf 时显示相同基本名称的替代文件路径列表?

python - 在 python 文件中显示我当前的语义位置

c++ - 在 C++ 中,使用模板根据状态更改函数调用的行为

c - 启用stm32f103c8t6 Blue Pill中的输出端口

c - 将结构体中的数组分配给带有数组的新结构体

vim - 在一行中写入与上一行长度一样多的字符