newlisp.vom and .vimrc

Started by Lutz, November 09, 2007, 05:57:52 AM

Previous topic - Next topic

Lutz

added parenthesis coloring and re-did .vimrc to match new newlisp.vim from Cyril.



http://newlisp.org/code/newlisp.vim.txt">http://newlisp.org/code/newlisp.vim.txt



http://newlisp.org/code/vimrc.txt">http://newlisp.org/code/vimrc.txt



Lutz



ps: the only missing part for complete compatibility with the newLISP GS editor would be a special color for quoted symbols (don't know how to do this :-( , perhaps Cyril knows ;-) )

Lutz

#1
Unfortunately the parenthesis coloring ruins Cyril's error coloring for unmatched parenthesis, needs help!



Lutz

Cyril

#2
Quote from: "Lutz"Unfortunately the parenthesis coloring ruins Cyril's error coloring for unmatched parenthesis, needs help!


Fixed. Version 1.2 uploaded to http://wagner.pp.ru/~slobin/vim/syntax/newlisp.vim">it's usual place. It is not the version 1.2 I've not promised to do in other tread, that one is underway (will be 1.3)! I have also uploaded it at the Vim site as http://www.vim.org/scripts/script.php?script_id=2067">script #2067.



BTW, in your patch you have linked newlispParenthesis group to Parenthesis group, but there is no standard Parenthesis group in Vim! At least, there is no such group in Vim version 7.1.130 which I am using. So I have not seen any changes in highlighting. In my version 1.2 I have linked parentheses to standard Delimiter group instead. If you have the Parentheses group in you Vim, then probably it is better to re-link it in your .vimrc, not in plugin distributed. Use hi link newlispParenthesis Parenthesis (note the absence of def -- the very intent of def(ault) is to allow overriding it in .vimrc).
With newLISP you can grow your lists from the right side!

Cyril

#3
Definitely I am blessed by Gods tonight! Version 1.3 is ready and uploaded to http://wagner.pp.ru/~slobin/vim/syntax/newlisp.vim">my page and to the http://www.vim.org/scripts/script.php?script_id=2067">Vim site. Now it highlights documentation keywords (like @author) and HTML markup in comments. It doesn't although validate HTML -- it is newLISP syntax file, after all. ;-)



You can look at rather random examples http://wagner.pp.ru/~slobin/vim/syntax/newlisp.syntax.highlighting.examples.lsp.html">here.
With newLISP you can grow your lists from the right side!

Cyril

#4
Call me crazy, but I have done version 1.4! Now it understands real newlispdoc syntax in comments, not just a rough approximation as 1.3 did. Addresses of file itself and examples see in my previous message.



The only pitfall is that I am not sure whether it still works with Vim 6.x versions. I do my development with 7.1 and I have used some rather advanced features of Vim, and I do not remember in which Vim version they have been introduced.
With newLISP you can grow your lists from the right side!

Cyril

#5
Show must go on? It does! Version 1.5 released. By popular demand (where "popular" means "of Lutz" ;-), quoted symbols are highlighted now.



BTW, do you know that Russian language has a special word for "one and a half"?
With newLISP you can grow your lists from the right side!

cormullion

#6
Quote from: "Cyril"BTW, do you know that Russian language has a special word for "one and a half"?


;-) No. But there's one in latin, too, isn't there - sesqui.

Lutz

#7
Quote from: "Cyril"... it understands real newlispdoc syntax ... quoted symbols are highlighted now ...


simply amazing :), thanks



Lutz

Cyril

#8
Version 1.6 is released. No new functionality, a bugfix only. A nasty bug (two nasty bugs really) was triggered when switching syntax off and back on or when changing colorscheme. If you are always using default colorscheme (or some other, but always the same) and never turn highlighting off and on, you are not affected. Now you can safely play with colors in the quest for the end of rainbow! ;-)
With newLISP you can grow your lists from the right side!

Cyril

#9
Another bugfix version. Keyword @example was processed incorrectly (the script was erroneously supposed that it has the same one-line syntax as @module, @author etc.). I have found this when really tried to write some docs to some my code.
With newLISP you can grow your lists from the right side!

rickyboy

#10
Quote from: "cormullion"
Quote from: "Cyril"BTW, do you know that Russian language has a special word for "one and a half"?


;-) No. But there's one in latin, too, isn't there - sesqui.


The Russian is εναμισι.  :-)
(λx. x x) (λx. x x)

Cyril

#11
Another bugfix version. In previous versions, if you written two 'monospace' items in one line of documentation, the text between them was treated as monospace too. The similar with <italic>.
With newLISP you can grow your lists from the right side!

Cyril

#12
After the three bug-fixing versions at least a feature-starring one! This version marks as an error non top-level expressions started in the first column. Why? Most sane programmers used some or another form of indentation, and the nested expressions have a very little chance to touch the left side of the screen. The only reason of such an event is that lisp considers the expression being nested, but you, the programmer, being top-level. This can happen (and regularly does happen) with me if I forgot some right parentheses in previous expression. So the idea is: if you are finished to type a function definition, and start a new function with first column, and Vim highlights the first opening parenthesis as an error -- check for unclosed parentheses in the previous definition.



If you like to start nested lists with the first column (maybe for a reason), then stay with version 1.8 -- or wait for 1.10. I am planning to make all error marks disable-able (each kind of error individually). But it will happen tomorrow, not before -- this night I am going to sleep! ;-)
With newLISP you can grow your lists from the right side!

Cyril

#13
Quote from: "Cyril"If you like to start nested lists with the first column (maybe for a reason), then stay with version 1.8 -- or wait for 1.10. I am planning to make all error marks disable-able (each kind of error individually). But it will happen tomorrow, not before -- this night I am going to sleep! ;-)


I was too optimistic about "tomorrow", but this is at last done! With version 1.10 you can choose which kinds of errors you want to highlight. For example, if you don't like the nested left parenthesis in the leftmost column checking introduced in version 1.9, you can now write let g:newlisp_noerrors = "1" in your .vimrc and this test will be disabled. Assigning "12345" will disable all tests.



Another change: @example keyword in documentation comments processed closer with newlispdoc behavior.
With newLISP you can grow your lists from the right side!