Questions tagged [options]

For questions about runtime settings that modify the behavior of the editor. When applicable, tag the version of the editor.

Options are settings that influence the behavior of the editor and that can be set at runtime. Options can have string, numeric or boolean values. In Vim, some options can have different values in different buffers or windows.

This tag is about ex/vi edit options. For command line options when starting vi, see .

Basic usage

  • Change the value of an option: :set optionname=value
  • Set a boolean option to true: :set optionname
  • Set a boolean option to false: :set nooptionname
  • See the current value of an option: :set optionname?

References

109 questions
42
votes
3 answers

When to use the after/ directory?

I understand it's the place to put things that should have the final say and not be overridden by another source, but I'm unclear on how to decide when to put something in, say, ~/.vim/after/ftplugin/ rather than ~/.vim/ftplugin/. Do people…
ivan
  • 1,450
  • 1
  • 11
  • 16
11
votes
2 answers

How to list the available options of a plugin?

I recently found out that YouCompleteMe has an g:ycm_autoclose_preview_window_after_insertion option that automatically hides the documentation preview window after exiting insert mode, and I also recently started out using vim, so this was the…
Iulian Onofrei
  • 235
  • 4
  • 9
9
votes
3 answers

Is there a way to set an option to the value of another option?

For example, I'd like to set set tabstop=4 set shiftwidth=4 Is there a way to do something like set tabstop=4 set shiftwidth=tabstop so I can set both values by only changing a single number?
Chad Paradis
  • 517
  • 3
  • 7
7
votes
0 answers

What is the default "effective" titlestring?

Is the effective default value for titlestring documented somewhere? By effective, I mean the one that displays $(basename) ($(dirname)) (m of n) - GVIM1 or ... ((m) of n), even though titlestring is "actually" empty (so I guess it's some…
antony
  • 171
  • 2
4
votes
2 answers

Change 'lastline' display character (@@@)

You can set display to lastline to see "@@@" at the end of the last line when it doesn't fit the screen. I'd prefer to use a different character for that purpose, such as ... or ---. Is there a way to change the character used?
Luiz Martins
  • 457
  • 2
  • 9
4
votes
2 answers

Change the looks of the character limit ruler

I wonder if there is a way to have a ruler displayed between the 80th and the 81th character in vim. I know that one can highlight the 81th column, but that actually looks as ugly as something from the DOS era. Is there a way to display a pretty…
Adam Hunyadi
  • 151
  • 3
3
votes
1 answer

showcmd on first line instead of last line

From the help file for showcmd: Show (partial) command in the last line of the screen Is it possible to have the commands displayed on the first line instead? I can't find anything in the help or on the web on this subject.
notAlex
  • 131
  • 1
2
votes
1 answer

Freeze after File No Longer Available Message

When I go to a buffer where the file was deleted Vim shows: E211: File "foo" no longer available Vim freezes for about a second before it resumes. Where can I change/disable this delay or handle it in another way?
laktak
  • 2,933
  • 13
  • 27
1
vote
0 answers

All of my Vim text is underlined

I have configured Vim and then noticed that all of my text is underlined for some reason. I am running WSL with the Hyper terminal and I also configured Vim using the Ultimate Vim Configuration. Is there a setting to turn off all of the underlined…
user30800
  • 11
  • 1
0
votes
2 answers

Prevent saving buffer with new name

I am developing a command line application that uses VIM to edit an existing file - think visudo or crontab -e When I launch VIM, I'm passing it the path of an existing file. I want the user to be able to modify and save the file (e.g. :w or ZZ) but…
LiamF
  • 185
  • 7
0
votes
1 answer

When I view local options (i.e. :setlocal) - what do the "odd" prefixes (i.e. '--') mean?

I'm working with CentOS 7, and Vim 7.4, :setl --- Local option values --- autoindent define= include= path= softtabstop=4 --autoread errorformat= keywordprg= readonly …
CrashNeb
  • 203
  • 1
  • 6