Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [align]

The tag has no usage guidance.

2
votes
0answers
22 views

How to align latex tables when using macro folding

I have a latex table which contains some long commands like includegraphics or href which makes the table very nasty to read. To get a better view I fold all macros in the table and want to use ...
0
votes
1answer
48 views

How to align specific columns, for several lines simultaneously?

Consider i want to make something like this row one goes like this row two goes like this woops like this woops like what happend now and i want the like to be aligned in all sentences, something ...
0
votes
0answers
36 views

org-brain-visualize alignment issue on Mac OS

I am having trouble getting the Picture art in org-brain-visualize to align properly. I have tried this with several versions of Emacs, both run as a Mac app and from the Terminal: Org-brain version ...
1
vote
0answers
32 views

Align elements of a matrix to the right

I have a matrix in C++ Matrix<double> A = { {31, -13, 0, 0, 0, -10, 0, 0, 0}, {-13, 35, -9, 0, -11, 0, 0, 0, 0}, {0, -9, 31, -10, 0, 0, 0, 0, 0}, {0, 0, -10, 79, -30, 0, 0, 0, -...
1
vote
1answer
41 views

How do I align code on dot/period (.)?

I recently switched to emacs. Just wanted to see how it works and if it'll help with productivity. Right now I'm working in Haskell, which means a lot of function composition with . operator. I have ...
1
vote
1answer
55 views

Go Lang Struct Align Text

I am using go programming I have structs like this: type person struct { firstname string lastname string age int address string } I want it to be aligned like this ...
0
votes
1answer
92 views

How to use align-regex to align text as column or matrix?

I am trying to align code using align-regex but I could not figure out how to solve the below problem. This is what I have: public class Person { public static String id = ""; private String ...
0
votes
1answer
48 views

align doesn't indent multiple lines of C code correctly

This is my simple C code block: int main() { // the enty function in x = 100; // my new variable for(int i=1; i<2012; ++i) { // loop a lot x -= i; } } /* ...
3
votes
2answers
197 views

How to align both of comments and macro of multiple lines with space instead tabs for C/C++ code?

This is my configuration in init.el for C/C++ code which is default value in linux kernel: (setq indent-tabs-mode t) I'm using this style and won't change it to nil. And indentation and alignment ...
0
votes
1answer
29 views

Re-align text after a bigger symbol

I'd like to customize a bit mu4e in order to display nice utf-8 chars (or still better, colored emojis). However, the problem is that the utf8 chars does not have the good width (even in the mono ...
0
votes
1answer
80 views

How to link to a LaTeX label within align* environment in Orgmode?

I am using org mode to write documents with math, and then exporting to latex. Consider an unnumbered align environment with two equations: \begin{align*} x = 1\\ y = 2 \end{align*} Now, number the ...
0
votes
0answers
68 views

Where are the rules for (align-current) specified?

I am running off the develop branch of spacemacs. I recently pulled HEAD of develop, and the behaviour of align-current has changed. In C++-mode, if I run align-current (SPC x a c) on this ...
1
vote
0answers
108 views

Why is Emacs not aligning text?

When I started Emacs with emacs -q I customized the variable "Bidi Paragraph Direction" to 1 (right to left) It only affected this "Customize .." buffer and the bottom buffer. One of them is ...
1
vote
0answers
30 views

Passing function to align-region raises an error when using 'justify' rule

I have *test* buffer with following contents: 1234 23347 35466 155555 267 31 1444444 2444 32777 Now I'm trying to understand how passing a callback to align-region works, so I ...
0
votes
1answer
49 views

shell script: emacs does not align case if pattern involves $

Let us start with an unaligned piece of code case $word in pattern1) command1 ;; *) command_defaultcase ;; esac I can align this code by selecting the lines and pressing TAB. The result is: case $...
2
votes
1answer
52 views

Align the values of a JavaScript map

Say that you have the following JavaScript map literal {a: 1, aoeu: 2} and want the values aligned for readability like {a: 1, aoeu: 2} Is this possible to do with emacs? I'm currently using ...
7
votes
3answers
526 views

How to make emacs align and indent a bibtex entry?

I want bibtex-mode to align and properly indent fields. I copied a bibtex entry for the following article into Emacs: (Article source here) But, with a simple paste, the alignment is lost in Emacs ...
1
vote
0answers
111 views

Help Aligning a Pattern with `align-regexp`

How can I use M-x align-regexp to align by // All ; after // All , within [] after // For example: With text: Line 1 ; B // Comment 1 [11, 22] ; Comment 2 [3333, 4] Line 2 C // Comment 3 [3, 55] ...
1
vote
1answer
134 views

emacs align-regexp

I'm looking for a way in emacs to format a code like this: // param1, param2, param3, param4 foo(9, 8, "bar", 3) to this: // param1, param2, param3, param4 foo(9, 8, "bar", 3) I guess ...
5
votes
0answers
120 views

Prettify symbols without screwing up alignment

Is there a way to prettify symbols without running into alignment issues? E.g. replacing not with ¬is visually pleasing, but screws up code alignment, b/c not is 3 chars while ¬ is one char. Since ...
0
votes
1answer
25 views

Shift text after cursor to specified column

If I have a line like: vec3 pos; // May not be defined. And I want to shift the comment to a specific column number, say 27, such that I get: vec3 pos; // May not be defined. Is ...
2
votes
0answers
40 views

Can align-current handle aligning a varying number of columns?

I'm attempting to write a rule for align-current for Robot Framework tests. Columns are delimited by multiple spaces in a row (I know, what an awful choice) and each row can have a varying number of ...
0
votes
1answer
117 views

how to get web-mode to ignore alignment in favor of indentation during method chaining?

when I write code (Javascript, specifically) in a web-mode buffer which chains methods across newlines: object.foo() .bar() web-mode seems to want to align it like this: object.foo() .bar()// ...
1
vote
0answers
440 views

The org-mode table alignment issue in right-to-left languages

I really enjoy writing bidirectional text in org-mode using Emacs as it supports the rt-to-left direction out of the box. However, when it comes to org tables alignment things become very unorganized. ...
3
votes
1answer
81 views

Update cc-style to use a mix of tabs and spaces, depending on context?

I'm looking for a way to mix tabs and spaces in my cc-styles. Whilst I question the sanity of this coding style, and wouldn't ever choose to use it had I the choice (seems other people share my view),...
2
votes
1answer
122 views

align (indent) in bibtex file

I have a bibtex file, and would like to have indentation as follows. @book{moon70:trees, AUTHOR = {John W. Moon}, TITLE = {Counting labelled trees}, YEAR = 1970, ...
5
votes
1answer
322 views

How to get align-regexp to help line up Markdown tables properly?

I am trying to line up a text table using align-regexp. A table, before alignment, looks like this: | Alpha | Bravo | Charlie | |-------|-------|---------| | Delta | Echo | Foxtrot | | Golf | Hotel | ...
2
votes
1answer
190 views

How to align grep output?

I use grep-mode for a set of files and wgrep (writable grep buffer) for editing them. The buffer usually looks like: I want to find a way to change the view like this: wgrep and compile-goto-error ...
2
votes
2answers
376 views

function to reshape a 1-column buffer list into N-columns with align-regexp

I wanted to display a list of strings in the emacs completing-read style, which displays a list of completion strings in a nicely aligned multi-column display. But I could not find an easy answer or ...
4
votes
1answer
56 views

How to contribute align rules

I've been working on align-rules for Fortran 90 so that the built-in align and align-current functions do something useful. What would be the best way to make this code available for others?
4
votes
1answer
345 views

How to make Emacs align-regexp work with leading spaces

If I try and use emacs C-u align-regexp on the below with \(\s-*\)| and 1 and 1 and y I get an incorrectly formatted result: Foobar Foobar foobar| foobar foobar | || Incorrectly formatted ...
0
votes
1answer
38 views

How to align based on capitalized words?

I have some SQL code in the following style: "CREATE TABLE IF NOT EXISTS test ( \n\ \ id INTEGER PRIMARY KEY, \n\ \ symbol TEXT NOT NULL, \n\ \ date TEXT NOT NULL, \n\ \ val DECIMAL(10, 2) NOT ...
11
votes
1answer
586 views

Align columns in Org mode table with Japanese fonts

How can I mix Japanese and English in the same org-mode table (that uses fixed-width fonts)? Something like: | m m m m m m | | | はどう デシウ | | | ハーフ | ハーフ | won't align. ...
6
votes
1answer
247 views

How align tabs inside block of string?

For example, I have the following code snippet: $query = 'SELECT SUM(T01.foobar) FROM db_foo.bar T01 WHERE T01.fooID = 1 AND T01.barID = 2 AND T01....
1
vote
1answer
32 views

Alignment not working on one machine, but working on others?

Alignment is not working for me on my Windows machine, but it is on my Centos machine. I want to understand why. I first noticed the problem when I turned on linum-mode. Here's what it looks like ...
3
votes
1answer
104 views

More useful vertical scrolling in emacs

I am trying to compare two log files, side by side in two emacs buffers. The logfiles are similar in context, but some have extra debug inserted. This makes simple use of pgup/pgdown painful as things ...
0
votes
0answers
100 views

Simple align-regexp example

I'm trying to align 4000 1 2 4000 1 2 11 1 44 => 11 1 44 1 0000 999 1 0000 999 as described at http://emacswiki.org/emacs/...
2
votes
2answers
1k views

Aligning text in Org-mode after refactoring or making changes

I use org-mode mainly to write extensive notes, but I'm finding it difficult to "justify" while refactoring or making changes. For example, suppose I have to make changes to the following text: * ...
1
vote
2answers
105 views

Recenter buffer when clickable text is clicked?

TASK 1: If I run C-h f goto-line(or any other function) it will open help buffer with clickable text like this. If I click this text, it will open that file in a new buffer and it will take to that ...
8
votes
1answer
250 views

Emacs align matrices

Since I find myself writing a lot of matrices and tables, I'm looking for a way to align numbers nicely in Emacs (similar to the align package in vim). I found that there is align-regexp, but I couldn'...
1
vote
1answer
615 views

How do I align a block of text into columns?

For instance, let's say I have the following block of code in a buffer: pattern TTF_STYLE_NORMAL = #{const TTF_STYLE_NORMAL} pattern TTF_STYLE_BOLD = #{const TTF_STYLE_BOLD} pattern TTF_STYLE_ITALIC =...
0
votes
0answers
488 views

Wrong indent in c-mode and c++-mode

In my coding style tabs used to indent and spaces for align. I've configure Emacs for this, but some times emacs places 4 spaces instead of tabulation in some blocks of code. If can be fixed by ...
7
votes
0answers
908 views

How to better align tags in Org Mode using variable-width font

I prefer using variable-width fonts in Emacs whenever I can. That said, Org Mode tags are horribly aligned when headings use variable-width fonts, even if the tags themselves use fixed-width fonts. Is ...
2
votes
2answers
627 views

Vertically aligning text in emacs

I am writing this mode where I only want to show one paragraph at a time. Ideally I'd like to show the paragraph in the center of the screen. Getting it horizontally centered is trivial, but I have ...
1
vote
1answer
67 views

the '(' is not aligned properly when using Mono font in Emacs

I am using Emacs to edit. all the ( in the picture are all at the same point on each line. But they are not aligned. Major Mode: verilog-mode Theme : manoj-dark
2
votes
0answers
95 views

How can I tell align-current to align multicolumn cells properly?

Can align-current also handle multicolumn cells properly? IT does not in my case, you can see in the following example, that the 2 columns called "Col" are placed above cell "c" in the editor after ...
1
vote
1answer
114 views

Auctex align-current does not properly align table in Aquamacs - what's wrong?

I'm working with very large tables (14 columns for example) and it's really difficult to find the right cell to edit. I discovered the align-current command and tried to use it on my table, but the ...
9
votes
1answer
1k views

How to right align region and/or line?

We can center text with M-x center-region and M-o M-s. Is there something similar for right-alignment? Example before: Item 0: value | Item 100:...
30
votes
2answers
4k views

Understanding of emacs align-regexp

I've read the Emacs documentation for align-regexp but still have difficulty in understanding how it works. What I'm talking about is its prefixed form C-uM-xalign-regexp, not the simple form M-xalign-...
15
votes
2answers
785 views

Is there an auto-align package or mode for Emacs?

There are times when I'm editing files (Puppet manifests, for example) where I want to align buffer contents on the fly. For example, I know that I can use align-regexp or align to align code like ...