2

I normally open files in emacs with:

$ emacs file.txt &

But what really gets me crazy, is that eventually I have dozens of files - each one opened in a separate window and as a result navigation between them becomes a real nightmare. What I want is to open new files in new tabs (like the way browser opens sites in new tabs). But I do not know how to do that.

1 Answer 1

0

You are actually opening each file in a DIFFERENT copy of emacs. Probably not the best usage of system resources.

In your ${HOME}/.emacs file, ensure that you execute the server-start function as part of your emacs startup. Start emacs before the following

Then edit your files with:

# wait until you type ^X# in the emacs buffer
emacsclient file.txt

# do not wait  
emacsclient --no-wait file.txt  

Rather than retrain my reflexes, I define an alias in my ~/.bashrc:

alias emacs='emacsclient --alternate-editor /usr/bin/gvim' 

and start my initial emacs with

/usr/bin/emacs24 &  

or by clicking on an icon.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .