Vim kidnapped my bash editor - pls help me get (u)emacs back
Hi, How does one force bash to use emacs (or uemacs) for editing, in Suse 9.2? (I mean in a KDE's konsole window.) A while ago I installed some VIM and emacs packages and uemacs; among them kvim. (Kvim I later uninstalled.) Now, for some reason, when I try to edit anything and type in bash for example 'edit myfile', the editor that starts is vim 6.3. I have read respective paragraphs in several Linux (and bash) books & docs and tried these commands in command line: EDITOR=/usr/bin/uemacs export EDITOR VISUAL=/usr/bin/uemacs export VISUAL FCEDIT=...etc ..and also in this form: export EDITOR=/usr/bin/uemacs And done this: set -o allexport And this: shopt -o emacs and set -o emacs ..to no avail. It is vim that starts every time. The above stuff I have tried first as a user, then also as root. I have also made in my home dir a .bashrc file and entered the export EDITOR=/usr/bin/uemacs (and so on) there. AND in my home dir's '.profile'file, before the "test -z [etc]" line there . Reboted, even. No help. in /etc I have (as root) made a file 'bash.bashrc.local' and entered the stuff there, too. So Where should one put these preferences (and the noclobber thing and the command to prevent CTRL-D closing the konsole window, and the possible commands for the prompt to automatically show pwd) ..in order them to work? The 'set' command tells that my shell is bin/bash, and that (!) my editor=/usr/bin/uemacs (and that the same editor is used for visual and fcedit). The uemacs editor does work, when started with the uemacs command from a console. A while a go I changed my login name in KDE - could that have made some mess? If I remove vim (=uninstall it) the 'edit foofile' command does nothing. The command 'shopt -o emacs' produces this response: emacs on whether I run it as root or in a user's terminal. Thanks on any hints on this supernaturalish thing! I'd like to learn vim but do not like a gun being put to my head this way... DW / Mike
* Dumb Waiter
Hi,
How does one force bash to use emacs (or uemacs) for editing, in Suse 9.2? (I mean in a KDE's konsole window.)
A while ago I installed some VIM and emacs packages and uemacs; among them kvim. (Kvim I later uninstalled.)
Now, for some reason, when I try to edit anything and type in bash for example 'edit myfile', the editor that starts is vim 6.3.
Why don;t you type xemacs myfile or emacs myfile or uemacs myfile Kind regards, -- Gerhard den Hollander Phone :+31-10.280.1515 Global ICT manager Direct:+31-10.280.1539 Fugro-Jason Fax :+31-10.280.1511 gdenhollander@Fugro-Jason.com POBox 1573 visit us at http://www.Fugro-Jason.com 3000 BN Rotterdam JASON.......#1 in Reservoir Characterization The Netherlands This e-mail and any files transmitted with it are confidential and intended solely for the use of the addressee. This e-mail shall not be deemed binding unless confirmed in writing. If you have received it by mistake, please let us know by e-mail reply and delete it from your system; you may not copy this message or disclose its contents to anyone. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.
On Thu, 20 Jan 2005 17:06:23 +0100, Gerhard den Hollander
* Dumb Waiter
(Thu, Jan 20, 2005 at 06:03:23PM +0200) Hi,
How does one force bash to use emacs (or uemacs) for editing, in Suse 9.2? (I mean in a KDE's konsole window.)
A while ago I installed some VIM and emacs packages and uemacs; among them kvim. (Kvim I later uninstalled.)
Now, for some reason, when I try to edit anything and type in bash for example 'edit myfile', the editor that starts is vim 6.3.
Why don;t you type xemacs myfile or emacs myfile or uemacs myfile
The point is, I want to learn how I can change the bash environment. This present problem I could circumvent by typing uemacs myfile, but perhaps some next problem would be much more complicated to solve. That is why I would like to know how the environment can be modified. The Suse manuals don't seem to reveal this to me, nor does any of the books I have consulted; it all really _seems_ simple (apart from the various names different sources use for the files where bash might or might not be looking for it's variables) -- but it boils down to just not working: vim starts every time... I wonder where I went wrong. (Apart from being born the person I am.) dw
Dumb wrote regarding '[SLE] Vim kidnapped my bash editor - pls help me get (u)emacs back' on Thu, Jan 20 at 10:03:
Hi,
How does one force bash to use emacs (or uemacs) for editing, in Suse 9.2? (I mean in a KDE's konsole window.)
A while ago I installed some VIM and emacs packages and uemacs; among them kvim. (Kvim I later uninstalled.)
Now, for some reason, when I try to edit anything and type in bash for example 'edit myfile', the editor that starts is vim 6.3. [...]
Must... ignore.. urge to suggest that your computer is telling you that the bloated pig of an editor is crushing it, and that vim is clearly much more friendly to the hardware... ;) Setting the environment variables is a good start. However, you need to figure out what's running when you type "edit". Is it a command, or an alias? Let's see if it's a command - type "which edit". On my system, that returns "/usr/bin/edit". Well, so it's a file. Next, let's find out what kind of file it is - "file /usr/bin/edit" tells me that "/usr/bin/edit: symbolic link to vim". Therefore, you probably want to fix that by typing ln -sf `which emacs` /usr/bin/edit Though you'll have to run that as root in order to write to /usr/bin. As an aside, if it wasn't a command, it would've been an alias. Type "alias" as your shell to get a list of aliases. You could also fix this problem by, in your .bashrc (or .profile, if you prefer), adding a line like alias edit="/usr/bin/emacs" changing that as neccesary for wherever emacs lives. An alias will override a program in the path. That's fun for doing stupid things like alias ls="rm -f" on the accounts of people you dislike. --Danny, who dislikes almost no one ;)
Danny, On Thursday 20 January 2005 09:20, Danny Sauer wrote:
Dumb wrote regarding '[SLE] Vim kidnapped my bash editor - pls help me get (u)emacs back' on Thu, Jan 20 at 10:03:
Hi,
How does one force bash to use emacs (or uemacs) for editing, in Suse 9.2? (I mean in a KDE's konsole window.)
A while ago I installed some VIM and emacs packages and uemacs; among them kvim. (Kvim I later uninstalled.)
Now, for some reason, when I try to edit anything and type in bash for example 'edit myfile', the editor that starts is vim 6.3.
[...]
Must... ignore.. urge to suggest that your computer is telling you that the bloated pig of an editor is crushing it, and that vim is clearly much more friendly to the hardware... ;)
Now, now. Emacs is a venerable editor. I wish I could say I knew how to use it, but I'm a Vi / Vim guy from way back.
Setting the environment variables is a good start. However, you need to figure out what's running when you type "edit". Is it a command, or an alias? Let's see if it's a command - type "which edit". On my system, that returns "/usr/bin/edit". Well, so it's a file. Next, let's find out what kind of file it is - "file /usr/bin/edit" tells me that "/usr/bin/edit: symbolic link to vim". Therefore, you probably want to fix that by typing ln -sf `which emacs` /usr/bin/edit Though you'll have to run that as root in order to write to /usr/bin.
This is not advisable, I'd say. Witness: % rpm -qf /usr/bin/edit vim-6.2-233 So, "/usr/bin/edit" is part of the Vim package and altering it is, in effect, breaking that package installation and will get put right the next time that package is updated or repaired. Probably he should simply not use "edit" to invoke his own editor. That, or he should put an alias in his "~/.bashrc" or create a different script or symlink in his "~/bin/" directory.
...
--Danny, who dislikes almost no one ;)
Cool. Give is the short list, OK? Randall Schulz (Who has a long, long enemies list.)
Randall wrote regarding 'Re: [SLE] Vim kidnapped my bash editor - pls help me get (u)emacs back' on Thu, Jan 20 at 11:34:
Danny,
On Thursday 20 January 2005 09:20, Danny Sauer wrote:
Dumb wrote regarding '[SLE] Vim kidnapped my bash editor - pls help me get (u)emacs back' on Thu, Jan 20 at 10:03:
Hi,
How does one force bash to use emacs (or uemacs) for editing, in Suse 9.2? (I mean in a KDE's konsole window.)
A while ago I installed some VIM and emacs packages and uemacs; among them kvim. (Kvim I later uninstalled.)
Now, for some reason, when I try to edit anything and type in bash for example 'edit myfile', the editor that starts is vim 6.3.
[...]
Must... ignore.. urge to suggest that your computer is telling you that the bloated pig of an editor is crushing it, and that vim is clearly much more friendly to the hardware... ;)
Now, now. Emacs is a venerable editor. I wish I could say I knew how to use it, but I'm a Vi / Vim guy from way back.
Back when there wasn't enough memory / CPU available to get emacs into memory *and* have room for another open filehandle? ;) [...]
vim". Therefore, you probably want to fix that by typing ln -sf `which emacs` /usr/bin/edit Though you'll have to run that as root in order to write to /usr/bin.
This is not advisable, I'd say. Witness:
% rpm -qf /usr/bin/edit vim-6.2-233
So, "/usr/bin/edit" is part of the Vim package and altering it is, in effect, breaking that package installation and will get put right the next time that package is updated or repaired.
Probably he should simply not use "edit" to invoke his own editor. That, or he should put an alias in his "~/.bashrc" or create a different script or symlink in his "~/bin/" directory.
That's weird. How in the heck was "edit" working before, then? I went through and dumped the contents of all the packages in my 9.2 ftp mirror (I'm not real busy right now), and the file only exists in the vim package. I suppose that's as expected, so there aren't file conflicts, but I wonder how it was working before? You're right, though - the alias probably is a better fix.
...
--Danny, who dislikes almost no one ;)
Cool. Give is the short list, OK?
Randall Schulz (Who has a long, long enemies list.)
If you filter out the politicians, the list actually is pretty short. :) --Danny, who actually just mocks emacs because he has never taken the time to learn how to use it...
On Thu, 20 Jan 2005 11:50:43 -0600, Danny Sauer
Randall wrote regarding 'Re: [SLE] Vim kidnapped my bash editor - pls help me get (u)emacs back' on Thu, Jan 20 at 11:34:
Danny,
On Thursday 20 January 2005 09:20, Danny Sauer wrote:
Dumb wrote regarding '[SLE] Vim kidnapped my bash editor - pls help me get (u)emacs back' on Thu, Jan 20 at 10:03:
Hi,
How does one force bash to use emacs (or uemacs) for editing, in Suse 9.2? (I mean in a KDE's konsole window.)
A while ago I installed some VIM and emacs packages and uemacs; among them kvim. (Kvim I later uninstalled.)
Now, for some reason, when I try to edit anything and type in bash for example 'edit myfile', the editor that starts is vim 6.3.
[...]
Must... ignore.. urge to suggest that your computer is telling you that the bloated pig of an editor is crushing it, and that vim is clearly much more friendly to the hardware... ;)
Now, now. Emacs is a venerable editor. I wish I could say I knew how to use it, but I'm a Vi / Vim guy from way back.
Back when there wasn't enough memory / CPU available to get emacs into memory *and* have room for another open filehandle? ;)
[...]
vim". Therefore, you probably want to fix that by typing ln -sf `which emacs` /usr/bin/edit Though you'll have to run that as root in order to write to /usr/bin.
This is not advisable, I'd say. Witness:
% rpm -qf /usr/bin/edit vim-6.2-233
So, "/usr/bin/edit" is part of the Vim package and altering it is, in effect, breaking that package installation and will get put right the next time that package is updated or repaired.
Probably he should simply not use "edit" to invoke his own editor. That, or he should put an alias in his "~/.bashrc" or create a different script or symlink in his "~/bin/" directory.
That's weird. How in the heck was "edit" working before, then? I went through and dumped the contents of all the packages in my 9.2 ftp mirror (I'm not real busy right now), and the file only exists in the vim package. I suppose that's as expected, so there aren't file conflicts, but I wonder how it was working before? You're right, though - the alias probably is a better fix. ...
Thanks for you input, Making an alias was the thing to do. Now I know how to choose the editor myself and lot be forced to use anything. Both vim and emacs (or uemacs or em) are interesting. (But I guess I'll have to cut the wires to my PC's speaker as the beeping of vim or emacs drives me up the wall.) Thank you guys! dw
* Dumb Waiter
Making an alias was the thing to do.
Now I know how to choose the editor myself and lot be forced to use anything.
Both vim and emacs (or uemacs or em) are interesting. (But I guess I'll have to cut the wires to my PC's speaker as the beeping of vim or emacs drives me up the wall.)
grep EDITOR ~/.bashrc export EDITOR=/usr/local/bin/jed echo $EDITOR /usr/local/bin/jed -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
Patrick wrote regarding 'Re: [SLE] Vim kidnapped my bash editor - pls help me get (u)emacs back' on Thu, Jan 20 at 20:50:
grep EDITOR ~/.bashrc export EDITOR=/usr/local/bin/jed
echo $EDITOR /usr/local/bin/jed
Whoa, whoa there buddy. Just step away from the strange editor, and everyone will be fine. We don't need to do anything *that* drastic... --Danny, glad that it's not pico, anyway (nano's not bad, but pico is)
participants (5)
-
Danny Sauer
-
Dumb Waiter
-
Gerhard den Hollander
-
Patrick Shanahan
-
Randall R Schulz