0
votes

On macOS Catalina (10.15.4) have the following editors installed:

  • macVim (8.2.539)

  • Sublime 3 (3.2.2 - build 3211)


Have the Dracula color theme installed in both (a big shout out on whoever originally created this colorscheme / theme - it rocks!).

The issue is that they both do not look very similar (the one on macVim has terrible colors for its Java package imports & comments syntax).

macVim_dracula_theme.png

See how awful the colors are for package imports and comments?


Sublime 3's Dracula theme rocks:

Sublime3Dracula.png


Can someone assist me into editing the particular colors inside .vimrc/autoload/dracula.vim so it could match the color's of Sublime 3's Dracula theme?

If not, where can I edit (what file & entries) to manually try different colors myself for Java related package imports and comments, myself?

Is there a way I can make macVim's Dracula theme identical (in terms of colors) as Sublime 3's?

The color codes for Dracula Sublime are listed here:

https://github.com/dracula/sublime/blob/b7e8961afa4c11d620ad26abe28d76929c7ff90b/Dracula.tmTheme

Tried editing .vimrc/autoload/dracula.vim and nothing changed. :(


More details: tried loading / installing Dracula via Vim-Plug but nothing happened so I manually inserted the files from Dracula Vim's Github into (this is the only way it worked):

~.vimrc/autoload/dracula.vim
~.vimrc/colors/dracula.vim

.vimrc:

set nu
set ruler
" set rulerformat=%l\:%c  
set autoindent
syntax on
set showmatch " Shows matching brackets
set nocompatible 
set t_Co=256
set tabstop=4
set laststatus=2
set encoding=utf-8     
set smarttab " Autotabs for certain code
set shiftwidth=4

if has("gui_running")
  if has("gui_gtk2")
    set guifont=Inconsolata\ 12
  elseif has("gui_macvim")
    set guifont=JetBrains\ Mono\ Regular:h14
  elseif has("gui_win32")
    set guifont=Consolas:h11:cANSI
  endif
endif

" colorscheme pencil
colorscheme dracula

set background=light
let g:airline_theme = 'pencil'

call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
Plug 'dracula/vim', { 'as': 'dracula' }
call plug#end()

map <C-t> :NERDTreeToggle<CR>

.gvimrc

set nu
set ruler
set rulerformat=%l\:%c  
set autoindent
syntax on
set nocompatible 
set t_Co=256
set tabstop=4
set laststatus=2
set encoding=utf-8     

if has("gui_running")
  if has("gui_gtk2")
    set guifont=Inconsolata\ 12
  elseif has("gui_macvim")
    set guifont=JetBrains\ Mono\ Regular:h14
  elseif has("gui_win32")
    set guifont=Consolas:h11:cANSI
  endif
endif

" colorscheme pencil
colorscheme dracula

set background=light
let g:airline_theme = 'pencil'

call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
Plug 'dracula/vim', { 'as': 'dracula' }
call plug#end()

map <C-t> :NERDTreeToggle<CR>

~/.vimrc's top level folder structure:

~/.vim$ ls
autoload    colors      plugged

Inside the ~/.vim/plugged dir:

├── dracula
│   ├── INSTALL.md
│   ├── LICENSE
│   ├── README.md
│   ├── after
│   │   ├── plugin
│   │   │   └── dracula.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.vim
│   │   ├── dracula.vim
│   │   └── lightline
│   │       └── colorscheme
│   │           └── dracula.vim
│   ├── colors
│   │   └── dracula.vim
│   ├── doc
│   │   ├── dracula.txt
│   │   └── tags
│   └── screenshot.png
1
idk if this a vim-plug issue or not, but I suspect you're missing the after/syntax and other files in the repo. Also, it is generally true that you can't use the plugins until after plug#end... - D. Ben Knoble
@D.BenKnoble - I do have the after/syntax folders inside ~/.vim/plugged/dracula, see my edited post above. Its just that I had to manually insert these two specific files, dracula.vim, from Dracula Vim Github repository, into their respective places ~/.vim/autoload & ~/.vim/colors. Makes me think its a vim-plug issue. - PacificNW_Lover

1 Answers

0
votes

Got it working by placing the colorscheme after the call plug# section in .vimrc and .gvimrc:

set nu
set ruler
" set rulerformat=%l\:%c  
set autoindent
syntax on
set showmatch " Shows matching brackets
set nocompatible 
set t_Co=256
set tabstop=4
set laststatus=2
set encoding=utf-8     
set smarttab " Autotabs for certain code
set shiftwidth=4

if has("gui_running")
  if has("gui_gtk2")
    set guifont=Inconsolata\ 12
  elseif has("gui_macvim")
    set guifont=JetBrains\ Mono\ Regular:h14
  elseif has("gui_win32")
    set guifont=Consolas:h11:cANSI
  endif
endif

set background=light
let g:airline_theme = 'pencil'

call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
Plug 'dracula/vim', { 'as': 'dracula' }
call plug#end()

" colorscheme pencil
colorscheme dracula

map <C-t> :NERDTreeToggle<CR>

enter image description here


Just a note though, if you use vim-plug, you still have to manually put the specific dracula.vim files inside autoload and colors directory manually. Per Dracula for Vim's Github page, those instructions are not correct.