Copy current file's file path or dir path with Unix file separators

Compatible with  IntelliJ IDEA
19.10.2014
1 053

Very simple plugin that copies current file's path or its dir path to the →clipboard with always Unix and never Windows path separators regardless.

Problem:
If your IDE runs under Windows, then standard Idea "Copy Path" feature will copy you the backslashed Windows path, but if you run a Unix terminal into your Windows paths (like Cygwin or a virt with shared folders), then it is very hard to use the backslashed Windows path with Unix shell scripts, that's when this plugin can help.

And if you have the Windows Services for Unix installed, you'll be able to use the paths provided by this plugin in Windows as well, in Explorer and the CMD.EXE shell and the PowerShell.

Solution:
This plugin adds 2 menu items to the editor popup menu, but I also remapped the standard Idea's "Edit → Copy Path" action's keyboard shortcuts to my plugin's too.

On top of that:
Starting @version 1.0.4, also adds settings to transform paths by a regex for a project. For example, substituting this: ^[A-Z]:/dir/(.+)$ with this: /mount/wf_dir/$1 will turn this Windows path: C:\dir\meh\blah\file.ext into this on the clipboard: /mount/wf_dir/meh/blah/file.ext

Download plugin

Version

Update date

Recent change notes

  • 1.0.5 - Sat 2014-Oct-18; small UX fixes, typos, cosmetics etc. No functional changes.
  • 1.0.4 - Sat 2014-Oct-18; provided optional path substitution
  • 1.0.3 - Sat 2014-Oct-11; Issue #1: Eliminated one class, simplified code.
  • 1.0.2 - recompiled for JDK 7 for folks who are still on 7
  • 1.0.1 - added directory path copy action
  • 1.0.0 - initial release, built for JDK 8
This plugin sounds great but I can't install it on PyCharm. Is this plugin not compatible with PyCharm?
05.02.2015
This is very useful plugin for me! But the current version (1.0.5) has an imperfection: the plugin does not allow to make its settings default (global for all projects), and plugin settings (regular expression pattern and replacement) need to be copied among projects manually.
20.10.2014
clean and functional
Please  sign in  to leave a comment.