top of page

Install and Set up Vim for Linux Kernel Development

  • Writer: Zach Pfeffer
    Zach Pfeffer
  • Jan 4, 2019
  • 1 min read

Updated: May 14, 2023



This post lists the steps to install and setup Vim for Linux kernel development.


Steps


1. Type sudo apt-get install vim

2. Type vi ~/.vimrc

3. Copy :set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab cindent cc=80 | %retab | autocmd BufWritePre * %s/\s\+$//e

4. In vim type i

5. Paste the line you copied into the doc

6. Press ESC

7. Type :w ENTER

8. Press ESC

9. Press :q ENTER


Reference

Image is an amalgamation of images from [link] (Vim) and [link] (Tux)


Note

A post that covers fixing tabs is at [link].


© 2025 by Centennial Software Solutions LLC.

bottom of page