Inconsolata font in Vim. Ubuntu.

  • Context: MHB 
  • Thread starter Thread starter caffeinemachine
  • Start date Start date
  • Tags Tags
    Font Ubuntu
Click For Summary

Discussion Overview

The discussion revolves around the installation and usage of the Inconsolata font in the Vim text editor on Ubuntu. Participants share their experiences and seek guidance on configuring Vim to utilize this font, as well as addressing related issues such as color schemes and terminal settings.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses enthusiasm for using Vim but struggles with font installation and configuration.
  • Another suggests installing the Inconsolata font via the package manager using the command sudo apt-get install ttf-inconsolata.
  • A different participant provides an alternative method for manual installation by copying .ttf files to specific directories and updating the font cache.
  • After following the installation steps, a participant reports that the font did not change in Vim despite using the command :set guifont=inconsolata.
  • Several participants discuss how to change the color scheme in Vim, with suggestions to modify the vimrc file and use the :colorscheme command.
  • One participant mentions the use of the vim-latex package and questions whether it affects font and color settings.
  • Another participant shares a LaTeX setup involving Inconsolata and notes changes in package management that may affect font usage.
  • There are requests for snapshots of the font appearance and discussions about preferred color schemes, with some expressing dissatisfaction with the default options.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for configuring the font and color scheme in Vim. Multiple approaches are discussed, and some participants express confusion or dissatisfaction with the results.

Contextual Notes

Participants mention various methods for font installation and configuration, but there are unresolved issues regarding the effectiveness of these methods in achieving the desired appearance in Vim. The discussion also touches on dependencies related to terminal settings and package management.

Who May Find This Useful

This discussion may be useful for users of Vim on Ubuntu who are interested in customizing their text editor with specific fonts and color schemes, particularly those who are new to Linux and seek guidance on configuration.

caffeinemachine
Gold Member
MHB
Messages
799
Reaction score
15
Hello MHB,

I started 'using' vim editor in Ubuntu three days back. I think it is a great tool to have. However, since I am a newbie at a linux system, to get anything done I have to irritate my friends with a lot of questions, some of which they cannot answer on phone. So here's my latest problem.

I want to use this font on my Vim:
https://docs.google.com/file/d/0B77QF0wgZJZ7cDJVZTdzV1l2ZDg/edit

It's name is 'Inconsolata'. I googled "How to install a new font in Ubuntu" and "How to use a font in Vim" and similar searches. I could not understand the responses on Ubunutu forums. They were too terse for a newbie like me.

Can somebody tell me what steps can I follow to get this done?

Thanks.
 
Last edited:
Physics news on Phys.org
sudo apt-get install ttf-inconsolata
 
Installing the package is the preferred way. If you want to install the font manually, you can simply copy the .ttf files to the ~/.fonts/ directory (for a single user) or (a suitable subdirectory of) /usr/share/fonts/ (system-wide; requires root privileges). The system may require a font cache update to notice your new fonts. Either say something like "fc-cache -vf" or restart the computer.

Then I guess it is necessary to make Vim use this font...
 
I did what dwsmith said. I typed sudo apt-get install ttf-inconsolata in my terminal. Something happened.

Then I did what Makarov suggested. I wrote fc-cache -vf in my terminal and something happened again.

To use the font in Vim the web pages I looked at seem to suggest typing:

:set guifont=inconsolata

Nothing happened. The font is just as ugly as it was previously. What am not doing right?
 
UPDATE:

I got the font changed. yay!
But how do I get the color scheme which was there in the link in my first post? Here is the link again https://docs.google.com/file/d/0B77QF0wgZJZ7cDJVZTdzV1l2ZDg/edit

I am using a gnome terminal.
 
Last edited:
caffeinemachine said:
I got the font changed. yay!
But how do I get the color scheme which was there in the link in my first post?
Are you using the vim-latex package? Did you install it through the package manager or according to the instructions here? How did you change the font in Vim?

I have not worked with Vim, but it seems there is no separate GUI program; instead, it runs in the terminal. If so, then you only need to change the font in the Gnome terminal, which can be done in Edit | Profile Preferences | General. This should not affect syntax highlighting in Vim.
 
Evgeny.Makarov said:
Are you using the vim-latex package? Did you install it through the package manager or according to the instructions here? How did you change the font in Vim?

I have not worked with Vim, but it seems there is no separate GUI program; instead, it runs in the terminal. If so, then you only need to change the font in the Gnome terminal, which can be done in Edit | Profile Preferences | General. This should not affect syntax highlighting in Vim.
No, I am not using the vim-latex suite. And yes, I changed the font in vim just the way you described. But I am still working with an ugly colorscheme.
 
In your vimrc, add a line like colors <your color scheme> as the last line.

To bring up a list of installed themes, :colorscheme then hit space and then tab
 
dwsmith said:
In your vimrc, add a line like colors <your color scheme> as the last line.

To bring up a list of installed themes, :colorscheme then hit space and then tab
Now I know how to change the colorscheme too. :)

Do you know a good one? I have been using desert so far. It is really bad.
 
  • #10
caffeinemachine said:
Now I know how to change the colorscheme too. :)

Do you know a good one? I have been using desert so far. It is really bad.

You use the terminator terminal and change my scheme from there. I use emacs though. So I don't know any built themes but a bunch of people love wombat.
 
  • #11
Were you able to get inconsolata to work. I read that sometime within the last 3months I think MikTeX changed the package to:

Latex Code:

\usepackage{zi4}
I am not sure if this is the same on TeXLive, but if this was changed in ctan, it would affect TeXLive as well.

A font set up I really like is:

Latex Code:

\usepackage[utf8]{inputenx}% CTAN: Package inputenx
% Euler for math | Palatino for rm | Helvetica for ss | Courier for tt
\renewcommand{\rmdefault}{ppl}% rm
\linespread{1.05}% Palatino needs more leading
\usepackage[scaled]{helvet}% ss CTAN: Package helvet
\usepackage{courier}% tt CTAN: Package Courier
\usepackage{eulervm} % CTAN: Package eulervm
\normalfont%
\usepackage[T1]{fontenc}% CTAN: Package fontenc
\usepackage{textcomp}% CTAN: Package textcompSo Inconsolata was changed on ctan.
Here is from the documentation (http://ctan.mirrors.hoobly.com/fonts/inconsolata/README):

The TeX font metrics, virtual fonts and font definition files for Inconsolata, i.e., the other files in the archive Inconsolata.zip, may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2003/12/01 or later. Those files and LaTeX support file zi4.sty are
 
Last edited:
  • #12
dwsmith said:
Were you able to get inconsolata to work. I read that sometime within the last 3months I think MikTeX changed the package to:

Latex Code:

\usepackage{zi4}
I am not sure if this is the same on TeXLive, but if this was changed in ctan, it would affect TeXLive as well.

A font set up I really like is:

Latex Code:

\usepackage[utf8]{inputenx}% CTAN: Package inputenx
% Euler for math | Palatino for rm | Helvetica for ss | Courier for tt
\renewcommand{\rmdefault}{ppl}% rm
\linespread{1.05}% Palatino needs more leading
\usepackage[scaled]{helvet}% ss CTAN: Package helvet
\usepackage{courier}% tt CTAN: Package Courier
\usepackage{eulervm} % CTAN: Package eulervm
\normalfont%
\usepackage[T1]{fontenc}% CTAN: Package fontenc
\usepackage{textcomp}% CTAN: Package textcompSo Inconsolata was changed on ctan.
Here is from the documentation (http://ctan.mirrors.hoobly.com/fonts/inconsolata/README):

The TeX font metrics, virtual fonts and font definition files for Inconsolata, i.e., the other files in the archive Inconsolata.zip, may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2003/12/01 or later. Those files and LaTeX support file zi4.sty are
Can you please post a snapshot of the font you get using this?
 
  • #13
caffeinemachine said:
Can you please post a snapshot of the font you get using this?

With my setup I really like, look at my notes for Nonlinear PDEs or Mathematical Physics. I am almost positive I used it to write Orbital and Classical as well.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
6K
Replies
5
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
Replies
23
Views
7K
Replies
38
Views
5K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
6
Views
9K
  • · Replies 8 ·
Replies
8
Views
3K