From 9da8e7e0074c5958d5326bf042c3ee28b71147a9 Mon Sep 17 00:00:00 2001 From: Ludovic Koenig Date: Thu, 26 Sep 2019 13:25:58 +0200 Subject: [PATCH 1/4] Relinked some Ruby syntax groups Some of Ruby's syntax groups have been linked to other highlight groups to make the colorscheme more coherent. It should beautify the template on vimcolors.com. --- colors/odyssey.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/colors/odyssey.vim b/colors/odyssey.vim index a4af003..4fdfe8f 100644 --- a/colors/odyssey.vim +++ b/colors/odyssey.vim @@ -320,7 +320,10 @@ call s:l( 'rubyDefine', 'Statement') call s:l( 'rubyInclude', 'Statement') call s:h( 'rubyInstanceVariable', 'background', 'warning', 'italic') call s:l('rubyInterpolationDelimiter', 'Function') -call s:l( 'rubyStringDelimiter', 'Constant') +call s:l( 'rubyStringDelimiter', 'Function') +call s:l( 'rubyAccess', 'Statement') +call s:l( 'rubyAttribute', 'Statement') +call s:l( 'rubyPseudoVariable', 'Special') " }}} " Rust Highlights {{{ From 475aa0018787d371ea5cd7db2013a605cbd65525 Mon Sep 17 00:00:00 2001 From: Ludovic Koenig Date: Fri, 27 Sep 2019 13:23:33 +0200 Subject: [PATCH 2/4] Add some new links between syntax and highlight Some new links have been added or changed in order to beautify the Ruby syntax. --- after/syntax/ruby.vim | 11 +++++++++++ colors/odyssey.vim | 28 ++++++++++++++++++---------- 2 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 after/syntax/ruby.vim diff --git a/after/syntax/ruby.vim b/after/syntax/ruby.vim new file mode 100644 index 0000000..f2015b1 --- /dev/null +++ b/after/syntax/ruby.vim @@ -0,0 +1,11 @@ +" Maintainer: Ludovic Koenig +" Version: 0.6.0 +" Since: 0.6.0 +" License: MIT +" +" Ruby Syntax {{{ + +syntax keyword rubyOdysseyNil nil + +" }}} +" vim: foldmethod=marker diff --git a/colors/odyssey.vim b/colors/odyssey.vim index 4fdfe8f..a052354 100644 --- a/colors/odyssey.vim +++ b/colors/odyssey.vim @@ -314,22 +314,30 @@ let g:python_no_builtin_highlight = 1 " }}} " Ruby Highlights {{{ -call s:l( 'rubyClass', 'Statement') -call s:h( 'rubyClassVariable', 'background', 'warning', 'italic') -call s:l( 'rubyDefine', 'Statement') -call s:l( 'rubyInclude', 'Statement') -call s:h( 'rubyInstanceVariable', 'background', 'warning', 'italic') -call s:l('rubyInterpolationDelimiter', 'Function') -call s:l( 'rubyStringDelimiter', 'Function') -call s:l( 'rubyAccess', 'Statement') -call s:l( 'rubyAttribute', 'Statement') -call s:l( 'rubyPseudoVariable', 'Special') +call s:l( 'rubyClass', 'Statement') +call s:h( 'rubyClassVariable', 'background', 'warning', 'italic') +call s:l( 'rubyDefine', 'Statement') +call s:l( 'rubyInclude', 'Statement') +call s:h( 'rubyInstanceVariable', 'background', 'warning', 'italic') +call s:l('rubyInterpolationDelimiter', 'Function') +call s:l( 'rubyStringDelimiter', 'Normal') +call s:l( 'rubyAccess', 'Statement') +call s:l( 'rubyAttribute', 'Statement') +call s:l( 'rubyPseudoVariable', 'Special') +call s:l( 'rubySymbol', 'rubyConstant') +call s:h( 'rubyBlockParameter', 'background', 'procedure', 'italic') +call s:l( 'rubyOdysseyNil', 'Normal') +call s:l( 'rubyBoolean', 'Normal') +call s:l( 'rubyFloat', 'Normal') +call s:l( 'rubyInteger', 'Normal') " }}} " Rust Highlights {{{ + call s:l( 'rustLifetime', 'Constant') call s:l( 'rustQuestionMark', 'Operator') call s:l('rustOdysseyFunction', 'Function') call s:l( 'rustOdysseyType', 'Type') + " }}} " vim: foldmethod=marker From e46886e639a249ad59f476a209a3feb3ecdd1fa9 Mon Sep 17 00:00:00 2001 From: Ludovic Koenig Date: Fri, 27 Sep 2019 13:33:41 +0200 Subject: [PATCH 3/4] Add the commentary in the ruby syntax script --- after/syntax/ruby.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/after/syntax/ruby.vim b/after/syntax/ruby.vim index f2015b1..96d3d9b 100644 --- a/after/syntax/ruby.vim +++ b/after/syntax/ruby.vim @@ -1,3 +1,18 @@ +" __ ____ +" _____ __ __ / /_ __ __ / __/____ _____ +" / ___// / / // __ \ / / / / / /_ / __ \ / ___/ +" / / / /_/ // /_/ // /_/ / / __// /_/ // / +" /_/ \__,_//_.___/ \__, / /_/ \____//_/ +" __ /____/ +" ____ ____/ /__ __ _____ _____ ___ __ __ +" / __ \ / __ // / / // ___// ___// _ \ / / / / +" / /_/ // /_/ // /_/ /(__ )(__ )/ __// /_/ / +" \____/ \__,_/ \__, //____//____/ \___/ \__, / +" /____/ /____/ +" +" Note: This script only defines the syntax group named rubyOdysseyNil, because +" otherwise nil is considered to be a rubyPseudoVariable +" " Maintainer: Ludovic Koenig " Version: 0.6.0 " Since: 0.6.0 From 7610763f28f8a9d831df9cab70d5865b3cc2f612 Mon Sep 17 00:00:00 2001 From: Ludovic Koenig Date: Sat, 28 Sep 2019 10:13:34 +0200 Subject: [PATCH 4/4] Update the CHANGELOG with the last changes It describes now the changes that have been maded to the Ruby syntax. --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4adb16..0a68296 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning]. +## [Unreleased] + +### Changed + +- Changed the color scheme for Ruby files: + + + Ruby booleans, 'nil', numbers and string delimitiers are using the `Normal` + syntax group. + + + `rubySymbol` are relinked to `rubyConstant`. + + + Some Ruby keywords are relinked to `Statement` to make the scheme more + coherent. + ## [0.5.0] - 2019-09-17 ### Added @@ -203,6 +217,7 @@ project adheres to [Semantic Versioning]. + Otherwise, a GUI version of Vim must be used. +[Unreleased]: https://github.com/ludokng/vim-odyssey/compare/0.5.0...HEAD [0.5.0]: https://github.com/ludokng/vim-odyssey/compare/0.4.0...0.5.0 [0.4.0]: https://github.com/ludokng/vim-odyssey/compare/0.3.0...0.4.0 [0.3.0]: https://github.com/ludokng/vim-odyssey/compare/0.2.0...0.3.0