gwatcha / reaper-keys

vim-bindings for Reaper
https://gwatcha.github.io/reaper-keys/
MIT License
144 stars 10 forks source link

Support Windows filenames #3

Closed tmwitczak closed 4 years ago

tmwitczak commented 4 years ago

Description

The repository can't be cloned on Windows due to the use of the reserved filename characters: < and >.

Context

Reproducing

Possible solution

The reserved characters could be replaced with the ones supported on Windows, as stated here.

jrbp commented 4 years ago

I'm also having this problem. I've tried enabling extra characters using fsutil, but that still doesn't seem to work with the "<>" characters.

From a quick glance it looks like the characters can be dealt with by adding to ALIASES in scripts/key_definitions.rb.

However, the windows filesystem is not case sensitive so some files in key_scripts, for example C-a and C-A, will also need to be renamed.

Awesome job with the script by the way! I've been wanting something like this and I'm looking forward to being able to use it.

gwatcha commented 4 years ago

I've pushed e8261e5689a706e7e0499cc17c3e0220728da584 as well as f0e44d6af52d645aa517cc3c036c5dd1e226d6be to make the paths play nicer with windows as well as OSX, though I can't test it so I'm not sure I caught everything.

Let me know if anything is still breaking, and if not I'll close this!

Reaper may try to keep using the old script paths when you re-import the key map, to make it forget them, delete the 'REAPER/reaper-kb.ini' file and restart Reaper.

jrbp commented 4 years ago

Now the filenames are okay and I can actually git clone and intsall in to reaper.

A new issue appears though. When I press any key I get the ReaScript : error main_SPC.lua:4: attempt to concatenate a nil value (local 'root_path') this is for any key SPC is just an example.

All the key_scripts files have lines 3 and 4 3 local root_path = info.source:match[[[^@]*reaper.keys/]] 4 package.path = package.path .. ';' .. root_path .. '?.lua' Maybe the problem is the trailing "/" since on Windows "\" is used to separate directories?

gwatcha commented 4 years ago

That's indeed the problem. I'll work on changing all the paths used throughout the library to be insensitive to this.

gwatcha commented 4 years ago

Alright I fixed the path names! I found a windows laptop to use as well and tested it out myself, so it should be good now.

jrbp commented 4 years ago

Seems to be working now, well done!

gwatcha commented 4 years ago

Cool! Thanks for helping me out.