Vim (text editor): Difference between revisions

From David's Wiki
Created page with "Vim, the text editor notorious for having a huge learning curve. Many people get stuck in this editor."
 
No edit summary
 
Line 1: Line 1:
Vim, the text editor notorious for having a huge learning curve.
Vim, the text editor notorious for having a huge learning curve.
Many people get stuck in this editor.
Many people get stuck in this editor.
==Settings==
You can set things in your <code>~/.vimrc</code>
===Indent size===
See [https://stackoverflow.com/questions/17916154/vim-tab-spacing-after-enter-new-line https://stackoverflow.com/questions/17916154/vim-tab-spacing-after-enter-new-line]
<pre>
set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
</pre>
* <code>tabstop</code> controls the tab size
* <code>shiftwidth</code> controls the spaces when it autoindents

Latest revision as of 01:07, 2 August 2021

Vim, the text editor notorious for having a huge learning curve. Many people get stuck in this editor.

Settings

You can set things in your ~/.vimrc

Indent size

See https://stackoverflow.com/questions/17916154/vim-tab-spacing-after-enter-new-line

set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
  • tabstop controls the tab size
  • shiftwidth controls the spaces when it autoindents