ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
im having to work on a solaris system and they have installed a very old nasty antequated version of vim so i find myself having to use emacs which i dont know very well. the problem is im really missing some commands from vim and i hope someone can guide me to the appropriate keystroke in emacs. im after equivelents for:
Ok, so I don't know what exactly a "change" command does. So this may not be what you want.
cw => change word
M-d is the keystoke in emacs to "kill word". It will kill everything from point/cursor to the next word break. For me the Meta key is escape... depends on your keymap though. You can also execute it like so:
M-x kill-word X
Where you replace X with the number of times to "kill word"
If you're looking to search-and-replace, the keystroke is M-%
c$ => Change to end of line
C-k will delete everything on the line from point/cursor to the end of the line. Hitting C-k twice in succession will not only delete the contents to the end of the line but also delete the newline as well
cf => could not find an online reference that mentioned it
and no emacs command list should be without:
Undo: C-_
Last edited by Dark_Helmet; 07-11-2003 at 09:07 PM.
change is essentially delete and enter insert mode. so M-d and C-k are exactly what im looking for, cf isnt really important, it changes the text between the current cursor and the first occurence of the character after f eg
printf("hello world");
if the cursor was at the beginning of the line then fhcfd would move to the h in hello then delete everything upto the d in world and put me into insert mode essentially changing the text in the quotes. but it was really the M-d i was after.
Glad I could help. Need any more commands? I always feel so alone since everybody else uses vi... I guess I'm just weird. I really don't like having two different 'modes'. I'm an impatient, instant gratification type I guess. When I hit 'G', I want to see a G put into the document...
that is a great command, how did you find it? i feel like ive trawled through miles of documentation and never saw anything like it. can i also do code folds?
I remembered someone telling me that it was possible to restrict yourself to a sub-buffer like that. Unfortunately, I'd forgotten the command since then. So I started searching for references to regions, then rectangles, and then by a stroke of luck, google turned up a message thread that someone mentioned it in.
In my version of Xemacs, when I execute the command, it says it's "disabled" but allows me to run it. That might be why it was difficult to find it. Perhaps the maintainers don't want to support that command anymore... dunno.
Until they rip it out completely or offer an alternative, I'd say it's fair game.
I can't say that I've seen code folds implemented. If they have, it's probably been someone's custom LISP implementation. Then again, those people tend to post their LISP code. So it's possible.
Last edited by Dark_Helmet; 07-16-2003 at 11:17 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.