Questions tagged [modeline]

The mode line is a feature of some text editors and source control systems. It provides useful summary or contextual information for an associated buffer or file.

Overview

The mode line is a feature of some text editors and source control systems.

It provides useful summary or contextual information for an associated buffer or file.

Vim modeline

In Vim, the modeline is an annotation at the beginning or end of a text document to configure the editor for that document

Emacs modeline

In Emacs, the modeline is shown in the window, including its name and current modes. It is located at the bottom of every Emacs Window aside from MiniBuffer windows.

Here is a screenshot that shows a windows with it's mode line (the gray bar at the bottom):

The mode-line

For complete information on the contents of mode lines, see mode line in the EmacsManual. The information in a mode line usually includes the following:

  1. Whether or not the buffer has been modified:
  • ** – modified since last save
  • -- – not modified since last save
  • %* – read-only, but modified
  • %% – read-only, not modified
  1. Buffer name.

  2. The name of one or more MajorModes or MinorModes of the buffer

  3. Line number of the TextCursor (and Point), and perhaps the column number.

  4. Position in buffer:

  • Top – the beginning of the buffer is shown in the window
  • Bot – the end of the buffer is shown in the window
  • All – all of the buffer is shown in the window
  • a percentage – percentage of the buffer above the top of the window.
  1. Coding system of the buffer.

  2. End-of-line translation.


Sources: ModeLine | Emacs Wiki

51 questions
1
vote
1 answer

Vim: disable autocmd BufRead (modeline)

From this answer I executed: :set modeline | doautocmd BufRead Since then, I cannot disable the BufRead. I can open a file and unset the modeline: :set nomodeline :e! :wq But when I reopen the same file, its modeline is again auto executed. I…
Xopi García
  • 359
  • 1
  • 2
  • 9
1
vote
2 answers

How to Call a Function in Emacs Mode Line Format

I want to call some methods in the Emacs mode-line format. For example count-words to see how many characters are selected or what's the class/method name cursor is on. This is my current mode-line format, but calling count-words, it shows *invalid*…
mortymacs
  • 3,456
  • 3
  • 27
  • 53
1
vote
1 answer

Emacs Mode Line Click Change Buffer

In some installation of Emacs for the terminal, I had that if you click (text mouse cursor) on the buffer name in the mode line it jumped to the next buffer. I search for a while but I couldn't find it. Do someone remembers how to achieve this. OS …
1
vote
1 answer

Vim or Emacs-like modeline magic support for VSCode

I'm writing a script using Qt's ECMAScript. The files use the extension .qs, which VSCode does not currently have syntax highlighting for. javascript syntax highlighting, however, is plenty pretty to satisfy me. Is there any way to map .qs to…
jmcker
  • 387
  • 4
  • 18
1
vote
1 answer

emacs: Which plugin is this?

I have seen many times this 'colourful' plugin but I cannot find which one it is. Any ideas?
George B.
  • 565
  • 7
  • 19
1
vote
0 answers

Emacs: add list of all opened files to mode-line?

I'd like the mode-line to show names of all opened files (maybe truncated if too long), similar to browser tabs. I'd like to have this because I have 2 shortcuts for switching to prev/next user buffer, and it would be more convenient if I know the…
AhLeung
  • 207
  • 1
  • 5
1
vote
1 answer

setting inline-open in modeline in emacs

I have this in my .emacs: (c-set-offset 'inline-open 0) Is there a way to "unset" inline-open in a modeline so that for some files inline-open does cause an indentation? Thanks.
MK.
  • 3,907
  • 5
  • 34
  • 46
1
vote
0 answers

How do I display the git branch in the emacs modeline?

By default the modeline like: Emacs displays Git-master when I am working in a directory that is under the Git version control system.Now I customize modeline in the file init-modeline.el like this: (setq-default mode-line-format (list …
Alan
  • 1,691
  • 1
  • 16
  • 13
1
vote
2 answers

Can I configure Vim to go to the end of particular file?

I have a text file that I append some text to. I would like to configure Vim to go to the end of this particular file each time I open it. How do I do this for a single file?
syntagma
  • 23,346
  • 16
  • 78
  • 134
1
vote
1 answer

Vim's custom foldmarker {,} doesn't work

I have a js file with following content: function do_this(){ a = '{1}'; } function do_that(a){ b = b + 1; } // vim: set fdm=marker fmr={,} : When it folds it shows following: function do_this(){ a = '{1}'; } function do_that(a){ +--…
Ariunbayar
  • 81
  • 6
1
vote
1 answer

How to prevent vim from interpreting a Makefile target as a modeline?

I have a target in my Makefile that is as follows: vim: .vim .vimrc .gvimrc $(foreach df, $^, ln -s $(CURDIR)/$(df) ~; ) I also have modelines enabled in vim. This means whenever I open the file in vim I get the following error: Error detected…
Zameer Manji
  • 3,017
  • 5
  • 31
  • 42
1
vote
2 answers

Text based emacs modeline

How do we use text-only based modeline in emacs ? I don't want a big button across the screen at the bootom of my emacs window. Just a text line with all the contents would be good and minimal. Similarly when I do a split screen, I don't want a…
user994572
  • 139
  • 1
  • 11
1
vote
1 answer

Can I configure vim with a modeline from a parent directory instead of from each and every file?

Possible Duplicate: Vim: apply settings on files in directory vim can be configured with settings like tab size and expanding tabs to spaces based on filetype. I want to configure editing settings for vim for the source files in my product but I…
codeshot
  • 1,183
  • 1
  • 9
  • 20
1
vote
1 answer

Which vim options should be used in modelines?

I'm wondering which vim options should I be specifying in modelines in my source files (mostly C), and which should not be specified there and rather left for the user to specify. I believe that the modelines should enforce code-specific policies…
Michał Górny
  • 18,713
  • 5
  • 53
  • 76
1
vote
1 answer

FBIOPUT_VSCREENINFO and modelines

I am trying to change the screen configuration with FBIOPUT_VSCREENINFO, but I do not have a clue how to compute: __u32 pixclock; /* pixel clock in ps (pico seconds) */ __u32 left_margin; /* time from sync to picture …
litro
  • 195
  • 1
  • 11