Ranger: Mapping F2 to cw (rename)

Created on 26 Feb 2017  路  4Comments  路  Source: ranger/ranger

I suggest mapping F2 to cw by default in next versions.

As F2 is empty (unmapped) unlike all other nearby file opeartion (copy, paste, delete) F-keys as described in the cheatsheet.

Cheatsheet

It would be esp. great because it would put ranger in line with the F2 to Rename tradition which is practiced by many other applications, and esp. by file managers such as Windows Explorer (I don't like Microsoft, but the key is also used for renaming files on desktop in Windows).

I mapped it in the local rc.conf file in my home directory, but I think it might help many people by being a default since the key is empty and there are keys for relational renaming of files like I and A (beginning and end, in line with Vim), and also a (to append before file extension), but not for absolute renaming. There is cw for absolute renaming but it is not just an easy key but a whole menu (as c points to many other things as well).

PS.

I'd also suggest g~ for going home.

There is g/ and gr for root, but I feel like gh needs a counterpart as well.


I just wanted to express my thoughts on that.

Thanks for consideration.

ISSUE TYPE

  • Improvement/feature request

RUNTIME ENVIRONMENT

  • Operating system and version: Arch Linux
  • Terminal emulator and version: Urxvt
  • Python version: Python 3.6.0 [GCC 6.3.1 20170109]
  • Ranger version/commit: ranger-stable 1.8.1
  • Locale: en_US

EXPECTED BEHAVIOR

Remap key

CURRENT BEHAVIOR

Key is unmapped

CONTEXT

Easiness of working with files

POSSIBLE SOLUTIONS

Just by mapping it by default

enhancement needs-opinions

Most helpful comment

Since F2 is not used by default anyway, I'd vote for adding it. We already support other keys from other file managers.

All 4 comments

I don't care either way, but will only add this if there's more interest in this being added by default.

Since F2 is not used by default anyway, I'd vote for adding it. We already support other keys from other file managers.

I know changing default behaviours is always an issue, but wouldn't this

map a console rename%space
map <F2>  rename_append

actually be more in line with windows file dialogs?

Makes sense. I'll change it. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ycf83 picture ycf83  路  5Comments

kevinhwang91 picture kevinhwang91  路  5Comments

politas picture politas  路  3Comments

chrissound picture chrissound  路  4Comments

techtonik picture techtonik  路  5Comments