fix(Save-/LoadMarks): add opt to keep original file-ext #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
let l:path = substitute(l:path, expand("%:e"), "json", "")did replace first extension match. E.g.filepy.pywould befilejson.pymain.jsandmain.html, then now withlet g:codepainter_file_keep_original_extension = 1I can have 2 different codepainter JSONs (main.js.jsonandmain.html.json). Or if set to0justmain.jsonas previous to this PRcodepainter#SaveMarks()echoes a warning, thussilentremoved fromPainterSaveMarksdeclaration to see those error-msgsNext is an example of what now can be achieved. TLDR: create JSON files for auto-save/load codepainter-marks with a regex that matches
.gitignore. Example of how to use:vim filepy.py:call SaveCodePaintersToJSON()createsfilepy.py__noGit_vim-codePainters.json. Which is awesome sincepyoffilepyis not renamed bylet l:path = substitute(l:path, expand("%:e"), "json", "")and adds_noGit_for the.gitignorevim filepy.py:call SourceCodePaintersFromJSON()loadsfilepy.py__noGit_vim-codePainters.json