Questions tagged [default-settings]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7
votes
2answers
546 views

Advice to add `set nocompatible` as first line of .vimrc

I recall (perhaps in the early 2000's) having set nocompatible as the first line of my vimrc and most Vim guides and tutorials recommending that practice. Some examples I could easily find online: ...
1
vote
1answer
35 views

How to forget specific file settings and treat it like a new file

Suppose I had tabstop set to 4 in ~/.vimrc. When I edit a file, I set the tabstop to 5 with :set tabstop=5. After that, I close vim and restarted the terminal. When I open the file again, the tabstop ...
2
votes
1answer
34 views

Saving setting to buffer

Is there a way to save the value of a setting to a buffer or a file? For example, when I type :set guifont It displays the setting I want to use but as soon as I start typing in the buffer it ...
2
votes
1answer
80 views

How to keep defaults yet make customization? [duplicate]

I have no vi customizations at all and really like the default behavior where on a search using / the cursor immediately jumps to the match without having to hit enter Problem is once I create file ...
1
vote
0answers
31 views

Meaning of `@` in `&isprint`

As far as I'm concerned "printable characters" are the set of characters that occupies a printing position on a display. You can print a subset of (not all) printable characters by executing :echo &...
1
vote
1answer
86 views

Vim bell limited to once per half a second

Since Vim 8, I've noticed that the bell can sound at most once per half a second. This annoys me. I have this solved by recompiling, but am still looking for a way to do it without. I've searched the ...
0
votes
0answers
36 views

Is there an `edefault` in the spirit of `gdefault` for setting the appropriate flags in vim's substitution commands?

To perform a buffer-wide substitution on all occurrences of foo (and not just the 1st one in a line), we can do %s/foo/bar/g The g flag may be omitted by setting this in the vimrc as set ...
1
vote
1answer
102 views

NeoVim: Single-Line Comments Also Format the Next Line [duplicate]

So, I started using NeoVim a little while ago and discovered a rather annoying quirk when using C++-style single-line comments // in source code of any language. Specifically, when you create a new ...
3
votes
1answer
39 views

Last line on screen not showing state

I'm going through the vimtutor, and in Lesson 2.1 I read NOTE: The letter d will appear on the last line of the screen as you type it. Vim is waiting for you to type w . On my ...
0
votes
1answer
1k views

Setting default gVim font via `vimrc`, conditional on the operating system

I can place the following code into my _vimrc file on Windows 7/10 and the font will default to 'Consolas - size 11' when I launch gVim. if has("gui_running") if has("gui_gtk2") set guifont=...
3
votes
1answer
216 views

Vim on Debian, configuration issues

I have been working with a stock vim configuration for a long time. I want to modify just a couple of settings. I don't want to lose the rest of the default configuration. If I create a new .vimrc I ...
0
votes
1answer
1k views

How to disable defaults.vim?

On my system vim has a "defaults.vim" file that is getting sourced. For example, if I do vim --version, I see the following: system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" ...