[solved] Emacs

Questions about applications and software
Forum rules
Before you post please read how to get help

[solved] Emacs

Postby KeesA on Fri Jan 25, 2013 5:07 pm

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,
Last edited by KeesA on Mon Apr 08, 2013 7:00 pm, edited 1 time in total.
User avatar
KeesA
Level 2
Level 2
 
Posts: 94
Joined: Wed Jan 09, 2013 8:47 pm

Linux Mint is funded by ads and donations.
 

Re: Emacs

Postby bjornmu on Fri Jan 25, 2013 5:13 pm

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)
User avatar
bjornmu
Level 3
Level 3
 
Posts: 160
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: Emacs

Postby DrHu on Fri Jan 25, 2013 5:25 pm

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
User avatar
DrHu
Level 17
Level 17
 
Posts: 7087
Joined: Wed Jun 17, 2009 8:20 pm

Re: Emacs

Postby KeesA on Fri Jan 25, 2013 5:53 pm

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)
User avatar
KeesA
Level 2
Level 2
 
Posts: 94
Joined: Wed Jan 09, 2013 8:47 pm

Re: Emacs

Postby bjornmu on Fri Jan 25, 2013 5:56 pm

Just put it before or after that large () block.
User avatar
bjornmu
Level 3
Level 3
 
Posts: 160
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: Emacs

Postby KeesA on Fri Jan 25, 2013 6:33 pm

I did, and it works out fine.

tnx a lot.
User avatar
KeesA
Level 2
Level 2
 
Posts: 94
Joined: Wed Jan 09, 2013 8:47 pm


Return to Software & Applications

Who is online

Users browsing this forum: DeMus and 28 guests