Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Update numbered headers for file #4

Open
Kristinita opened this issue Dec 22, 2017 · 4 comments
Open

[Feature request] Update numbered headers for file #4

Kristinita opened this issue Dec 22, 2017 · 4 comments

Comments

@Kristinita
Copy link

Kristinita commented Dec 22, 2017

1. Request

It would be nice, if would be possible to create or update numbered headers for all file, not for part of the file after carriage position.

2. Justification

I never need to create or update numbered headers for part of file, I update/create headers for all file.

I want update automatically my numbered headers, if I save file. I use Sublime Hooks for it.

If:

  • I save file by default Windows shortcut Ctrl+S,
  • my carriage not in begin of the file.

Headers update for part of a file, not for all file.

3. Settings

For example, I have a file SashaSmartHead.md. It content:

# Sasha First

## Sasha Second|

# 1. No, Sasha First

| — is a carriage position.

4. Steps to reproduce

Ctrl+Shift+PMarkdown Numbered Headers:Insert/Update Headers Nums.

5. Actual behavior

# Sasha First

## Sasha Second

# 1. No, Sasha First

6. Expected behavior

If: Ctrl+Shift+PMarkdown Numbered Headers:Insert/Update Headers Nums For File.

# 1. Sasha First

## 1.1. Sasha Second

# 2. No, Sasha First

Thanks.

@weituotian
Copy link
Owner

thanks for your great advice!

may be I can provide an option to let users to select whether to update all the file content or part of the file content.

weituotian pushed a commit that referenced this issue Apr 20, 2018
@weituotian
Copy link
Owner

sorry for late reply !

i had added an option format_all, you may set it to true to invoke processing all the file content.
image

you may follow this guide to install the new version by commit

@Kristinita
Copy link
Author

Status: ❌ Still doesn't work for me

1. New data

  • Markdown Numbered Headers 1.1.1

my User/MarkdownNumberedHeaders.sublime-settings file:

{
    "dottype": ".",
    "format_all": true,
    "logging": true
}

2. Actual behavior

As in first post.

Console output:

'run insert/update---------------------'
"[[1, '1. No, Sasha First', 32, 1]]"
"[1, '1. No, Sasha First', 32, 1, '1']"
'update'
# 1. No, Sasha First
'end run--------------------'

Thanks.

@biolxy
Copy link

biolxy commented Aug 3, 2018

When I insert an ordinal, the # in the code is also inserted a ordinal, which is obviously not what I expected:

# a test comment for my code
for(i in l){
    test <- whichSignatures(tumor.ref = sigs.input,signatures.ref = signatures.cosmic,sample.id=i,signature.cutoff=0,contexts.needed = TRUE,tri.counts.method = 'default')
    res <- test$weights  
    write.table(res,"cosmic.weight.txt",sep="\t",col.names=F,row.names=T,quote=F,append=T)
}

after of Insert/Update Headers Nums :

# 1、 a test comment for my code
for(i in l){
    test <- whichSignatures(tumor.ref = sigs.input,signatures.ref = signatures.cosmic,sample.id=i,signature.cutoff=0,contexts.needed = TRUE,tri.counts.method = 'default')
    res <- test$weights  
    write.table(res,"cosmic.weight.txt",sep="\t",col.names=F,row.names=T,quote=F,append=T)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants