[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [RFC] add toggle to writeout selection instead of entire bu
From: |
Brand Huntsman |
Subject: |
[Nano-devel] [RFC] add toggle to writeout selection instead of entire buffer |
Date: |
Tue, 20 Feb 2018 16:33:59 -0700 |
When a selection is active, ^O defaults to writing the selection to a new file.
Comment/uncomment, indent/unindent, search&replace, piping selection to command
and so on can all leave a selection active after performing them. This is great
when performing multiple tasks on the same selection. But rapidly pressing ^O
and ENTER (muscle memory) to save, results in a still modified unsaved buffer.
I propose ^O only saves the selection if a toggle is used, something like ^O^S.
Anyone wanting to save a selection must type out the filename and an extra ^S
won't interrupt their workflow much, especially for a feature that is probably
rarely used. Everyone saves files and needing to unselect before saving
disrupts normal workflow and can lead to unsaved files (if you don't notice and
walk away from the computer).
I also propose changing the prompt to reflect what is being saved.
"File Name to Write:" ->
"File Name to Write [Entire Buffer]:"
"Write Selection to File:" ->
"File Name to Write [Selection]:"
Displaying [Buffer] or [Entire Buffer] will help indicate the selection won't
be written, for anyone who expected it. Enabling ^S will clear the filename and
disabling it will restore to the buffer's filename.
- [Nano-devel] [RFC] add toggle to writeout selection instead of entire buffer,
Brand Huntsman <=