foldcomments
foldcomments copied to clipboard
"fold_partial_line_comments": false
Feature Request
slight change to current option
"fold_single_line_comments": true
This must act only on lines that act on one complete line.
--- Example ---
#This is a single line comment
# This is ALSO a single line comment ( whitespace prefix )
new option
"fold_partial_line_comments": true
This must act only on lines that act only on parts of line
--- Example ---
if rainy # This is a partial line comment
useUmberlla() # This is a another partial line comment
Thanks for current implementation :+1: Thanks in advance for new :wink:
Hi :)
So let me get this straight, what you're requesting is an option that would turn the following:
if rainy: #this is a partial line comment
use_umbrella() # this is another partial line comment
into
if rainy: (..)
use_umbrella() (..)
Where (..)
would be one of the folded comments. Is this correct?
Can you talk a bit about your use case?
Hi @oskarols,
First let me thank you, for the current implementation and Quick Response to feature request.
Making the requirements more clear, with few additional option like user customizable keyboard shortcuts and literate programming. sample links :: literate >> source, literate doc >> tool
I don't know how busy you are or how much time it will take to implement this. As of now I dont have any python skills or sublime plugin coding skills. :cry:
Just pumping out my thouthts on FoldComments to make it the best add on tool that every coder fall in love :heart:
settings
- "fold_single_line_comments": true | false This must act only on lines, that truly comments one complete line.
- "fold_partial_line_comments": true | false This must act only on lines that comments only parts of line
- "fold_literate": true | false This must fold the top level literate code (the markup)
customizable keyboard shortcuts
{ "keys": ["super+shift+c"], "command": "toggle_fold_comments" } # Works as per config file
New shortcuts that must act on full text of active file or on user selected code by overriding the settings found in config file. This gives super flexibility ! especially when working with big files and monitor placed vertically / in huge monitors (where user can see more line of code at once).
- "command": "toggle_block_comments"
- "command": "toggle_single_line_comments"
- "command": "toggle_partial_line_comments"
- "command": "toggle_ literate_comments"
Input 1: "concatenate_adjacent_comments": true "fold_single_line_comments": true "fold_partial_line_comments": false
#This is a single line comment
# This is ALSO a single line comment ( whitespace prefix )
if rainy # This is a partial line comment
useUmberlla() # This is a another partial line comment
Output:
(..)
if rainy # This is a partial line comment
useUmberlla() # This is a another partial line comment
Input 2: "concatenate_adjacent_comments": true "fold_single_line_comments": false "fold_partial_line_comments": true
#This is a single line comment
# This is ALSO a single line comment ( whitespace prefix )
if rainy # This is a partial line comment
useUmberlla() # This is a another partial line comment
output:
#This is a single line comment
# This is ALSO a single line comment ( whitespace prefix )
if rainy (..)
useUmberlla() (..)
Input 3: "concatenate_adjacent_comments": true "fold_single_line_comments": true "fold_partial_line_comments": true
#This is a single line comment
# This is ALSO a single line comment ( whitespace prefix )
if rainy # This is a partial line comment
useUmberlla() # This is a another partial line comment
output:
(..)
if rainy (..)
useUmberlla() (..)
Input 4: "concatenate_adjacent_comments": true "fold_single_line_comments": false "fold_partial_line_comments": false "fold_literate": true
Literate programming is really fun. It helps the developer to document easily
Especially with coffee script, it is fun. I wish if there was a tool to fold this literate
markup on demand and another tool to treat syntax highlight of markup just like
the colour scheme of comments ! It makes coding more fun !!
# This is a single line comment 1
# This is a single line comment 2
if rainy # This is a partial line comment 1
useUmberlla() # This is a partial line comment 2
output:
(..)
# This is a single line comment 1
# This is a single line comment 2
if rainy # This is a partial line comment 1
useUmberlla() # This is a partial line comment 2
Input 5: "concatenate_adjacent_comments": true "fold_single_line_comments": true "fold_partial_line_comments": true "fold_literate": true
Literate programming is really fun. It helps the developer to document easily
Especially with coffee script, it is fun. I wish if there was a tool to fold this literate
markup on demand and another tool to treat syntax highlight of markup just like
the colour scheme of comments ! It makes coding more fun !!
# This is a single line comment 1
# This is a single line comment 2
if rainy # This is a partial line comment 1
useUmberlla() # This is a partial line comment 2
output:
(..)
(..)
if rainy (..)
useUmberlla() (..)
Thanks in advance
When I'm writing code for the Factor programming language in Sublime, I often have a comment after each line to represent the state of the datastack after executing that line:
: ccval ( seq -- n ) ! { 6 12 25 1 }
0 [ over empty? ] [ (ccval) ] until ! { } 1286
nip ! 1286
;
It would be great to be able to toggle those comments' visibility. So I searched packagecontrol and wound up here.
Thanks for this project!