Vim Tips Wiki
(→‎Syntax Fold For Java: An even better proposal.)
(Change <tt> to <code>, perhaps also minor tweak.)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<big>'''New tips October 2011'''</big> <small>[[Vim Tips Wiki:New tips/201109|Previous]] &bull; [[Vim Tips Wiki:New tips/201111|Next]]</small>
 
<big>'''New tips October 2011'''</big> <small>[[Vim Tips Wiki:New tips/201109|Previous]] &bull; [[Vim Tips Wiki:New tips/201111|Next]]</small>
   
For each proposed new tip:
 
*Is it worth keeping as a separate tip?
 
*Should it be merged into an existing tip? Which?
 
*If it should be kept, is it ready for release? Which points need fixing? Should it be renamed?
 
 
Please edit this page (not the talk page) in the appropriate section below the following table.<br />
 
<!-- (When discussion finished, delete above and remove begin/end of this comment)
 
 
'''This page is an archive listing tips created in October 2011. Please do not edit this page because discussion has finished. If you have any comments, edit the appropriate tip page.'''
 
'''This page is an archive listing tips created in October 2011. Please do not edit this page because discussion has finished. If you have any comments, edit the appropriate tip page.'''
 
-->
 
Alternatively, comments can be posted on the [http://lists.wikia.com/mailman/listinfo/vim-l mailing list].
 
   
 
{| border="1" cellpadding="2"
 
{| border="1" cellpadding="2"
Line 23: Line 13:
 
|-
 
|-
 
| [[Syntax Fold For Java]]
 
| [[Syntax Fold For Java]]
|align="center"| '''Merge? Need comments'''
+
|align="center"| Merged to [[VimTip143]]
 
|}
 
|}
 
'''Please add your comment (sign with <tt><nowiki>~~~~</nowiki></tt>) below the appropriate heading. Use&nbsp;<tt><nowiki>----</nowiki></tt>&nbsp;between&nbsp;comments.'''
 
   
 
==[[Preview current HTML in browser on Linux]]==
 
==[[Preview current HTML in browser on Linux]]==
Line 33: Line 21:
   
 
==[[Syntax Fold For Java]]==
 
==[[Syntax Fold For Java]]==
  +
*'''Merged''' to [[VimTip143]]. We have probably changed our minds. See below. [[User:JohnBeckett|JohnBeckett]] 11:34, May 6, 2012 (UTC)
 
----
 
'''Keep'''. The tip has a few problems, see my comments. Most people may not care about these problems because they probably always use standard indent.
 
'''Keep'''. The tip has a few problems, see my comments. Most people may not care about these problems because they probably always use standard indent.
   
 
I think since syntax folding exists by default, this tip is poorly named. Perhaps "Enhanced syntax folding for Java" or "Java syntax folding with context" or something would be better. The tip should also start out by explaining that java does have some folding, it just leaves much to be desired. --[[User:Fritzophrenic|Fritzophrenic]] 16:13, April 6, 2012 (UTC)
 
I think since syntax folding exists by default, this tip is poorly named. Perhaps "Enhanced syntax folding for Java" or "Java syntax folding with context" or something would be better. The tip should also start out by explaining that java does have some folding, it just leaves much to be desired. --[[User:Fritzophrenic|Fritzophrenic]] 16:13, April 6, 2012 (UTC)
 
----
 
----
Keep. I will leave this for someone else as I don't do Java. How about renaming to "Syntax folding for Java" and insert an introductory sentence saying that by default <tt>.java</tt> files (if vimrc contains {{tt|syntax on}} and {{tt|filetype plugin indent on}} will have [[folding]] available. However, the following suggestion enhances the folding provided the .java file is correctly indented. (I think that is what you are saying.) We have 385 [[Some Java tips]] (not much use), and for completeness I will mention that a search for "java" and "fold" turns up 143 [[Use of Vim folds for javadocs]] and 304 [[Fold braces and javadoc]]. [[User:JohnBeckett|JohnBeckett]] 08:39, April 7, 2012 (UTC)
+
Keep. I will leave this for someone else as I don't do Java. How about renaming to "Syntax folding for Java" and insert an introductory sentence saying that by default <code>.java</code> files (if vimrc contains <code>syntax on</code> and <code>filetype plugin indent on</code> will have [[folding]] available. However, the following suggestion enhances the folding provided the .java file is correctly indented. (I think that is what you are saying.) We have 385 [[Some Java tips]] (not much use), and for completeness I will mention that a search for "java" and "fold" turns up 143 [[Use of Vim folds for javadocs]] and 304 [[Fold braces and javadoc]]. [[User:JohnBeckett|JohnBeckett]] 08:39, April 7, 2012 (UTC)
 
----
 
----
 
We have these tips that seem to be about folding Javadoc comments:
 
We have these tips that seem to be about folding Javadoc comments:
Line 44: Line 34:
 
*new [[Syntax Fold For Java]]
 
*new [[Syntax Fold For Java]]
 
I propose the following:
 
I propose the following:
*Rename 143 to "Syntax folding for Java". We do not need "enhanced" in the title because the tip can (when developed in the future) mention that syntax folding is standard (if certain settings are in vimrc), and more things can be done in the <tt>after</tt> directory.
+
*Rename 143 to "Syntax folding for Java". We do not need "enhanced" in the title because the tip can (when developed in the future) mention that syntax folding is standard (if certain settings are in vimrc), and more things can be done in the <code>after</code> directory.
 
*Merge the new tip and 304 to 143. I don't think there is anything much from 304 or 143 that needs to be kept, so 143 would be more or less a copy of the new tip.
 
*Merge the new tip and 304 to 143. I don't think there is anything much from 304 or 143 that needs to be kept, so 143 would be more or less a copy of the new tip.
 
*Redirect 304 and the new tip to 143.
 
*Redirect 304 and the new tip to 143.
Line 53: Line 43:
 
*1547 [[Customize text for closed folds]]
 
*1547 [[Customize text for closed folds]]
 
I guess it's too much work to do anything with them. [[User:JohnBeckett|JohnBeckett]] 08:03, May 1, 2012 (UTC)
 
I guess it's too much work to do anything with them. [[User:JohnBeckett|JohnBeckett]] 08:03, May 1, 2012 (UTC)
  +
  +
:I think [[VimTip143]] has a clever trick which should be kept, for people who like marker folding. The user can then define exactly where a fold starts and ends, possibly covering entire classes or methods, and not affect the actual text shown in javadoc as would normally be the case if using marker-based folding within a javadoc comment. I'm not sure whether 143 belongs in the merge or as its own tip. I could easily go either way.
  +
  +
:[[VimTip304]] seems mostly useless, I agree. Certainly lets merge that one.
  +
  +
:For [[VimTip1150]] it is probably worth looking into the javadoc syntax folding addition, and maybe keeping it as an alternate solution for those who mostly like the built-in folding but also want to fold javadoc. The non-syntax folding stuff can probably go away. I think we should merge this one, too.
  +
  +
:[[VimTip1547]] is unrelated, I think it should remain its own tip.
  +
  +
:&mdash;[[User:Fritzophrenic|Fritzophrenic]] 15:13, May 1, 2012 (UTC)
  +
::I have renamed 143 to [[Syntax folding for Java]], and have roughly merged in the new [[Syntax Fold For Java]], and 304 [[Fold braces and javadoc]], and 1150 [[Java/C/C++ folding]]. 1547 will remain separate. Would you please edit 143 and remove or merge stuff that you think is unhelpful for a reasonably recent Vim. More cleaning can be done later, but I'm hoping you will prune out what you can now. [[User:JohnBeckett|JohnBeckett]] 11:34, May 6, 2012 (UTC)
   
 
----
 
----

Latest revision as of 08:37, 15 July 2012

New tips October 2011 PreviousNext

This page is an archive listing tips created in October 2011. Please do not edit this page because discussion has finished. If you have any comments, edit the appropriate tip page.

Proposed new tip Current consensus
Preview current HTML in browser on Linux Merged to VimTip127
Syntax Fold For Java Merged to VimTip143

Preview current HTML in browser on Linux[]

I would like to merge this somewhere. As I mentioned in the comments, I have some notes about this topic (there are a lot of old tips on this), and want to clean them up. I will look. JohnBeckett 08:39, April 7, 2012 (UTC)

Syntax Fold For Java[]

  • Merged to VimTip143. We have probably changed our minds. See below. JohnBeckett 11:34, May 6, 2012 (UTC)

Keep. The tip has a few problems, see my comments. Most people may not care about these problems because they probably always use standard indent.

I think since syntax folding exists by default, this tip is poorly named. Perhaps "Enhanced syntax folding for Java" or "Java syntax folding with context" or something would be better. The tip should also start out by explaining that java does have some folding, it just leaves much to be desired. --Fritzophrenic 16:13, April 6, 2012 (UTC)


Keep. I will leave this for someone else as I don't do Java. How about renaming to "Syntax folding for Java" and insert an introductory sentence saying that by default .java files (if vimrc contains syntax on and filetype plugin indent on will have folding available. However, the following suggestion enhances the folding provided the .java file is correctly indented. (I think that is what you are saying.) We have 385 Some Java tips (not much use), and for completeness I will mention that a search for "java" and "fold" turns up 143 Use of Vim folds for javadocs and 304 Fold braces and javadoc. JohnBeckett 08:39, April 7, 2012 (UTC)


We have these tips that seem to be about folding Javadoc comments:

I propose the following:

  • Rename 143 to "Syntax folding for Java". We do not need "enhanced" in the title because the tip can (when developed in the future) mention that syntax folding is standard (if certain settings are in vimrc), and more things can be done in the after directory.
  • Merge the new tip and 304 to 143. I don't think there is anything much from 304 or 143 that needs to be kept, so 143 would be more or less a copy of the new tip.
  • Redirect 304 and the new tip to 143.

Is there a reason the above would not be a good idea?

We also have:

I guess it's too much work to do anything with them. JohnBeckett 08:03, May 1, 2012 (UTC)

I think VimTip143 has a clever trick which should be kept, for people who like marker folding. The user can then define exactly where a fold starts and ends, possibly covering entire classes or methods, and not affect the actual text shown in javadoc as would normally be the case if using marker-based folding within a javadoc comment. I'm not sure whether 143 belongs in the merge or as its own tip. I could easily go either way.
VimTip304 seems mostly useless, I agree. Certainly lets merge that one.
For VimTip1150 it is probably worth looking into the javadoc syntax folding addition, and maybe keeping it as an alternate solution for those who mostly like the built-in folding but also want to fold javadoc. The non-syntax folding stuff can probably go away. I think we should merge this one, too.
VimTip1547 is unrelated, I think it should remain its own tip.
Fritzophrenic 15:13, May 1, 2012 (UTC)
I have renamed 143 to Syntax folding for Java, and have roughly merged in the new Syntax Fold For Java, and 304 Fold braces and javadoc, and 1150 Java/C/C++ folding. 1547 will remain separate. Would you please edit 143 and remove or merge stuff that you think is unhelpful for a reasonably recent Vim. More cleaning can be done later, but I'm hoping you will prune out what you can now. JohnBeckett 11:34, May 6, 2012 (UTC)