Questions tagged [default-settings]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
118 views

What defines default colors for highlight groups not present in a color scheme?

After updating to vim 9.1 yesterday, diff highlighting colors were broken for me. Comparing with an older vim (7.4) on a different machine, it seems that the cause was probably a change in the diff....
l4mpi's user avatar
  • 855
1 vote
1 answer
54 views

VIM "forgets" last edited line

I've noticed that VIM "forgets" last edited line after some time. Sometimes when I open a file that I haven't been editing since a few days (maybe 3 and more) and type '. in normal mode I'll ...
ka3ak's user avatar
  • 261
1 vote
1 answer
55 views

How to escape commas in au patterns and comma separated lists?

How do you specify a comma literal in the kinds of comma separated lists that are ubiquitous in vim configuration? The first example I can think of off the top of my head is in autocmds: au! BufRead,...
minseong's user avatar
  • 2,313
0 votes
0 answers
48 views

Creating a local vimrc for a large LaTeX project with selective plugins, settings, and mappings

This is related to my previous question that you can find here: I am currently working on a large project (a PhD thesis with multiple chapters, each consisting of around 30 pages) and have found that ...
Mafsi's user avatar
  • 225
0 votes
1 answer
45 views

Multiple tabstops to make tab seperated columns line up

I have a file with several columns separated by tabs, the first column needs a 20 tabstop, but the rest are much smaller. This will get me the 20, but "20,25,35,50, etc." fails. vim --cmd &...
Daniel Malcor's user avatar
2 votes
1 answer
28 views

Why does iskeyword contain colon for TeX files? And where is it set?

From iskeyword's doc I read that its default on Linux is @,48-57,_,192-255. However, when I open a *.tex file, echo &iskeyword gives @,48-57,_,192-255,:. Where in the startup of Vim is that : ...
Enlico's user avatar
  • 2,194
1 vote
1 answer
324 views

How can I restore the behavior where h and l stopped at the beginning and end of the line?

After quite some time of using Vim I wanted to switch to NeoVim and set it up with more IDE-like features. So I googled and took the first thing I found (LunarVim/nvim-basic-ide/), thinking I could ...
obvg's user avatar
  • 13
1 vote
0 answers
25 views

Revert back to full screen after using set columns=X

If I set columns=X, how can I get back to "normal"? Saving the original value might be one way to go, but if I resize the terminal between saving and reverting I'll be ending up with the ...
fbence's user avatar
  • 667
3 votes
2 answers
1k views

Where does neovim store its defaults? Where is the defaults.vim for neovim?

On regular vim, you can find the defaults in defaults.vim. These are sourced when there is no .vimrc, or when you include in your .vimrc the following, source $VIMRUNTIME/defaults.vim " Source ...
Evan Carroll's user avatar
  • 1,274
0 votes
1 answer
47 views

Meta-Model: Shrinking In Correct Direction

This questions sounds ridicolous, but is there any (mental?!) aid for my struggle when resizing windows? Since the earliest days of my vi/m usage, I have struggle shrinking windows in the correct ...
Tomes's user avatar
  • 88
0 votes
2 answers
6k views

How do I completely reset vim to its default settings?

A follow up to my other question here: Problem using gdb with vim over ssh I was messing around trying to get my issues over ssh fixed, and I don't know what I did but now vim doesn't show any colour ...
user13267's user avatar
  • 135
0 votes
2 answers
468 views

Is there any way to change the default startup text in vim?

When you first open vim there is a text that says "VIM - Vi IMproved version......" Is there a file or setting you can use to change this default text? I've looked on the internet and here ...
Levi_OP's user avatar
  • 103
0 votes
1 answer
294 views

Disable mapping of `Man`

I have this mapping in my ~/.config/nvim/mappings.vim (it's included with source from the init.vim file): noremap <S-k> 5gk vnoremap <S-k> 5gk I went through a part of the vim manuals and ...
TornaxO7's user avatar
  • 561
3 votes
1 answer
652 views

Are opening and closing double quotes expected to be of different color in a bash script?

I've just noticed, after years using Vim, that the two double quote characters opening and closing a string in a bash script have different colors, which I can verify by simply writing var="var&...
Enlico's user avatar
  • 2,194
14 votes
2 answers
10k 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: ...
filbranden's user avatar
  • 28.7k
1 vote
1 answer
378 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 ...
M Imam Pratama's user avatar
2 votes
1 answer
191 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 ...
Stephen Rasku's user avatar
3 votes
1 answer
879 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 ...
Scott Stensland's user avatar
1 vote
0 answers
44 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 &...
gfe's user avatar
  • 245
1 vote
1 answer
188 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 ...
fghsgh's user avatar
  • 11
1 vote
0 answers
74 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 ...
Dr Krishnakumar Gopalakrishnan's user avatar
2 votes
1 answer
1k 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 ...
Anadian's user avatar
  • 23
3 votes
1 answer
244 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 ...
gds's user avatar
  • 33
0 votes
1 answer
4k 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=...
Display name's user avatar
4 votes
1 answer
593 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 ...
Spiru's user avatar
  • 43
-1 votes
2 answers
3k 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" ...
Tyler Durden's user avatar
  • 2,091