Vim theme doesn't work when .vimrc is there!

sudoit

New Member
Joined
Apr 7, 2022
Messages
2
Reaction score
0
Credits
21
Hi guys! my native language is not English, so I apologize to you for the mistakes you'll see.
When there is a ~/.vimrc file, the vim theme does not work, but the rest of the configurations are enabled, like set nu.
Even by running the colorscheme delek command, the vim theme will not be set!
Screenshot from 2022-04-07 21-14-23.png

So the only way is to delete the .vimrc file, open the vim and set it up manually!
I recently immigrated to Devuan because of recent changes in Ubuntu that you know about.
And I didn't have that problem at the Ubuntu. But how can I fix it here?
Devuan Ceres + Openrc + Gnome.
 


It sounds like the theme you're trying to use probably wasn't packaged with the version of vim you have.

All of vims color schemes and things are stored somewhere in /usr/share/vim, if you don't see a file there that matches the theme you're trying to apply, then that's why it's not working. You'll have to find the vim script for the theme somewhere and add it to vim yourself.

Good Luck!
 
Now a days, there are packages for this. This is a list from a non-Ubuntu system.
But I know there are similar packages for other other distros.

vim-X11.x86_64 : The VIM version of the vi editor for the X Window System - GVim
vim-airline.noarch : Lean & mean status/tabline for vim that's light as air
vim-ale.noarch : Asynchronous Vim Lint Engine
vim-ansible.noarch : Vim plugin for syntax highlighting ansible's common filetypes
vim-command-t.x86_64 : An extremely fast, intuitive mechanism for opening files in VIM
vim-commentary.noarch : Comment and uncomments stuff in Vim using motion as a target
vim-common.x86_64 : The common files needed by any version of the VIM editor
vim-ctrlp.noarch : Full path fuzzy file, buffer, mru, tag, ... finder for Vim
vim-data.noarch : Shared data for Vi and Vim
vim-default-editor.noarch : Set vim as the default editor
vim-devicons.noarch : Adds file type icons to Vim plugins
vim-editorconfig.noarch : EditorConfig Vim Plugin
vim-enhanced.x86_64 : A version of the VIM editor which includes recent enhancements
vim-filesystem.noarch : VIM filesystem layout
vim-fugitive-pagure.noarch : Pagure support for vim-fugitive plugin
vim-go.x86_64 : Go development plugin for Vim
vim-golint.x86_64 : Golint vim plugin
vim-gtk-syntax.noarch : Vim syntax highlighting for GLib, Gtk+, Gstreamer, and more
vim-gv.noarch : Git commit browser in Vim
vim-javabrowser.noarch : The javabrowser plugin for VIM editor
vim-jedi.noarch : The Jedi vim plugin
vim-jellybeans.noarch : A colorful, dark color scheme for Vim
vim-latex.noarch : Tools to view, edit and compile LaTeX documents in Vim
vim-latex-doc.noarch : Documentation for vim-latex
vim-merlin.noarch : Context sensitive completion for OCaml in Vim
vim-minimal.x86_64 : A minimal version of the VIM editor
vim-nerdtree.noarch : A tree explorer plugin for the editor Vim
vim-omnicppcomplete.noarch : vim c++ completion omnifunc with a ctags database
vim-perl-support.noarch : Perl-IDE for VIM
vim-powerline.noarch : Powerline VIM plugin
vim-rhubarb.noarch : GitHub support for vim-fugitive plugin
vim-syntastic.noarch : A vim plugins to check syntax for programming languages

vim-syntastic-vim.noarch : A syntax checker for vim programming language
vim-taglist.noarch : The taglist plugin for VIM editor
vim-toml.noarch : Vim syntax for TOML
vimiv.x86_64 : An image viewer with vim-like keybindings
vimiv-qt.x86_64 : An image viewer with vim-like keybindings
vimpal.x86_64 : Separate application providing a file tree for VIM
====================================== Name Matched: vim ======================================
vim-fugitive.noarch : A Git wrapper so awesome, it should be illegal
vim-gitgutter.noarch : Shows a git diff in the gutter and stages/undoes hunks and partial hunks
vim-halibut.noarch : Syntax file for the halibut manual tool
vim-nerdtree-git-plugin.noarch : Plugin of NERDTree showing git status
vim-pathogen.noarch : Manage your runtimepath
vim-syntastic-ada.noarch : A syntax checker for ada programming language
vim-syntastic-ansible.noarch : A syntax checker for ansible programming language
vim-syntastic-asciidoc.noarch : A syntax checker for asciidoc programming language
vim-syntastic-asl.noarch : A syntax checker for asl programming language
vim-syntastic-asm.noarch : A syntax checker for asm programming language
vim-syntastic-c.noarch : A syntax checker for c programming language
vim-syntastic-cabal.noarch : A syntax checker for cabal programming language
vim-syntastic-coffee.noarch : A syntax checker for coffee programming language
vim-syntastic-coq.noarch : A syntax checker for coq programming language
vim-syntastic-cpp.noarch : A syntax checker for cpp programming language
vim-syntastic-cs.noarch : A syntax checker for cs programming language
vim-syntastic-css.noarch : A syntax checker for css programming language
vim-syntastic-cucumber.noarch : A syntax checker for cucumber programming language
vim-syntastic-docbk.noarch : A syntax checker for docbk programming language
vim-syntastic-elixir.noarch : A syntax checker for elixir programming language
vim-syntastic-erlang.noarch : A syntax checker for erlang programming language
vim-syntastic-eruby.noarch : A syntax checker for eruby programming language
vim-syntastic-fortran.noarch : A syntax checker for fortran programming language
vim-syntastic-glsl.noarch : A syntax checker for glsl programming language
vim-syntastic-go.noarch : A syntax checker for go programming language
vim-syntastic-haml.noarch : A syntax checker for haml programming language
vim-syntastic-haskell.noarch : A syntax checker for haskell programming language
vim-syntastic-help.noarch : A syntax checker for help programming language
vim-syntastic-html.noarch : A syntax checker for html programming language
vim-syntastic-java.noarch : A syntax checker for java programming language
vim-syntastic-json.noarch : A syntax checker for json programming language
vim-syntastic-julia.noarch : A syntax checker for julia programming language
vim-syntastic-less.noarch : A syntax checker for less programming language
vim-syntastic-lex.noarch : A syntax checker for lex programming language
vim-syntastic-llvm.noarch : A syntax checker for llvm programming language
vim-syntastic-lua.noarch : A syntax checker for lua programming language
vim-syntastic-matlab.noarch : A syntax checker for matlab programming language
vim-syntastic-nasm.noarch : A syntax checker for nasm programming language
vim-syntastic-objc.noarch : A syntax checker for objc programming language
vim-syntastic-objcpp.noarch : A syntax checker for objcpp programming language
vim-syntastic-ocaml.noarch : A syntax checker for ocaml programming language
vim-syntastic-perl.noarch : A syntax checker for perl programming language
vim-syntastic-perl6.noarch : A syntax checker for perl6 programming language
vim-syntastic-php.noarch : A syntax checker for php programming language
vim-syntastic-po.noarch : A syntax checker for po programming language
vim-syntastic-pod.noarch : A syntax checker for pod programming language
vim-syntastic-puppet.noarch : A syntax checker for puppet programming language
vim-syntastic-python.noarch : A syntax checker for python programming language
vim-syntastic-qml.noarch : A syntax checker for qml programming language
vim-syntastic-rst.noarch : A syntax checker for rst programming language
vim-syntastic-ruby.noarch : A syntax checker for ruby programming language
vim-syntastic-sass.noarch : A syntax checker for sass programming language
vim-syntastic-scala.noarch : A syntax checker for scala programming language
vim-syntastic-scss.noarch : A syntax checker for scss programming language
vim-syntastic-sh.noarch : A syntax checker for sh programming language
vim-syntastic-spec.noarch : A syntax checker for spec programming language
vim-syntastic-tcl.noarch : A syntax checker for tcl programming language
vim-syntastic-tex.noarch : A syntax checker for tex programming language
vim-syntastic-texinfo.noarch : A syntax checker for texinfo programming language
vim-syntastic-text.noarch : A syntax checker for text programming language
vim-syntastic-trig.noarch : A syntax checker for trig programming language
vim-syntastic-turtle.noarch : A syntax checker for turtle programming language
vim-syntastic-vala.noarch : A syntax checker for vala programming language
vim-syntastic-verilog.noarch : A syntax checker for verilog programming language
vim-syntastic-xhtml.noarch : A syntax checker for xhtml programming language
vim-syntastic-xml.noarch : A syntax checker for xml programming language
vim-syntastic-xslt.noarch : A syntax checker for xslt programming language
vim-syntastic-yacc.noarch : A syntax checker for yacc programming language
vim-syntastic-yaml.noarch : A syntax checker for yaml programming language
vim-syntastic-yara.noarch : A syntax checker for yara programming language
vim-syntastic-z80.noarch : A syntax checker for z80 programming language
vim-syntastic-zsh.noarch : A syntax checker for zsh programming language
vim-trailing-whitespace.noarch : Highlights trailing whitespace in red and provides

No need to bother with .vimrc anymore.
 
It sounds like the theme you're trying to use probably wasn't packaged with the version of vim you have.
Thank you for your opinion, but did you read the title of the topic or this part?
So the only way is to delete the .vimrc file, open the vim and set it up manually!
This means themes don't work only when there's a .vimrc file.
No need to bother with .vimrc anymore.
Wow! but I'm not a programmer yet, so to edit a normal text file, it's easier to use .vimrc!
 
Last edited:
delek is a standard colour scheme that ships with vim.

The OP didn’t post their .vimrc. They did post a screenshot of their .bashrc open in vim.
.vimrc should work for everybody.

@sudoit - can you post the content of your .vimrc? It might be a problem with your .vimrc file itself.
Make a new post in this thread and copy/paste the code for your .vimrc inside some code tags, instead of posting a screenshot.

@dos2unix : most of those packages are vim extensions. Many of those require a little messing/wrangling with your .vimrc.
Sometimes the packages will automatically edit your .vimrc, to configure new extensions.

But even with no plugins, vim has tons of functionality out of the box, configurable via .vimrc.
 

Members online


Top