Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Would you prefer to use EMACS or VIM ?
I prefer the hjkl since you do not need 2 hands. With a single hand you can fly all through a document.
I use 'n' to scroll down/page down and 'u' for page up
So use spacemacs and you can still do so.
Quote:
besides 44 Mb, so much:
Code:
# apt-get install emacs --no-install-recommends
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
adwaita-icon-theme emacs24 emacs24-bin-common emacs24-common
imagemagick-common libatk-bridge2.0-0 libatspi2.0-0 libcolord2
libfftw3-double3 libgtk-3-0 libgtk-3-bin libgtk-3-common libjson-glib-1.0-0
libjson-glib-1.0-common liblqr-1-0 libm17n-0 libmagickcore-6.q16-2
libmagickwand-6.q16-2 libotf0 librest-0.7-0 libsoup-gnome2.4-1
libwayland-cursor0 m17n-db
Suggested packages:
emacs24-common-non-dfsg emacs24-el libfftw3-bin libfftw3-dev gvfs m17n-docs
libmagickcore-6.q16-2-extra gawk
Recommended packages:
at-spi2-core colord
The following NEW packages will be installed:
adwaita-icon-theme emacs emacs24 emacs24-bin-common emacs24-common
imagemagick-common libatk-bridge2.0-0 libatspi2.0-0 libcolord2
libfftw3-double3 libgtk-3-0 libgtk-3-bin libgtk-3-common libjson-glib-1.0-0
libjson-glib-1.0-common liblqr-1-0 libm17n-0 libmagickcore-6.q16-2
libmagickwand-6.q16-2 libotf0 librest-0.7-0 libsoup-gnome2.4-1
libwayland-cursor0 m17n-db
0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
Need to get 37.2 MB of archives.
After this operation, 144 MB of additional disk space will be used.
Do you want to continue? [Y/n]
So you have all that functionality sitting there awaiting your fingertips.... always available at a keystroke.
There is no substitute for knowing vi basics. If you install a base system of any *BSD, you will usually only have the vi editor. If you need to configure, loader tunables, rc.conf, etc then you need a text editor from the start, possibly with no network access or X server.
Very wise words.
I've been stuck a bunch of times on a system with nothing but vi. Very frustrating. So of course, the first order of business is to get emacs installed so I can breath.
Actually, my favorite is emn. Never heard of it? OK, I'll provide a copy:
I "wanted" to be an emacs user. But if your xterm has > 256 $LINES, then emacs hangs. A fatal flaw IMO. So I've been learning vim. But mostly I know how to exit both.
^X^C
<ESC>:q!<ENTER>
I've been using the cwm window manager for a while now, and a lot of it's default key bindings are those for vim.
But if your xterm has > 256 $LINES, then emacs hangs.
More that 256 lines in an xterm?? The most I can get in a reasonable font on my monitor is 88. You must have either a really really big monitor or really really good eyesight!
Quote:
Originally Posted by Shadow_7
I've been using the cwm window manager for a while now, and a lot of it's default key bindings are those for vim.
The bindings probably aren't connected to the WM, but to the shell. Try this command to get emacs bindings:
More that 256 lines in an xterm?? The most I can get in a reasonable font on my monitor is 88. You must have either a really really big monitor or really really good eyesight!
Or I use Xdmx to combine a couple Xephyr windows. The neep font has a 6x13 option.
So an 80x332 xterm is possible on a 1080p screen with the neep 6x13 font. With an 8x8 bitmap font you can do 80x405. Or if Xephyr and Xdmx isn't your thing you can have a virtual desktop bigger than your visible screen. Even my hp stream 11's will do a 4096x4096 px X environment.
Allows $(( 5 * 13 )) for window decorations. With a 32" 8k display, it's not an uncommon thing these days. Granted that I'd probably have to be 12" away to actual read the thing, but I'm near sited and wouldn't need glasses at that distance.
In the case of emacs "-geometry 80x328+0+0" would fail, but "-geometry 80x256+0+0" would work. In this case I limit it to 82 ROWS (largest even multiple that fits the space) in 4x Xephyr windows of 80 COLUMNS. Although cwm, and "ignore Xephyr" in the .cwmrc so there's no window decorations on the Xephyr windows. And quirky as Xdmx hasn't really been updated since 2004, so your focus needs to be on the 1st Xephyr window to have your keyboard input work. And when things get odd you might need to minimize and restore a couple times to regain usability. The syntax for xterm is identical, except that "-w 0" would be "-bw 0". And this is 80x328 on a 1080p display. Someday I'll have a 4k display, 3840x2160 which could handle over 1k lines of code on screen. Although the 10x20 neep option is a LOT more readable IMO, but only 96x108 $COLUMNS x $LINES on a 1080p screen with Xdmx and two Xephyr windows.
For a practical demonstration:
...
In the case of emacs "-geometry 80x328+0+0" would fail, but "-geometry 80x256+0+0" would work.
You're abusing the word "practical".
This demonstrates a clever way to stress test emacs. It appears you've found a genuine bug. You should report it. But it's not a bug that will affect 1 in 10,000 users.
I find that 81x43 is a very pleasing size to use for practical use. The 80-column width is based on an anachronism, but it turns out to be a extremely good ergonomic maximum width for text and source code files. I enforce it religiously. (I add one column for convenience.) The 43 height was based on my smallest old monitor, which is gone now, but it's still a reasonable size.
I have installed EMACS and use it, without the mouse, and trying to understand it. $ emacs on terminal.
The key shortcuts of emacs are summarized here: https://www.gnu.org/software/emacs/r...df/refcard.pdf
F10 gives a nice, useful, menu. Nice.
However, the motion c-b, with meta,... I am not understanding the concept. This motion is different of the original, most common, ones of machines:
Quote:
Ctrl+S moves the text cursor one position to the left.
Ctrl+D moves the text cursor one position to the right.
Ctrl+E moves the text cursor one line upward.
Ctrl+X moves the text cursor one line downward.
Ctrl+A moves the text cursor to the start of the previous word or the end of the previous line, whichever is closer.
Ctrl+F moves the text cursor to the start of the next line or the end of the current line, whichever is closer.
Ctrl+R moves the text cursor up an entire screen.
Ctrl+C moves the text cursor down an entire screen.
Ctrl+W scrolls down one line. Cursor moves up one line unless it is already at the top
However, the motion c-b, with meta,... I am not understanding the concept.
Do you mean C-M-b (<CTRL><ALT>b)?
You can get help on any keystroke by typing C-h k <keystroke>, so C-h k C-M-b.
It's probably only useful when writing source code. Emacs has oddball names for a lot of things due to it's lisp heritage. So C-M-b goes backward to the start to the last "sexp".
You can Really work with that combination of keys??? Kinda terrific key shortcut gymnastics with the keyboard ...
The irony is that I have many emacs key sequence programmed into my fingers such that if someone asks me how I do something I can't tell them. But I can do it. The muscle memory in my fingers knows.
This has a great advantage and a disadvantage. The great advantage is that as I work with a concept that I want to implement, I don't have to think about how to move the cursor around or delete a column or straighten my code. I just think about what I want to happen and it happens.
The disadvantage is that when I am forced to work with any other editor, I have to focus on NOT allowing my fingers to automatically pressing emacs keys. I have to carefully think through how to get the cursor where I want it, etc. This is very distracting and frustrating.
A couple of years ago Canadian Border Patrol made me give them the password to my laptop. I had to "type" it in mid-air with an imaginary keyboard to "remember" the keys. I'm sure I looked a bit bonkers to them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.