sponsor Vim development Vim logo Vim Book Ad

st.vim : Syntax highlighting for Smalltalk

 script karma  Rating 21/8, Downloaded by 1354  Comments, bugs, improvements  Vim wiki

created by
Jānis Rūcis
 
script type
syntax
 
description
st.vim is a syntax highlighting script for Smalltalk that I wrote because I wasn't quite happy with the one that was distributed with my copy of Vim.  It's somewhat GNU Smalltalk-oriented, but I'm open to suggestions on improving compatibility with other versions of Smalltalk, as well as suggestions and corrections in general.  Also, I have only tested it in Vim 7.0.  If it works (or can be made to work) in earlier versions, please let me know.
 
install details
Drop st.vim in the syntax directory of your 'runtimepath'.  Type :help 'runtimepath' to find out where it is on your system and :help syntax for information on syntax highlighting in general.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
st.vim 0.2.1 2007-04-01 7.0 Jānis Rūcis Changed the way temporary variables are matched.  Should be less broken now.
st.vim 0.2.0 2007-03-31 7.0 Jānis Rūcis - Underscore is now recognized in identifiers.
- Added support for Smalltalk/X-style end-of-line comments (comment starting with "/ and ending at a newline).  For these to be recognized you have to set (:let) the st_stx_style_end_of_line_comments internal variable to any value in your .vimrc or wherever it is you usually set them.
- For name spaces in addition to the dot a double-colon is now recognized in the #methodFor: statement.
- Support for three-character binary selectors can be activated by setting the st_three_character_binary_selectors internal variable to any value.
- Made the white-space before an argument identifier optional for keyword and binary selectors in message patterns.  "doSomethingTo:anObject" and "==anObject" won't be highlighted as errors.
- Added support for Smalltalk/X-style primitives, sort of.  #primitiveDefinitions and #primitiveFunctions chunks are recognized, as well as %{ and %}-delimited regions.  (Contained C code is also highlighted.  Might be an overkill, though.)  For these to be recognized, set the st_stx_style_primitives variable.
- Re-added support for GNU Smalltalk-style sign-after-radix numbers.  Actived with st_sign_after_radix.
- Sign is now everywhere highlighted as part of the number.
- Assignment operator is only highlighted if preceded by an identifier.
- Some other stuff like, say, a new completely arbitrary script versioning system...
st.vim 1.0 2007-03-27 7.0 Jānis Rūcis Added a check to make sure there's white-space separating
message pattern from the body of the method.  Makes
errors somewhat easier to spot.

Added a fix to allow use of line continuation.  Script will no
longer fail when 'compatible' is set.

Added support for spell checking.  It's now performed only
in comments and strings.

Numbers are now handled separately as integers, floats and
scaled decimals.  The patterns now conform to the
draft ANSI Smalltalk standard which means that some
GNU Smalltalk specific constructs are no longer supported.
It's planned to reintroduce those in a different fashion
some time "in the future".  Which is soon, hopefully.

Temporarily removed error highlighting from array literals.  This is a
side effect of the change above.

Symbol handling was also changed for conformance.  In
particular, Symbol literals that aren't strings must
be valid selectors.  This isn't quite true in
GNU Smalltalk, but it's also something that I'll add back
later.
st.vim 0.2 2007-03-24 7.0 Jānis Rūcis Don't treat comments in Array and ByteArray literals as error.
st.vim 0.1 2007-03-24 7.0 Jānis Rūcis Initial upload
ip used for rating: 3.145.175.243

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github