Customizing Vim

Vim is a vi-style terminal text editor, that extends vi with additional features including syntax highlighting, native scripting (using vimscript), and more.

The QNX Developer Desktop comes with a basic Vim configuration located in ~/.config/vim/vimrc. The fully annotated file is as follows:

" Import basic defaults. View full list of settings by opening the specified file.
source /usr/share/vim/vim91/defaults.vim
 
" Turn on custom indent configuration
filetype plugin indent on
 
" Set tab length to 4 spaces
set tabstop=4
set shiftwidth=4
 
" Expand tabs to 4 spaces
set expandtab

Vim searches for a user-specified configuration entry point in ~/.vimrc, ~/.vim/vimrc, and ~/.config/vim/vimrc. You can find this list by running the command vim --version.

Vim resources

Page updated: