is there a mode that gives tabs to emacs. I lost lots of time navigating between buffers. I need to get a view which shows me the different buffers.
For tabs, I recommend tabbar-mode. It is a minor mode that should provide the functionality you're looking for.
I use elscreen for this, even if they are not "real" tabs like in other apps (not draggable, no close button, and not "one buffer per tab" concept, we create tabs when we want). But it's enough for me to organize my work in different views.
I also like the hydra you'll see on the wiki and I bound other keys to switch between tabs more naturally:
(global-set-key (kbd "<C-prior>") 'elscreen-previous)
(global-set-key (kbd "<C-next>") 'elscreen-next)
(global-set-key (kbd "<C-tab>") 'elscreen-next) ;; except in org
(global-set-key (kbd "<C-iso-lefttab>") 'elscreen-previous)
see also Buffer Management and specially ibuffer if your goal is to list all available buffers (which you can do now with the menu).
Try my package centaur-tabs. I tried to make it as modern looking as I could, providing a lot of customization options and theming it in popular theme packages like Kaolin Themes or Atom One Dark Theme. It is keyboard oriented although the tabs work with the mouse. It is available in MELPA, try it out and feel free to contribute or submit any kind of feedback. (https://i.stack.imgur.com/K1N5C.png)
As of 2019 Emacs now has native tabs, so
(global-tab-line-mode t)
I find C-x C-b
(list-buffers)
combined with o (Buffer-menu-other-window, try also
? for detailed help) perfectly adequate.
Others use
Speedbar
which is way more powerful.
You have several choices:
speedbar: M-x speedbar
ibuffer: M-x ibuffer
or even simply using helm: M-x helm-buffer-list
I am new to Emacs and presently I am using it heavily for LaTeXing.
Please help me out with the following customizations:
How to scroll continuously in doc-view-mode? I have
(setq doc-view-continuous t)
in my .emacs file. This enables scrolling through the pages, however, the pages "jump" to the next one. I do not like reading to the bottom of the screen. Is it possible to resolve it?
I invoke doc-view using C-c C-c and the PDF loads into a new window. Is it possible to load it in a new frame?
I have used
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
in my .emacs file. This works fine. However, the first line is just below the top screen. Can I create some margin ONLY on top?
How do I copy/paste from Emacs to other application, like a browser? I couldn't copy the code above using C-w in Emacs and then Ctrl-v in Iceweasel (browser). I had to use Kate, sadly. (This I realized while typing this question!)
Regards,
Saurav Agarwal
You should be able to scroll "line by line" with C-n and C-p.
I do not know that mode (I use tex-mode), but what you probably want is to find out how C-c C-c is invoking doc-view and use it with other-window, for example:
(defun new-frame-dvi-file ()
(interactive)
(split-window-right)
(other-window 1)
(tex-view))
I could not find anything that sets a top margin ONLY, but found this:
(set-frame-parameter nil 'internal-border-width 10)
You can share clipboards with this:
(setq x-select-enable-clipboard t)
Anyway, even if it sounds really boring, sometimes it is really useful to take a look at the manual. Sometimes you don't need to read it all and you can find the answer quickly ;-)
Hope it helps!
I have auto-complete.el, using Emacs. When I type something, only part of the suggestion appears, and I want to set a key shortcut or something, to enable the whole thing and show all possible suggestions. Using it in Python mode.
When I first installed it, I used it once, don't remember how (possibly automatically).
Try this:
(add-hook
'python-mode-hook
(lambda()
(define-key python-mode-map "\C-i" 'auto-complete)))
I'm trying to use emacs in fullscreen mode with a decent font. I have an nvidia-based laptop running Ubuntu. When it first loads, the font is huge think 16pt font. I used the menu options to set a decent font (8pt).
Now when I run emacs in fullscreen mode, it adjusts the window sort of for the huge font then loads my 8pt font. Now half of my screen is the minibuffer. How do I correctly set the font so that I can use fullscreen mode.
I have tried specifying displaysize in my x config and X does not start. I hear theres something else you need to do for nvidia drivers... but not sure how that works.
I use the following (from http://www.emacswiki.org/emacs/FullScreen) in my .emacs:
(defun toggle-fullscreen (&optional f)
(interactive)
(let ((current-value (frame-parameter nil 'fullscreen)))
(set-frame-parameter nil 'fullscreen
(if (equal 'fullboth current-value)
(if (boundp 'old-fullscreen) old-fullscreen nil)
(progn (setq old-fullscreen current-value)
'fullboth)))))
(global-set-key [f11] 'toggle-fullscreen)
;; Make new frames fullscreen by default. Note: this hook doesn't do
;; anything to the initial frame if it's in your .emacs, since that file is
;; read _after_ the initial frame is created.
(add-hook 'after-make-frame-functions 'toggle-fullscreen)
Then F11 will toggle fullscreen on/off.
This is tough since I can't replicate the problem on my machine. I just add -fs and it seems to work. If you just want more real estate... do these work for you:
ditch the menu/toolbar
add (menu-bar-mode 0) and (tool-bar-mode 0) to .emacs
start up and maximze
you should just have the regular DE frame but nothing else
toggle from emacs using M-x menu-bar-mode and M-x tool-bar-mode as needed
manually fullscreen emacs
I can just start emacs, right click the window bar and choose fullscreen from xfce
I have F11 set to do this, but it doesn't seem to work from emacs (emacs seems to try and interpret it as a key binding rather than passing the key to the DE)
if this works, perhaps find a binding in your DE that emacs doesn't care about and just maximize normally
combine the two
I start emacs regularly (/usr/bin/emacs)
I disabled both tool-bar-mode and menu-bar-mode disabled
I manually fullscreen with a right mouse click on the window bar
I get THIS
that's the entire screen, not just a shot of the window contents
What do you think of those ideas? Sorry I can't help more with Ubuntu and/or nvidia. No experience and tough if one can't replicate the problem! Maybe if emacs starts regularly for you the above can help achieve close (or fully) what you're hoping for.
The emacs tabbar.el package adds (buffer)tabs to each window and comes standard with aquamacs and can be added to emacs23 with the emacs-goodies-el package.
Are any of you hardcore emacs users actually using tabbar? I'm sort of used to having tabs, but I would like to know if working without them could be more productive, and if there are other ways besides checking your bufferlist (C-x C-b) to get an overview of your current project files.
As a side note, I really like textmate's project drawer (and tabs), but anything similar in emacs looks just plain hideous.
I've tried using it, but I felt it constraint my workflow rather than improve it. There are a lot of excellent Emacs modes to help with the organization of many buffers and I simply don't feel mapping buffers to tabs is one of those ways.
Just think about the most basic scenario - a lot of tabs. How different programs deal with it - limit the maximum tabs(IntelliJ IDEA); enable tabs bar scrolling(Firefox); infinitely reducing the tabs size(Google Chrome); creating rows of tabs(IntelliJ IDEA)... None of this solutions is that great and by not having tabs in Emacs we have one less problem to worry about. At least this is my subjective opinion - others will most certainly disagree... I personally need nothing more than ido and and iswitchb.
A video of ido in action: http://www.youtube.com/watch?v=lsgPNVIMkIE
Ya, I use tabbar, along with sr-speedbar.
I customize tabbar to show files in specific groups, and mod some keybindings to make navigating the files easier.
FWIW, here's the relevant section from my ~/.emacs:
(require 'tabbar)
; turn on the tabbar
(tabbar-mode t)
; define all tabs to be one of 3 possible groups: “Emacs Buffer”, “Dired”,
;“User Buffer”.
(defun tabbar-buffer-groups ()
"Return the list of group names the current buffer belongs to.
This function is a custom function for tabbar-mode's tabbar-buffer-groups.
This function group all buffers into 3 groups:
Those Dired, those user buffer, and those emacs buffer.
Emacs buffer are those starting with “*”."
(list
(cond
((string-equal "*" (substring (buffer-name) 0 1))
"Emacs Buffer"
)
((eq major-mode 'dired-mode)
"Dired"
)
(t
"User Buffer"
)
)))
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
(global-set-key [M-s-left] 'tabbar-backward)
(global-set-key [M-s-right] 'tabbar-forward)
There's lot's of other tips on emacswiki:
http://www.emacswiki.org/emacs/TabBarMode
no.
I use iswitch-b
C-x b "first few letters of buffer", then C-s to rotate to the specific file I want takes me under 2 seconds without me having to move hand to mouse.
No. I could possibly be convinced to try it again with the right customisation, but by default it's pretty useless for me, as I habitually have in excess of 100 buffers open. ibuffer with its filtering and grouping is the best way for managing large numbers of buffers that I've tried.
I like to use speedbar for quick buffer navigation. I have in my .emacs
(speedbar-change-initial-expansion-list "buffers")
(global-set-key [f8] 'speedbar-get-focus)
so when I hit F8, a new frame pops up with a list of open buffers, there you can move point over the buffer you want to select and to activate it. One more F8 goes back to the main frame.
tabs are not reserved for mouse users. look at vim possible workflow: gt to go next tab, or gT to go previous. Say you've one dedicated window for vim: you might easily switch from one buffer to another. Yes, tabs are probably for users with few buffers. if you have hundreds, this won't work.
Quite frankly, you'll find better editors than emacs when speaking of tabs, menus and toolbar. Emacs clearly encourages you to use your keyboard and leave your mouse asleep.
Tabbar or any other tab management tool will have difficulties when you'll have lots of buffers opened. You also don't want to show all your buffers in tabs. Having to remove your hand from the keyboard to grasp the mouse and click on a tab and then remove your hand from the mouse and put it onto the keyboard is clearly a waste of time when a simple keystroke could be used instead.
The best thing you could do to your emacs and to you is to have the following configuration in your .emacs :
(menu-bar-mode -1) ;hide menu-bar
(scroll-bar-mode -1) ;hide scroll-bar
(tool-bar-mode -1) ;hide tool-bar
That will force you to forget the old way of doing things using a mouse (like using tabbar, or menus...), and to use your fingers instead.
Up until now, I haven't tried it, but before I switched back to GNU Emacs from XEmacs, I used the XEmacs tabs very heavily. I found that when I had many source files open, it was one of the fastest ways to jump to the correct file.
Now that I know about tabbar, I am trying it; and so far, I like it.
John
Tabs are really only useful if you use the mouse, and one of the main benefits (to me) of Emacs is that I can avoid the mouse.
So, no, tabbar isn't useful in general.
I did find the tabs useful when I was browsing web pages (using w3m), but I was using the mouse in that case...
Tabbar looks like it is godforsaken
So what about elscreen?
Can be found via http://melpa.milkbox.net/#/elscreen - or installed emacs-elpa (or melpa).
Elscreen is very useful for me.
C-x b<RET> always gives you the last edited buffer. And what do you do with tabs ? Mostly switch back & forth between two files. There you go.