Wayne Blaszczyk wrote:
On Fri, 2018-02-02 at 07:35 +1100, Wayne Blaszczyk wrote:
On Tue, 2018-01-30 at 22:39 +0100, Pierre Labastie wrote:
On 30/01/2018 21:43, Wayne Blaszczyk wrote:
On Tue, 2018-01-30 at 10:48 -0600, Bruce Dubbs wrote:
Wayne Blaszczyk wrote:
Hi,
Can I propose adding the following line to /etc/vimrc:
let skip_defaults_vim=1
This fixes the following issue:
Creating an empty ~/.vimrc prevents vim from overriding settings in /etc/vimrc
by using /usr/share/vim/vim80/defaults.vim.
More info can be found here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864074
Interesting. I am thinking that there may be initialization in
/usr/share/vim/vim80/defaults.vim that is useful, but the /etc/vimrc
should be able to supersede it.
What do you think about adding to the start of /etc/vimrc:
source $VIMRUNTIME/defaults.vim
let skip_defaults_vim=1
" rest of /etc/vimrc
-- Bruce
That looks reasonable although 'yet to be tested'.
I'll put it into my config and see if there are any
detrimental effects.
Are you sure that $VIMRUNTIME is set at this point time (boot time)?
$VIMRUNTIME is not set for me at a terminal session.
Where is it set?
I think it is not boot time when /etc/vimrc is run, but when starting vim :)
And VIMRUNTIME is set, as an internal variable.
Pierre
I've had source /usr/share/vim/vim80/defaults.vim
as the first line for several days now
and I can see a difference already.
Vim now remembers the location of the cursor since last use.
Also, I've confirmed that /etc/vimrc is sourced
every time vim is launched and not during boot time;)
Regards,
Wayne.
FYI,
I've removed source $VIMRUNTIME/defaults.vim from /etc/vimrc.
When editing XML files, it was inserting tab characters which I didn't ask
for when inserting a new line.
What I use now for /etc/vimrc:
" Begin /etc/vimrc
source $VIMRUNTIME/defaults.vim
let skip_defaults_vim=1
set nocompatible
set backspace=2
syntax on
set expandtab
set tabstop=3
set shiftwidth=3
set laststatus=2
set background=dark
set ai
"set backup
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler
set hlsearch
set mouse=
augroup cprog
" Remove all cprog autocommands
au!
" When starting to edit a file:
" For C and C++ files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd FileType * set formatoptions=tcql nocindent comments&
autocmd FileType c,cpp set formatoptions=croql cindent
comments=sr:/*,mb:*,el:*/,://
augroup END
" End /etc/vimrc
There is some email wrapping on the inside if the augroup construct.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page