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
Comments
You make several good points here. I bet we can come to some agreement on chaning some defaults.
Agree about syntax highlighting. I'm a solarized dark user myself, but I'm not sure having a dark theme by default is good.
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.
Agree.
I think we should be more reluctant to introduce new keybindings.
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.. Not sure we should add plugins to the core. This is a choice made by distributions.
A bit ambivalent, but I have to agree.. Also I have mouse support enabled, but
Ditto as above |
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 Relative numbering is contentious, but absolute numbering at the very least is a must-have, totally on board with absolute numbering. |
Great discussion. Here is my personal opinions:
Syntax highlighting should definitely be on by default. Anything better than Vim's
I'm not a user of relative line numbers myself and I think
I'm not sure what I think about this. I don't use
One of the most googled questions is how to turn off hlsearch after doing a search, the answer is usually
This I disagree with. I don't see any reason to introduce this as a default.
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.
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.
This I agree with. Experienced users can easily disable the arrow keys by unbinding them or |
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 Finally, I don't see the problem of introduce new maps if they come in the rc. |
My votes as a user:
+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.
+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.
+1
+1 Although I don't know what would be a preferred key binding. I use
-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.
-1 for using any external plugins with the main distro. Minor improvements would help new users, especially including the mode.
+0 Doesn't seem needed but it wouldn't effect existing users and could help new ones.
+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. |
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! |
See also: https://github.com/tpope/vim-sensible, especially the issues, since they have already have this discussion a lot. |
In my opinion, But to use plugin managers, users must write this statement in your rc file.
I agreed. Emacs has a lot of default extensions. But I think Vim should have plugin manager support than lot of default plugins.
It is great idea. |
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. |
@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? But now we're hijacking the thread.. Perhaps it's better if you post this to the mailing list? |
@simendsjo absolutely, see https://groups.google.com/forum/#!topic/neovim/RqJHRV6TY1c. I addressed your questions there. |
@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. |
@OliverUv thanks! I'll look into that. |
https://bitbucket.org/vimcommunity/vim-pi I think it is better repository for Vim. |
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). |
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. |
Look at what the show. Mostly a sea of dark images!
Agreed. Relative numbering can be left for the tweaker to discover.
(also in reply to @KevinSjoberg and @copenhas regarding hlsearch) nnoremap <c-c> :if (&hlsearch == 1) \| set nohlsearch \| else \| set hlsearch \| endif <cr> In other modes like INSERT,
(also in reply to @KevinSjoberg and @taecilla regarding the tabline) As @taecilla shows in the , 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 ( 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 Sublime Text (for example) does a great job with defaults, and it's super easy to configure the settings in Sublime's config file.
(also replying to @copenhas about default plugins) @KevinSjoberg
Agreed.
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.
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.
Yeah! +1 for @Shougo's NeoBundle!
Can you expand on which options would need to be set for those?
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.
Yes yes yes!!! Thank you for keeping the new users in mind!!
The project description says NeoVim has (or will) remove all vi compat entirely. +1 for backspace through lines.
We could definitely use some ideas from there.
+1
Yeah! It'd super nice in the future for NeoVim to interactively involve the user in learning and configuring NeoVim. |
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
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
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. |
@trusktr
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. |
There is LearnVim, "A suggested path for learning Vim" which could be useful to look at, even though it's still partly unfinished. |
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.) |
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!
In total agreement (@copenhas, @clentfort too ^). Something interactive would be awesome. I had the following idea in issue #277:
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).
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, I made (@simendsjo). The result suggests that the majority use a status line plugin.
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 I'd consider myself experienced in Vim, and I still prefer tabs over |
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. |
What about a featured section in the package manager? |
Hello, |
@commonquail What about the default empty status line? Mine shows
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.
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. |
I'm not inherently against changing certain default settings. Some of them are practically useless or nonsensical. We can easily make default
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. |
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.
My vote is no, too. Those plug-ins may be nice but I like more the old
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 |
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. |
How about making Note: I’m only talking about |
@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 EDIT: Looks like GitHub VimL syntax choked on that last one. |
@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. |
@Chronial Agreed, this home key functionality is basically the norm in modern editors. I added it to the list at the top. |
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 I was also thinking if perhaps some common workarounds would be good to have there too, like this for tmux/screen. |
@fmoralesc What about 👍 +1 for the tmux/screen thing. |
@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. |
@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 I haven't experienced that, and I can't reproduce it. The behaviors seem identical in my case. |
I'd add Smartcase to the defaults as well, just MHO |
@habash1986 I never use Smartcase at all. |
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! |
@habash1986 Because I always know what I'm looking for : Class or class If I want both capital or not on a letter I do And If I really need uppercase and lowercase search for a repetitive task : |
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. |
If I want to go on word Class in a text, I do If I want to go on word class in a text, I do Now if I want both 'class' and 'Class', 3 ways to do it (and many others I think):
and when I will press |
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? |
Ha, yes, good idea, though I suspect we already set the only thing 90 % of Vimmers can agree on: |
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. |
fix UnicodeEncodeError in ultisnips_completer
closing for #1664 |
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:
set hlsearch
.Tabs (the "tabline" as it's called invim
):set tabline=2
if has('mouse') | set mouse=a | endif
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"?set number
set backspace=indent,eol,start
filetype plugin indent on
%
:runtime! macros/matchit.vim
vim-airlinemap Y y$
)incsearch
wildmode
: list:longestWant to back this issue? Place a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: