dracula / vim

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

can't make dracula_pro installation instructions work for me on Vim #305

Closed rodaguilera closed 1 year ago

rodaguilera commented 1 year ago

What happened

can't make dracula_pro installation instructions work for me on Vim. Did fine with iTerm2 and Xcode.

What I expected to happen

to work as advised in INSTALL.md

Screenshot

Screenshot 2023-05-03 at 00 16 19 Screenshot 2023-05-03 at 00 16 36

Machine Info

Additional Info

my dir tree:

.vim/
├── autoload
│   └── plug.vim
├── colors
│   └── molokai.vim
├── pack
│   └── themes
│       └── start
│           └── dracula_pro
│               ├── INSTALL.md
│               ├── after
│               │   ├── plugin
│               │   │   └── dracula_pro.vim
│               │   └── syntax
│               │       ├── css.vim
│               │       ├── gitcommit.vim
│               │       ├── html.vim
│               │       ├── javascript.vim
│               │       ├── json.vim
│               │       ├── markdown.vim
│               │       ├── ocaml.vim
│               │       ├── perl.vim
│               │       ├── php.vim
│               │       ├── plantuml.vim
│               │       ├── python.vim
│               │       ├── ruby.vim
│               │       ├── rust.vim
│               │       ├── sass.vim
│               │       ├── sh.vim
│               │       ├── tex.vim
│               │       ├── typescript.vim
│               │       ├── typescriptreact.vim
│               │       ├── vim.vim
│               │       ├── xml.vim
│               │       └── yaml.vim
│               ├── autoload
│               │   ├── airline
│               │   │   └── themes
│               │   │       └── dracula_pro.vim
│               │   ├── dracula_pro.vim
│               │   └── lightline
│               │       └── colorscheme
│               │           └── dracula_pro.vim
│               ├── colors
│               │   ├── dracula_pro.vim
│               │   ├── dracula_pro_base.vim
│               │   ├── dracula_pro_blade.vim
│               │   ├── dracula_pro_buffy.vim
│               │   ├── dracula_pro_lincoln.vim
│               │   ├── dracula_pro_morbius.vim
│               │   └── dracula_pro_van_helsing.vim
│               └── doc
│                   └── dracula_pro.txt
└── plugged
    ├── nerdtree
    │   ├── CHANGELOG.md
    │   ├── LICENCE
    │   ├── README.markdown
    │   ├── _config.yml
    │   ├── autoload
    │   │   ├── nerdtree
    │   │   │   └── ui_glue.vim
    │   │   └── nerdtree.vim
    │   ├── doc
    │   │   ├── NERDTree.txt
    │   │   └── tags
    │   ├── lib
    │   │   └── nerdtree
    │   │       ├── bookmark.vim
    │   │       ├── creator.vim
    │   │       ├── event.vim
    │   │       ├── flag_set.vim
    │   │       ├── key_map.vim
    │   │       ├── menu_controller.vim
    │   │       ├── menu_item.vim
    │   │       ├── nerdtree.vim
    │   │       ├── notifier.vim
    │   │       ├── opener.vim
    │   │       ├── path.vim
    │   │       ├── tree_dir_node.vim
    │   │       ├── tree_file_node.vim
    │   │       └── ui.vim
    │   ├── nerdtree_plugin
    │   │   ├── exec_menuitem.vim
    │   │   ├── fs_menu.vim
    │   │   └── vcs.vim
    │   ├── plugin
    │   │   └── NERD_tree.vim
    │   ├── screenshot.png
    │   └── syntax
    │       └── nerdtree.vim
    ├── swift.vim
    │   ├── LICENSE
    │   ├── README.md
    │   ├── ale_linters
    │   │   └── swift
    │   │       └── swiftpm.vim
    │   ├── compiler
    │   │   └── swift.vim
    │   ├── ctags
    │   │   └── swift.cnf
    │   ├── example
    │   │   ├── MainViewController.swift
    │   │   ├── URL.swift
    │   │   └── example.swift
    │   ├── ftdetect
    │   │   └── swift.vim
    │   ├── ftplugin
    │   │   └── swift.vim
    │   ├── indent
    │   │   └── swift.vim
    │   ├── plugin
    │   │   └── swift.vim
    │   ├── screenshots
    │   │   ├── screen.png
    │   │   ├── screen2.png
    │   │   └── screen3.png
    │   ├── syntax
    │   │   └── swift.vim
    │   └── syntax_checkers
    │       └── swift
    │           ├── swiftlint.vim
    │           └── swiftpm.vim
    └── vim-markdown
        ├── CONTRIBUTING.md
        ├── Makefile
        ├── README.md
        ├── after
        │   └── ftplugin
        │       └── markdown.vim
        ├── doc
        │   ├── tags
        │   └── vim-markdown.txt
        ├── ftdetect
        │   └── markdown.vim
        ├── ftplugin
        │   └── markdown.vim
        ├── indent
        │   └── markdown.vim
        ├── registry
        │   └── markdown.yaml
        ├── syntax
        │   └── markdown.vim
        └── test
            ├── README.md
            ├── folding-toc.vader
            ├── folding.vader
            ├── ge_test.md
            ├── header-decrease.vader
            ├── indent-new-list-item.vader
            ├── indent.md
            ├── indent.vader
            ├── insert-toc.vader
            ├── map.vader
            ├── python-folding.vader
            ├── run-tests.sh
            ├── setextoatx.vader
            ├── syntax-singleline.vader
            ├── syntax.md
            ├── syntax.vader
            ├── table-format.vader
            ├── toc-autofit.vader
            ├── toc.vader
            └── vimrc

51 directories, 113 files

my .vimrc file:

" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif

" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
  \| PlugInstall --sync | source $MYVIMRC
\| endif

call plug#begin('~/.vim/plugged')

Plug 'keith/swift.vim'
Plug 'preservim/vim-markdown'
Plug 'preservim/nerdtree'

call plug#end()

" Set font and size
set guifont=Hack\ Nerd\ Font\ Regular:h16

" Enable syntax highlighting
syntax enable

" Enable global lateral number line indication
set number

" disable the swapfile
set noswapfile 

" highlight all results
set hlsearch 

" ignore case in search
set ignorecase 

" show search results as you type
set incsearch 

" Enable indent 
filetype plugin indent on

" Set file type detection for shell scripts
au BufRead,BufNewFile *.sh set filetype=sh

" Set indentation options for shell scripts
autocmd FileType sh setlocal shiftwidth=4 tabstop=4 softtabstop=4

" Set indentation options for Makefiles
autocmd FileType make setlocal shiftwidth=4 tabstop=4 softtabstop=4

" Set indent, syntax highlighting and numbered lines for C programming
autocmd FileType c setlocal shiftwidth=4 tabstop=4 softtabstop=4

" Dracula Pro Theme
packadd! dracula_pro
let g:dracula_colorterm = 0
set termguicolors

" Set colorscheme
colorscheme dracula_pro 
benknoble commented 1 year ago

There's a known issue with the latest Dracula Pro releases where they were created on a Windows machine in such a way that didn't properly account for file encodings and system handling of newlines.

Try something like find . -type f -exec dos2unix {} + from inside the dracula_pro directory. If you don't have dos2unix, you can do something like cd …dracula_pro && vim $(find . -type f), then :argdo %s/\r// | update and :qall.

benknoble commented 1 year ago

(P.S. In the future, please don't post images of text.)

rodaguilera commented 1 year ago

Thank you! worked now. Did it with dos2unix.

Sorry for the images of the text.

Kindest regards, Rodrigo