Is there a way to get Vim list of all installed color scheme? This can easily choose not to view a .vim
directory.
#1st Floor
You can /usr/share/vim/vimNN/colors
see the color scheme list under ( NN
a version, for example, vim74
for vim 7.4).
This is here to explain.
I use Linux server via ssh, print TAB ^I
and CTRL dprint ^D
.
#2nd Floor
A good solution, thank you for your contributors. Over the years, I have been struggling to find a completely bad color scheme - using SSH to connect to Redhat system under Windows Vista, terminal type is xterm. Editor provides a black background and strange color for a variety of keywords. Worse - After leaving Vim, xterm terminal appeared strange color scheme.
Really confused.
In addition, Backspace during insertion mode failure, which is annoying - although Delete done the same thing.
Cure -
In SSH monitor, select the "edit / settings."
One. Select Profile Settings / Color
Bay select 'Enable ANSI Colors'
C. Standard text color may not be a problem
Add these lines to $ HOME / .vimrc:
colorscheme default
if&term ==“xterm”
Provided t_kb = ^ H.
fixdel
just in case
Note: ^ H must be entered as ctrl-V ctrl-H. It seems strange, but it seems to work.
#3rd floor
If you are willing to install plug-ins, I recommend that you use https://github.com/vim-scripts/CycleColor .
Cycle through all installed colorschemes. Easily select a good method of colorscheme.
#4th floor
try
set wildmenu
set wildmode=list:full
set wildcharm=<C-z>
let mapleader=','
nnoremap <leader>c :colorscheme <C-z><S-Tab>
Your ~/.vimrc
.
The first two exercise possible matches displayed as a list. You can use one or two.
The fourth line is the leader ,
rather than the default \\
.
The last line allows you to simply type ,c
in order to obtain a list and tips to change your colorscheme.
The third line effectively allows Tab
s appear in the key map.
(Of course, I learned from the Internet to all of these strategies, are recent SO, recently.)
#5th Floor
This is what I have written a small function to try all colorschemes $ VIMRUNTIME / colors directory.
Add the following function to vimrc, and then open the source file and call the function from a command.
function! DisplayColorSchemes()
let currDir = getcwd()
exec "cd $VIMRUNTIME/colors"
for myCol in split(glob("*"), '\n')
if myCol =~ '\.vim'
let mycol = substitute(myCol, '\.vim', '', '')
exec "colorscheme " . mycol
exec "redraw!"
echo "colorscheme = ". myCol
sleep 2
endif
endfor
exec "cd " . currDir
endfunction
#6th floor
Check out my system menu.vim (Find 'Color Scheme submenu') and @chappar answer, I came up with the following features:
" Returns the list of available color schemes
function! GetColorSchemes()
return uniq(sort(map(
\ globpath(&runtimepath, "colors/*.vim", 0, 1),
\ 'fnamemodify(v:val, ":t:r")'
\)))
endfunction
It does the following:
- Get the script list of all available color schemes in the path runs (globpath, runtimepath)
- The script path mapped to their base name (stripping parent directory and extension) (map, fnamemodify)
- Sort and delete duplicates (uniq, sort)
I then use the function to do something like this:
let s:schemes = GetColorSchemes()
if index(s:schemes, 'solarized') >= 0
colorscheme solarized
elseif index(s:schemes, 'darkblue') >= 0
colorscheme darkblue
endif
This means that I prefer the "exposure", then "Deep Blue" program; if not available, do nothing.
#7th floor
For ease of reference only, because I see a lot of people search for this topic and too lazy ... I'm sorry, too busy to check their own (including me). Here is a list of Vim default color scheme 7.4:
blue.vim
darkblue.vim,
delek.vim
desert.vim
elflord.vim
evening.vim
industry.vim
koehler.vim
morning.vim
murphy.vim
pablo.vim
peachpuff.vim
ron.vim
shine.vim
slate.vim
torte.vim
zellner.vim
Building # 8
Types of
:colorscheme
Then Space,followed TAB.
Or Peter said,
:colorscheme
then SpacefollowedCTRL d
Short version of the command is :colo
so you can use it in the previous two commands, rather than using the "long form."
If you want to find and preview about the topic, there are a variety of sites, such as Vim color
House # 9
If you are using a +menu
compiled vim, you can use :help
console-menu
:help
to focus console-menu
. From there, you can navigate to Edit.Color\\ Scheme
in order to get the gvim
same list.
The other method is to use a cool script ScrollColors , it uses the j/k
preview colorschemes when rolling program.