dracula / vim

🧛🏻‍♂️ Dark theme for Vim
https://draculatheme.com/vim
MIT License
1.34k stars 455 forks source link

Can't install and documentation doesn't help at all #157

Closed adrianTNT closed 4 years ago

adrianTNT commented 4 years ago

In my opinion the instructions / documentation is useless

For example:

If you use vim + vundle: [...]
If you use vim-plug [...]

What if I don't know what these are and I don't use any ?

cd ~/.vim

What is that supposed to do ? Nothing on the raspberry pi I am testing.

Since it is just a color scheme I doubt it should be that complicated. And should not require to install other 2-3 tools. Very frustrating :/

get-me-power commented 4 years ago

@adrianTNT OK, I will send Pull Request about these project's readme. Please check.

dsifford commented 4 years ago

Since it is just a color scheme I doubt it should be that complicated. And should not require to install other 2-3 tools. Very frustrating :/

It actually is a bit more complicated than just dropping the colors/dracula.vim file in your ~/.vim/colors directory because we also support a litany of other plugins and have defined a few autoload definitions to make doing that easier.

What specific issues do you have with the instructions?

cd ~/.vim

What is that supposed to do ? Nothing on the raspberry pi I am testing.

Really?

adrianTNT commented 4 years ago

// Sorry for the rant above but it is frustrating.

It was not obvious that I should create the ~/.vim if is not there (?!), I can just assume it is a bad command or path. The dir was not there on raspberry pi for example.

Then:

cd ~/.vim
git submodule add git@github.com:dracula/vim.git bundle/dracula
fatal: not a git repository (or any of the parent directories): .git

Is it possible to do this manually ? Even if it means to copy many files ? At least I could understand how it works. As it is now, I need to install these plugin managers, each of them with their own issues and fixes.

dsifford commented 4 years ago

The easiest way (IMHO) is to use vim-plug.  https://github.com/junegunn/vim-plug

adrianTNT commented 4 years ago

I was trying by this path, if I can't get it to work, then I would try vi-plug as you mentioned.

cd ~/.vim
git submodule add git@github.com:dracula/vim.git bundle/dracula
fatal: not a git repository (or any of the parent directories): .git

Is this valid instead of the above ?

sudo mkdir -p ~/.vim/bundle/dracula
sudo git clone https://github.com/dracula/vim ~/.vim/bundle/dracula

If so, can you tell me next step ? :D

adrianTNT commented 4 years ago

Does this look OK (dracula) or is more like a default/fallback theme ?

theme

benknoble commented 4 years ago

That is definitely not dracula. You really should not need sudo.

"What to do" depends entirely on how you want to setup vim and plugins. There are hundreds of plugin managers, several truly good ones, a runtimepath manager that can be used to plugins, and the "native" vim way (8+ required). Do you care? Do you have a preference? We can't guide your installation without knowing.

I would also humbly suggest that if you're not comfortable with a command-line, it might be worth learning the command-line/shell better before really decking out vim.

tobiabocchi commented 4 years ago

Hello, I am also trying to install dracula on my mac for vim using the "native" vim feature, I could not understand what the guide means when it says that "dracula" should be in my runtimepath, which currently is set to: runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim /vimfiles/after,~/.vim/after I moved the folders from this repo to the .vim folder but I am still getting this error when opening vim: Error detected while processing /Users/tobiabocchi/.vim/vimrc: line 26: E919: Directory not found in 'packpath': "pack/*/opt/dracula" Press ENTER or type command to continue and line 26 is packadd! dracula

rogerdahl commented 4 years ago

@adrianTNT The person who wrote the instructions assumed a level of familiarity with vim and the shell that is higher than yours. For vim, it was higher than mine as well. Not really their fault -- all instructions have to make assumptions about the audience (or they would have to start by teaching you how to read :) )

I also concur with @benknoble -- Remember that people have many demands on their time and that they're providing both the projects and support for them to you for free. Pro tip: Add a "for me" qualifier. E.g. "It doesn't work" -> "It doesn't work for me".

If you have an otherwise unconfigured instance of vim, this is a quick and dirty install that works "for me" on Raspberry Pi:

Install dependencies:

sudo apt install git rsync vim

Install Dracula for vim (you can copy/paste the whole block into your shell in one go, and you may have to press Enter to launch it):

git clone https://github.com/dracula/vim.git ~/dracula

mkdir -p ~/.vim
rsync -r  ~/dracula/ ~/.vim
rm -rf ~/dracula

cat << EOF >> ~/.vimrc
:set rtp+=~/.vim

if (has("termguicolors"))
  set termguicolors
endif

syntax on
colorscheme dracula
EOF

If correctly installed, vim ~/.vimrc should give you colors like this:

Selection_040

If colors still aren't correct, try adding a TERM setting to your .bashrc (copy/paste block to your shell):

echo >> ~/.bashrc export TERM=xterm-256color
. ~/.bashrc
adrianTNT commented 4 years ago

While developing and selling web related software since 2004 (~15 years), when I write a readme file I always assume that the user is an absolute beginner, I make the code and the instructions so that you can't go wrong and so that it can be explained in a simple manner. I feel that is not the case here. Too many wide assumptions and references to other tools (go use that and that).

I think I have a good idea about how documentation should look like, I had no complains regarding my documentation, just few people that refused to read it.

I am very familiar with bash and console, editing with vi/vim, but zero experience customizing vim. I think most users fit in this group and instructions should consider this :)

This is not supposed to be a rant, just explaining my situation and trying to improve the experience for everyone else in same situation.

[...] You really should not need sudo [...]

On Raspberry pi it failed to create some paths unless I used sudo.

benknoble commented 4 years ago

Notes (thanks to @rogerdahl for more gently explaining where I was coming from):

  1. :set rtp+=~/.vim is wrong: the defaults on most systems include ~/.vim (see :help 'runtimepath')
  2. rogerdahl's method will work, but it's inconvenient to update a plugin, and even worse to delete it—thus, plugin managers and pathogen were born, with vim 8 eventually getting packages.
  3. @adrianTNT I hope you'll forgive my assumption; I expect git users to be aware of how to use git. The real assumption is: people looking to customize vim understand how to do so. Perhaps that is bold, but there is a plethora of available material in the form of :help and google.com—it is a time sink to explain it for the nth time. No instruction "can't go wrong." That said, I can take another look and make a pass at improvements. (P.S. I assume command-line folks know cd can fail, and they should mkdir directories they need...)
  4. sudo shouldn't be necessary unless ~ (or, God forbid, ~/.vim) is not owned by the logged in $USER.
  5. You still haven't answered my questions: how do you plan to manage plugins? Doing it without help is a bad idea, period. At least use packages if you have vim8 (whether or not you use submodules), or consider a plugin manager.
  6. The original instructions contain this link: if you use vim + pathogen...

What if I don't know what these are and I don't use any ?

You are surrounded by powerful research tools: perhaps it would be worth your time to investigate? Customizing vim is a deep and powerful journey (I'm on year 4...). I am glad to help (especially over on vi.stackexchange.com), but please try to respect that there are communities and a wealth of documented resources available to you.

Hope it goes well!

benknoble commented 4 years ago

@tobiabocchi

I could not understand what the guide means when it says that "dracula" should be in my runtimepath

This means that 'runtimepath' must contain the directories that contain the directories in this repo, somewhere, before you do colorscheme dracula.

packadd is more for opt than start plugins. You might want to read :help packages. We also have a whole other thread on this (maybe @dsifford remembers which issue?).

get-me-power commented 4 years ago

I think that more information is available on the official website. Therefore, it may be better to access this url than to read the README.

url

https://draculatheme.com/vim/

tobiabocchi commented 4 years ago

Ok thank you, I solved my problem by removing packadd! dracula line from my vimrc. It was unclear to me, from reading the README and the website's documentation that the steps to take in order to install just the colorscheme were to copy all the folders from this repo somewhere in my runtimepath in my case, the .vim folder and then just use colorscheme dracula instead of copying just the dracula.vim. Thank you! image

get-me-power commented 4 years ago

@benknoble @dsifford

I think this issue has been resolved, what do you think?