Questions tagged [default-settings]
The default-settings tag has no usage guidance.
25
questions
1
vote
1
answer
45
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 ...
1
vote
1
answer
41
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,...
0
votes
0
answers
45
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 ...
0
votes
1
answer
33
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 &...
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 : ...
1
vote
1
answer
228
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 ...
0
votes
0
answers
19
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 ...
2
votes
2
answers
943
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 ...
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 ...
0
votes
2
answers
5k
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 ...
0
votes
2
answers
424
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 ...
0
votes
1
answer
246
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 ...
3
votes
1
answer
599
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&...
14
votes
2
answers
9k
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
1
answer
359
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
1
answer
185
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
1
answer
799
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
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 &...
1
vote
1
answer
183
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 ...
1
vote
0
answers
72
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 ...
2
votes
1
answer
912
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
1
answer
224
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
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=...
4
votes
1
answer
535
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
1
answer
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"
...