UTCS VIM - Vi IMproved

The University of Texas at Austin — Department of Computer Science

Spring 2026 Release · Vim 9.2
View on GitHub Download

What is UTCS Vim?

A customized build of Vim for UT Austin Computer Science students and faculty. Based on Vim 9.2 with memory bug fixes, built-in LaTeX support, and the Longhorn (Burnt Orange) default theme.

Longhorn Theme

The default colorscheme uses the official UT Austin Burnt Orange (#BF5700) palette. Status line, tab bar, search highlights, and cursor all use Burnt Orange accents on a dark background.

LaTeX Support

Compile and view LaTeX documents without leaving Vim. :TexCompile, :TexView, quickfix error navigation, and multi-file project support — all built in.

Memory Fixes

Five memory bugs squashed: free() vs vim_free() mismatch, use-after-free in type copying, NULL deref in realloc profiling, duplicate cleanup call, and integer overflow protection.

Quick Start

# Clone
git clone https://github.com/abdonmorales/vim.git
cd vim/src

# Build
make -j$(nproc)              # Linux
make -j$(sysctl -n hw.ncpu)  # macOS

# Try it
./vim                         # Longhorn theme + Spring 2026 intro
./vim test.tex                # LaTeX support (needs pdflatex)

# Install
sudo make install

What is Vim?

Vim is a greatly improved version of the good old UNIX editor Vi. Many new features have been added: multi-level undo, syntax highlighting, command line history, on-line help, spell checking, filename completion, block operations, script language, and more. There is also a Graphical User Interface (GUI) available.

Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS, and almost all flavours of UNIX.

LaTeX Compile & View

The UTCS LaTeX plugin is automatically loaded when editing .tex files. It provides compilation, PDF viewing, auxiliary file cleanup, and quickfix error navigation.

Commands

CommandShortcutDescription
:TexCompile<Leader>llCompile with pdflatex. Errors are parsed into the quickfix list.
:TexCompileFull<Leader>lfFull build: pdflatex → bibtex → pdflatex ×2. Needed for citations, cross-references, and TOC.
:TexView<Leader>lvOpen compiled PDF in system viewer (macOS: open, Linux: xdg-open, Windows: start).
:TexClean<Leader>lcRemove auxiliary files: .aux, .log, .toc, .bbl, .blg, .synctex.gz, etc.

Mappings

All mappings use <Leader>l as a prefix (default leader is backslash \). They use <Plug> so you can remap them:

nmap <buffer> <F5> <Plug>TexCompile
nmap <buffer> <F6> <Plug>TexView

Settings

Override these in your vimrc:

VariableDefaultDescription
g:tex_compiler"pdflatex"LaTeX compiler command. Use "xelatex" or "lualatex" for Unicode.
g:tex_compiler_flags"-interaction=nonstopmode -file-line-error -synctex=1"Flags passed to the compiler.
g:tex_bibtex"bibtex"Bibliography processor. Set to "biber" for biblatex.
g:tex_viewer"open" / "xdg-open"PDF viewer command. E.g., "zathura", "evince".
g:tex_clean_extensions(long list)File extensions removed by :TexClean.

Multi-File Projects

For projects with multiple .tex files, add a magic comment in the first 10 lines of each sub-file:

% !TEX root = main.tex
% !TEX root = ../thesis.tex

All compile and view commands will then operate on the root file.

Error Handling

When compilation fails, errors are loaded into the quickfix list. Navigate with:

CommandAction
:copenOpen the quickfix window
:cnextJump to the next error
:cprevJump to the previous error
:ccloseClose the quickfix window

Longhorn Theme

The default colorscheme for UTCS Vim, built on the official UT Austin brand palette. Burnt Orange is THE default — at every level: compiled-in GUI highlights, :colorscheme default, and the startup defaults.vim.

The original vanilla Vim colors are available as :colorscheme classic.

Color Palette

Burnt Orange
#BF5700
White
#FFFFFF
Charcoal
#333F48
Limestone
#D6D2C4
Dark Background
#1a1e24
Subtle Background
#252a31
Muted Orange
#87653a
Warm Orange
#d7875f
Green
#87af5f
Blue
#5f87af
Purple
#af87af
Teal
#5fafaf
Red
#d75f5f
Comment Grey
#5f6773

Compiled-in Highlight Groups

These GUI colors are baked into the binary — visible even with vim -u NONE:

GroupAppearance
StatusLineBurnt Orange bg, white bold text
StatusLineNCCharcoal bg, limestone text
TabLineSelBurnt Orange bg, white bold text
TabLineCharcoal bg, limestone text
ModeMsgBurnt Orange text (INSERT, VISUAL)
TitleBurnt Orange bold text
Search / IncSearchBurnt Orange bg, white text
CursorLineNrBurnt Orange bold text
DirectoryBurnt Orange text
PmenuCharcoal bg, limestone text
PmenuSelBurnt Orange bg, dark text
CursorBurnt Orange bg, dark text
VisualWarm brown selection
DiffAddGreen tint
DiffChangeBlue tint
DiffDeleteRed tint
MatchParenBurnt Orange bold text
LineNrMuted Burnt Orange

Usage

" Longhorn is the default. To restore after switching:
:colorscheme longhorn
" or equivalently:
:colorscheme default

" To switch to vanilla Vim colors:
:colorscheme classic

" For best terminal colors, enable true color:
:set termguicolors

Customization

" Override after loading:
colorscheme longhorn
hi StatusLine guibg=#333F48

" Change accent color globally:
hi StatusLine guifg=#1a1e24 guibg=#5fafaf gui=bold
hi TabLineSel guifg=#1a1e24 guibg=#5fafaf gui=bold

Memory Bug Fixes

The Spring 2026 release includes five memory-related bug fixes and improvements to the core Vim C source code.

diff.c: free() vs vim_free()

Memory allocated by Vim's alloc()/lalloc() was freed with raw free(), bypassing Vim's memory profiling and safety checks. Both calls in run_linematch_algorithm() changed to vim_free().

File: src/diff.c:2420,2424

userfunc.c: Use-After-Free

copy_function() shallow-copied type pointers (uf_arg_types, uf_ret_type, uf_va_type, uf_func_type) that pointed into the original function's uf_type_list. When the original was freed, these became dangling pointers. Fixed by deep-copying all types via copy_type() into the copy's own type list.

File: src/userfunc.c:6198-6228

alloc.c: mem_realloc() NULL Crash

When called with ptr == NULL (which realloc() treats as malloc()), mem_pre_free() would dereference before the pointer, causing undefined behavior. Added a NULL guard. Affects MEM_PROFILE builds.

File: src/alloc.c:314

alloc.c: Duplicate ResetRedobuff()

free_all_mem() called ResetRedobuff() twice in a row — a copy-paste bug. Removed the duplicate call.

File: src/alloc.c:512-513

alloc.c: Integer Overflow in ga_grow_inner()

The computation itemsize × (ga_len + n) could silently wrap around for very large growing arrays, allocating a too-small buffer and causing heap corruption. Added an overflow check that returns FAIL on wrap-around.

File: src/alloc.c:747

Installation

Build from Source

# Clone the repository
git clone https://github.com/abdonmorales/vim.git
cd vim/src

# Configure (optional — defaults are fine for most users)
./configure --with-features=huge --enable-multibyte

# Build
make -j$(nproc)              # Linux
make -j$(sysctl -n hw.ncpu)  # macOS

# Install system-wide
sudo make install

Verify

# Check version
vim --version | head -1
# Expected: VIM - Vi IMproved 9.2 (2026 Feb 14, compiled ...)

# See the intro screen
vim
# Expected: "UTCS VIM - Vi Improved 9.2" and "Spring 2026 Release"

# Check help
vim -c ":help tex-utcs"
vim -c ":help longhorn"

Platform-Specific Notes

PlatformReadme
Unix / LinuxREADMEdir/README_unix.txt
macOSREADMEdir/README_mac.txt
MS-WindowsREADMEdir/README_dos.txt
HaikuREADMEdir/README_haiku.txt
VMSREADMEdir/README_vms.txt

LaTeX Prerequisites

To use the LaTeX compile commands, you need a TeX distribution installed:

PlatformInstall Command
macOSbrew install --cask mactex
Ubuntu / Debiansudo apt install texlive-full
Fedorasudo dnf install texlive-scheme-full
Archsudo pacman -S texlive-most
WindowsMiKTeX or TeX Live

License

Vim is Charityware. You can use and copy it as much as you like, but you are encouraged to make a donation to help orphans in Uganda. See :help uganda inside Vim for details.

The license is GPL compatible. There are no restrictions on using or distributing an unmodified copy of Vim. For modified versions, a few restrictions apply. See runtime/doc/uganda.txt.