Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bring back the <CTRL> Y (line delete) in editors

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
I guess I'm old school but boy do I wish that <CTRL> Y (an old WordStar keyboard shortcut) was not missing in many modern editors.
<CTRL> Y will simply delete the entire line where the cursor is.
Example Swordfish BASICs IDE does use it :)
MPLAB does not :(
I guess I'll have to dig into MPLABs options to see if there is a way...
 
Last edited:
I use it all the time in VB. It should be compulsory in all software.

Mike.
 
I use <END><SHIFT+HOME><BACKSPACE>...like the good old days before <CTRL> keys existed.

Wordstar...was that the DOS text software? I remember vaguely of using it a very very very very long time ago.
 
Last edited:
I simply don't use editors which don't allow complete customization. It's one reason I stay away from IDEs in general unless I can either substitute my favourite editor for the default one, or they have a really good emacs mode.

Of course, for me that means that Ctrl-Y means to paste whatever's in the kill ring to the cursor location, but I remember Ctrl-Y from the old Wordstar-based Borland editors in DOS.


Torben

Edit: I swear I didn't notice Nigel's post above on the Borland IDEs before I wrote this. :) I just happened to remember using Turbo Pascal and Turbo C in high school.
 
Last edited:
use (g)VI(M)

dd deletes that line
d5 deletes 5lines its all win with vim
 
Cool new keyboard shortcut, you learn something everyday unless your in a vegetative state.

Four keystrokes to delete a line isn't really a shortcut. :) All that does is move to the end of the line, start highlight, highlight to start of line, and delete.

Most editors can do it in two keystrokes at most. EDIT: But the fastest almost always ends up being whatever you have stored in your own muscle memory.


Torben
 
Last edited:
Just getting my fingers to press that combo on my laptop is tough, it looks like I'm summoning a demon.

Try Ctrl-Shift-K to delete the entire current line, and Ctrl-K to delete from the cursor to the end of the line.

Does that work?


Torben
 
Never mind. I just installed MPLAB and that doesn't work. Also, the hot keys available for editing appear to be severely limited. Perhaps the MPLAB IDE editor really is that brain damaged. I don't know.

OK, yeah, we get it. The 15-minute limitation on edits is also brain damaged. Can we have the old behaviour back now?
 
Last edited:
vi? OMG, what a pain that editor is... Unix nerds :) I thought Brief was a good editor.
 
vi? OMG, what a pain that editor is... Unix nerds :) I thought Brief was a good editor.

brief was good ... vi is *the fastest* editor out there .. and when u r on a slow line .. it helps :) ...

the wordstar shortcuts rule .. they are so widely use for so long time that almost everyone knows them .. they are darn fast, u do not need to move your fingers from "start" position .. vi is even faster and when you master it, you do not like to move from it ..
 
Brief was just superb. The column copy and macros were so useful.

I agree, vi was an absolute pain, Emacs wasn't much better either.

Mike.
 
Brief was just superb. The column copy and macros were so useful.

I agree, vi was an absolute pain, Emacs wasn't much better either.

Mike.

I first programmed in the Turbo Pascal 3 editor, which IIRC was based on WordStar. Later versions spiced up the editor a lot, with menus, built-in debugging, and so on.

In university we had emacs on the main computers so that's what I used. Getting into it damn near broke my mind but once I'd learned what it could do there was no turning back. I understand vi is also very powerful but I only learned it because it's always there (on *nix, anyway).

After getting used to the admittedly odd (but very consistent) command syntax I have just never been satisfied with anything else. Even when I need a certain IDE's other features for something, I edit the files in emacs. I hate mousing when I'm editing.

A good example would be the MPLAB IDE, which I just downloaded yesterday to check out. Overall it seems pretty powerful--about like the old Turbo Pascal 5/Turbo C IDE (except not text-mode) with the programmer interfaces added on. The MPLAB IDE editor, however, is abysmal, with limited hotkey support and a useless macro function. When I get into PICs I may need to use MPLAB (if I can't get sdcc to work) but there is no way I'm using that horrible editor.

That was just a very windy way of saying that yeah, emacs is a pain in the butt to learn, but man oh man...once you do, it's insane. I guess vi is the same for vi fans but I just learned emacs first. And my fingers still speak Wordstar but its limitations are ultimately frustrating.


Torben
 
VI/VIM gets really easy whenever you have to edit an xorg.conf file a quadrillion times to get it to do what you want, and who doesn't love saving a text file by typing in "save! /etc/X11/xorg.conf" (as an example)
 
Last edited:
gVIM is the best
nuff said. I have tried many an IDE (eclipse, Visual-C++, Xilinx-IDE, ...) and every time I come back to g/VI/M (for my coding needs, and editing needs)

With all the scripts people have written for VIM it is really useful
Plus VI is part of the POSIX spec and thus if you know the basic VI commands you are sorted

Use it on, windows, solaris, Linux, MAC. I have portable gVIM as well on my USB stick

Quick cheatsheet:
The Vim commands cheat sheet
 

Attachments

  • Screenshot-ftdi.py (~-Desktop) - GVIM.png
    Screenshot-ftdi.py (~-Desktop) - GVIM.png
    135.4 KB · Views: 257
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top