Comments (3)
Thanks for all the great suggestions. There's a lot here and it might take a while to work through it all.
As a non-compiling amateur the self contained windows binary is very welcome
(I note it's not in the nightly CAB build).
Are you referring to yedit.exe? It should be part of yori-typical.cab, both in stable and daily. Are you seeing something different?
* Delete at (or beyond) EOL joins lines. I Can't remove line one if cursor is on line one!
Hmm, odd that I missed that. I have a fix for it ready, will push it soon.
* Left at col 1 moves to end of line above * Right at EOL moves to col 1 line below * Cursor not to stray beyond EOL
This behavior is following MS-DOS Edit. I've been following version 1 (which is included with NT 4.) I don't know if version 2 did something different. But I agree this behavior is a little strange, and I'm open to changing it; I just wanted to start with the original and see what people want before deviating too much.
* Cursor back to home after cut/del line
Can I ask what this one refers to? When I select a line with shift+down and hit del, the cursor seems to end in the right location. What are you using to delete the line, and where does the cursor go?
This is one area where I changed behavior from Edit. In Edit, it's not possible to have a selection that spans lines without including the entire line - you can select lines, or select characters within a line, but not both. When deleting a selection that spans lines, it returns the cursor to the beginning of the line because that's the beginning of the selection.
* Ctrl/Ctrl+Shift with left/right arrows (move/select word),
Hmm, I never knew Edit did that...
* Select drive in open dialog
Yedit followed edit by putting drives as part of the directory list. I know that's not what modern UIs do, but it was common for DOS programs.
* Infinite Undo
I've been wanting to implement this too. It's a larger change and may take a while though.
* Auto-indenting and smart home
Realistically, I doubt this will ever happen. Auto indent implies knowledge of the language that the text is written in. That just seems "a bridge too far" - there are lots of good editors that do this kind of thing, but they are necessarily larger and need ongoing maintenance to keep up with the languages they are parsing.
* Ctrl+A Select all
You probably already knew this, but it looks like MS-DOS Edit treats Ctrl+A as move one word left, Ctrl+S as move one char left, Ctrl+D as move one char right, and Ctrl+F as move one word right. I didn't know that before. I wonder what environment they were using it in where arrow keys were not available or supported.
* Ctrl+F6 launch new editor - hopefully with a useful current directory
Since I've been following Edit 1, there's no multi-document support. I'm not sure if this is worth doing or not - in a modern environment it's easy to launch multiple instances, and the clipboard is shared since it's using the Windows clipboard. The main reason I can see for this is when using SSH and launching multiple instances of things is hard.
* Wrapping lines
You're not the first person to ask for this, although it's a ton of work, and Edit 1 didn't support it. (I had to build support for this in ymore.exe and am horrified about how it turned out but don't know how to do better.)
* After mouse click to change location - then del or bksp fails. Even if I insert text I can't use del/bksp. I have to left, right, home, or end to restore del/bksp actions (I use Win 10 legacy console)
That's very funny. I have a fix and will push it soon. This was broken by trying to support mouse selection - it has created a selection with zero characters in it. Delete refuses to delete an empty selection, but leaves the selection there anyway, so the only way out is to use keys that clear selections.
from yori.
Hi,
+Alternate installation
Although I couldn't find a list online, I have now found yedit inside:
- http://malsmith.net/download?obj=yori/latest-stable/yori-typical-win32.cab
- http://malsmith.net/download?obj=yori/latest-daily/yori-typical-win32.cab
I appreciate yedit was built as part of yori, but am delighted that it only imports KERNEL32.DLL and
will run as a single file application :-)
+Behaviors
I have revived my old Thinkpad with Windows 98 and found edit.com (version 2.0.026. 11/May/1998 69kb). This is old enough to support full screen DOS and it comes with a HLP file, which is plain text and could be used as a blueprint - EDIT.HLP.txt
You are entirely correct about the default cursor behaviors and I never knew about some of these original keyboard shortcuts:
- Ctrl+A Move one word left
- Ctrl+B ? inserts smiley face
- Ctrl+C Copy selection
- Ctrl+D as move one char right
- Ctrl+E move one line up
- Ctrl+F as move one word right
- Ctrl+G delete
- Ctrl+H backspace
- Ctrl+I insert spaces, indent if multiple lines selected
- Ctrl+J ? inserts something
- Ctrl+K ? inserts something
- Ctrl+L Find
- Ctrl+M Enter
- Ctrl+N ? inserts something
- Ctrl+O ? inserts something
- Ctrl+P ? inserts something
- Ctrl+Q Shows some of the possible keys on status line
A - replace
C - copy
D - Goto end of line
F - find
R - Goto start of file
S - Goto start of line
Y - delete to end - Ctrl+R Goto start of file - but at current col!
- Ctrl+S as move one char left
- Ctrl+T ? inserts something
- Ctrl+U ? inserts something
- Ctrl+V Paste
- Ctrl+W ? nothing ?
- Ctrl+X Cut
- Ctrl+Y Delete the current line - not the current selected lines
- Ctrl+Z ? nothing ?
- CTRL+LeftArrow and CTRL+RightArrow keys will select words, and then whole lines,
- CTRL+Up and CTRL+Down do nothing.
I guess as I am running Autohotkey I could remap some of these, to use the arrow keys - or even "hjkl".
This is your project and the difficult decisions about replicating/modernizing the handling of EOL boundaries is in your hands.
IMHO to make a really useful Windows editor I would suggest copying the cursor behavior of Notepad.exe, with a few additional keyboard shortcuts:
- CTRL+N/O/S/Q/F - as you have already changed
- CTRL+Shift+Home: Extend selection to row 1 col 1
- CTRL+Shift+End: Extend selection to EOF
- CTRL+Left: Move word left
- CTRL+Right: Move word right
- CTRL+Shift+Right: Extend selection one word right
- CTRL+Shift+Left: Extend selection one word left
- CTRL+A Select all: BOF to EOF
- CTRL+H Replace: Dialog
- CTRL+Y Delete line, (all lines in multiline the selection?)
- CTRL+Z Undo: Infinite for the whole session this file has been open.
- CTRL+B Block: Select the whole of any line within the selection - such that cut/paste leaves things unchanged.
I am a lazy mouse selector, often from the bottom up, and a key to accurately select the whole of the lines is useful.
This allows for easy Autohotkeys to indent, move block up/down, sort block, prefix/postfix block. - F5 Reload: Revert to disc image of the file - or load results after running a script.
- Shift+F5 Execute: Use the ShellExec call to run the file with its default association, from its location. Saves context switching to run the file.
- Shift+F3 Find Previous: Search towards BOF.
- Wrap the find/replace past EOF/BOF.
I was using "{Home}, Shift-{End}, {Del}" to remove a line and the cursor was staying at the old last col on an empty line which looked very odd. If you choose to hold the cursor to the left of the EOL this will then bring the cursor back to col 1.
I have still not found how yedit allows one to change drive; when displaying my root directory there are no other drives listed. This could be a feature of my system.
+Extensions
Auto-indenting and smart home: I am only suggesting that {Enter} will match the indentation of the line above and {Home} will go to the first non-space character - although {Home}{Home} will go to Col 1. I am a spaces for indentation person.
I can imagine wrapping lines is difficult, but it does allow comfortable use of the editor for prose/letters/emails.
Infinite Undo combined with Run is just so good for scripting: "edit, save(CTRL+S), execute(Shift+F5), undo(CTRL+Z)" is a very common cycle.
I can live without multiple documents/splits etc. However, spawning a new instance in the current directory would be useful.
Once again many thanks for bringing back edit to the command line.
Kind Regards Gavin Holt
Edited after reading you commit descriptions
from yori.
Hi,
I have been reading your commit comments and am getting excited. Greatly looking forward to the new binary release of yedit. Guess we can close this item.
Kind regards Gavin
from yori.
Related Issues (20)
- Ctrl-C stops working after terminating GUI app once HOT 5
- Provide all installer options as command line arguments HOT 2
- Allow for a custom starting directory HOT 2
- Command line length limit in Yori ? Like 8191 in cmd ? HOT 2
- Implement long path pseudo current directory HOT 4
- Broken alias command for paths with spaces HOT 2
- Feature request: Option in Tee to remove color HOT 2
- yori's lsof breaks react-scripts HOT 3
- Yori installer for the arm64 Windows HOT 4
- current version -- 2.0 is marked as infected with a trojan by Windows Defender HOT 3
- yenv: accept variable from stdin HOT 4
- "cab.exe -s -u" does not overwrite files with read-only and system attributes set HOT 2
- "ycopy.exe -p" raises ERRORLEVEL to 1 if there is nothing to overwrite HOT 1
- Can't run Notepad HOT 2
- YoriInit.ys1 script %__APPDIR__% and %__CD__% environment variables on Windows XP HOT 2
- throw er; // Unhandled 'error' event HOT 2
- fail to install yori-core on amd HOT 2
- ConEmu + Clink + Yori + Python + xonsh = surprise XD HOT 2
- CD Improvement HOT 2
- Scrolling with mouse wheel in Windows Terminal isn't working unless you hold down Shift while scrolling HOT 3
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 yori.