Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am working on Ubuntu and using vim to make C files. I want to make the entire text in the editor bold. How can I do that without installing any plugin? I am not looking to make specific words bold. I am using a black background. Colors in bold would make the editor look really good.

share|improve this question

migrated from stackoverflow.com Oct 18 '12 at 3:11

This question came from our site for professional and enthusiast programmers.

    
are you running vim in a terminal or a gui version? –  pb2q Oct 17 '12 at 16:31
    
I believe you should configure the terminal, not vim. Hence 1) asking what terminal do you use? 2) seconding the request to move the question to superuser. –  ZyX Oct 17 '12 at 20:05
    
@Zyx: I use the bash terminal –  Parth Shah Oct 18 '12 at 2:25
    
@ParthShah No, bash is the shell and not a terminal. “Terminal” here is a short of “terminal emulator”: GUI application you use. –  ZyX Oct 18 '12 at 3:06

5 Answers 5

For Gvim only: Change the font to bold using(Monospace in this example)

:set guifont=Monospace\ Bold\ 11 

Put it in your .gvimrc if you want to do it every time.

share|improve this answer
    
Nothing changes. Can you plz tell me what can be the reason? –  Parth Shah Oct 18 '12 at 2:29
up vote 1 down vote accepted

The correct answer was given to me by one of the users @akira in one of the comments. I am just sharing it.. You can change the font only in GVim. Vim uses the fonts that you are using in the shell. So if you happen to be reading this and have the same requirement the best thing would be to change the settings of your shell such that it displays fonts in bold. I believe this is the best method.

share|improve this answer

Adjust your terminal emulator's settings to make your fonts bold.

On a tty console, run:

$ sudo dpkg-reconfigure console-setup

and then adjust settings from there.

Note: You cannot do this in xterm.

share|improve this answer

You can use the :match command to apply a highlight to a given regular expression. For gVim:

:highlight MyGroup gui=bold
:match MyGroup /./

For terminal:

:highlight MyGroup cterm=bold
:match MyGroup /./
share|improve this answer

You can make bold some elements of C file. For example

:highlight Comment gui=bold

will make comments in C files bold for GVim. For console Vim it will be

:highlight Comment cterm=bold

Unfortunately, I do not know other way to make all text bold except for making it bold for each highlight group (cComment, cNumber, etc.).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.