Questions tagged [delimiters]
The delimiters tag has no usage guidance.
20
questions
3
votes
2
answers
225
views
Emacs Lisp to view text file like a table
I'd like to write a mode, or at least some Lisp functions, to view a tab-separated file like a table. What I mean is lines like this:
foo\t123\tbar
yabba dabba\t12345\treally long field here
Should ...
3
votes
2
answers
77
views
Determining number of left and right bracketing marks within region
I want to write a function that uses a selected region and counts the number of left and right bracketing marks (whether (), {}, [], <>).
I have started with this
(defun veak-count (region-...
1
vote
2
answers
49
views
How to customize the delimiter in the minor mode Hideshow for use with JSON data?
The documentation of hs-minor-mode explains:
In C mode and related modes, blocks are delimited by braces, while in Lisp mode they are delimited by parentheses.
I use the mode to collapse objects ...
0
votes
0
answers
89
views
Inheritance of font-lock-comment-delimiter-face
How does inheritance of font-lock-comment-delimiter-face work with font-lock-comment-face?
The following uses a different colour for the comment delimiter by setting the foreground colour to font-lock-...
0
votes
1
answer
90
views
show line number when matching parathenses/braces
I work with latex/other documents with long nested of texts/codes are enclosed by paratheses or braces, like this:
{
long blocks of latex or other materials
(
another long blocks of texts
...
0
votes
1
answer
84
views
Any existing function to fix comma-separated list in parens-pair?
I am looking a way to programatically fix invalidly formatted code for programming languages that use relatively simple list expression of elements separated by commas (ie, not in C++).
For example I'...
0
votes
2
answers
63
views
Lispy and Racket
I'm using lispy with Racket and having a tough time with some forms. Namely, if I with to a let or keyword argument I can't seem to type the inner [ character. For example, I want to define a ...
2
votes
1
answer
308
views
Add quotes or brackets around selection in doom-emacs
I used to use Spacemacs and it had this nifty feature where a selection could be bracketed with quotes, parentheses or any similar pair characters by simply pressing the character.
So UpdateJob could ...
1
vote
1
answer
29
views
Is there toggle-syntax package for parens, brackets, brokets, braces?
I rely on toggle-quotes (to switch between single and double quotes), but I'm not finding any available packages that can do the same for switching between pairs of ( [ { <. I'd expect it to cycle ...
3
votes
1
answer
71
views
How can I find corresponding balanced parentheses?
I have this LaTeX code:
\caption{Lorem ipsum dolor sit amet: foo), bar), baz) and qux) consectetuer adipiscing elit.}
I want to put a marker immediately before the first { and one immediately after ...
0
votes
0
answers
62
views
Highlight matching parenthesis, only in Lisp mode (and maybe a few similar modes)
is there a way to have the global minor mode show-paren-mode
functionality as a buffer-local minor mode? I love its behavior but only for Lisp.
Searching for a package I can see a number of close ...
1
vote
1
answer
424
views
How to find the matching bracket at a point in elisp?
What is a reliable way to find the matching balanced bracket (eg: {}, [], () in C or Python), which doesn't get confused by brackets in strings, or escaped brackets for e.g.
Example:
["Foo]" ?\] 0 [...
1
vote
0
answers
53
views
Test if I am inside a paired delimiter
I have been having a problem where I want an up-sexp command that treats paired delimiters like $ in LaTeX-mode just as if they were pairs of balanced parentheses. There are hacks I can use that get ...
5
votes
1
answer
535
views
Highlight matching quotes
Is it possible to highlight matching quotes as show-paren-mode does with parentheses? The characters I'm looking to highlight are "dumb" quotes, both single (Unicode: apostrophe, U+0027) and double (...
6
votes
7
answers
2k
views
Easily changing matching quotes
Not infrequently, I want to change the delimiters of a string from single quotes to double quotes, or vice versa. This is so annoying a process I wonder if there's an easier way.
What I do now is:
...
2
votes
1
answer
284
views
How to configure the delimiter for evil-search-word for C/C++ modes? [duplicate]
Using evil mode, pressing * runs evil-search-word-forward.
But for some reason C/C++ mode uses _ as a delimiter, meaning ID_FOO will only match the first term ID when searching for the next term.
...
6
votes
4
answers
635
views
How to do paredit-kill backwards?
Most everyone who uses paredit has used paredit-kill (i.e., C-k), which allows one to delete a line forwards whilst keeping delimiters balanced properly. But how does one do this in the reverse ...
3
votes
1
answer
2k
views
How do I match a closing bracket in Emacs lisp
I would think this was really simple. I am trying to match closing delimiters in Emacs Lisp regex. I can match {}()[ no problem, but I cannot match ]. I have been using re-builder and have tried "[\\}\...
7
votes
2
answers
500
views
Change field separator for sort-fields
sort-fields and sort-numeric-fields work great; but the field separator is whitespace. I would like to use a different delimiter (e.g.: [colon-char]).
I want this feature because I find myself ...
5
votes
2
answers
753
views
Getting electric-pair mode to behave more nicely around existing strings
Electric-pair-mode always tries to insert a closing delimiter after the opening one if nothing is selected. However, if you're placing delimiters around an existing something that you don't want to ...