New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim default settings. #276

Closed
trusktr opened this Issue Mar 4, 2014 · 121 comments

Comments

Projects
None yet
@trusktr

trusktr commented Mar 4, 2014

The thing that scares off people trying out vim for the first time (going off of my real-world experiences) is the fact that it comes with default settings that are horrible (e.g. no syntax highlight, no numbers, etc).

In modern times, most people expect basic things like syntax highlight, line numbers, etc.

A project like this one should set some defaults that most people nowadays will end up enabling anyways, and that will attract new users trying the editor for the first time. The following would be good defaults:

  • Syntax highlight enabled with a nice and dark colorscheme.
  • Line numbers enabled (Mine toggles between relative numbering in NORMAL mode and regular numbering in INSERT mode automatically).
  • Search highlight enabled: set hlsearch.
  • A way to turn off the search highlight easily (I use while in NORMAL mode to toggle it on or off).
  • Tabs (the "tabline" as it's called in vim): set tabline=2
  • A nice status line. (vim-airline?)
  • Mouse support enabled: if has('mouse') | set mouse=a | endif
  • Arrow key support in all modes enabled by default (new users will need this is you wish to keep as many as possible, but I believe they will naturally transition to the home row when they learn how convenient it is, and veteran users will feel right at home without even touching the arrow keys anyways).

That's just a basic list of the top of my head. I'll look at my vimrc later to see if there's any more.

Defaults based on the comments below:

  • Rename "tabs" something else like "spaces" or "views"?
  • Absolute line numbering: set number
  • backspace through lines: set backspace=indent,eol,start
  • Automatic indentation: filetype plugin indent on
  • Enabled matching of HTML tags, etc, with %: runtime! macros/matchit.vim
  • Updated filetype plugins for indentation, folding and omni-complete:
  • vim-airline
  • A built in plugin manager
    • [NeoBundle](Tabs are just not the same thing.)?
    • a way to explore community plugins (e.g. view newest, most downloaded, etc)
  • Change Y to yank to end of line (map Y y$)
  • incsearch
  • wildmode: list:longest
  • Include editorconfig plugin
  • Smart key goes first to the first non-white-space character, then to beginning of line, and alternates thereafter.

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@simendsjo

This comment has been minimized.

Contributor

simendsjo commented Mar 4, 2014

You make several good points here. I bet we can come to some agreement on chaning some defaults.

  • Syntax highlight enabled with a dark colorscheme like Hybrid or Solarized.

Agree about syntax highlighting. I'm a solarized dark user myself, but I'm not sure having a dark theme by default is good.

  • Line numbers enabled (Mine toggles between relative numbering in NORMAL mode and regular numbering in INSERT mode automatically).

I use relative numbers in every mode, but I think using absolute numbers in every mode would be a good default adhering to the element of least surprise.

  • Search highlight enabled ("hlsearch in vim).

Agree.

  • A way to turn off the search highlight easily (I use while in NORMAL mode to toggle it on or off).

I think we should be more reluctant to introduce new keybindings.

  • Tabs (the "tabline" as it's called in vim)

Tabs in vim are more like views or workspaces in other editors. Not sure if always showing them gives the right impression - people start using one tab per file..

  • A nice status line, perhaps using vim-airline.

Not sure we should add plugins to the core. This is a choice made by distributions.
I love vim-airline though, and the default statusbar is missing a lot.

  • Mouse support enabled.

A bit ambivalent, but I have to agree.. Also I have mouse support enabled, but
I cannot remember the last time I used it.

  • Arrow key support in all modes enabled by default (new users will need this is you wish to keep as many as possible, but I believe they will naturally transition to the home row when they learn how convenient it is, and veteran users will feel right at home without even touching the arrow keys anyways).

Ditto as above

@aktau

This comment has been minimized.

Member

aktau commented Mar 4, 2014

Strongly agree with this, good defaults will help a lot!

Let's keep what's currently in plugins, in plugins (for the first year at least), unless it is very small stuff like native .editorconfig support.

Relative numbering is contentious, but absolute numbering at the very least is a must-have, totally on board with absolute numbering.

@KevinSjoberg

This comment has been minimized.

KevinSjoberg commented Mar 4, 2014

Great discussion. Here is my personal opinions:

  • Syntax highlight enabled with a dark colorscheme like Hybrid or Solarized.

Syntax highlighting should definitely be on by default. Anything better than Vim's default colorscheme is in my opinion an improvement.

  • Line numbers enabled (Mine toggles between relative numbering in NORMAL mode and regular numbering in INSERT mode automatically).

I'm not a user of relative line numbers myself and I think :set numbers by default is good enough. It will be consistent with other editors as well.

  • Search highlight enabled ("hlsearch in vim).

I'm not sure what I think about this. I don't use :set hlsearch but :set incsearch only. If the majority of Vim users use :set hlsearch I think it should be a default.

  • A way to turn off the search highlight easily (I use while in NORMAL mode to toggle it on or off).

One of the most googled questions is how to turn off hlsearch after doing a search, the answer is usually :set nohlsearch. A keybinding for this would be preferable if :set hlsearch is introduced as a default.

  • Tabs (the "tabline" as it's called in vim)

This I disagree with. I don't see any reason to introduce this as a default.

  • A nice status line, perhaps using vim-airline.

This I disagree with. I don't see any reason to introduce a more "sophisticated" status line and especially not one relying on third-party plugins.

  • Mouse support enabled.

This I disagree with. The power in Vim is its rich set of key bindings and the ability to quickly operate your editor without reaching for your mouse. If people still need the mouse, it's easy enough to enable it.

  • Arrow key support in all modes enabled by default (new users will need this is you wish to keep as many as possible, but I believe they will naturally transition to the home row when they learn how convenient it is, and veteran users will feel right at home without even touching the arrow keys anyways).

This I agree with. Experienced users can easily disable the arrow keys by unbinding them or :set noesckeys.

@tssm

This comment has been minimized.

tssm commented Mar 4, 2014

My opinion as user: I don't care about the defaults because I have invested a lot of time on my .vimrc, but please, don't introduce new default plugins like Airline. Although I'm an user of netrw, which comes with Vim, I think there's no need to have it in every installation, some people never uses it and they prefer NERD Tree or Command-T or etc. (Better to add an official scripts repository and native scripts manager, in the future, after the refactoring is done).

It doesn't mean that I'm against all default plugins, in fact I think (updated) file types related stuff (syntax, indentation, folding and omni-complete functions) should come with Neovim as well as some nice color schemes, like Solarized and Hemisu, instead of the current defaults.

I also disagree with the tabline proposal, basically because tabs in Vim (and in Neovim) are different from all other editors, and in my opinion that's a good thing (I'm really accustomed to :b [pattern]<tab>).

Finally, I don't see the problem of introduce new maps if they come in the rc.

@copenhas

This comment has been minimized.

copenhas commented Mar 4, 2014

My votes as a user:

  • Syntax highlight enabled with a dark colorscheme like Hybrid or Solarized.

+1 although for the colorscheme I think it only needs to be "good enough" and everyone I know prefers a dark theme. It's easy enough to find a preferred colorscheme and enable it.

  • Line numbers enabled

+1, absolute line numbers by default. I use relative in NORMAL and abosolute in INSERT but most people I know would expect absolute all the time.

  • Search highlight enabled ("hlsearch in vim).

+1

  • A way to turn off the search highlight easily

+1 Although I don't know what would be a preferred key binding. I use enter in NORMAL to clear.

  • Tabs (the "tabline" as it's called in vim)

-1 I agree with the others, not needed as a default. I rarely use tabs in VIM and whenever I introduce someone to VIM I start on buffers pretty early.

  • A nice status line, perhaps using vim-airline.

-1 for using any external plugins with the main distro. Minor improvements would help new users, especially including the mode.

  • Mouse support enabled.

+0 Doesn't seem needed but it wouldn't effect existing users and could help new ones.

  • Arrow key support in all modes enabled by default

+1 this will certainly aid new users.

There are other small improvements I see but I believe this would be handled by turning off VI compat by default. One that comes to mind is being able to backspace over newlines.

@aktau

This comment has been minimized.

Member

aktau commented Mar 4, 2014

There are other small improvements I see but I believe this would be handled by turning off VI compat by default. One that comes to mind is being able to backspace over newlines.

Exactly, this scared my young self away from using vim for several years. Great defaults are an absolute must and I'm glad the discussion is being had!

@thiderman

This comment has been minimized.

Contributor

thiderman commented Mar 4, 2014

See also: https://github.com/tpope/vim-sensible, especially the issues, since they have already have this discussion a lot.

@Shougo

This comment has been minimized.

Contributor

Shougo commented Mar 4, 2014

In my opinion,
filetype plugin indent on
is should be default.

But to use plugin managers, users must write this statement in your rc file.

My opinion as user: I don't care about the defaults because I have invested a lot of time on my .vimrc, but please, don't introduce new default plugins like Airline. Although I'm an user of netrw, which comes with Vim, I think there's no need to have it in every installation, some people never uses it and they prefer NERD Tree or Command-T or etc. (Better to add an official scripts repository and native scripts manager, in the future, after the refactoring is done).

I agreed. Emacs has a lot of default extensions. But I think Vim should have plugin manager support than lot of default plugins.

See also: https://github.com/tpope/vim-sensible, especially the issues, since they have already have this discussion a lot.

It is great idea.

@KevinSjoberg

This comment has been minimized.

KevinSjoberg commented Mar 5, 2014

But I think Vim should have plugin manager support than lot of default plugins.

I've began some work on a standalone plugin manager. See https://github.com/KevinSjoberg/vpm. I'd love feedback, ideas and/or contributions. My goal would be to seamlessly integrate it with Neovim in the future.

@simendsjo

This comment has been minimized.

Contributor

simendsjo commented Mar 5, 2014

@KevinSjoberg : I'm using pathogen, and have some custom stuff to update all plugins, so this project seems interesting for me.

Seems like it's tied to GitHub. What about BitBucket and other sources that might arise?
It's also a little scarce on documentation. I'm not sure what it does under the hood.

But now we're hijacking the thread.. Perhaps it's better if you post this to the mailing list?

@KevinSjoberg

This comment has been minimized.

KevinSjoberg commented Mar 5, 2014

@simendsjo absolutely, see https://groups.google.com/forum/#!topic/neovim/RqJHRV6TY1c. I addressed your questions there.

@OliverUv

This comment has been minimized.

OliverUv commented Mar 5, 2014

@KevinSjoberg I've seen that @Shougo and the japanese vim community have begun specifying, discussing (and maybe implementing?) what a good vim plugin repository would look like. They're considering things like dependency management, etc. I couldn't find it again, but I'm sure @Shougo can point you in the right direction.

@KevinSjoberg

This comment has been minimized.

KevinSjoberg commented Mar 5, 2014

@OliverUv thanks! I'll look into that.

@Shougo

This comment has been minimized.

Contributor

Shougo commented Mar 5, 2014

https://bitbucket.org/vimcommunity/vim-pi

I think it is better repository for Vim.

@adelarsq

This comment has been minimized.

adelarsq commented Mar 5, 2014

I agree with @copenhas

A default plugin manager with plugin ratings and dependency management would be good.

I'll add my two cents: molokai as colorscheme (https://github.com/tomasr/molokai).

@Gaelan

This comment has been minimized.

Contributor

Gaelan commented Mar 6, 2014

molokai as colorscheme (https://github.com/tomasr/molokai)

What? No! Solarized!

On a more serious note, if would be cool if, on first run, we showed several color schemes and let the user choose.

@trusktr

This comment has been minimized.

trusktr commented Mar 8, 2014

@simendsjo

but I'm not sure having a dark theme by default is good.

Look at what the Google image results for "vim colorshemes" show. Mostly a sea of dark images!

but I think using absolute numbers in every mode would be a good default adhering to the element of least surprise.

Agreed. Relative numbering can be left for the tweaker to discover.

  • Search highlight enabled ("hlsearch in vim).

Agree.

  • A way to turn off the search highlight easily (I use while in NORMAL mode to toggle it on or off).

I think we should be more reluctant to introduce new keybindings.

(also in reply to @KevinSjoberg and @copenhas regarding hlsearch)
Might I make a suggestion? <c-c> doesn't do anything in NORMAL mode, so it could be used for this:

nnoremap <c-c> :if (&hlsearch == 1) \| set nohlsearch \| else \| set hlsearch \| endif <cr>

In other modes like INSERT, <c-c> exits back to NORMAL. As Vim comes with no default behavior for <c-c> NORMAL mode, we won't be hurting any of it's current functionality.

  • Tabs (the "tabline" as it's called in vim)

Tabs in vim are more like views or workspaces in other editors. Not sure if always showing them gives the right impression - people start using one tab per file..

(also in reply to @KevinSjoberg and @taecilla regarding the tabline)
That's exactly what I use it for in most cases: one file per tab. If needed I'll split the view in the tab vertically or horizontally. In projects with many files, I group files together into tabs, separated vertically and horizontally with window splits inside the tab. And occasionally I use :buffers to find hidden buffers from windows that I've closed.

As @taecilla shows in the link provided, tabs in vim are more than just the tabs in Notepad++ or Sublime Text. With that in mind, most of the users (that I know personally) who run away from Vim are the types that use editors like Visual Studio, Eclipse, Gedit, or Notepad++, and they always use tabs for each file. They will feel welcomed to NeoVim if tabs are set to default because it's immediately visible and doesn't require a mental map (:b requires an invisible mental mapping of your buffers). Being the expert users we are, it's not difficult for us to set a simple option in our .vimrc to disable the tabline (set showtabline=0) while at the same time allowing new users to make the transition to vi/vim/neovim, which is very important!

NeoVim should aim to not scare away potential new users. Default settings like the tabline (which is rendered as a tab bar in a graphical UI) will be great way to attract new users coming from Gedit, Notepad++, etc. I'm comfortable editing my .vimrc file, so I can easily disable default settings that are in place to keep new users instead of scare them away.

Sublime Text (for example) does a great job with defaults, and it's super easy to configure the settings in Sublime's config file.

  • A nice status line, perhaps using vim-airline.

Not sure we should add plugins to the core. This is a choice made by distributions. I love vim-airline though, and the default statusbar is missing a lot.

(also replying to @copenhas about default plugins)
On second thought, I agree with you guys about not having plugins by default. I think @Shougo's excellent NeoBundle plugin manager should be used as a starting point for a built in plugin manager for NeoVim, and that ~vim-airline can take a prime seat as a toggle-able plugin. Plugins should not be enabled by default, but the plugin manager should be easily discoverable and have a default set of (disabled) plugins so users can easily experiment with and discover which plugins they like, and learn how to find and install more.

@KevinSjoberg

:set numbers by default is good enough

Agreed.

If the majority of Vim users use :set hlsearch I think it should be a default.

I'd like to take it further by suggesting another default: when a user double clicks on a word, not only is it selected in VISUAL mode, but all other occurrences are highlighted. This is the awesome default in Notepad++ and Sublime Text. Gedit has search highlight by default but not the double click feature.

Mouse support enabled.

This I disagree with. The power in Vim is its rich set of key bindings and the ability to quickly operate your editor without reaching for your mouse. If people still need the mouse, it's easy enough to enable it.

I think the best way to satisfy both experienced users (you and I @KevinSjoberg), new users, and experienced users who none-the-less still use the mouse is to have it enabled by default, and just not use it if you don't need it. My reason in favor of this is to not scare new users away, especially the point-and-click Gedit/Eclipse/Notepad++ users. I see classmates of mine pointing and clicking all over the place. Let's aim to have them to fall in love with vi/vim/neovim. Due to the nature of NeoVim anyways, they will begin to use the mouse less than before anyways, due to the convenient power NORMAL mode offers.

@taecilla

Better to add an official scripts repository and native scripts manager, in the future, after the refactoring is done

Yeah! +1 for @Shougo's NeoBundle!

indentation, folding and omni-complete functions

Can you expand on which options would need to be set for those?

@copenhas

  • Tabs (the "tabline" as it's called in vim)

-1 I agree with the others, not needed as a default. I rarely use tabs in VIM and whenever I introduce someone to VIM I start on buffers pretty early.

That's the thing! All the tab-using people got scared away when they tried vim with default settings and went back to Gedit, Notepad++ and Sublime Text, which leaves only people like you who don't need tabs and mind map all their buffers! Let's not scare those other people off, and allow them to fall in love with NeoVim. It's no problem for experienced users like you and I to disable tabs with one line of code.

Mouse support enabled.

+0 Doesn't seem needed but it wouldn't effect existing users and could help new ones.

Yes yes yes!!! Thank you for keeping the new users in mind!!

turning off VI compat by default

The project description says NeoVim has (or will) remove all vi compat entirely. +1 for backspace through lines.

@thiderman

See also: https://github.com/tpope/vim-sensible

We could definitely use some ideas from there.

@Shougo

filetype plugin indent on

+1

@Gaelan

would be cool if, on first run, we showed several color schemes and let the user choose.

Yeah! It'd super nice in the future for NeoVim to interactively involve the user in learning and configuring NeoVim.

@tssm

This comment has been minimized.

tssm commented Mar 8, 2014

NeoVim should aim to not scare away potential new users. Default settings like the tabline (which is rendered as a tab bar in a graphical UI) will be great way to attract new users coming from Gedit, Notepad++, etc. I'm comfortable editing my .vimrc file, so I can easily disable default settings that are in place to keep new users instead of scare them away.

This made me wonder what is the point of Neovim? I don't think Neovim should be a more easy Vim for new users, the aim of the project (as I interpreted it from the Bountysource campaign) is to turn our beloved editor in a modern piece of software, so it can be patched and debugged faster, and extended easily and improve its performance. I agree that nicer defaults (community defaults, like sensible) are a good idea (who uses Vim today without syntax highlighting?), but I think defaults shouldn't pervert the way Vim is used. I think that if we try to make Neovim to behave like a "normal" (in the mathematical sense of the word) editor although we know that that is not the way it has been designed to work we'll confuse new users a lot more. Think of JavaScript: "let's make it a prototyped language but lets people think that it has classes, like Java". Disaster.

What nobody has said (and I would be happy to help, although my English is not good enough) is that maybe a neovimtutor should be written, explaining the nature of Vim and how to use it instead o mention a lot of text objects and motion that people only will learn writing a lot of text.

most of the users (that I know personally) who run away from Vim are the types that use editors like Visual Studio, Eclipse, Gedit, or Notepad++, and they always use tabs for each file. They will feel welcomed to NeoVim if tabs are set to default because it's immediately visible and doesn't require a mental map (:b requires an invisible mental mapping of your buffers).

Assuming that the world is against me and @tarruda decides to enable a tabline by default then mouse support should be enabled by default too because :tabe, gt and other commands aren't obvious, just like :b... And the thing is that the idea is to abstract the editor from the UI, and I think mouse support (as well as a tabline) are part of the UI, no?

indentation, folding and omni-complete functions

Can you expand on which options would need to be set for those?

They don't need default options, but a couple of default file type plug-ins. I said before that instead of bloat Neovim with plug-ins it should come with a plug-in manager instead, and let the user chose what to enable. But, I think the exception to the rule are color schemes and file type plug-ins. Just imagine to open any file, even one whose file type you don't recognize, and Neovim ready, with the correct indentation, folding and omni-complete functions enabled :D Vim comes with a lot of these file type plug-ins, but most of them are out of date. Anyway, that's another discussion.

@copenhas

This comment has been minimized.

copenhas commented Mar 8, 2014

@trusktr
I agree that NeoVIM should be inviting to new users with fewer surprises but as @taecilla said "I think defaults shouldn't pervert the way Vim is used." Tabs are just not the same thing. Are there any plug-ins for viewing buffer lists? Or including the open buffer list in a directory browser? Seems like including some options in a FAQ for new users would be good.

What nobody has said (and I would be happy to help, although my English is not good enough) is that maybe a neovimtutor should be written, explaining the nature of Vim and how to use it instead o mention a lot of text objects and motion that people only will learn writing a lot of text.

This would be great. I haven't been through the vimtutor in a long time, might be worth a revisit to refresh my memory and think about any shortcomings to most people's introductory material. There are several gamifications of learning VIM that add to the interactivity. Perhaps some of those ideas could be pulled in to create an interactive neovimtutor.

+1 for including a plug-in manager.

@mklinga

This comment has been minimized.

mklinga commented Mar 8, 2014

What nobody has said (and I would be happy to help, although my English is not good enough) is that maybe a neovimtutor should be written, explaining the nature of Vim and how to use it instead o mention a lot of text objects and motion that people only will learn writing a lot of text.

There is LearnVim, "A suggested path for learning Vim" which could be useful to look at, even though it's still partly unfinished.

@clentfort

This comment has been minimized.

clentfort commented Mar 8, 2014

That's pretty bad place for beginners IMHO. If I tried a new editor I would want to know how to get into Insert mode and not how to find help for some commands I found in someones vimrc, I wouldn't even know what a vimrc is after all! A real good start for vim is http://vim-adventures.com/ at least the free levels! (Haven't tried the others.)
Okay it doesn't help you on how to change the mode but after all it teaches you the very basics of vim in a really nice and playful way!

@trusktr

This comment has been minimized.

trusktr commented Mar 9, 2014

@taecilla

if we try to make Neovim to behave like a "normal" (in the mathematical sense of the word) editor although we know that that is not the way it has been designed to work we'll confuse new users a lot more.

Vi and Vim were designed decades ago. Imagine if Vim never existed, and we were the first ones to make it. Surely some decisions like using HJKL for movement keys would have never taken place. NeoVim (based on it's description) should be best friends with Modern. We don't want to confuse new users at all, I definitely agree with that.

Vim defaults are certainly very confusing compared to the defaults of any other modern editor. Vi is even worse!

It doesn't have to be that way, and we've all agreed that we need some sensible defaults. I'm glad there's lots of input on the topic!

maybe a neovimtutor should be written

In total agreement (@copenhas, @clentfort too ^). Something interactive would be awesome. I had the following idea in issue #277:

If you've noticed, the command line at the bottom of Vim is empty by default. This is a waste of space! Instead of wasting space, why not provide useful hints to the user based on what mode is active?

For example, let's say NeoVim starts in INSERT mode. The command line at the bottom says

Welcome to neovim. You are in INSERT mode. Press Ctrl+C to enter NORMAL mode, then type ":w<enter>" to save your file.

As soon at the user enters NORMAL mode, the command line changes to

You're in NORMAL mode. Type a colon ":" to enter command line, "yy" to copy a line, "p" to paste, "dd" to delete a line, or ":tutorial" to begin learning...

Something along these lines would be very helpful. Something interactive. For example, after the user has typed y``y to copy a line, the command line changes to

You've copied a line. Type "p" to paste it below the cursor.

The user presses p and the command line changes to

You've pasted a line.

Then a second and a half later it changes back to the default NORMAL mode command line hint:

You're in NORMAL mode. Type a colon ":" to enter command line, "yy" to copy a line, "p" to paste, "dd" to delete a line, or ":tutorial" to begin learning...

Get my idea?

I have not impeded any veteran's ability to use the editor, but I have helped a new user learn, fall in love with, and stick to a new and amazing editor. Will the hints in the command line get annoying? No problem. Just set nohints and never see the hints again!

@taecilla

the idea is to abstract the editor from the UI, and I think mouse support (as well as a tabline) are part of the UI, no?

That's correct, but NeoVim core would still need to be aware of the sequences thrown at it from UIs (text or graphic) by mouse movements. The UI is a mechanism that communicates interactions to NeoVim, but NeoVim itself is the one who handles those interactions (though it's possible GUIs can implement their own editor logic, in which case the use of NeoVim has just been negated).

I said before that instead of bloat Neovim with plug-ins it should come with a plug-in manager instead, and let the user chose what to enable.

Agreed. That would be very nice.

Here's a nice filetype plugin for JavaScript: https://github.com/pangloss/vim-javascript

How do you guys feel about including popular plugins like vim-airline, vim-fugitive, etc, by default but having them disabled by default? By the way, here's a poll I made (@simendsjo). The result suggests that the majority use a status line plugin.

@copenhas

Tabs are just not the same thing.

You could look at it this way: they are the same thing, plus they do more. A new user would surely appreciate having tabs for managing one file per tab, and then later down the line learn how to split windows within each tab (through interactive tutorials built into NeoVim).

I don't see anything outrageously wrong with tabs as default. Having to set tabline=0 in .nvimrc is incredibly easy for an experienced vim user, and showing tabs by default is extremely helpful for new users coming from a world full of tab idioms (every popular browser, every popular GUI text editor, and many file managers, have tabs, with one page/file per tab). For new users, tabs as a default is a much less "perverted use-case for Vim" than Vim's scary defaults.

I'd consider myself experienced in Vim, and I still prefer tabs over :buffers, :splits, and :vsplits. For each window split I lose one row or column of text estate. With tabs I only lose one line no matter how many tabs I open!

@commonquail

This comment has been minimized.

commonquail commented Mar 9, 2014

vim-airline

Absolutely not. I don't want that anywhere near my Vim.

There are plugins that offer real utility that may indeed be worthwhile considering shipping (e.g. NerdTREE, CtrlP) but I'm leaning towards no. We should include syntax files, and probably indentation files, by default, but plugins are a bad idea for a few reasons, mainly that we won't want to have to update Neovim whenever one of the shipped plugins is updated.

This falls under the purview of the package manager. Make a good package manager and leave it at that.

@Gaelan

This comment has been minimized.

Contributor

Gaelan commented Mar 9, 2014

What about a featured section in the package manager?

@dchilot

This comment has been minimized.

dchilot commented Mar 9, 2014

Hello,
As some of you stressed earlier the core of neovim will be separate from the UI.
Would it then be possible to consider the defaults part of the UI ? Sourcing a UI specific file could do the trick (or maybe just a plugin that would be installed by default).
One downside is that different UIs would have different defaults, but maybe it is not a bad things provided different UIs could have quite different approaches.
We already have something that kind of looks like that with the easy mode.

@trusktr

This comment has been minimized.

trusktr commented Mar 9, 2014

@commonquail What about the default empty status line? Mine shows filename by default, or filename [+] when there are unsaved changes. Would you agree in setting a nicer desfault value for statusline? And no, we wouldn't need to release a new version of NeoVim everytime vim-airline is updated, in the same way that Ubuntu doesn't release a new Ubuntu everytime one piece of software is updated (daily).

@Gaelan

featured section in the package manager

I really like that idea. And have it be sortable so you can choose to see the 10 most recent, or 10 most installed, etc, all accessible from the UI.

@dchilot

consider the defaults part of the UI?

This might make it difficult for people to use their own nvimrc files with those custom UIs if their nvimrc is written assuming certain default conditions. For the purposes of consistency, I think it'd be better if the defaults were established in NeoVim core, and that UIs made for specific purposes could override those defaults if they really need to.

@commonquail

This comment has been minimized.

commonquail commented Mar 9, 2014

Would you agree in setting a nicer desfault value for statusline?

I'm not inherently against changing certain default settings. Some of them are practically useless or nonsensical. We can easily make default statusline more helpful, packaging airline just isn't the way to accomplish that.

And no, we wouldn't need to release a new version of NeoVim everytime vim-airline is updated, in the same way that Ubuntu doesn't release a new Ubuntu everytime one piece of software is updated (daily).

Then by that logic we wouldn't need to include any plugins at all (yay!). Of course, this assumes a "good" package manager can be developed. That is a wholly non-trivial problem, and a problem for a different repository.

In fact, I'm reconsidering the value in including default runtime files, too. What happens if they get outdated? Is the onus on having the latest version on the user (not ideal)? Granted, these sometimes have version dependencies, which also isn't ideal, but often you can use runtime files independently of Vim's version.

@tssm

This comment has been minimized.

tssm commented Mar 9, 2014

You could look at it this way: they are the same thing, plus they do more. A new user would surely appreciate having tabs for managing one file per tab, and then later down the line learn how to split windows within each tab (through interactive tutorials built into NeoVim).

I insist that we should be careful on this. I have read people in StackOverflow confused because Vim tabs don't behave like normal tabs... "Why I have two tabs with the same file? It's stupid, OH MY GOSH VIM SUCKS FIX THE BUG". The sad thing is that buffers and tabs (which should be called layout or something like that) are really nice features.

There are plugins that offer real utility that may indeed be worthwhile considering shipping (e.g. NerdTREE, CtrlP) but I'm leaning towards no.

My vote is no, too. Those plug-ins may be nice but I like more the old :find [pattern]<Tab>, so I don't need/want CtrlP/NERD Tree/what ever. Airline is nice too, but I prefer the approach of Lightline. I think its better to think on how to distribute plug-ins in a modern way (I like what @Shougo is doing about it) instead of discuss which one is the best statusline. Or if statuslines are worthwhile.

In fact, I'm reconsidering the value in including default runtime files, too. What happens if they get outdated?

If we only include file type plug-ins and a couple of color schemes then I don't see the problem (mainly because those are scripts that don not change often), but it would be nice to update them without release a new Neovim version. I think this discussion should be continued here.

Thinking on the defaults again, I vote for make sensible.vim the default /etc/nvimrc. I don't use it myself, but it has been discussed a little bit longer, and has a solid user base.

@copenhas

This comment has been minimized.

copenhas commented Mar 9, 2014

@trusktr

You could look at it this way: they are the same thing, plus they do more. A new user would surely appreciate having tabs for managing one file per tab, and then later down the line learn how to split windows within each tab (through interactive tutorials built into NeoVim).

I agree with @taecilla that we would need to be very careful. Tabs don't work the same way and will certainly cause surprises. If tabs are presented to the user right away I can't help but think that some short introduction to how they are different should be as well. I wouldn't say put all this on hold because of we can't agree on tabs. If anything I would suggest a plugin of the proposed defaults is built so all can try. Sounds like sensible.vim is favored as a starting place.

@commonquail if a solid package manager (I haven't looked into @Shougo's work) you could do all the runtime files as plugins. Distribute NeoVIM with the latest at the time of the build but on startup the package manager could pull down the latest versions from the plug-in repo.

@hkjels

This comment has been minimized.

hkjels commented Aug 21, 2014

@Chronial

This comment has been minimized.

Chronial commented Nov 25, 2014

How about making <Home> go to the beginning of the text (=after indentation) on the first press and beginning of the line on second (more precisely, if we are at the beginning of the text).
This is how every other editor out there works.

Note: I’m only talking about <Home>, not ^ or 0.

@trusktr

This comment has been minimized.

trusktr commented Nov 26, 2014

@Chronial I think that's a good one. It's easy to map:

map <expr> <home> search('^\s\+\%#', 'n') ? '0' : '_'

but lately I've just been using 0 or _ depending on which I want, which is better than having to search for the home key on different keyboards inconsistently, and generally easier to reach from home row than any home key.

EDIT: Looks like GitHub VimL syntax choked on that last one.

@Chronial

This comment has been minimized.

Chronial commented Nov 26, 2014

@trusktr nice short mapping. (Note: If we do this, we should map it in all modes).

I personally use a mapping like that since I use a keyboard layout that brings the home key to the home row. But this is kind of besides the point, isn’t it? ^^ — One of the best reasons to have sensible defaults is to be nicer to new users, and they are probably used to the home key.

@justinmk justinmk added the ux label Nov 26, 2014

@trusktr

This comment has been minimized.

trusktr commented Nov 27, 2014

@Chronial Agreed, this home key functionality is basically the norm in modern editors. I added it to the list at the top.

@fmoralesc

This comment has been minimized.

Contributor

fmoralesc commented Dec 14, 2014

I'm currently working on implementing #1664 (see the PR), and there are a few defaults discussed here that might make sense there too. So far, I've included set hlsearch, set mouse=a, set wildmode=list:longest (although I personally feel that set wildmode=full is more ergonomic) and the <home> mapping there. I originally mapped Y to y$ too, but revisiting the discussions here and at vim-sensible, I decided against it for now.

I was also thinking if perhaps some common workarounds would be good to have there too, like this for tmux/screen.

@fmoralesc fmoralesc referenced this issue Dec 14, 2014

Closed

[RFC] Set some defaults early #1667

4 of 4 tasks complete
@trusktr

This comment has been minimized.

trusktr commented Dec 14, 2014

@fmoralesc What about set wildmode=longest:list,full? It behaves like set wildmode=list:longest but if you press tab one more time after the list appears then it starts the full behavior of selecting a completion. Described here. I think this option would be better because if you don't want the completion menu, then you don't have to press tab again, so it's optional.

👍 +1 for the tmux/screen thing.

@fmoralesc

This comment has been minimized.

Contributor

fmoralesc commented Dec 14, 2014

@trusktr That seems better, and it might work fine as a default.

On the tmux/screen thing, it seems like some (@justinmk) would prefer not to set terminal codes if possible. I still think it is not a bad idea to handle known corner cases like this.

@justinmk

This comment has been minimized.

Member

justinmk commented Dec 14, 2014

@fmoralesc I am going to back off that statement because I don't want to make a blanket statement for all terminal codes. How about adding them to a separate PR, to get the attention of those who have a more informed opinion than I.

@fmoralesc

This comment has been minimized.

Contributor

fmoralesc commented Dec 14, 2014

@justinmk OK. I'm going to open a new issue about this, because both vim and nvim seem to be messed up, and I don't know what the best solution for that is at all. I adopted the t_tu setting in my vimrc because that fixed some issues I had with colors, but it is an incomplete fix.

@fmoralesc

This comment has been minimized.

Contributor

fmoralesc commented Dec 14, 2014

@trusktr Btw, have you encountered issue #1546?

@trusktr

This comment has been minimized.

trusktr commented Dec 15, 2014

@fmoralesc I haven't experienced that, and I can't reproduce it. The behaviors seem identical in my case.

@VelocityREST

This comment has been minimized.

VelocityREST commented Dec 17, 2014

I'd add Smartcase to the defaults as well, just MHO

@Hettomei

This comment has been minimized.

Contributor

Hettomei commented Dec 17, 2014

@habash1986 I never use Smartcase at all.
So, off course, I would not put it in default settings.

@VelocityREST

This comment has been minimized.

VelocityREST commented Dec 17, 2014

why? it seems a nice addition, to my knowledge, if ignorecase & smartcase are set, you can search for both capital & small letter with small letters, but when specifying capital letter, it searches for the capital letters only, how could them bad? it's amazing!

@Hettomei

This comment has been minimized.

Contributor

Hettomei commented Dec 17, 2014

@habash1986
Yes I know what it is. That's why i never use it in vim grep ack ag ....

Because I always know what I'm looking for : Class or class
And when I used smart case, every time I do %s/Search/Other_seach/g it was the mess.

If I want both capital or not on a letter I do /[cC]lass

And If I really need uppercase and lowercase search for a repetitive task : set ic do the trick quickly

@VelocityREST

This comment has been minimized.

VelocityREST commented Dec 17, 2014

Interesting, I'm not a programmer, but I use Vim mainly to manipulate and clean data. I usually use / to jump quickly to a location, but something interests me in your comment and I can't get it, if you use ignorecase, how would you jump to "Class" directly? do you use \c? that seems extra work for me.

@Hettomei

This comment has been minimized.

Contributor

Hettomei commented Dec 17, 2014

If I want to go on word Class in a text, I do /Class

If I want to go on word class in a text, I do /class

Now if I want both 'class' and 'Class', 3 ways to do it (and many others I think):

  • I can search with /[cC]lass ( [ ] triggers regular expression and so looks for 'c' or 'C')
  • set ic or set ignorecase and then /class
  • set sm or set smartcase and then /Class

and when I will press n I'll go to 'class' or 'Class'

@rht

This comment has been minimized.

rht commented Dec 20, 2014

To make decision on which config should be in default, how about scraping everyone's vimrc's https://github.com/search?l=VimL&q=vimrc&type=Repositories and pick the settings used by at least 90% people?

@kopischke

This comment has been minimized.

kopischke commented Dec 21, 2014

Ha, yes, good idea, though I suspect we already set the only thing 90 % of Vimmers can agree on: nocompatible ;).

@justinmk

This comment has been minimized.

Member

justinmk commented Dec 23, 2014

This thread is getting long, so if anyone really needs to discuss a specific default that is not covered by sensible.vim, please open an issue for that specific suggestion.

@neovim neovim locked and limited conversation to collaborators Dec 23, 2014

Grimy pushed a commit to Grimy/neovim that referenced this issue Jan 7, 2015

Merge pull request neovim#276 from JazzCore/ultisnips_unicode
fix UnicodeEncodeError in ultisnips_completer
@justinmk

This comment has been minimized.

Member

justinmk commented Mar 23, 2015

closing for #1664

@justinmk justinmk closed this Mar 23, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.