I've got the absolute path available in commands via $TM_FILEPATH. How can I write a command that gives me a relative path, specifically i'd like to copy this path to enable sharing and ease some git/bash operations?
In TextMate (or Sublime) how can I get the path relative my project directory?
221 Views Asked by Graham P Heath At
1
There are 1 best solutions below
Related Questions in TEXTMATE
- VSCode Extension - Grammar Injection Into Multiple Languages
- org.eclipse.tm4e.core.TMException: No grammar provided for <text.html.basic>
- Detailed explainations about tmTheme?
- How to clear textmate grammar highlighting for variables in strings?
- How to include syntax checking in TextMate for MACOS?
- Visual Studio Textmate scope set color/appearance
- Matching labels in a Visual Studio Code grammar
- How to highlight syntax of block and inline comments in VSCode extensions?
- How to use custom syntax highlighting in AvaloniaEdit?
- Where can I find docs for TextMate grammars?
- What TextMate scope is used for "normal code/text" in VS Code?
- how connect TM4E (TextMate) to eclipse?
- How can I define bracket pair colorization for brackets inside comments for a VS Code language extension?
- TextMate grammar: detecting whitespace-indented comments
- Syntax coloring VSCode extension
Related Questions in TEXTMATE2
- Building for macOS-x86_64 but attempting to link with file built for macOS-arm64
- How to hide deleted files in TextMate's file browser
- Syntax Highlighting Grammar for String Interpolation
- Set textmate2 to save automatically with a .java extension?
- Why does textmate modify the file mtime after closing the tab?
- Please add the directory containing “/Users/me/.rvm/bin/rvm-auto-ruby
- Text Mate lookbehind after nonfixed character length
- How do I add a bare-bones syntax to VSCode?
- VS Code/Ruby, Go To Symbol In File match not behaving same as Go To File
- Match line but respect word boundary in Textmate 2 Language Grammar
- How can I keep deleted files from showing up in TextMate 2 file-browser sidebar?
- scopeAttributes with multiple values
- Way to always show window tabs in Textmate 2?
- Textmate Javascript Validate Syntax Command
- TextMate 2 Escape key: how to disable next completion and previous completion
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
pbcopywill place a string onto your clipboard. From there, you just need to do some detect and replacement.Start with the standard bash Command TextMate boilerplate:
Then check if the $TM_PROJECT_DIRECTORY exists:
If not, copy the full path:
If so replace the project path in the file path, and copy;
Please see this gist incase of updates.