Comments (3)
I actually found a way to copy the relative / absolute path and filename of the current file with existing commands from FileManager:
[
{ "keys": ["..."] , "command": "fm_copy", "args": { "which": "relative path" } },
{ "keys": ["..."] , "command": "fm_copy", "args": { "which": "absolute path" } },
{ "keys": ["..."] , "command": "fm_copy", "args": { "which": "name" } }
]
This could be added to the documentation. Hope it helps!
from filemanager.
I don't think that belongs in file manager, but it's not too hard to write your own plugin for that.
import sublime
import sublime_plugin
class CopyFilePathAndLineNumberCommand(sublime_plugin.TextCommand):
def run(self, edit):
row_number = self.view.rowcol(self.view.sel()[0].begin())[0] + 1
file_path = None
for folder in self.view.window().folders():
if folder in self.view.file_name():
file_path = self.view.file_name().replace(folder + '/', '')
break
if file_path is None:
file_path = self.view.file_name()
sublime.set_clipboard('{}:{}'.format(file_path, row_number))
{"keys": [...], "command": "copy_file_path_and_line_number"}
from filemanager.
Is it possible to include the line number in the copied path?
from filemanager.
Related Issues (20)
- [Feature Request] Add edit files without any layout setting HOT 4
- FileManager shouldn't create so many commands HOT 2
- Remove .sublime folder HOT 1
- Alpha ST4 - Duplicate Rename entries on menu HOT 6
- Test tab completion logic
- Document tips and tricks
- [help wanted] Remove useless things. Make this package intuitive. HOT 3
- Refresh side bar checking view settings instead of FileManager settings
- Copy relative path function outputs a string starting with "/" HOT 5
- How to accept an intermediate path completion? HOT 6
- stopped working for me HOT 8
- Duplicate chokes on non-ascii files HOT 1
- folder selection is not working
- [Bug] Sidebar missing entries when file is open HOT 1
- conflict of hotkey "alt+n" HOT 2
- Cannot move files to different directories
- can not duplicate the file to a new directory HOT 3
- Definign index number in preferences does not seem to change the default
- Remove so many features
- Getting frivolous infinite loop messages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filemanager.