background preloader

Xemacs

Facebook Twitter

CC Mode Manual: Customizing Indentation. The context sensitive indentation is mainly controlled by the variable c-offsets-alist: User Option: c-offsets-alist This special style variable contains the mappings between syntactic symbols and the offsets to apply for those symbols.

CC Mode Manual: Customizing Indentation

It's set at mode initialization from a style you may specify. Styles are groupings of syntactic symbol offsets and other style variable values. Most likely, you'll find that one of the predefined styles will suit your needs. Only syntactic symbols not already bound on c-offsets-alist will be set from styles. The offset associated with any particular syntactic symbol can be an integer, a function or lambda expression, a variable name, a vector, a list, or one of the following special symbols: +, -, ++, --, *, or /. The special symbols describe an offset in multiples of the value of c-basic-offset: User Option: c-basic-offset Style variable that holds the basic offset between indentation levels. A Collection of Tutorials on Emacs - Indentation. Go to the first, previous, next, last section, table of contents.

A Collection of Tutorials on Emacs - Indentation

Basic Concepts There are quite a few concepts in Emacs which relate to white space at the beginning of a line. Enough, in fact, to be potentially quite confusing. I'll try to clear up the confusion in this little document. The following concepts come into play: The TAB key. Contrary to popular belief, the TAB key does not insert a tab character in most modes. The tab character. It is possible to change the way a tab character is displayed. In order to correctly view files with non-standard tab width settings, it is possible to set the variable tab-width, like this: (setq-default tab-width 4) If you only want this in a particular mode, add (setq tab-width 4) to that mode's hook.

Whether or not tab characters are used for indentation. Whether by syntax-driven indentation, or relative indentation (text mode), or advancing to the next tab stop (fundamental mode), indentation needs to insert white space. Syntax driven indentation. TrampMode. TRAMP (Transparent Remote Access, Multiple Protocols) is a package for editing remote files, similar to AngeFtp or efs.

TrampMode

Whereas the others use FTP to connect to the remote host and to transfer the files, TRAMP uses a remote shell connection (rlogin, telnet, ssh). It can transfer the files using rcp or a similar program, or it can encode the file contents (using uuencode or base64) and transfer them right through the shell connection. Tramp was formerly called RCP or rcp.el. It allows you transparent access to files on remote access. “Transparent” means that usually the user doesn’t have to worry about anything. If Tramp still isn’t fast enough for you (or if you don’t use linux), try . Obtaining TRAMP TrampMode is a part of Emacs starting with version 22.1.

You can get it from here: Tramp Documentation: Quick-start tramp configuration (require 'tramp) (setq tramp-default-method "ssh") For GNU Emacs C-x C-f /remotehost:filename RET (or /method:user@remotehost:filename) For XEmacs use the syntax.