Page 1 of 1

[solved] Emacs

Posted: Fri Jan 25, 2013 5:07 pm
by KeesA
Hallo Mint forum,

For writing bash-scripts, someone suggested to use Emacs.
I am doing so, but why not just use Notepad?
Another question about Emacs:
When I made a mistake, the bash shell says in which line the fault is.
Is it possible in Emacs to show line numbers?

Kind regards,

Re: Emacs

Posted: Fri Jan 25, 2013 5:13 pm
by bjornmu
Emacs can do so much more than notepad....

It does show the line number at the bottom by default (at least I think it is by default). If you add this to ~/.emacs, you can hit CTRL-L to go to a specific line (it will prompt for the number:

Code: Select all

(define-key global-map "\C-l" 'goto-line)

Re: Emacs

Posted: Fri Jan 25, 2013 5:25 pm
by DrHu
You may also want to try out VIM, may be considered less complicated (not as many key control codes to consider), or some of the more GUI-based(or programmer style) editors for Gnome..
http://www.geany.org/
http://linux.wikia.com/wiki/Vim
http://archive09.linux.com/feature/114359
---it can be made into a bash ide
http://www.tuxfiles.org/linuxhelp/vimcheat.html

For the terminal, a simple text editor such as nano, most are similar to msdos style command line editors; in having a menu bar at the top as well as various keyboard shortcuts or menu selections
https://en.wikipedia.org/wiki/Category: ... xt_editors

Re: Emacs

Posted: Fri Jan 25, 2013 5:53 pm
by KeesA
Hallo Bjornmu,

This is what I found when I opened .emacs (please see below).
Where do I have to put the code or is this not what you meant?

@DrHu thanks for the links.
I will give Emacs a try but when it is to complicated, I will have a look at the other editors.
Once at the "evening-university" I was forced to learn vi and that was one of the reasons for me to quit.
I hope vim is something different.

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(cua-mode t nil (cua-base)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
.emacs (END)

Re: Emacs

Posted: Fri Jan 25, 2013 5:56 pm
by bjornmu
Just put it before or after that large () block.

Re: Emacs

Posted: Fri Jan 25, 2013 6:33 pm
by KeesA
I did, and it works out fine.

tnx a lot.