Questions tagged [delimiters]

20 questions
7
votes
2 answers

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 resorting the passwd files records by UID via vipw. I…
ericx
  • 283
  • 1
  • 6
6
votes
7 answers

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: delete the opening or closing quote type the…
Sean
  • 929
  • 4
  • 13
6
votes
4 answers

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 direction? When one does C-0 C-k, which is something…
GDP2
  • 1,340
  • 9
  • 25
5
votes
1 answer

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 (Unicode: quotation mark, U+0022). Sometimes I get…
Arch Stanton
  • 1,525
  • 9
  • 22
5
votes
2 answers

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 select for some reason, this adds another keystroke…
bright-star
  • 839
  • 9
  • 17
3
votes
2 answers

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 display something like: | foo | 123 | bar…
Rob N
  • 547
  • 2
  • 12
3
votes
2 answers

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-start region-end) "todo Interactive functions…
Dilna
  • 1,173
  • 3
  • 10
3
votes
1 answer

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 its corresponding }. forward-list is my usual…
Onner Irotsab
  • 431
  • 2
  • 9
3
votes
1 answer

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 "[\\}\\)\\]]", "[\\}\\)]]", "[\\}\\)\\\]]",…
Prgrm.celeritas
  • 849
  • 6
  • 15
2
votes
1 answer

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 be converted to "UpdateJob" by selecting the name…
TheGeorgeous
  • 185
  • 10
2
votes
1 answer

How to configure the delimiter for evil-search-word for C/C++ modes?

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. How to configure these delimiter characters?
ideasman42
  • 8,375
  • 1
  • 28
  • 105
1
vote
2 answers

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 while reading JSON files. This works fine, because…
ceving
  • 1,308
  • 1
  • 14
  • 28
1
vote
1 answer

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 ) some text } In emacs, if e.g. I move…
underflow
  • 111
  • 3
1
vote
1 answer

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 between the four (and maybe /). Does it exist (yet)?
Micah Elliott
  • 221
  • 3
  • 6
1
vote
1 answer

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 2]] ^ ^ Input point. Return…
ideasman42
  • 8,375
  • 1
  • 28
  • 105
1
2