if has('langmap') && exists('+langnoremap')
set langnoremap
endif
Probably not:
" these two leave files behind
set backup
set undofile
" may conflict with a user mapping
inoremap <C-U> <C-G>u<C-U>
" hard to revert
if has('syntax') && has('eval')
packadd matchit
endif
Comments?
On Sun, Jul 24, 2016 at 9:02 AM, Bram Moolenaar <Br...@moolenaar.net> wrote:
Probably not:
" these two leave files behind
set backup
set undofile
" may conflict with a user mapping
inoremap <C-U> <C-G>u<C-U>
" hard to revert
if has('syntax') && has('eval')
packadd matchit
endif
Comments?Definitely not! Especially "matchit", since it's hard to reverse. I don't want that thing. &undofile will leave unexpected litter around, which is ban enough; but since the litter will start with dots it will unintentionally wind up making it into tarballs because people will forget that such files are lurking. Also, the "backup" related things will mess up "creation date" in mac OS depending on how they're configured. Currently the creation date is preserved on macOS by Vim's default settings.
Hi Bram,
2016/07/25 0:33 "Bram Moolenaar" <Br...@moolenaar.net>:
>
>
> Nicola wrote:
>
> > On 2016-07-24 13:02:56 +0000, Bram Moolenaar said:
> >
> > > Vim has always been conservative about the default option values.
> > > Without any .vimrc the default is 'compatible'. That's nice for people
> > > who rely on the old Vi. But how many of these still exist? I expect
> > > nearly all Vim users to want 'nocompatible', thus create a .vimrc ASAP.
> > >
> > > What has stopped me from changing this is the unexpected change. Many
> > > users will notice that Vim suddenly behaves differently. Some may be
> > > upset. The release of Vim 8.0 might be the best point in time to do
> > > this. If we do this.
> >
> > Talking as someone who has been using Vim only for a couple of years and
> > who does not work with systems more than a decade old, I would welcome
> > such changes. And a major release obviously provides the best opportunity
> > for introducing backward-incompatible changes.
> >
> > I agree with the defaults you are proposing. How about the following?
> >
> > 1) nnoremap Y y$
>
> Please, this was not an invitation for everybody to mention their
> favorite adjustments.
Sorry, it's too much.
so do you think this setting is also personal preference, not 'compatible' one?
set display+=lastline
Any reason to not display long line instead of '@' ?
for speed?
is it really good default value for "normal user" ?
> In this case it's clear that most people,
> including myself, expect Y to yank the current line. Changing this is
> clearly a personal preference, not something that will help all users.
>
> > 2) Make UTF8 the default encoding.
>
> That is something that could break things in weird ways. Vim already
> automatically sets 'encoding' to utf-8 in situations where it makes
> sense.
>
> > > What we can probably always do:
> > >
> > > " In many terminal emulators the mouse works just fine, thus enable it.
> > > if has('mouse')
> > > set mouse=a
> > > endif
> >
> > I would also set ttymouse=sgr when possible (but I do not know all the
> > implications).
>
> This already happens when the required xterm version is detected.
>
> --
> [Autumn changed into Winter ... Winter changed into Spring ... Spring
> changed back into Autumn and Autumn gave Winter and Spring a miss and
> went straight on into Summer ... Until one day ...]
> "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
>
> /// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
>
I agree with Tony, 'hidden' is not actually very friendly to new users.
And, I don't see how it's going to prevent anyone from using tab pages as file proxies.
If one were to change anything for ease-of-use for new users, it wouldn't be 'hidden', it would be 'confirm', so that Vim becomes consistent with many other programs which don't just refuse to quit when you have unsaved changes, they instead ask you whether you want to save first.
Don't common plugin managers require you to turn on filetype stuff at a very specific location, e.g. *after* loading the plugin manager functionality?
I.e. will this interfere with plugin managers? Or is it enough for them to document "filetype off...enableMe()...filetype plugin indent on" in their installation instructions?
I guess many Vim distributions already enable filetype stuff in the system vimrc, so maybe the installation instructions already account for this.
I think it is better to change the default value of Vim body for some of the options.
i.e.
set wildmenu
set ruler
set showcmd
set tags=./tags;,tags;
etc...
Obviously useful things should be changed.
Thanks.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)
Hirohito Higashi wrote:
> I think it is better to change the default value of Vim body for some
> of the options.
>
> i.e.
> set wildmenu
> set ruler
> set showcmd
> set tags=./tags;,tags;
> etc...
>
> Obviously useful things should be changed.
A few people have mentioned setting 'wildmenu'. I also have that set.
I wonder if there are real disadvantages to setting it by default?
Keep in mind that most of these defaults are for options that new users
would not even know about. It's possible that a few users don't like it
and have to disable it in their .vimrc. So long as that number is
small (less than 1%?) that would be an acceptable price for helping new
users enjoying Vim more.
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" Switch syntax highlighting on when the terminal has colors or when using the
" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
syntax on
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Jul 27, 2016 6:20 AM, "Kazunobu Kuriyama" <kazunobu...@gmail.com> wrote:
>
> 2016-07-27 17:01 GMT+09:00 Manuel Ortega <manny...@gmail.com>:
>> If "syntax on" is in the system vimrc as proposed, then I can't seem to find any way *at all* to disable the loading of the system menu.vim (short of unacceptable hacks like bash-aliasing 'vim' to 'vim -u ~/.vimrc'.)
>>
>> Not only that, but the variables in menu.vim intended to be settable by the user to stop certain segments from loading, i.e.,
>>
>> let did_install_default_menus = 1
>> let no_buffers_menu =1
>> let did_install_syntax_menu = 1
>>
>> ... have no effect in the user's vimrc because menu.vim is already loaded by the system vimrc's "syntax on".
>>
>> Please, please, remove "syntax on" from the proposal. There is no way for the user to undo its side-effects.
>>
>> -Manny
>
>
> Hi,
>
> After having read your argument through, I’m still for ‘syntax on’.
>
> After all, the problem boils down to this: How many GUI users do they actually set go=+M?
>
> My bet is that the number is nearly zero.
>
> If our system menu were of such less importance that one could kill it at will, it would not be worth being called “the system menu.”
I'd wager it's more than you think. I know many people that change gvim to basically look like console vim. Personally, I set 'guioptions' to just "cM".
Cheers,
James
...or maybe a new file sourced before the default settings? The default settings file itself could source it, if it exists.
2016-07-27 17:01 GMT+09:00 Manuel Ortega <manny...@gmail.com>:On Wed, Jul 27, 2016 at 3:51 AM, Manuel Ortega <manny...@gmail.com> wrote:On Wed, Jul 27, 2016 at 2:51 AM, Manuel Ortega <manny...@gmail.com> wrote:On Tue, Jul 26, 2016 at 5:17 PM, Bram Moolenaar <Br...@moolenaar.net> wrote:
" Switch syntax highlighting on when the terminal has colors or when using the
" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
syntax onWait a sec. If "syntax on" is done here, then won't it be impossible to use "set guioptions+=M" in the user's .vimrc and have it work? The docs say that in order for that to work, it must be done "before switching on syntax or filetype recognition". But if syntax is turned on here, by the time the "set go+=M" in his .vimrc is encountered it will be too late, right?Indeed, that is the case (I tried it). If you put "syntax on" in the system vimrc, then the user cannot use "set go+=M". I think this is a good reason to remove "syntax on" from the proposal. If it's left in, you might as well just eliminate "M" as one of the guioptions, because it's totally unusable unless it goes in the local machine's system vimrc, which many users will not be able to change, or will not want to tweak it every time they build a new Vim.If "syntax on" is in the system vimrc as proposed, then I can't seem to find any way *at all* to disable the loading of the system menu.vim (short of unacceptable hacks like bash-aliasing 'vim' to 'vim -u ~/.vimrc'.)Not only that, but the variables in menu.vim intended to be settable by the user to stop certain segments from loading, i.e.,let did_install_default_menus = 1let no_buffers_menu =1let did_install_syntax_menu = 1... have no effect in the user's vimrc because menu.vim is already loaded by the system vimrc's "syntax on".Please, please, remove "syntax on" from the proposal. There is no way for the user to undo its side-effects.-MannyHi,After having read your argument through, I’m still for ‘syntax on’.After all, the problem boils down to this: How many GUI users do they actually set go=+M?My bet is that the number is nearly zero.If our system menu were of such less importance that one could kill it at will, it would not be worth being called “the system menu.”
On 2016-07-27, Manuel Ortega wrote:
> If "syntax on" is in the system vimrc as proposed, then I can't seem to find
> any way *at all* to disable the loading of the system menu.vim (short of
> unacceptable hacks like bash-aliasing 'vim' to 'vim -u ~/.vimrc'.)
How about "sudo rm /usr/share/vim/vimrc"?
Another, less drastic way would be to create a file,
~/.vim/ftdetect/guioptions.vim, containing this:
set guioptions+=M
I agree that "syntax on" and "filetype on" (maybe even "filetype plugin
indent on") are pretty core features that should probably be enabled by
default, as nearly everyone will use them.However, I disagree that this should come at the expense of being able
to set up specific options. Anything done in the default settings should
be modifiable by the user, and it looks like in this situation that is
not possible, if the default settings are always sourced.I would have no problem with "syntax on" going in a system vimrc if it didn't have unfixable side-effects.Perhaps it's possible for Bram to change the behavior of "syntax on" so that it doesn't cause menu.vim to be loaded. Same for "filetype on".Or perhaps it's possible for Bram to change them so that menu.vim isn't loaded until after the user's vimrc is loaded. Then the user could at least set the "did_install_*" variables.-Manny
On 2016-07-27, Manuel Ortega wrote:
> What if "syntax on" and "filetype plugin indent on" were moved into the autocmd
> group "vimStartup" that the proposed system vimrc defines, under VimEnter
> autocmds:
>
> au VimEnter * syntax on
> au VimEnter * filetype plugin on
>
> This way, everyone who wants them still gets them, and &go+=M still works
> without modification. As an added bonus, both of the "ons" can be prevented
> from ever happening using the same "au!" line that kills the others in that
> group.
From ":help VimEnter", the VimEnter event occurs 'After doing all
the startup stuff, including loading .vimrc files, executing the
"-c cmd" arguments, creating all windows and loading the buffers in
them.'
Enabling filetype detection after buffers are loaded is too late.
-Manny
It may be true that setting go+=M will reduce memory usage and make startup faster. But I would say the benefit gained by doing that is quite marginal.
Hence, in comparison with those heavy tasks, what is gained by go+=M is negligible.
I don't understand why go+=M is so important for some people.
What's the reason for doing this change when the new mapping has just as much key presses? For me it actually feels like it's slower than gq since I need to involve and move both hands.
I can see in the help for gq that Q actually did gq before which could be a reason to change it back but I guess there was a reason for changing it to gq too?
2016-7-24(Sun) 22:03:06 UTC+9 Bram Moolenaar:
> Vim has always been conservative about the default option values.
> Without any .vimrc the default is 'compatible'. That's nice for people
> who rely on the old Vi. But how many of these still exist? I expect
> nearly all Vim users to want 'nocompatible', thus create a .vimrc ASAP.
>
> What has stopped me from changing this is the unexpected change. Many
> users will notice that Vim suddenly behaves differently. Some may be
> upset. The release of Vim 8.0 might be the best point in time to do
> this. If we do this.
>
> Besides making 'nocompatible' the default, there are a few options that
> should probably be on by default. Currently these are in
> $VIMRUNTIME/vimrc_example.vim. Most of these only have a visual effect
> or slightly change how editing works. You will notice this right away.
> The ones that have unexpected effects should be avoided.
>
> If someone wants to start in the old way, the -C flag should be used:
> vim -C
>
> If someone wants to start with 'nocompatible', but not all of the new
> option values, a .vimrc would be needed to change the settings. This is
> the most common and also most tricky part. Assuming that the user will
> want most of the new option values, but not all, he should be able to
> revert to the old value. For options that is easy. But including the
> matchit plugin is not easy to revert.
>
> What we can probably always do:
>
> set backspace=indent,eol,start
> set history=50 " keep 50 lines of command line history
> set ruler " show the cursor position all the time
> set showcmd " display incomplete commands
> set incsearch " do incremental searching
>
> " Don't use Ex mode, use Q for formatting
> map Q gq
>
> " In many terminal emulators the mouse works just fine, thus enable it.
> if has('mouse')
> set mouse=a
> endif
> if &t_Co > 2 || has("gui_running")
> syntax on
> set hlsearch
> let c_comment_strings=1
> endif
>
> if has("autocmd")
> " Enable file type detection.
> filetype plugin indent on
>
> augroup vimrcEx
> au!
>
> " For all text files set 'textwidth' to 78 characters.
> autocmd FileType text setlocal textwidth=78
>
> " When editing a file, always jump to the last known cursor position.
> " Don't do it when the position is invalid or when inside an event handler
> " (happens when dropping a file on gvim).
> autocmd BufReadPost *
> \ if line("'\"") >= 1 && line("'\"") <= line("$") |
> \ exe "normal! g`\"" |
> \ endif
>
> augroup END
> else
> set autoindent " always set autoindenting on
> endif
>
> if has('langmap') && exists('+langnoremap')
> set langnoremap
> endif
>
>
> Probably not:
>
> " these two leave files behind
> set backup
> set undofile
>
> " may conflict with a user mapping
> inoremap <C-U> <C-G>u<C-U>
>
> " hard to revert
> if has('syntax') && has('eval')
> packadd matchit
> endif
>
> Comments?
Sorry for late reply :-)
I want to add the following setting:
" If Vim cause malfunctioning cursor keys on slow terminals or very busy systems, adjust the value or comment out this.
set ttimeoutlen=0
'ttimeoutlen' default value is -1.
This means that use the 'timeoutlen' to the key code time-out value.
That one second.
I think most user feels "Vim is slow" in the following operation. This is disadvantage.
- When the transition to the normal-mode by pressing the XXX in insert-mode.
i<Esc>
- Similarly, in visual-mode.
V<Esc>
- Similarly, in cmdline-mode.
:<Esc>
Yes, I know that lag does not occur if the input without waiting for the display is switched.
But, most people would wait until the display is switched. And they feels "Vim is slow...".
`set ttimeoutlen=0` will solve the above.
I have invested in above setting more than a year, but the trouble does not happen even once.
thanks.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)