Vim Tips Wiki
(standard format)
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{ScriptComments|2390|CSApprox: make gvim-only colorschemes work transparently in terminal Vim}}
+
{{ScriptComments|CSApprox: make gvim-only colorschemes work transparently in terminal Vim}}
   
 
==Comments==
 
==Comments==
Line 10: Line 10:
 
This check can now be removed for Vim-7.3 since synIDattr() can now get the GUI attributes even when built without GUI.
 
This check can now be removed for Vim-7.3 since synIDattr() can now get the GUI attributes even when built without GUI.
 
--[[User:Dominiko|Dominiko]] August 13, 2010, 19:48:54 UTC 15:04 (UTC)
 
--[[User:Dominiko|Dominiko]] August 13, 2010, 19:48:54 UTC 15:04 (UTC)
  +
----
  +
The github for CSapprox is here: https://github.com/godlygeek/csapprox
  +
It seems to have the necessary update for 7.3 (as of Jul19 2010), but I haven't tested it.
  +
--[[Special:Contributions/98.248.112.191|98.248.112.191]] 17:54, January 21, 2012 (UTC)
  +
:I have. It works. No need for hacking. --[[Special:Contributions/58.106.81.165|58.106.81.165]] 00:29, October 7, 2012 (UTC)
  +
----
  +
In the plugin/CSApprox.vim file, near line 65, you should find something like
  +
if ! has('gui') && s:verbose > 0
  +
echomsg "CSApprox needs gui support - not loading."
  +
echomsg " See :help |csapprox-+gui| for possible workarounds."
  +
endif
  +
  +
comment it. It should do the trick. Oh and don't forget to uncomment the
  +
finish
  +
command just below the four lines mentioned above, or it won't load.
  +
--anon August 24, 2011
  +
  +
----
  +
Currently, CSApprox chokes on abbreviated color values such as "#aac", which are otherwise legal as color values. (Short-form color values are equivalent to having each hex digit repeated, so #59a would become #5599aa.) --anon 16:01, October 29, 2010
  +
----
  +
CSApprox plugin ~/.vim/plugins/CSApprox.vim was overriding my syntax highlighting for MatchParen, and couldn't figure out how to override it, so i added the line:
  +
highlight MatchParen cterm=bold ctermbg=red ctermfg=white
  +
to the last line of CSApprox file as a hack soln. New to vim, so if anyone can recommend a better method to override this and other CSApprox settings that would be great. I tried using an ~/.vim/after/plugin/CSApprox.vim file, but that did not seem to work. _d May 24, 2012
  +
----

Latest revision as of 00:29, 7 October 2012

Use this page to discuss script 2390 CSApprox: make gvim-only colorschemes work transparently in terminal Vim

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Comments[]

When I use the plugin CSApprox-3.50 with latest Vim-7.3f built without GUI, I get this message:

$ vim
CSApprox needs gui support - not loading.
  See :help |csapprox-+gui| for possible workarounds.

This check can now be removed for Vim-7.3 since synIDattr() can now get the GUI attributes even when built without GUI. --Dominiko August 13, 2010, 19:48:54 UTC 15:04 (UTC)


The github for CSapprox is here: https://github.com/godlygeek/csapprox It seems to have the necessary update for 7.3 (as of Jul19 2010), but I haven't tested it. --98.248.112.191 17:54, January 21, 2012 (UTC)

I have. It works. No need for hacking. --58.106.81.165 00:29, October 7, 2012 (UTC)

In the plugin/CSApprox.vim file, near line 65, you should find something like

if ! has('gui') && s:verbose > 0
  echomsg "CSApprox needs gui support - not loading."
  echomsg "  See :help |csapprox-+gui| for possible workarounds."
endif

comment it. It should do the trick. Oh and don't forget to uncomment the

finish

command just below the four lines mentioned above, or it won't load. --anon August 24, 2011


Currently, CSApprox chokes on abbreviated color values such as "#aac", which are otherwise legal as color values. (Short-form color values are equivalent to having each hex digit repeated, so #59a would become #5599aa.) --anon 16:01, October 29, 2010


CSApprox plugin ~/.vim/plugins/CSApprox.vim was overriding my syntax highlighting for MatchParen, and couldn't figure out how to override it, so i added the line:

highlight MatchParen cterm=bold ctermbg=red ctermfg=white

to the last line of CSApprox file as a hack soln. New to vim, so if anyone can recommend a better method to override this and other CSApprox settings that would be great. I tried using an ~/.vim/after/plugin/CSApprox.vim file, but that did not seem to work. _d May 24, 2012